More compact config items by stashing away extra info in tooltips.

This commit is contained in:
Matthias Mees 2013-06-23 20:18:58 +02:00
parent f2e39bf9be
commit 37dfa061c4
4 changed files with 24 additions and 18 deletions

View File

@ -20,14 +20,14 @@
{if $item.guessedInput}
{if $item.type == 'bool'}
<fieldset class="clearfix {$zebra_class}">
<legend><span>{$item.title} <span>{$item.description}</span></span></legend>
<legend><span>{$item.title}{if $item.description} <span class="icon-info-circled" title="{$item.description|escape:"html"}" rel="tooltip"></span>{/if}</span></legend>
<div class="clearfix grouped">
{$item.guessedInput}
</div>
</fieldset>
{else}
<div class="clearfix {$zebra_class} form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}">
<label for="{$item.var}">{$item.title}<span>{$item.description}</span></label>
<label for="{$item.var}">{$item.title}{if $item.description} <span class="icon-info-circled" title="{$item.description|escape:"html"}" rel="tooltip"></span>{/if}</label>
{$item.guessedInput}
</div>
{/if}

View File

@ -19,7 +19,7 @@
</div>
<div class="form_field clearfix">
<label for="target_filename_1" class="uploadform_target_filename_label">{$CONST.SAVE_FILE_AS} <span>{$CONST.PLAIN_ASCII_NAMES}</span></label>
<label for="target_filename_1" class="uploadform_target_filename_label">{$CONST.SAVE_FILE_AS} <span class="icon-info-circled" title="{$CONST.PLAIN_ASCII_NAMES}" rel="tooltip"></span></label>
<input id="target_filename_1" class="uploadform_target_filename" name="serendipity[target_filename][1]" type="text" value="">
</div>

View File

@ -2,9 +2,7 @@
<hr>
{elseif $ctype == 'select'}
<div class="clearfix form_select">
<label for="serendipity_{$config_item}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</label>
{* Make sure id creation actually produces unique identifiers *}
<select id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]{($is_multi_select) ? '[]' : ''}" {($is_multi_select) ? 'multiple' : ''} {($is_multi_select && ($select_size > 0)) ? "size='{$select_size}'" : ''}>
{foreach $select AS $select_value => $select_desc}
@ -16,7 +14,7 @@
</div>
{elseif $ctype == 'radio'}
<fieldset>
<legend><span>{$cname}{if $cdesc != ''} <span>{$cdesc}</span>{/if}</span></legend>
<legend><span>{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</span></legend>
<div class="clearfix grouped">
{foreach $radio_button AS $r}
<div class="form_radio">
@ -29,17 +27,13 @@
</fieldset>
{elseif $ctype == 'string'}
<div class="clearfix form_field">
<label for="serendipity_{$config_item}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</label>
{* TODO: Make sure id creation actually produces unique identifiers *}
<input id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="{$input_type}" value="{$hvalue}">
</div>
{elseif (($ctype == 'html') || ($ctype == 'text'))}
<div class="clearfix form_area">
<label for="nuggets{$elcount}">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<label for="nuggets{$elcount}">{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</label>
<textarea id="nuggets{$elcount}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" rows="{$text_rows}">{$hvalue}</textarea>
</div>
@ -58,9 +52,7 @@
</div>
{elseif $ctype == 'media'}
<div class="clearfix form_field media_choose">
<label for="serendipity[{$postKey}][{$config_item}]">{$cname}
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
</label>
<label for="serendipity[{$postKey}][{$config_item}]">{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</label>
<input id="serendipity[{$postKey}][{$config_item}]" class="change_preview" name="serendipity[{$postKey}][{$config_item}]" type="text" data-configitem="{$config_item}" data-pmwidth="{$preview_width}" data-pmheight="{$preview_height}" value="{$value}">{* This should be input[type=file] … *}
@ -71,7 +63,7 @@
<script src="{serendipity_getFile file="admin/js/dragdrop.js"}"></script>
{/if}
<fieldset>
<legend><span>{$cname}{if $cdesc != ''} <span>{$cdesc}</span>{/if}</span></legend>
<legend><span>{$cname}{if $cdesc != ''} <span class="icon-info-circled" title="{$cdesc}" rel="tooltip"></span>{/if}</span></legend>
<input id="{$config_item}_value" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$value}">
<noscript>

View File

@ -482,7 +482,6 @@ form > a,
.block_level,
.form_multiselect label,
label > span,
legend > span > span,
#back_to_blog,
.msg_error,
.msg_success,
@ -500,6 +499,13 @@ legend > span > span,
display: block;
}
label > [class^="icon-"],
label > [class*=" icon-"],
legend > span > [class^="icon-"],
legend > span > [class*=" icon-"] {
display: inline-block;
}
.image_resize_hint p {
display: inline;
}
@ -1043,6 +1049,14 @@ summary {
color: #777;
}
label > [class^="icon-"],
label > [class*=" icon-"],
legend > span > [class^="icon-"],
legend > span > [class*=" icon-"] {
color: #444;
cursor: help;
}
/* LOGIN FORM
----------------------------------------------------------------- */