diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index dd56fa8e4..fd694534c 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -714,7 +714,7 @@ SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation ;'; $result = pwg_query($query); - $thumb_params = ImageStdParams::get_by_type(IMG_THUMB); + $thumb_params = ImageStdParams::get_by_type(IMG_SQUARE); // template thumbnail initialization while ($row = pwg_db_fetch_assoc($result)) { diff --git a/admin/themes/clear/theme.css b/admin/themes/clear/theme.css index 78b98881b..4404748a1 100644 --- a/admin/themes/clear/theme.css +++ b/admin/themes/clear/theme.css @@ -82,7 +82,7 @@ h3, .throw, .row1 { background-color: #ddd; } UL.thumbnails span.wrap2:hover { background-color:#7CBA0F; color:#999; } UL.thumbnails span.wrap2 { - background-color:#ddd; + background-color:transparent; } @@ -192,7 +192,7 @@ img.ui-datepicker-trigger{margin:-2px 10px 1px -2px;} .ui-slider .ui-slider-range { background:#aaa;border-radius:2px; } .ui-slider .ui-slider-handle { - background-color: #eee; + background-color: #ddd; border: 1px solid #aaa; border-radius: 3px; } @@ -243,38 +243,42 @@ UL.thumbnails li.rank-of-image {background-color: #ddd;} } #batchManagerGlobal .thumbnails li:hover .font-checkbox [class*="icon-check"]::before { - color:white; + color: #3C3C3C; + background-color: #fea744; + border: 2px solid #3C3C3C; } #batchManagerGlobal li.thumbSelected .font-checkbox [class*="icon-check"]::before { - color:white; + color: #3C3C3C; + background-color: #fea744; + border: 2px solid #3C3C3C; + display: block; } #batchManagerGlobal UL.thumbnails li:hover .wrap2 { - background-color: #ff7700; + background-color: transparent; color: #999; } #batchManagerGlobal .thumbSelected { background-color:transparent !important } #batchManagerGlobal .thumbSelected .wrap2 { - background-color: #444 !important; + background-color: transparent !important; } #batchManagerGlobal #selectedMessage { - background-color: #555; - color:white; + color: #FFA646; + font-weight: bold; } /* beta-test begins: specific changes on Batch Manager */ #batchManagerGlobal legend { - background-color:#ddd; color:#555; - padding:5px 10px; } #batchManagerGlobal fieldset { - margin-top:2em; + margin: 0; + margin-top: 30px; } /* beta-test ends */ @@ -666,7 +670,7 @@ table.dataTable thead th, table.dataTable.no-footer { } FORM#categoryOrdering p.albumTitle a { color: #5B5B5B; } -FORM#categoryOrdering p.albumActions a { border-left:1px solid #D6D6D6; } +FORM#categoryOrdering p.albumActions a { border-left:1px solid #D6D6D6; background-color: #E8E8E8;} .albumInfos {color: #999999;} FORM#categoryOrdering p.albumActions a:hover {background-color: #FFA844; color: #3A3A3A;} FORM#categoryOrdering p.albumActions .userSeparator {border: 1px solid #E1E1E1;} @@ -690,13 +694,60 @@ li.plupload_delete a {background: url("images/cancel.svg")!important; background li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important; background-size: cover!important;} .addAlbumEmpty {color: #3C3C3C;} +#permitAction p {background: #FFF;} #addAlbumForm input[name="category_name"] {border:none!important; margin-top: 5px!important;} #addAlbumForm input[name="category_name"]:focus {background-color: #DDDDDD;} .buttonSeparator {color: #3C3C3C;} #uploadForm li.plupload_droptext {background-color: #F5F5F5!important;} .addFilesButtonChanged {background-color: #E5E5E5;} + .addFilesButtonChanged:hover {background-color: #BBB;} +#checkActions a, .deleteDerivButtons a {background-color: #E8E8E8;} +#addFilter, #filterList select, .pictureLevels select {background-color: #FFF; color: #4E4E4E; border: 2px solid #7070704f !important;} +#filter_category .selectize-input.items.full.has-options.has-items, #filter_tags .selectize-input.items.not-full.has-options, +#filter_tags .selectize-input.items.not-full, #filter_search input, #action_associate .selectize-input.items.full.has-options.has-items, +#action_dissociate .selectize-input.items.full.has-options.has-items { + border: 2px solid #7070704f !important; + background: #FFF; + color: #3C3C3CBD; +} +#permitAction select {background-color: #FFF; color: #4E4E4E; border: 1px solid #787777a6;} +#action_associate a:last-child {background: #FFF; border: 1px solid #787777a6; box-shadow: none;} +#forbidAction, .selectionEmptyBlock {background-color: #f3f3f3;} +#action_title .large, #action_author .large {background-color: #FFF; color: #4E4E4E;} +#filter_dimension .slider-choice, #filter_filesize .slider-choice {background-color: #EEE; color: #777;} +#filter_dimension .slider-choice:hover, #filter_filesize .slider-choice:hover, .dimension-cancel:hover { + text-decoration: none; background-color: #ffa646 !important; color: initial; +} +#filterList .ui-slider .ui-slider-range {background: rgba(255,166,70, 0.9); margin-top: -1px; border: 1px solid #ffaf58;} +#filterList .ui-widget-content {border: 1px solid #EEE; background: #DDD;} +.navigationBar, .thumbnailsActionsNumber, .navigationBar a, +.navigationBar span, .thumbnailsActionsNumber a, .thumbnailsActionsNumber span { + background-color: #f9f9f9; border-radius: 10px; +} +.navigationBar a:hover, .thumbnailsActionsNumber a:hover {background-color: #ffd2a1;} +#batchManagerGlobal option[disabled] {background-color: #EEE;} +.dimension-cancel {background-color: #F8F8F8 !important;} +.pageNumberSelected {color: #FFF !important; font-weight: bold;} +.navigationBar span, .thumbnailsActionsNumber span { + color: #BBB; +} +#batchManagerGlobal .ui-state-default, #batchManagerGlobal .ui-widget-content .ui-state-default,#batchManagerGlobal .ui-widget-header .ui-state-default { + border: 1px solid #ffaf58; background: #ffaf58; +} +#batchManagerGlobal .ui-state-hover,#batchManagerGlobal .ui-widget-content .ui-state-hover, #batchManagerGlobal .ui-widget-header .ui-state-hover { + background: #ffaf58; +} +#batchManagerGlobal .ui-state-focus, #batchManagerGlobal .ui-widget-content .ui-state-focus,#batchManagerGlobal .ui-widget-header .ui-state-focus { + border: 1px solid #ffaf58; background: #ffaf58; +} +#batchManagerGlobal .ui-state-active, #batchManagerGlobal .ui-widget-content .ui-state-active,#batchManagerGlobal .ui-widget-header .ui-state-active { + background: #ffaf58; +} +#batchManagerGlobal .ui-slider-range.ui-widget-header.ui-corner-all {border: 1px solid #ffaf58;} +#batchManagerGlobal .font-checkbox.selected {color: #777;} + .icon-red { background-color: #ffcfcf; color: #ff5252; diff --git a/admin/themes/default/js/batchManagerGlobal.js b/admin/themes/default/js/batchManagerGlobal.js index ae05eb3ae..f7693c6ae 100644 --- a/admin/themes/default/js/batchManagerGlobal.js +++ b/admin/themes/default/js/batchManagerGlobal.js @@ -8,7 +8,7 @@ function filter_enable(filter) { $("input[type=checkbox][name="+filter+"_use]").prop("checked", true); /* forbid to select this filter in the addFilter list */ - $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled"); + $("#addFilter").find("option[value="+filter+"]").attr("disabled", "disabled"); } function filter_disable(filter) { @@ -19,7 +19,7 @@ function filter_disable(filter) { $("input[name="+filter+"_use]").prop("checked", false); /* give the possibility to show it again */ - $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled"); + $("#addFilter").find("option[value="+filter+"]").removeAttr("disabled"); } $(".removeFilter").addClass("icon-cancel-circled"); @@ -205,17 +205,17 @@ function getDerivativeUrls() { } function selectGenerateDerivAll() { - $("#action_generate_derivatives input[type=checkbox]").prop("checked", true); + $("#action_generate_derivatives input[type=checkbox]").prop("checked", true).trigger("change"); } function selectGenerateDerivNone() { - $("#action_generate_derivatives input[type=checkbox]").prop("checked", false); + $("#action_generate_derivatives input[type=checkbox]").prop("checked", false).trigger("change"); } function selectDelDerivAll() { - $("#action_delete_derivatives input[type=checkbox]").prop("checked", true); + $("#action_delete_derivatives input[type=checkbox]").prop("checked", true).trigger("change"); } function selectDelDerivNone() { - $("#action_delete_derivatives input[type=checkbox]").prop("checked", false); + $("#action_delete_derivatives input[type=checkbox]").prop("checked", false).trigger("change"); } /* sync metadatas or delete photos by blocks, with progress bar */ @@ -224,21 +224,11 @@ jQuery('#applyAction').click(function(e) { return true; } - /* TODO "delete" and "metadata" algorithms are highly similar, they should be merged */ - if (jQuery('[name="selectAction"]').val() == 'metadata') { e.stopPropagation(); jQuery('.bulkAction').hide(); jQuery('#regenerationText').html(lang.syncProgressMessage); - var maxRequests=1; - - var queuedManager = jQuery.manageAjax.create('queued', { - queue: true, - cacheResponse: false, - maxRequests: maxRequests - }); - elements = Array(); if (jQuery('input[name=setSelected]').is(':checked')) { @@ -275,12 +265,12 @@ jQuery('#applyAction').click(function(e) { (function(ids) { var thisBatchSize = ids.length; - queuedManager.add({ + jQuery.ajax({ url: "ws.php?format=json&method=pwg.images.syncMetadata", type:"POST", dataType: "json", data: { - pwg_token: jQuery("input[name=pwg_token]").val(), + pwg_token: jQuery("input[name=pwg_token").val(), image_id: ids }, success: function(data) { @@ -301,8 +291,6 @@ jQuery('#applyAction').click(function(e) { image_ids = Array(); } - - return false; } if (jQuery('[name="selectAction"]').val() == 'delete') { @@ -420,7 +408,7 @@ jQuery('#sync_md5sum').click(function(e) { var addBlockSize = Math.min( Number((jQuery('#md5sum_to_add').data('origin') / 2).toFixed()), - conf.checksum_compute_blocksize + 1000 ); add_md5sum_block(addBlockSize); @@ -433,7 +421,7 @@ function add_md5sum_block(blockSize){ type:"POST", dataType: "json", data: { - pwg_token: jQuery("input[name=pwg_token]").val(), + pwg_token: jQuery("input[name=pwg_token").val(), block_size: blockSize }, success:function(data) { @@ -445,7 +433,7 @@ function add_md5sum_block(blockSize){ var percent_done = 100 - percent_remaining; jQuery('#md5sum_added').html(percent_done); if (data.result.nb_no_md5sum > 0) { - add_md5sum_block(blockSize); + add_md5sum_block(); } else { // time to refresh the whole page @@ -483,7 +471,7 @@ function delete_orphans_block(blockSize) { type:"POST", dataType: "json", data: { - pwg_token: jQuery("input[name=pwg_token]").val(), + pwg_token: jQuery("input[name=pwg_token").val(), block_size: blockSize }, success:function(data) { diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 5134c8137..9f51b706b 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -1,5 +1,5 @@ {include file='include/datepicker.inc.tpl' load_mode='async'} -{include file='include/colorbox.inc.tpl' load_mode='footer'} +{include file='include/colorbox.inc.tpl' load_mode='async'} {include file='include/add_album.inc.tpl' load_mode='async'} {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} @@ -26,14 +26,8 @@ var lang = { AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}" }; -var conf = { - checksum_compute_blocksize: {$conf_checksum_compute_blocksize}, -}; - jQuery(document).ready(function() { - jQuery('.help-popin').colorbox({ width:"500px" }); - {* *} var tagsCache = new TagsCache({ serverKey: '{$CACHE_KEYS.tags}', @@ -138,6 +132,8 @@ $(document).ready(function() { } } + + $("[id^=action_]").hide(); $("select[name=selectAction]").change(function () { @@ -269,6 +265,7 @@ $(document).ready(function() { jQuery('#applyActionBlock').hide(); jQuery('select[name="selectAction"]').hide(); + jQuery('.permitActionListButton div').addClass('hidden'); jQuery('#regenerationMsg').show(); progress(); @@ -336,200 +333,220 @@ var sliders = {