[DE mobile] Fixed display blocked preloader.
This commit is contained in:
parent
e2058ff642
commit
a7cf60048e
|
@ -333,7 +333,7 @@ define([
|
|||
} else {
|
||||
_.delay(function () {
|
||||
$(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask);
|
||||
}, 200);
|
||||
}, 300);
|
||||
}
|
||||
|
||||
if (id==Asc.c_oAscAsyncAction['Save'] && (!me._state.fastCoauth || me._state.usersCount<2)) {
|
||||
|
@ -342,93 +342,99 @@ define([
|
|||
},
|
||||
|
||||
setLongActionView: function(action) {
|
||||
var title = '', text = '';
|
||||
var me = this,
|
||||
title = '',
|
||||
text = '';
|
||||
|
||||
switch (action.id) {
|
||||
case Asc.c_oAscAsyncAction['Open']:
|
||||
title = this.openTitleText;
|
||||
text = this.openTextText;
|
||||
title = me.openTitleText;
|
||||
text = me.openTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
this._state.isSaving = new Date();
|
||||
title = this.saveTitleText;
|
||||
text = this.saveTextText;
|
||||
me._state.isSaving = new Date();
|
||||
title = me.saveTitleText;
|
||||
text = me.saveTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
||||
title = this.loadFontsTitleText;
|
||||
text = this.loadFontsTextText;
|
||||
title = me.loadFontsTitleText;
|
||||
text = me.loadFontsTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
||||
title = this.loadImagesTitleText;
|
||||
text = this.loadImagesTextText;
|
||||
title = me.loadImagesTitleText;
|
||||
text = me.loadImagesTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['LoadFont']:
|
||||
title = this.loadFontTitleText;
|
||||
text = this.loadFontTextText;
|
||||
title = me.loadFontTitleText;
|
||||
text = me.loadFontTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['LoadImage']:
|
||||
title = this.loadImageTitleText;
|
||||
text = this.loadImageTextText;
|
||||
title = me.loadImageTitleText;
|
||||
text = me.loadImageTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['DownloadAs']:
|
||||
title = this.downloadTitleText;
|
||||
text = this.downloadTextText;
|
||||
title = me.downloadTitleText;
|
||||
text = me.downloadTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Print']:
|
||||
title = this.printTitleText;
|
||||
text = this.printTextText;
|
||||
title = me.printTitleText;
|
||||
text = me.printTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['UploadImage']:
|
||||
title = this.uploadImageTitleText;
|
||||
text = this.uploadImageTextText;
|
||||
title = me.uploadImageTitleText;
|
||||
text = me.uploadImageTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
||||
title = this.applyChangesTitleText;
|
||||
text = this.applyChangesTextText;
|
||||
title = me.applyChangesTitleText;
|
||||
text = me.applyChangesTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||
title = this.savePreparingText;
|
||||
text = this.savePreparingTitle;
|
||||
title = me.savePreparingText;
|
||||
text = me.savePreparingTitle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
||||
title = this.mailMergeLoadFileText;
|
||||
text = this.mailMergeLoadFileTitle;
|
||||
title = me.mailMergeLoadFileText;
|
||||
text = me.mailMergeLoadFileTitle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['DownloadMerge']:
|
||||
title = this.downloadMergeTitle;
|
||||
text = this.downloadMergeText;
|
||||
title = me.downloadMergeTitle;
|
||||
text = me.downloadMergeText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['SendMailMerge']:
|
||||
title = this.sendMergeTitle;
|
||||
text = this.sendMergeText;
|
||||
title = me.sendMergeTitle;
|
||||
text = me.sendMergeText;
|
||||
break;
|
||||
|
||||
case ApplyEditRights:
|
||||
title = this.txtEditingMode;
|
||||
text = this.txtEditingMode;
|
||||
title = me.txtEditingMode;
|
||||
text = me.txtEditingMode;
|
||||
break;
|
||||
|
||||
case LoadingDocument:
|
||||
title = this.loadingDocumentTitleText;
|
||||
text = this.loadingDocumentTextText;
|
||||
title = me.loadingDocumentTitleText;
|
||||
text = me.loadingDocumentTextText;
|
||||
break;
|
||||
}
|
||||
|
||||
if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
|
||||
this.loadMask = uiApp.showPreloader(title);
|
||||
if (me.loadMask && $(me.loadMask).hasClass('modal-in')) {
|
||||
$$(me.loadMask).find('.modal-title').text(title);
|
||||
} else {
|
||||
me.loadMask = uiApp.showPreloader(title);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// this.getApplication().getController('Statusbar').setStatusCaption(text);
|
||||
|
|
|
@ -45,7 +45,7 @@ define([
|
|||
], function (core) {
|
||||
'use strict';
|
||||
|
||||
DE.Controllers.AddContainer = Backbone.Controller.extend((function() {
|
||||
DE.Controllers.AddContainer = Backbone.Controller.extend(_.extend((function() {
|
||||
// private
|
||||
|
||||
return {
|
||||
|
@ -66,9 +66,7 @@ define([
|
|||
},
|
||||
|
||||
showModal: function() {
|
||||
var me = this,
|
||||
mainView = DE.getController('Editor').getView('Editor').f7View,
|
||||
isAndroid = Framework7.prototype.device.android === true;
|
||||
var me = this;
|
||||
|
||||
if ($$('.container-add.modal-in').length > 0) {
|
||||
return;
|
||||
|
@ -88,10 +86,11 @@ define([
|
|||
},
|
||||
|
||||
_layoutEditorsByStack: function () {
|
||||
var addViews = [];
|
||||
var me = this,
|
||||
addViews = [];
|
||||
|
||||
addViews.push({
|
||||
caption: 'Table',
|
||||
caption: me.textTable,
|
||||
id: 'add-table',
|
||||
layout: DE.getController('AddTable')
|
||||
.getView('AddTable')
|
||||
|
@ -99,7 +98,7 @@ define([
|
|||
});
|
||||
|
||||
addViews.push({
|
||||
caption: 'Shape',
|
||||
caption: me.textShape,
|
||||
id: 'add-shape',
|
||||
layout: DE.getController('AddShape')
|
||||
.getView('AddShape')
|
||||
|
@ -107,7 +106,7 @@ define([
|
|||
});
|
||||
|
||||
addViews.push({
|
||||
caption: 'Image',
|
||||
caption: me.textImage,
|
||||
id: 'add-image',
|
||||
layout: DE.getController('AddImage')
|
||||
.getView('AddImage')
|
||||
|
@ -115,7 +114,7 @@ define([
|
|||
});
|
||||
|
||||
addViews.push({
|
||||
caption: 'Other',
|
||||
caption: me.textOther,
|
||||
id: 'add-other',
|
||||
layout: DE.getController('AddOther')
|
||||
.getView('AddOther')
|
||||
|
@ -127,7 +126,6 @@ define([
|
|||
|
||||
_showByStack: function(isPhone) {
|
||||
var me = this,
|
||||
mainView = DE.getController('Editor').getView('Editor').f7View,
|
||||
isAndroid = Framework7.prototype.device.android === true,
|
||||
layoutAdds = me._layoutEditorsByStack();
|
||||
|
||||
|
@ -253,7 +251,12 @@ define([
|
|||
});
|
||||
|
||||
Common.NotificationCenter.trigger('addcontainer:show');
|
||||
}
|
||||
},
|
||||
|
||||
textTable: 'Table',
|
||||
textShape: 'Shape',
|
||||
textImage: 'Image',
|
||||
textOther: 'Other'
|
||||
}
|
||||
})());
|
||||
})(), DE.Controllers.AddContainer || {}))
|
||||
});
|
|
@ -47,7 +47,7 @@ define([
|
|||
], function (core) {
|
||||
'use strict';
|
||||
|
||||
DE.Controllers.AddImage = Backbone.Controller.extend((function() {
|
||||
DE.Controllers.AddImage = Backbone.Controller.extend(_.extend((function() {
|
||||
//
|
||||
|
||||
return {
|
||||
|
@ -103,33 +103,33 @@ define([
|
|||
},
|
||||
|
||||
onUrlChange: function (e) {
|
||||
$('#addimage-insert')[_.isEmpty($(e.currentTarget).val()) ? 'addClass' : 'removeClass']('disabled');
|
||||
$('#addimage-insert').toggleClass('disabled', _.isEmpty($(e.currentTarget).val()));
|
||||
},
|
||||
|
||||
onInsertByUrl: function (e) {
|
||||
var me = this,
|
||||
$input = $('#addimage-link-url input[type="url"]');
|
||||
$input = $('#addimage-link-url input[type=url]');
|
||||
|
||||
if ($input) {
|
||||
var value = ($input.val()).replace(/ /g, '');
|
||||
|
||||
_.delay(function () {
|
||||
if (!_.isEmpty(value)) {
|
||||
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
|
||||
if (!_.isEmpty(value)) {
|
||||
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
|
||||
DE.getController('AddContainer').hideModal();
|
||||
_.defer(function () {
|
||||
me.api.AddImageUrl(value);
|
||||
DE.getController('AddContainer').hideModal();
|
||||
} else {
|
||||
uiApp.alert(me.txtNotUrl);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uiApp.alert(me.textEmptyImgUrl);
|
||||
uiApp.alert(me.txtNotUrl);
|
||||
}
|
||||
}, 300);
|
||||
} else {
|
||||
uiApp.alert(me.textEmptyImgUrl);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
textEmptyImgUrl : 'You need to specify image URL.',
|
||||
txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"'
|
||||
}
|
||||
})());
|
||||
})(), DE.Controllers.AddImage || {}))
|
||||
});
|
||||
|
|
|
@ -135,5 +135,10 @@
|
|||
"DE.Controllers.Toolbar.dlgLeaveMsgText": "You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||
"DE.Controllers.Toolbar.leaveButtonText": "Leave this Page",
|
||||
"DE.Controllers.Toolbar.stayButtonText": "Stay on this Page",
|
||||
"DE.Views.Toolbar.textBack": "Back"
|
||||
"DE.Views.Toolbar.textBack": "Back",
|
||||
|
||||
"DE.Controllers.AddContainer.textTable": "Table",
|
||||
"DE.Controllers.AddContainer.textShape": "Shape",
|
||||
"DE.Controllers.AddContainer.textImage": "Image",
|
||||
"DE.Controllers.AddContainer.textOther": "Other"
|
||||
}
|
Loading…
Reference in a new issue