Skip to content

Commit

Permalink
Fixes for RTE loading overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 3, 2015
1 parent 5780dfe commit e35264f
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions imp/js/compose.js
Expand Up @@ -526,13 +526,25 @@ var ImpCompose = {

RTELoading: function(show, notxt)
{
var loading = $('rteloading'),
opts = {
duration: 0.1,
queue: {
limit: 1,
scope: 'rteloading'
}
};

if (show) {
[ $('rteloading').down('SPAN') ].invoke(notxt ? 'hide' : 'show');
$('rteloading').clonePosition('composeMessageParent').appear({
duration: 0.1
});
loading.appear(Object.extend(opts, {
afterSetup: function() {
[ loading.down('SPAN') ].invoke(notxt ? 'hide' : 'show');
loading.clonePosition('composeMessageParent');
}
}));
} else {
$('rteloading').fade({ duration: 0.1 });
Effect.Queues.get('rteloading').invoke('cancel');
loading.fade(opts);
}
},

Expand Down Expand Up @@ -950,9 +962,8 @@ var ImpCompose = {
}

$('composeMessage').setStyle({ height: mah + 'px' });

if ($('rteloading').visible()) {
this.RTELoading(true);
if (this.rte) {
$('rteloading').clonePosition('composeMessageParent');
}
},

Expand Down

0 comments on commit e35264f

Please sign in to comment.