fix sidebar spinner
This commit is contained in:
parent
87e067f4c8
commit
0ae931ed57
2 changed files with 10 additions and 4 deletions
|
@ -73,5 +73,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.shareTabView .icon-loading-small {
|
.shareTabView .icon-loading-small {
|
||||||
margin-left: -30px;
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: white;
|
||||||
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
' {{/if}}' +
|
' {{/if}}' +
|
||||||
' {{#unless isCollection}}' +
|
' {{#unless isCollection}}' +
|
||||||
' <li data-share-type="{{shareType}}" data-share-with="{{shareWith}}" title="{{shareWith}}">' +
|
' <li data-share-type="{{shareType}}" data-share-with="{{shareWith}}" title="{{shareWith}}">' +
|
||||||
' <a href="#" class="unshare"><img class="svg" alt="{{unshareLabel}}" title="{{unshareLabel}}" src="{{unshareImage}}" /></a>' +
|
' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><img class="svg" alt="{{unshareLabel}}" title="{{unshareLabel}}" src="{{unshareImage}}" /></a>' +
|
||||||
' {{#if avatarEnabled}}' +
|
' {{#if avatarEnabled}}' +
|
||||||
' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
|
' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
|
||||||
' {{/if}}' +
|
' {{/if}}' +
|
||||||
|
@ -244,12 +244,14 @@
|
||||||
|
|
||||||
onUnshare: function(event) {
|
onUnshare: function(event) {
|
||||||
var $element = $(event.target);
|
var $element = $(event.target);
|
||||||
|
console.log($element);
|
||||||
|
|
||||||
if($element.hasClass('icon-loading-small')) {
|
var $loading = $element.siblings('.icon-loading-small').eq(0);
|
||||||
|
if(!$loading.hasClass('hidden')) {
|
||||||
// in process
|
// in process
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$element.empty().addClass('icon-loading-small');
|
$loading.removeClass('hidden');
|
||||||
|
|
||||||
var $li = $element.closest('li');
|
var $li = $element.closest('li');
|
||||||
var shareType = $li.data('share-type');
|
var shareType = $li.data('share-type');
|
||||||
|
|
Loading…
Reference in a new issue