I could've posted it as a patch, but I've changed a lot so I post the whole module. Maybe you should tag it as the next version.

Changelog:
* Lot of refactoring
* Fixed some bugs in tableofcontents.js
* Fixed multiple-tocs-bug
* Fixed incorrect-nesting-bug
* Corrected use of form_set_error()
* Corrected use of t()
* Added options as filter settings
* Added option to remove tocs from teasers

CommentFileSizeAuthor
#1 tableofcontents.zip14.64 KBcasey

Comments

casey’s picture

StatusFileSize
new14.64 KB

Oops forgot to upload my tableofcontents.zip

deviantintegral’s picture

This obviously isn't a patch, but I've used this to help guide other work I'm doing. In the future, try to submit individual patches for each feature, so they can individually tested: http://drupal.org/patch. It may be more work, but it really helps in testing.

Things from this which I would like to still do:

  • Lot of refactoring: I would like to implement _tableofcontents_settings() and _tableofcontents_validate_options() specifically. I'll open new issues in a minute.
  • Fixed multiple-tocs-bug: This would be great, but reading your code I don't see how or where it's done. Could you explain it please?
  • Added option to remove tocs from teasers: Nice! There's an issue for this over at 191683: prevent toc from appearing in teaser lists where I'll post a patch.

Could you also explain what you mean by "Fixed incorrect-nesting-bug"? If it's still an issue in the current -dev release, please post a new issue describing it. I'm closing this issue since all of the relevant changes have their own issues.

Thanks,
--Andrew

deviantintegral’s picture

Status: Needs review » Closed (fixed)