diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-08-01 16:59:06 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-08-01 16:59:06 +0000 |
commit | 4eb43c14060d0c70b7b199cc81193537309611b5 (patch) | |
tree | fb61740b4eb7a2a25b86427bcaf21d001a4abdda /admin/themes | |
parent | eae8b9c05184582c1f651cfd14f2161e11b6514e (diff) |
batch manager improvements/fixes:
- when refreshing photo set, start is set to 0 (otherwise if the new set is smaller that start, it looks like it is empty)
- correct positioning of thumbnails (width/height) is done in template instead of javascript (immediate instead on ready + no reflows)
- less space lost on batch manager page
- fix wrong page title in batch manager because of global variable $title overriden
- fix language keys in element_set_ranks (capital/lowercase issue)
git-svn-id: http://piwigo.org/svn/trunk@17289 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/themes/clear/theme.css | 4 | ||||
-rw-r--r-- | admin/themes/default/template/batch_manager_global.tpl | 78 | ||||
-rw-r--r-- | admin/themes/default/theme.css | 63 | ||||
-rw-r--r-- | admin/themes/roma/theme.css | 4 |
4 files changed, 66 insertions, 83 deletions
diff --git a/admin/themes/clear/theme.css b/admin/themes/clear/theme.css index 2a5003fc6..1eed49bc7 100644 --- a/admin/themes/clear/theme.css +++ b/admin/themes/clear/theme.css @@ -97,8 +97,6 @@ h3, .content, .throw, .row1 { background-color: #ddd; } UL.thumbnails span.wrap2:hover { background-color:#7CBA0F; color:#999; } UL.thumbnails span.wrap2 { - padding: 4px; - border-radius: 4px; background-color:#ddd; } @@ -111,7 +109,7 @@ TEXTAREA { cursor:text; font-size: 13px; } .tagSelected LABEL {color:black;} .content ul.categoryActions a img { margin-left: 10px; } -ul.thumbnails input { border:3px double #666; color:#666; font-size:10px; margin:0; background-color:#bbb; text-align: center;} +ul.thumbnails input { color:#666; font-size:10px; margin:0; background-color:#bbb; text-align: center;} INPUT.bigbutton:hover { background-color: #ddd; color:#0cc; border: 0; } .throw { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; } label { cursor:pointer } diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 7f5d82d1b..cce55082a 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -50,6 +50,7 @@ jQuery(document).ready(function() { $(this).click(function(event) {console.log(event.shiftKey);$(this).triggerHandler("shclick",event)}); }); } + $('ul.thumbnails').enableShiftClick(); }); {/literal}{/footer_script} @@ -481,17 +482,7 @@ $(document).ready(function() { checkPermitAction() }); -jQuery(window).load(function() { - var max_w=0, max_h=0; - $(".thumbnails img").each(function () { - max_w = Math.max(max_w, $(this).width() ); - max_h = Math.max(max_h, $(this).height() ); - }); - max_w += 10; - max_h += 35; - $("ul.thumbnails span, ul.thumbnails label").css('width', max_w+'px').css('height', max_h+'px'); - $('ul.thumbnails').enableShiftClick(); -}); + {/literal}{/footer_script} <div id="batchManagerGlobal"> @@ -499,6 +490,7 @@ jQuery(window).load(function() { <h2>{'Batch Manager'|@translate}</h2> <form action="{$F_ACTION}" method="post"> + <input type="hidden" name="start" value="{$START}"> <fieldset> <legend>{'Filter'|@translate}</legend> @@ -510,7 +502,7 @@ jQuery(window).load(function() { {'Predefined filter'|@translate} <select name="filter_prefilter"> {foreach from=$prefilters item=prefilter} - <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> + <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> {/foreach} </select> </li> @@ -528,9 +520,9 @@ jQuery(window).load(function() { <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}> {'Tags'|@translate} <select id="tagsFilter" name="filter_tags"> - {foreach from=$filter_tags item=tag} + {if isset($filter_tags)}{foreach from=$filter_tags item=tag} <option value="{$tag.id}">{$tag.name}</option> - {/foreach} + {/foreach}{/if} </select> <label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label> <label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label> @@ -546,7 +538,7 @@ jQuery(window).load(function() { </li> </ul> - <p class="actionButtons" style=""> + <p class="actionButtons"> <select id="addFilter"> <option value="-1">{'Add a filter'|@translate}</option> <option disabled="disabled">------------------</option> @@ -586,32 +578,34 @@ jQuery(window).load(function() { <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}> </p> - <ul class="thumbnails"> - {foreach from=$thumbnails item=thumbnail} - {if in_array($thumbnail.ID, $selection)} - {assign var='isSelected' value=true} - {else} - {assign var='isSelected' value=false} - {/if} - <li> - <span class="wrap1"> - <label> - <span class="wrap2{if $isSelected} thumbSelected{/if}"> - <div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> · <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div> - {if $thumbnail.LEVEL > 0} - <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em> - <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em> - {/if} - <span> - <img src="{$thumbnail.TN_SRC}" alt="{$thumbnail.FILE}" title="{$thumbnail.TITLE|@escape:'html'}" class="thumbnail"> - </span> - </span> - <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}> - </label> - </span> - </li> - {/foreach} - </ul> + <ul class="thumbnails"> + {html_style} +UL.thumbnails SPAN.wrap2{ldelim} + width: {$thumb_params->max_width()+2}px; +} +UL.thumbnails SPAN.wrap2 {ldelim} + height: {$thumb_params->max_height()+25}px; +} + {/html_style} + {foreach from=$thumbnails item=thumbnail} + {assign var='isSelected' value=$thumbnail.id|@in_array:$selection} + <li> + <span class="wrap1"> + <label> + <input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}> + <span class="wrap2{if $isSelected} thumbSelected{/if}"> + <div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> · <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div> + {if $thumbnail.level > 0} + <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em> + <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em> + {/if} + <img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}> + </span> + </label> + </span> + </li> + {/foreach} + </ul> {if !empty($navbar) } <div style="clear:both;"> @@ -713,7 +707,7 @@ jQuery(window).load(function() { <!-- del_tags --> <div id="action_del_tags" class="bulkAction"> -{$DEL_TAG_SELECTION} +{if !empty($DEL_TAG_SELECTION)}{$DEL_TAG_SELECTION}{/if} </div> <!-- author --> diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 688c07997..a2cb884cf 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -42,12 +42,13 @@ UL.thumbnails li.rank-of-image { float: left; background-color: #333; color: #666; - -moz-border-radius: 5px; + border-radius: 5px; display: block; - width: 104px; - height: 104px; + width: 120px; + height: 120px; cursor: move; - margin: 10px; + margin: 4px; + overflow: hidden; } .clipwrapper { position:relative; @@ -58,8 +59,7 @@ UL.thumbnails li.rank-of-image { .clip { position:absolute; } -UL.thumbnails li.rank-of-image input { -} + UL.thumbnails SPAN.wrap1 { margin: 5px; display: table-cell; display: inline-table; @@ -71,25 +71,28 @@ UL.thumbnails SPAN.wrap2 { margin: 0; /* important reset the margins */ display: table-cell; /* block prevents vertical-align here */ vertical-align: middle; /* Ok with Opera and Geko not IE6 */ + border-radius: 4px; +} +UL.thumbnails LABEL { + position: relative; + display: block; + border-bottom: none; } -UL.thumbnails LABEL { display: block; border-bottom: none; } + UL.thumbnails IMG { - margin-bottom: -4px; /* why ??? something wrong with Geko and Opera ignored by IE6*/ + vertical-align: middle; + margin-top: 12px; } -UL.thumbnails LABEL { position: relative; } + UL.thumbnails INPUT { - position: relative; /* <= Opera can handle relative here */ - top: -20px; -} -:root UL.thumbnails INPUT { /* hide from Opera */ - position: absolute; /* <= Opera hide 1 checkbox over 2 !!! */ + position: absolute; left: 2px; top: 2px; } UL.thumbnails .levelIndicatorB { -display:block; position:absolute; z-index:100;padding:0px 0 0 14px; color:black; font-weight:bold; font-size:120%; +display:block; position:absolute; z-index:100; padding:7px 0 0 2px; color:black; font-weight:bold; font-size:120%; } UL.thumbnails .levelIndicatorF { -display:block; position:absolute; z-index:101;padding:1px 0 0 15px; color:white; font-weight:bold; font-size:120%; +display:block; position:absolute; z-index:101; padding:8px 0 0 3px; color:white; font-weight:bold; font-size:120%; } /* default-layout.css */ @@ -297,7 +300,7 @@ text-align: left; font-size: 150%; font-weight: normal; font-style:italic; -padding: 8px 0 0 10px; +padding: 2px 0 0 10px; margin: 0; float:left; } @@ -306,7 +309,7 @@ float:left; #pwgHead A {color:#ccc;} #pwgHead A:hover {color:#fff;border-bottom:1px solid #fff} -#headActions {float:right; height:46px; line-height:46px; margin-right:10px;} +#headActions {float:right; height:36px; line-height:36px; margin-right:10px;} A { text-decoration:none; @@ -589,7 +592,7 @@ img.ui-datepicker-trigger { #pwgHead { background-color:#464646; - height:46px; + height: 36px; } html, body {height:100%; margin:0; padding:0;} @@ -603,11 +606,12 @@ html, body {height:100%; margin:0; padding:0;} position:absolute; bottom:0; width:100%; - height:46px; - background: url(images/logo.png) no-repeat 7px 8px; - background-color:#464646; + height: 34px; + line-height: 34px; + background-repeat: no-repeat; + background-position: 7px 2px; + background-color:#464646; color:#aaa; - line-height:46px; } #footer A {color:#ccc;} @@ -768,17 +772,6 @@ BODY { #thePopuphelpPage #pwgHead {display:none} #thePopuphelpPage #footer {display:none} -/* Set some sizes according to your maximum thumbnail width and height */ -UL.thumbnails SPAN, -UL.thumbnails SPAN.wrap2 A, -UL.thumbnails LABEL { - width: 140px; /* max thumbnail width + 2px */ -} -UL.thumbnails SPAN.wrap2 { - height: 140px; /* max thumbnail height + 2px */ -} - - .themeBox {display:inline-table; text-align:center; height:192px; background-color:#eee; margin:5px; -moz-border-radius:5px; overflow:hidden; } .themeBox IMG {border:1px solid white; margin:0 15px;} @@ -978,7 +971,7 @@ LEGEND { #batchManagerGlobal ul.thumbnails div.actions a {color:#fff;} #batchManagerGlobal ul.thumbnails div.actions a:hover {border-color:#fff;} #batchManagerGlobal ul.thumbnails span.wrap1:hover div.actions {display:block;} -#batchManagerGlobal #selectedMessage {padding:5px; -moz-border-radius:5px;-webkit-border-radius:5px;} +#batchManagerGlobal #selectedMessage {padding:5px; border-radius:5px;} #batchManagerGlobal #selectSet a {border-bottom:1px dotted;} #batchManagerGlobal #applyOnDetails {font-style:italic;} #batchManagerGlobal .actionButtons {text-align:left;} diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css index a1509ed1e..e6d9eea30 100644 --- a/admin/themes/roma/theme.css +++ b/admin/themes/roma/theme.css @@ -64,8 +64,6 @@ h3, .row2, .content { background-color: #222; } UL.thumbnails span.wrap2:hover { background-color#7CBA0F; color:#666; } UL.thumbnails span.wrap2 { - padding: 4px; - border-radius: 4px; background-color:#333; } @@ -80,7 +78,7 @@ TEXTAREA { cursor:text; font-size: 13px; } .tagSelection LI.tagSelected {background-color:#aaa;} .tagSelected LABEL {color:#000;} .content ul.categoryActions a img { margin-left: 10px; } -ul.thumbnails input { border:3px double #999; color:#999; font-size:10px; margin:0; background-color:#444; text-align: center;} +ul.thumbnails input { color:#999; font-size:10px; margin:0; background-color:#444; text-align: center;} INPUT[type="submit"]:hover , INPUT[type="reset"]:hover { cursor: pointer; } INPUT.bigbutton:hover { background-color: #222; color:#f33; border: 0; } .throw { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; color: #ff3363; } |