Spped up configuration display.

Since we now hide controls on no-js, we can skip some JS which
affected rendering performance.
This commit is contained in:
Matthias Mees 2013-06-22 11:14:18 +02:00
parent 01b390fcb7
commit f0b7d6631b
4 changed files with 3 additions and 5 deletions

View File

@ -11,7 +11,7 @@
{foreach $config as $category} {foreach $config as $category}
<div class="configuration_group"> <div class="configuration_group">
{if $config|@sizeof > 1} {if $config|@sizeof > 1}
<h3>{if $allowToggle}<a id="optionel{$category@iteration}" class="show_config_option" href="#el{$category@index}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-minus"></span> {$category.title}</a>{else}{$category.title}{/if}</h3> <h3>{if $allowToggle}<a id="optionel{$category@iteration}" class="show_config_option" href="#el{$category@index}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-plus"></span> {$category.title}</a>{else}{$category.title}{/if}</h3>
{/if} {/if}
<fieldset id="el{$category@index}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info"> <fieldset id="el{$category@index}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info">
<legend class="visuallyhidden">{$category.description}</legend> <legend class="visuallyhidden">{$category.description}</legend>

View File

@ -1,4 +1,3 @@
{* serendipity_plugins_admin.inc.php::serendipity_plugin_config() *}
{if $showSubmit_head} {if $showSubmit_head}
<div class="save_conf form_buttons"> <div class="save_conf form_buttons">
{if $postKey == "template"} {if $postKey == "template"}
@ -13,7 +12,7 @@
<div id="serendipity_config_options"> <div id="serendipity_config_options">
{foreach $config_groups AS $config_header => $config_groupkeys} {foreach $config_groups AS $config_header => $config_groupkeys}
<div class="configuration_group"> <div class="configuration_group">
<h3><a id="optionel{$config_groupkeys@iteration}" class="show_config_option" href="#el{$config_groupkeys@iteration}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-minus"></span> {$config_header}</a></h3> <h3><a id="optionel{$config_groupkeys@iteration}" class="show_config_option" href="#el{$config_groupkeys@iteration}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-plus"></span> {$config_header}</a></h3>
<fieldset id="el{$config_groupkeys@iteration}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info"> <fieldset id="el{$config_groupkeys@iteration}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info">
{foreach $config_groupkeys AS $config_groupkey} {foreach $config_groupkeys AS $config_groupkey}

View File

@ -713,7 +713,6 @@ function highlightComment(id, checkvalue) {
var $hasConfigOpts = $('body').has('#serendipity_config_options'); var $hasConfigOpts = $('body').has('#serendipity_config_options');
if($hasConfigOpts.size() > 0) { if($hasConfigOpts.size() > 0) {
$('.show_config_option > .icon-minus').removeClass('icon-minus').addClass('icon-plus');
var optsCollapsed = true; var optsCollapsed = true;
$('.show_config_option').click(function(e) { $('.show_config_option').click(function(e) {

View File

@ -1701,7 +1701,7 @@ form > .button_link:first-of-type {
} }
.no-js #show_config_all, .no-js #show_config_all,
.no-js .show_config_option .icon-minus, .no-js .show_config_option .icon-plus,
.no-js #reset_timestamp, .no-js #reset_timestamp,
.no-js .filters_toolbar, .no-js .filters_toolbar,
.no-js .invert_selection, .no-js .invert_selection,