Layout fixes for plugin configuration.
This commit is contained in:
parent
6bbbb6ac34
commit
0ec5a237dd
@ -23,5 +23,5 @@
|
||||
{else}
|
||||
<h2>{$CONST.CONFIGURATION}</h2>
|
||||
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_int"':'class="form_field"'}
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
||||
{/if}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{* … then again, hr has new meaning in HTML5. *}
|
||||
{/if}
|
||||
{if $ctype == 'select'}
|
||||
<div class="clearfix form_select">
|
||||
<div class="form_select">
|
||||
<label for="serendipity_{$config_item}">{$cname}
|
||||
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
|
||||
</label>
|
||||
@ -23,24 +23,21 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if $ctype == 'radio'}
|
||||
<div class="clearfix">
|
||||
<fieldset>
|
||||
<legend><span>{$cname}</span></legend>
|
||||
{if $cdesc != ''}<p>{$cdesc}</p>{/if}
|
||||
<div class="clearfix">
|
||||
{foreach $radio_button AS $r}
|
||||
<div class="form_radio">
|
||||
<input id="serendipity_plugin_{$r['id']}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="radio" value="{$r['value']}" {(!empty($r['checked'])) ? 'checked="checked"' : ''} title="{$r['index']|escape}">
|
||||
<label for="serendipity_plugin_{$r['id']}">{$r['index']}{* escapement is already done *}</label>
|
||||
{assign var="r" value="counter[0]"}
|
||||
</div>
|
||||
{/foreach}
|
||||
<fieldset>
|
||||
<legend><span>{$cname}{if $cdesc != ''} <span>{$cdesc}</span>{/if}</span></legend>
|
||||
<div class="clearfix">
|
||||
{foreach $radio_button AS $r}
|
||||
<div class="form_radio">
|
||||
<input id="serendipity_plugin_{$r['id']}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="radio" value="{$r['value']}" {(!empty($r['checked'])) ? 'checked="checked"' : ''} title="{$r['index']|escape}">
|
||||
<label for="serendipity_plugin_{$r['id']}">{$r['index']}{* escapement is already done *}</label>
|
||||
{assign var="r" value="counter[0]"}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{if $ctype == 'string'}
|
||||
<div class="clearfix form_field">
|
||||
<div class="form_field">
|
||||
<label for="serendipity_{$config_item}">{$cname}
|
||||
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
|
||||
</label>
|
||||
@ -49,7 +46,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if (($ctype == 'html') || ($ctype == 'text'))}
|
||||
<div class="clearfix form_area">
|
||||
<div class="form_area">
|
||||
<label for="nuggets{$elcount}">{$cname}
|
||||
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
|
||||
</label>
|
||||
@ -92,93 +89,88 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if $ctype == 'sequence'}
|
||||
<div class="clearfix">
|
||||
{if !$sequencejs_output}
|
||||
<script src="{serendipity_getFile file='dragdrop.js'}"></script>
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend><span>{$cname}</span></legend>
|
||||
{if $cdesc != ''}
|
||||
<p>{$cdesc}</p>
|
||||
{/if}
|
||||
<input id="{$config_item}_value" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$value}">
|
||||
<fieldset>
|
||||
<legend><span>{$cname}{if $cdesc != ''} <span>{$cdesc}</span>{/if}</span></legend>
|
||||
<input id="{$config_item}_value" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$value}">
|
||||
|
||||
<noscript>
|
||||
<!-- Replace standard submit button when using up/down submits -->
|
||||
<input name="SAVECONF" type="hidden" value="Save">
|
||||
</noscript>
|
||||
<noscript>
|
||||
<!-- Replace standard submit button when using up/down submits -->
|
||||
<input name="SAVECONF" type="hidden" value="Save">
|
||||
</noscript>
|
||||
|
||||
<ol id="{$config_item}" class="sequence_container pluginmanager_container">
|
||||
{foreach $order_id as $orid}
|
||||
<li id="{$orid['id']}" class="sequence_item pluginmanager_item_even">
|
||||
<div id="g{$orid['id']}" class="pluginmanager_grablet sequence_grablet">
|
||||
<a class="icon_link" href="#" title="Move"><span class="icon-move"></span><span class="visuallyhidden"> Move</span></a>{* i18n *}
|
||||
</div>
|
||||
{if $checkable}
|
||||
<div class="form_check">
|
||||
<input id="activate_{$orid['id']}" name="serendipity[{$postKey}][activate][{$config_item}][{$orid['id']}]" {(in_array($orid['id'], $store_order)) ? ' checked="checked" ' : ''} type="checkbox" onclick="sort_{$config_item}_Sequence();" value="true">
|
||||
{* TODO: needs label *}
|
||||
</div>
|
||||
<ol id="{$config_item}" class="sequence_container pluginmanager_container">
|
||||
{foreach $order_id as $orid}
|
||||
<li id="{$orid['id']}" class="sequence_item pluginmanager_item_even">
|
||||
<div id="g{$orid['id']}" class="pluginmanager_grablet sequence_grablet">
|
||||
<a class="icon_link" href="#" title="Move"><span class="icon-move"></span><span class="visuallyhidden"> Move</span></a>{* i18n *}
|
||||
</div>
|
||||
{if $checkable}
|
||||
<div class="form_check">
|
||||
<input id="activate_{$orid['id']}" name="serendipity[{$postKey}][activate][{$config_item}][{$orid['id']}]" {(in_array($orid['id'], $store_order)) ? ' checked="checked" ' : ''} type="checkbox" onclick="sort_{$config_item}_Sequence();" value="true">
|
||||
{* TODO: needs label *}
|
||||
</div>
|
||||
{/if}
|
||||
<span>{$items[{$orid['id']}]['display']}</span>
|
||||
{if isset($items[{$orid['id']}]['img'])}
|
||||
<img src="{$items[{$orid['id']}]['img']}">
|
||||
{/if}
|
||||
<noscript>
|
||||
<div>
|
||||
{if ($orid['sort_idx'] == 0)}
|
||||
|
||||
{else}
|
||||
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['oneup']}"><span class="icon-up-circled"></span><span class="visuallyhidden"> Move Up</span></button> {* i18n *}
|
||||
{/if}
|
||||
<span>{$items[{$orid['id']}]['display']}</span>
|
||||
{if isset($items[{$orid['id']}]['img'])}
|
||||
<img src="{$items[{$orid['id']}]['img']}">
|
||||
{if ($orid['sort_idx'] == $last)}
|
||||
|
||||
{else}
|
||||
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['onedown']}"><span class="icon-down-circled"></span><span class="visuallyhidden"> Move Down</span></button> {* i18n *}
|
||||
{/if}
|
||||
<noscript>
|
||||
<div>
|
||||
{if ($orid['sort_idx'] == 0)}
|
||||
|
||||
{else}
|
||||
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['oneup']}"><span class="icon-up-circled"></span><span class="visuallyhidden"> Move Up</span></button> {* i18n *}
|
||||
{/if}
|
||||
{if ($orid['sort_idx'] == $last)}
|
||||
|
||||
{else}
|
||||
<button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['onedown']}"><span class="icon-down-circled"></span><span class="visuallyhidden"> Move Down</span></button> {* i18n *}
|
||||
{/if}
|
||||
</div>
|
||||
</noscript>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
</div>
|
||||
</noscript>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
{if isset($no_sequence)}
|
||||
{$no_sequence}
|
||||
{/if}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
{*** Smarty 3 has a new auto literal option which is enabled by default.
|
||||
When the { is surrounded by whitespace it is not interpreted as smarty delimiter but literal. e.g. ' } ;'
|
||||
AS tests have proofed, ending javascript delimiters " } ;" and " };" and even "};" work fine as well. So back to origin. ***}
|
||||
<script>
|
||||
function sort_{$config_item}_Sequence() {
|
||||
//var seq = DragDrop.serData('{$config_item}_group', null);
|
||||
var seq = DragDrop.serData(null, '{$config_item}');
|
||||
var start = seq.indexOf("(");
|
||||
var end = seq.indexOf(")");
|
||||
seq = seq.slice((start + 1), end);
|
||||
checkable_seq = seq.split(",");
|
||||
out_seq = '';
|
||||
for (i in checkable_seq) {
|
||||
if (document.getElementById('activate_' + checkable_seq[i]) && !document.getElementById('activate_' + checkable_seq[i]).checked) {
|
||||
continue;
|
||||
} else {
|
||||
if (out_seq != '') {
|
||||
out_seq += ',';
|
||||
}
|
||||
out_seq += checkable_seq[i];
|
||||
<script>
|
||||
function sort_{$config_item}_Sequence() {
|
||||
//var seq = DragDrop.serData('{$config_item}_group', null);
|
||||
var seq = DragDrop.serData(null, '{$config_item}');
|
||||
var start = seq.indexOf("(");
|
||||
var end = seq.indexOf(")");
|
||||
seq = seq.slice((start + 1), end);
|
||||
checkable_seq = seq.split(",");
|
||||
out_seq = '';
|
||||
for (i in checkable_seq) {
|
||||
if (document.getElementById('activate_' + checkable_seq[i]) && !document.getElementById('activate_' + checkable_seq[i]).checked) {
|
||||
continue;
|
||||
} else {
|
||||
if (out_seq != '') {
|
||||
out_seq += ',';
|
||||
}
|
||||
out_seq += checkable_seq[i];
|
||||
}
|
||||
var order = document.getElementById("{$config_item}_value");
|
||||
order.value = out_seq;
|
||||
}
|
||||
var order = document.getElementById("{$config_item}_value");
|
||||
order.value = out_seq;
|
||||
}
|
||||
|
||||
function init_{$config_item}_Sequence() {
|
||||
var lst = document.getElementById("{$config_item}");
|
||||
DragDrop.makeListContainer(lst, '{$config_item}_group');
|
||||
lst.onDragOut = function() {
|
||||
sort_{$config_item}_Sequence();
|
||||
};
|
||||
}
|
||||
addLoadEvent(init_{$config_item}_Sequence);
|
||||
</script>
|
||||
</div>
|
||||
function init_{$config_item}_Sequence() {
|
||||
var lst = document.getElementById("{$config_item}");
|
||||
DragDrop.makeListContainer(lst, '{$config_item}_group');
|
||||
lst.onDragOut = function() {
|
||||
sort_{$config_item}_Sequence();
|
||||
};
|
||||
}
|
||||
addLoadEvent(init_{$config_item}_Sequence);
|
||||
</script>
|
||||
{/if}
|
||||
|
@ -15,7 +15,7 @@
|
||||
{/if}
|
||||
<form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post">
|
||||
{$formToken}
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'}
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
||||
<div class="form_buttons">
|
||||
<input name="SAVE" type="submit" value="{$CONST.SAVE}">
|
||||
</div>
|
||||
|
@ -17,18 +17,19 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if $showTable}
|
||||
<div id="serendipity_plugin_config">
|
||||
<div id="serendipity_plugin_config" class="configuration_group">
|
||||
{/if}
|
||||
{if is_array($config_groups)}
|
||||
<a id="optionall" class="button_link icon_link standalone" href="#" onClick="showConfigAll({sizeof($config_groups)}); return false" title="{$CONST.TOGGLE_ALL}">{$CONST.TOGGLE_ALL}</a>
|
||||
{foreach $config_groups AS $config_header => $config_groupkeys}
|
||||
<h2><a id="optionel{$config_groupkeys@iteration}" href="#" onClick="showConfig('el{$config_groupkeys@iteration}'); return false" title="{$CONST.TOGGLE_OPTION}">{$config_header}</a></h2>
|
||||
|
||||
<div id="el{$config_groupkeys@iteration}" class="plugin_optiongroup">
|
||||
<fieldset id="el{$config_groupkeys@iteration}" class="plugin_optiongroup">
|
||||
{foreach $config_groupkeys AS $config_groupkey}
|
||||
{$OUT_STACK[$config_groupkey]}
|
||||
{/foreach}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>document.getElementById('el{$config_groupkeys@iteration}').style.display = "none";</script>
|
||||
{/foreach}
|
||||
{* Is this really necessary? What for? *}
|
||||
|
@ -70,7 +70,7 @@
|
||||
{$formToken}
|
||||
{if $adminAction == 'edit'}{if $create_permission}<input name="serendipity[user]" type="hidden" value="{$from.authorid}">{/if}{/if}
|
||||
<h3>{if $adminAction == 'edit'}{if $no_create_permission}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{else}{if $create_permission}{$CONST.EDIT}{else}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{/if}{/if}{else}{$CONST.CREATE}{/if}</h3>
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'}
|
||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
||||
<div class="form_buttons">
|
||||
{if $adminAction == 'edit'}
|
||||
<input name="SAVE_EDIT" type="submit" value="{$CONST.SAVE}">
|
||||
|
@ -447,7 +447,8 @@ legend > span > span,
|
||||
#template_options .form_select label,
|
||||
#template_options .form_field label,
|
||||
.configuration_group .form_select label,
|
||||
.configuration_group .form_field label { display: block; }
|
||||
.configuration_group .form_field label,
|
||||
.configuration_group .form_area label { display: block; }
|
||||
|
||||
.image_resize_hint p { display: inline; }
|
||||
|
||||
@ -1041,6 +1042,7 @@ summary {
|
||||
#template_options .form_field input,
|
||||
.configuration_group .form_select select,
|
||||
.configuration_group .form_field input,
|
||||
.configuration_group .form_area textarea,
|
||||
#uploadform .form_select select,
|
||||
#uploadform .form_field input { width: 100%; }
|
||||
|
||||
@ -1364,7 +1366,8 @@ form > .button_link:first-of-type { margin-top: 0; }
|
||||
#template_options .form_select select,
|
||||
#template_options .form_field input,
|
||||
.configuration_group .form_select select,
|
||||
.configuration_group .form_field input { max-width: 320px; }
|
||||
.configuration_group .form_field input,
|
||||
.configuration_group .form_area textarea { max-width: 320px; }
|
||||
}
|
||||
|
||||
|
||||
@ -1421,14 +1424,18 @@ form > .button_link:first-of-type { margin-top: 0; }
|
||||
#template_options fieldset>.clearfix,
|
||||
.configuration_group .form_select label,
|
||||
.configuration_group .form_field label,
|
||||
.configuration_group .form_area label,
|
||||
.configuration_group .form_select select,
|
||||
.configuration_group .form_field input,
|
||||
.configuration_group .form_area textarea,
|
||||
.configuration_group fieldset>fieldset legend,
|
||||
.configuration_group fieldset>fieldset .clearfix,
|
||||
#uploadform .form_select label,
|
||||
#uploadform .form_field label,
|
||||
#uploadform .form_select select,
|
||||
#uploadform .form_field input {
|
||||
#uploadform .form_field input,
|
||||
#serendipity_plugin_config fieldset legend,
|
||||
#serendipity_plugin_config fieldset>.clearfix {
|
||||
float: left;
|
||||
margin-right: 2%;
|
||||
width: 48%;
|
||||
@ -1438,6 +1445,7 @@ form > .button_link:first-of-type { margin-top: 0; }
|
||||
#template_options .form_field input,
|
||||
.configuration_group .form_select select,
|
||||
.configuration_group .form_field input,
|
||||
.configuration_group .form_area textarea,
|
||||
#uploadform .form_select select,
|
||||
#uploadform .form_field input { max-width: 48%; }
|
||||
|
||||
@ -1445,12 +1453,14 @@ form > .button_link:first-of-type { margin-top: 0; }
|
||||
|
||||
.configuration_group .form_select,
|
||||
.configuration_group .form_field,
|
||||
.configuration_group .form_area,
|
||||
.configuration_group fieldset>fieldset,
|
||||
#template_select .odd,
|
||||
.media_pane .odd { clear: left; }
|
||||
|
||||
.configuration_group .form_select,
|
||||
.configuration_group .form_field,
|
||||
.configuration_group .form_area,
|
||||
.configuration_group fieldset>fieldset,
|
||||
#serendipityScaleImg,
|
||||
.media_file header { overflow: hidden; }
|
||||
@ -1537,7 +1547,7 @@ form > .button_link:first-of-type { margin-top: 0; }
|
||||
}
|
||||
|
||||
#moreFilter .left,
|
||||
#serendipity_comment .form_tarea { clear: both; }
|
||||
#serendipity_comment .form_area { clear: both; }
|
||||
|
||||
#main_menu { width: 23%; }
|
||||
.lt-ie8 #main_menu { width: 22.5%; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user