Skip to content

Commit

Permalink
small fix for loader opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
webber12 committed Apr 10, 2015
1 parent 6eb29c9 commit 7c5a427
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions assets/snippets/eFilter/html/css/eFilter.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
.eFiltr .fltr_colors label.disabled{opacity:0.5;cursor:default !important;}
.eFiltr .fltr_colors label input{display:none;}

#eFiltr_results{position:relative;}
#eFiltr_results .eFiltr_loader{position:absolute;top:10px;left:50%;margin-left:-32px;z-index:10;width:64px;height:64px;background:url(loader.GIF) 0 0 no-repeat;display:none;}
#eFiltr_results_wrapper{position:relative;min-height:64px;}
#eFiltr_results{}
#eFiltr_results_wrapper .eFiltr_loader{position:absolute;top:10px;left:50%;margin-left:-32px;z-index:10;width:64px;height:64px;background:url(loader.GIF) 0 0 no-repeat;display:none;}
5 changes: 3 additions & 2 deletions assets/snippets/eFilter/html/js/eFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ $(document).on("submit", "form#eFiltr", function(e){
type: "GET",
beforeSend:function(){
$("#eFiltr").css({'opacity':'0.5'});
$("#eFiltr_results").css({'opacity':'0.5'}).find(".eFiltr_loader").show();
$("#eFiltr_results_wrapper .eFiltr_loader").show();
$("#eFiltr_results").css({'opacity':'0.5'});
if (typeof(beforeFilterSend) == 'function') {
beforeFilterSend(_form);
}
Expand All @@ -28,7 +29,7 @@ $(document).on("submit", "form#eFiltr", function(e){
var new_form = $(msg).find("#eFiltr").html();
$("#eFiltr").html(new_form).css({'opacity':'1'});
var new_result = $(msg).find("#eFiltr_results").html();
$("#eFiltr_results .eFiltr_loader").hide();
$("#eFiltr_results_wrapper .eFiltr_loader").hide();
$("#eFiltr_results").html(new_result).css({'opacity':'1'});
if (typeof(afterFilterComplete) == 'function') {
afterFilterComplete(_form);
Expand Down
2 changes: 1 addition & 1 deletion install/assets/snippets/snippet.eFilterResult.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $params['tpl'] = $tovarChunk;

$out = '';
$pid = isset($pid) ? $pid : $modx->documentIdentifier;
$params['ownerTPL'] = isset($ownerTPL) ? $ownerTPL :'@CODE: <div id="eFiltr_results"><div class="eFiltr_loader"></div>[+dl.wrap+][+pages+]</div>';
$params['ownerTPL'] = isset($ownerTPL) ? $ownerTPL :'@CODE: <div id="eFiltr_results_wrapper"><div class="eFiltr_loader"></div><div id="eFiltr_results">[+dl.wrap+][+pages+]</div></div>';
if ($ids) {
$params['documents'] = $ids;
unset($params['parents']);
Expand Down

0 comments on commit 7c5a427

Please sign in to comment.