diff --git a/tocbot.admin.inc b/tocbot.admin.inc index 9421455..2fb6b70 100644 --- a/tocbot.admin.inc +++ b/tocbot.admin.inc @@ -22,20 +22,23 @@ function tocbot_config_form($form, $form_state) { $form['moduleSettings']['tocbot_extrabodyclass'] = array( '#type' => 'textfield', '#title' => t('Body class'), - '#description' => t('Additional body class for pages with a Tocbot block.'), + '#description' => t('Additional body class for pages with a Tocbot block.
+ Default: toc-is-active'), '#default_value' => $config->get('tocbot_extrabodyclass'), ); $form['moduleSettings']['tocbot_tocTitle'] = array( '#type' => 'textfield', '#title' => t('TOC title'), - '#description' => t('A title for the table of contents. Leave blank for none.'), + '#description' => t('A title for the table of contents. Leave blank for none.
+ Default: Contents'), '#default_value' => $config->get('tocbot_tocTitle'), ); $form['moduleSettings']['tocbot_minActivate'] = array( '#type' => 'textfield', '#title' => t('Minimum number of headings'), '#description' => t('Displays the Tocbot block only on pages where the - number of headings is greater than or equal to this value.'), + number of headings is greater than or equal to this value.
+ Default: 3'), '#default_value' => $config->get('tocbot_minActivate'), ); $form['moduleSettings']['tocbot_createAutoIds'] = array( @@ -43,7 +46,8 @@ function tocbot_config_form($form, $form_state) { '#title' => t('Create automatic IDs'), '#description' => t('Use JavaScript to create automatic IDs for headings. Disable if you want to create your IDs otherwise, e.g. manually or using - a text filter module.'), + a text filter module.
+ Default: Enabled'), '#default_value' => $config->get('tocbot_createAutoIds'), ); @@ -61,136 +65,157 @@ function tocbot_config_form($form, $form_state) { '#title' => t('tocSelector'), '#description' => t('Class of the table of contents wrapper. When you use the Tocbot block, set to .js-toc-block. Alternatively, set an - unique class and place an empty div with that class in your theme template.'), + unique class and place an empty div with that class in your theme template.
+ Default: .js-toc-block'), '#default_value' => $config->get('tocbot_tocSelector'), ); $form['tocbot_jsSettings']['tocbot_contentSelector'] = array( '#type' => 'textfield', '#title' => t('contentSelector'), '#description' => t('Where to grab the headings to build the table of - contents.'), + contents.
+ Default: .l-content'), '#default_value' => $config->get('tocbot_contentSelector'), ); $form['tocbot_jsSettings']['tocbot_headingSelector'] = array( '#type' => 'textfield', '#title' => t('headingSelector'), - '#description' => t('Comma and space seperated h2, h3, h4, h5, h6'), + '#description' => t('Separate elements by comma and space.
+ Default: h2, h3, h4, h5, h6'), '#default_value' => $config->get('tocbot_headingSelector'), ); $form['tocbot_jsSettings']['tocbot_ignoreSelector'] = array( '#type' => 'textfield', '#title' => t('ignoreSelector'), - '#description' => t('Headings that match the ignoreSelector will be skipped.'), + '#description' => t('Headings that match the ignoreSelector will be skipped.
+ Default: .js-toc-ignore'), '#default_value' => $config->get('tocbot_ignoreSelector'), ); $form['tocbot_jsSettings']['tocbot_linkClass'] = array( '#type' => 'textfield', '#title' => t('linkClass'), - '#description' => t('Main class to add to links.'), + '#description' => t('Main class to add to links.
+ Default: toc-link'), '#default_value' => $config->get('tocbot_linkClass'), ); $form['tocbot_jsSettings']['tocbot_extraLinkClasses'] = array( '#type' => 'textfield', '#title' => t('extraLinkClasses'), - '#description' => t('Extra classes to add to links.'), + '#description' => t('Extra classes to add to links.
+ Default: Empty'), '#default_value' => $config->get('tocbot_extraLinkClasses'), ); $form['tocbot_jsSettings']['tocbot_activeLinkClass'] = array( '#type' => 'textfield', '#title' => t('activeLinkClass'), '#description' => t('Class to add to active links, the link corresponding - to the top most heading on the page.'), + to the top most heading on the page.
+ Default: is-active-link'), '#default_value' => $config->get('tocbot_activeLinkClass'), ); $form['tocbot_jsSettings']['tocbot_listClass'] = array( '#type' => 'textfield', '#title' => t('listClass'), - '#description' => t('Main class to add to lists.'), + '#description' => t('Main class to add to lists.
+ Default: toc-list'), '#default_value' => $config->get('tocbot_listClass'), ); $form['tocbot_jsSettings']['tocbot_extraListClasses'] = array( '#type' => 'textfield', '#title' => t('extraListClasses'), - '#description' => t('Extra classes to add to lists.'), + '#description' => t('Extra classes to add to lists.
+ Default: Empty'), '#default_value' => $config->get('tocbot_extraListClasses'), ); $form['tocbot_jsSettings']['tocbot_isCollapsedClass'] = array( '#type' => 'textfield', '#title' => t('isCollapsedClass'), - '#description' => t('Class that gets added when a list should be collapsed.'), + '#description' => t('Class that gets added when a list should be collapsed.
+ Default: is-collapsed'), '#default_value' => $config->get('tocbot_isCollapsedClass'), ); $form['tocbot_jsSettings']['tocbot_collapsibleClass'] = array( '#type' => 'textfield', '#title' => t('collapsibleClass'), - '#description' => t('Class that gets added when a list is collapsible.'), + '#description' => t('Class that gets added when a list is collapsible.
+ Default: is-collapsible'), '#default_value' => $config->get('tocbot_collapsibleClass'), ); $form['tocbot_jsSettings']['tocbot_listItemClass'] = array( '#type' => 'textfield', '#title' => t('listItemClass'), - '#description' => t('Class to add to list items.'), + '#description' => t('Class to add to list items.
+ Default: toc-list-item'), '#default_value' => $config->get('tocbot_listItemClass'), ); $form['tocbot_jsSettings']['tocbot_collapseDepth'] = array( '#type' => 'textfield', '#title' => t('collapseDepth (number)'), - '#description' => t('Class to add to list items.'), + '#description' => t('How many heading levels should not be collapsed. Number 6 + will show everything since there are not more than 6 heading levels. Number 0 + will collapse all sections, and they will open and close as you scroll to them.
+ Default: 0'), '#default_value' => $config->get('tocbot_collapseDepth'), ); $form['tocbot_jsSettings']['tocbot_orderedList'] = array( '#type' => 'checkbox', '#title' => t('orderedList'), - '#description' => t('Generate ordered (ol) instead of unordered lists (ul).'), + '#description' => t('Generate ordered (ol) instead of unordered lists (ul).
+ Default: Disabled'), '#default_value' => $config->get('tocbot_orderedList'), ); $form['tocbot_jsSettings']['tocbot_scrollSmooth'] = array( '#type' => 'checkbox', '#title' => t('scrollSmooth'), - '#description' => t('Smooth scrolling enabled.'), + '#description' => t('Smooth scrolling.
+ Default: Enabled'), '#default_value' => $config->get('tocbot_scrollSmooth'), ); $form['tocbot_jsSettings']['tocbot_scrollSmoothDuration'] = array( '#type' => 'textfield', - '#title' => t('scrollSmoothDuration (number)'), - '#description' => t('Smooth scroll duration.'), + '#title' => t('scrollSmoothDuration'), + '#description' => t('Smooth scroll duration.
+ Default: 420'), '#default_value' => $config->get('tocbot_scrollSmoothDuration'), ); $form['tocbot_jsSettings']['tocbot_throttleTimeout'] = array( '#type' => 'textfield', - '#title' => t('throttleTimeout (number)'), + '#title' => t('throttleTimeout'), '#description' => t('Timeout between events firing to make sure its not too - rapid (for performance reasons)'), + rapid (for performance reasons).
+ Default: 50'), '#default_value' => $config->get('tocbot_throttleTimeout'), ); $form['tocbot_jsSettings']['tocbot_positionFixedSelector'] = array( '#type' => 'textfield', '#title' => t('positionFixedSelector'), '#description' => t('Specify a selector to make the table of contents fixed - after scrolling down. Default: .js-toc-block, which is the same - default value as in the "tocSelector" setting above.'), + after scrolling down.
+ Default: .js-toc-block (same as "tocSelector" at top of the JavaScript settings)'), '#default_value' => $config->get('tocbot_positionFixedSelector'), ); $form['tocbot_jsSettings']['tocbot_positionFixedClass'] = array( '#type' => 'textfield', '#title' => t('positionFixedClass'), '#description' => t('Fixed position class to add to make sidebar fixed after - scrolling down past the fixedSidebarOffset.'), + scrolling down past the fixedSidebarOffset.
+ Default: is-position-fixed'), '#default_value' => $config->get('tocbot_positionFixedClass'), ); $form['tocbot_jsSettings']['tocbot_fixedSidebarOffset'] = array( '#type' => 'textfield', '#title' => t('fixedSidebarOffset'), - '#description' => t('fixedSidebarOffset can be any number but by default - is set to auto which sets the fixedSidebarOffset to the sidebar elements - offsetTop from the top of the document on init.'), + '#description' => t('Can be any number. The default tries to set the offset + to the sidebar elements offsetTop from the top of the document on init.
+ Default: auto'), '#default_value' => $config->get('tocbot_fixedSidebarOffset'), ); $form['tocbot_jsSettings']['tocbot_includeHtml'] = array( '#type' => 'checkbox', '#title' => t('includeHtml'), - '#description' => t('includeHtml can be set to true to include the HTML - markup from the heading node instead of just including the textContent.'), + '#description' => t('Include the HTML markup from the heading node + instead of just including the textContent.
+ Default: Disabled'), '#default_value' => $config->get('tocbot_includeHtml'), );