diff --git a/sites/all/themes/unl_wdn/codemirror/unl.js b/sites/all/themes/unl_wdn/codemirror/unl.js index 36910a53bdd8aac740a59e47d0a981fd57dcec5d..7d3912b1f015e314457d2f073fecc1e4e6051ecb 100644 --- a/sites/all/themes/unl_wdn/codemirror/unl.js +++ b/sites/all/themes/unl_wdn/codemirror/unl.js @@ -1,5 +1,5 @@ /** - * Adds links to enable syntax highlighting to CSS and JS textareas + * Adds links to enable syntax highlighting to CSS and JS textareas * under admin/appearance/settings/unl_wdn * This code from cpn (Code Per Node) module. */ @@ -30,6 +30,7 @@ }); $(this).data('editor', editor); $(this).text(Drupal.t('Disable syntax highlighting')).addClass('enabled'); + $.cookie('codeHighlight', true); } // Disable @@ -37,10 +38,16 @@ $(this).data('editor').toTextArea(); $grippie.show(); $(this).text(Drupal.t('Enable syntax highlighting')).removeClass('enabled'); + $.cookie('codeHighlight', null); } return false; }); + // Enable on page load if cookie is set + if ($.cookie('codeHighlight')) { + $('.codemirror-toggle').click(); + } + } }; diff --git a/sites/all/themes/unl_wdn/theme-settings.php b/sites/all/themes/unl_wdn/theme-settings.php index 121fb55a2ff7cae2caa3ff80be6aed11d5d56a50..2d057fb1d494ef6d1e90bdc5d9ad972e986026bc 100644 --- a/sites/all/themes/unl_wdn/theme-settings.php +++ b/sites/all/themes/unl_wdn/theme-settings.php @@ -103,7 +103,7 @@ function unl_wdn_form_system_theme_settings_alter(&$form, &$form_state) { '#title' => t('Advanced settings'), 'sidebar_first_width' => array( '#type' => 'textfield', - '#title' => t('Sidebar first Grid Size'), + '#title' => t('Sidebar first grid size'), '#default_value' => theme_get_setting('sidebar_first_width'), '#description' => t('Enter only the numeral, for grid4 just enter 4.'), ),