[DE mobile] Fixed display add link and insert table.
This commit is contained in:
parent
3b54d5df2a
commit
58c6d7a311
|
@ -123,7 +123,7 @@ define([
|
||||||
_view.hideMenu();
|
_view.hideMenu();
|
||||||
|
|
||||||
DE.getController('AddContainer').showModal();
|
DE.getController('AddContainer').showModal();
|
||||||
DE.getController('AddOther').getView('AddOther').showLink();
|
DE.getController('AddOther').getView('AddOther').showLink(false);
|
||||||
} else if ('openlink' == eventName) {
|
} else if ('openlink' == eventName) {
|
||||||
_.some(_stack, function (item) {
|
_.some(_stack, function (item) {
|
||||||
if (item.get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink) {
|
if (item.get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink) {
|
||||||
|
@ -143,7 +143,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiShowPopMenu: function(posX, posY) {
|
onApiShowPopMenu: function(posX, posY) {
|
||||||
if ($('.popover.settings, .popup.settings, .picker-modal.settings').length > 0) {
|
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal.modal-in').length > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,11 @@
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'documenteditor/mobile/app/view/add/AddImage'
|
'documenteditor/mobile/app/view/add/AddImage',
|
||||||
], function (core) {
|
'jquery',
|
||||||
|
'underscore',
|
||||||
|
'backbone'
|
||||||
|
], function (core, view, $, _, Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
DE.Controllers.AddImage = Backbone.Controller.extend(_.extend((function() {
|
DE.Controllers.AddImage = Backbone.Controller.extend(_.extend((function() {
|
||||||
|
|
|
@ -41,8 +41,11 @@
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'documenteditor/mobile/app/view/add/AddOther'
|
'documenteditor/mobile/app/view/add/AddOther',
|
||||||
], function (core) {
|
'jquery',
|
||||||
|
'underscore',
|
||||||
|
'backbone'
|
||||||
|
], function (core, view, $, _, Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
DE.Controllers.AddOther = Backbone.Controller.extend(_.extend((function() {
|
DE.Controllers.AddOther = Backbone.Controller.extend(_.extend((function() {
|
||||||
|
|
|
@ -42,8 +42,11 @@
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'documenteditor/mobile/app/view/add/AddShape'
|
'documenteditor/mobile/app/view/add/AddShape',
|
||||||
], function (core) {
|
'jquery',
|
||||||
|
'underscore',
|
||||||
|
'backbone'
|
||||||
|
], function (core, view, $, _, Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
DE.Controllers.AddShape = Backbone.Controller.extend(_.extend((function() {
|
DE.Controllers.AddShape = Backbone.Controller.extend(_.extend((function() {
|
||||||
|
|
|
@ -43,8 +43,11 @@
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'documenteditor/mobile/app/view/add/AddTable'
|
'documenteditor/mobile/app/view/add/AddTable',
|
||||||
], function (core) {
|
'jquery',
|
||||||
|
'underscore',
|
||||||
|
'backbone'
|
||||||
|
], function (core, view, $, _, Backbone) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
DE.Controllers.AddTable = Backbone.Controller.extend(_.extend((function() {
|
DE.Controllers.AddTable = Backbone.Controller.extend(_.extend((function() {
|
||||||
|
@ -60,6 +63,12 @@ define([
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
|
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
|
||||||
|
|
||||||
|
this.addListeners({
|
||||||
|
'AddTable': {
|
||||||
|
'view:render' : this.onViewRender
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function (api) {
|
setApi: function (api) {
|
||||||
|
@ -83,7 +92,11 @@ define([
|
||||||
me.api.asc_GetDefaultTableStyles();
|
me.api.asc_GetDefaultTableStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#add-table li').single('click', _.buffered(me.onStyleClick, 100, me));
|
$('#add-table li').single('click', _.buffered(this.onStyleClick, 100, this));
|
||||||
|
},
|
||||||
|
|
||||||
|
onViewRender: function () {
|
||||||
|
$('#add-table li').single('click', _.buffered(this.onStyleClick, 100, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
onStyleClick: function (e) {
|
onStyleClick: function (e) {
|
||||||
|
|
|
@ -98,7 +98,7 @@ define([
|
||||||
//
|
//
|
||||||
},
|
},
|
||||||
|
|
||||||
showPage: function (templateId) {
|
showPage: function (templateId, animate) {
|
||||||
var rootView = DE.getController('AddContainer').rootView;
|
var rootView = DE.getController('AddContainer').rootView;
|
||||||
|
|
||||||
if (rootView && this.layout) {
|
if (rootView && this.layout) {
|
||||||
|
@ -110,7 +110,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
rootView.router.load({
|
rootView.router.load({
|
||||||
content: $content.html()
|
content: $content.html(),
|
||||||
|
animatePages: animate !== false
|
||||||
});
|
});
|
||||||
|
|
||||||
this.fireEvent('page:show', [this, templateId]);
|
this.fireEvent('page:show', [this, templateId]);
|
||||||
|
@ -121,8 +122,8 @@ define([
|
||||||
this.showPage('#addother-sectionbreak');
|
this.showPage('#addother-sectionbreak');
|
||||||
},
|
},
|
||||||
|
|
||||||
showLink: function () {
|
showLink: function (animate) {
|
||||||
this.showPage('#addother-link');
|
this.showPage('#addother-link', animate);
|
||||||
|
|
||||||
$('.page[data-page=addother-link] input[type=url]').single('input', _.bind(function(e) {
|
$('.page[data-page=addother-link] input[type=url]').single('input', _.bind(function(e) {
|
||||||
$('#add-link-insert').toggleClass('disabled', _.isEmpty($('#add-link-url input').val()));
|
$('#add-link-insert').toggleClass('disabled', _.isEmpty($('#add-link-url input').val()));
|
||||||
|
|
|
@ -82,6 +82,8 @@ define([
|
||||||
$tableStyles.replaceWith(this.layout.find('#add-table-root').html());
|
$tableStyles.replaceWith(this.layout.find('#add-table-root').html());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.fireEvent('view:render', this);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ define([
|
||||||
me.api.asc_registerCallback('asc_onInitEditorFonts', _.bind(onApiLoadFonts, me));
|
me.api.asc_registerCallback('asc_onInitEditorFonts', _.bind(onApiLoadFonts, me));
|
||||||
me.api.asc_registerCallback('asc_onSelectionChanged', _.bind(me.onApiSelectionChanged, me));
|
me.api.asc_registerCallback('asc_onSelectionChanged', _.bind(me.onApiSelectionChanged, me));
|
||||||
me.api.asc_registerCallback('asc_onEditorSelectionChanged', _.bind(me.onApiEditorSelectionChanged, me));
|
me.api.asc_registerCallback('asc_onEditorSelectionChanged', _.bind(me.onApiEditorSelectionChanged, me));
|
||||||
me.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(me.onApiInitEditorStyles, me)); // TODO: It does not work until the error in the SDK
|
me.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(me.onApiInitEditorStyles, me));
|
||||||
},
|
},
|
||||||
|
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
|
|
Loading…
Reference in a new issue