[DE mobile] Add document settings.

This commit is contained in:
Alexander Yuzhin 2016-12-28 17:55:11 +03:00
parent c9792dde5e
commit e6959997d0
10 changed files with 361 additions and 117 deletions

View file

@ -55,7 +55,25 @@ define([
var rootView,
inProgress,
infoObj,
modalView;
modalView,
_isPortrait = false,
_pageSizesIndex = -1,
_pageSizesCurrent = [0, 0],
_pageSizes = [
{ caption: 'US Letter', subtitle: '21,59cm x 27,94cm', value: [215.9, 279.4] },
{ caption: 'US Legal', subtitle: '21,59cm x 35,56cm', value: [215.9, 355.6] },
{ caption: 'A4', subtitle: '21cm x 29,7cm', value: [210, 297] },
{ caption: 'A5', subtitle: '14,81cm x 20,99cm', value: [148.1, 209.9] },
{ caption: 'B5', subtitle: '17,6cm x 25,01cm', value: [176, 250.1] },
{ caption: 'Envelope #10', subtitle: '10,48cm x 24,13cm', value: [104.8, 241.3] },
{ caption: 'Envelope DL', subtitle: '11,01cm x 22,01cm', value: [110.1, 220.1] },
{ caption: 'Tabloid', subtitle: '27,94cm x 43,17cm', value: [279.4, 431.7] },
{ caption: 'A3', subtitle: '29,7cm x 42,01cm', value: [297, 420.1] },
{ caption: 'Tabloid Oversize', subtitle: '30,48cm x 45,71cm', value: [304.8, 457.1] },
{ caption: 'ROC 16K', subtitle: '19,68cm x 27,3cm', value: [196.8, 273] },
{ caption: 'Envelope Choukei 3', subtitle: '11,99cm x 23,49cm', value: [119.9, 234.9] },
{ caption: 'Super B/A3', subtitle: '33,02cm x 48,25cm', value: [330.2, 482.5] }
];
return {
models: [],
@ -79,11 +97,13 @@ define([
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onGetDocInfoStart', _.bind(me._onApiGetDocInfoStart, me));
me.api.asc_registerCallback('asc_onGetDocInfoStop', _.bind(me._onApiGetDocInfoEnd, me));
me.api.asc_registerCallback('asc_onDocInfo', _.bind(me._onApiDocInfo, me));
me.api.asc_registerCallback('asc_onGetDocInfoEnd', _.bind(me._onApiGetDocInfoEnd, me));
me.api.asc_registerCallback('asc_onDocumentName', _.bind(me._onApiDocumentName, me));
me.api.asc_registerCallback('asc_onGetDocInfoStart', _.bind(me.onApiGetDocInfoStart, me));
me.api.asc_registerCallback('asc_onGetDocInfoStop', _.bind(me.onApiGetDocInfoEnd, me));
me.api.asc_registerCallback('asc_onDocInfo', _.bind(me.onApiDocInfo, me));
me.api.asc_registerCallback('asc_onGetDocInfoEnd', _.bind(me.onApiGetDocInfoEnd, me));
me.api.asc_registerCallback('asc_onDocumentName', _.bind(me.onApiDocumentName, me));
me.api.asc_registerCallback('asc_onDocSize', _.bind(me.onApiPageSize, me));
me.api.asc_registerCallback('asc_onPageOrient', _.bind(me.onApiPageOrient, me));
},
onLaunch: function () {
@ -136,7 +156,8 @@ define([
}
rootView = uiApp.addView('.settings-root-view', {
dynamicNavbar: true
dynamicNavbar: true,
domCache: true
});
Common.NotificationCenter.trigger('settingscontainer:show');
@ -149,74 +170,64 @@ define([
}
},
onPageShow: function(view) {
onPageShow: function(view, pageId) {
var me = this;
$('#settings-search').single('click', _.bind(me._onSearch, me));
$('#settings-readermode input:checkbox').single('change', _.bind(me._onReaderMode, me));
$('#settings-edit-document').single('click', _.bind(me._onEditDocumet, me));
$(modalView).find('.formats a').single('click', _.bind(me._onSaveFormat, me));
},
// API handlers
_onApiGetDocInfoStart: function () {
var me = this;
inProgress = true;
infoObj = {
PageCount : 0,
WordsCount : 0,
ParagraphCount : 0,
SymbolsCount : 0,
SymbolsWSCount : 0
};
_.defer(function(){
if (!inProgress)
return;
$('#statistic-pages').html(me.txtLoading);
$('#statistic-words').html(me.txtLoading);
$('#statistic-paragraphs').html(me.txtLoading);
$('#statistic-symbols').html(me.txtLoading);
$('#statistic-spaces').html(me.txtLoading);
}, 2000);
},
_onApiGetDocInfoEnd: function() {
inProgress = false;
$('#statistic-pages').html(infoObj.PageCount);
$('#statistic-words').html(infoObj.WordsCount);
$('#statistic-paragraphs').html(infoObj.ParagraphCount);
$('#statistic-symbols').html(infoObj.SymbolsCount);
$('#statistic-spaces').html(infoObj.SymbolsWSCount);
},
_onApiDocInfo: function(obj) {
if (obj) {
if (obj.get_PageCount() > -1)
infoObj.PageCount = obj.get_PageCount();
if (obj.get_WordsCount() > -1)
infoObj.WordsCount = obj.get_WordsCount();
if (obj.get_ParagraphCount() > -1)
infoObj.ParagraphCount = obj.get_ParagraphCount();
if (obj.get_SymbolsCount() > -1)
infoObj.SymbolsCount = obj.get_SymbolsCount();
if (obj.get_SymbolsWSCount() > -1)
infoObj.SymbolsWSCount = obj.get_SymbolsWSCount();
if ('#settings-document-view' == pageId) {
me.initPageDocumentSettings();
} else if ('#settings-document-formats-view' == pageId) {
me.getView('Settings').renderPageSizes(_pageSizes, _pageSizesIndex);
$('.page[data-page=settings-document-formats-view] input:radio[name=document-format]').single('change', _.bind(me.onFormatChange, me));
} else if ('#settings-download-view' == pageId) {
$(modalView).find('.formats a').single('click', _.bind(me.onSaveFormat, me));
} else if ('#settings-info-view' == pageId) {
me.initPageInfo();
} else if ('#settings-about-view' == pageId) {
// About
} else {
$('#settings-search').single('click', _.bind(me.onSearch, me));
$('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me));
$('#settings-edit-document').single('click', _.bind(me.onEditDocumet, me));
$('#settings-help').single('click', _.bind(me.onShowHelp, me));
}
},
_onApiDocumentName: function(name) {
$('#settings-document-title').html(name ? name : '-');
initPageDocumentSettings: function () {
var me = this,
$pageOrientation = $('.page[data-page=settings-document-view] input:radio[name=doc-orientation]'),
$pageSize = $('#settings-document-format');
// Init orientation
$pageOrientation.val([_isPortrait]);
$pageOrientation.single('change', _.bind(me.onOrientationChange, me));
// Init format
$pageSize.find('.item-title').text(_pageSizes[_pageSizesIndex]['caption']);
$pageSize.find('.item-subtitle').text(_pageSizes[_pageSizesIndex]['subtitle']);
},
_onEditDocumet: function() {
initPageInfo: function () {
var me = this;
if (me.api) {
me.api.startGetDocInfo();
var document = Common.SharedSettings.get('document') || {},
info = document.info || {};
$('#settings-document-title').html(document.title ? document.title : me.unknownText);
$('#settings-document-autor').html(info.author ? info.author : me.unknownText);
$('#settings-document-date').html(info.created ? info.created : me.unknownText);
}
},
// Handlers
onEditDocumet: function() {
Common.Gateway.requestEditRights();
},
_onSearch: function (e) {
onSearch: function (e) {
var toolbarView = DE.getController('Toolbar').getView('Toolbar');
if (toolbarView) {
@ -226,7 +237,7 @@ define([
this.hideModal();
},
_onReaderMode: function (e) {
onReaderMode: function (e) {
var me = this;
Common.SharedSettings.set('readerMode', !Common.SharedSettings.get('readerMode'));
@ -242,7 +253,12 @@ define([
Common.NotificationCenter.trigger('readermode:change', Common.SharedSettings.get('readerMode'));
},
_onSaveFormat: function(e) {
onShowHelp: function () {
window.open('http://support.onlyoffice.com/', "_blank");
this.hideModal();
},
onSaveFormat: function(e) {
var me = this,
format = $(e.currentTarget).data('format');
@ -267,6 +283,100 @@ define([
}
},
onFormatChange: function (e) {
var me = this,
rawValue = $(e.currentTarget).val(),
value = rawValue.split(',');
_.delay(function () {
me.api.change_DocSize(parseFloat(value[0]), parseFloat(value[1]));
}, 300);
},
onOrientationChange: function (e) {
var me = this,
value = $(e.currentTarget).val();
_.delay(function () {
me.api.change_PageOrient(value === 'true');
}, 300);
},
// API handlers
onApiGetDocInfoStart: function () {
var me = this;
inProgress = true;
infoObj = {
PageCount : 0,
WordsCount : 0,
ParagraphCount : 0,
SymbolsCount : 0,
SymbolsWSCount : 0
};
_.defer(function(){
if (!inProgress)
return;
$('#statistic-pages').html(me.txtLoading);
$('#statistic-words').html(me.txtLoading);
$('#statistic-paragraphs').html(me.txtLoading);
$('#statistic-symbols').html(me.txtLoading);
$('#statistic-spaces').html(me.txtLoading);
});
},
onApiGetDocInfoEnd: function() {
inProgress = false;
$('#statistic-pages').html(infoObj.PageCount);
$('#statistic-words').html(infoObj.WordsCount);
$('#statistic-paragraphs').html(infoObj.ParagraphCount);
$('#statistic-symbols').html(infoObj.SymbolsCount);
$('#statistic-spaces').html(infoObj.SymbolsWSCount);
},
onApiDocInfo: function(obj) {
if (obj) {
if (obj.get_PageCount() > -1)
infoObj.PageCount = obj.get_PageCount();
if (obj.get_WordsCount() > -1)
infoObj.WordsCount = obj.get_WordsCount();
if (obj.get_ParagraphCount() > -1)
infoObj.ParagraphCount = obj.get_ParagraphCount();
if (obj.get_SymbolsCount() > -1)
infoObj.SymbolsCount = obj.get_SymbolsCount();
if (obj.get_SymbolsWSCount() > -1)
infoObj.SymbolsWSCount = obj.get_SymbolsWSCount();
}
},
onApiDocumentName: function(name) {
$('#settings-document-title').html(name ? name : '-');
},
onApiPageSize: function(w, h) {
if (Math.abs(_pageSizesCurrent[0] - w) > 0.01 ||
Math.abs(_pageSizesCurrent[1] - h) > 0.01) {
_pageSizesCurrent = [w, h];
_.find(_pageSizes, function(size, index) {
if (Math.abs(size.value[0] - w) < 0.01 && Math.abs(size.value[1] - h) < 0.01) {
_pageSizesIndex = index;
}
}, this);
}
this.initPageDocumentSettings();
},
onApiPageOrient: function(isPortrait) {
_isPortrait = isPortrait;
},
unknownText: 'Unknown',
txtLoading : 'Loading...',
notcriticalErrorTitle : 'Warning',
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?'

View file

@ -54,7 +54,19 @@
</div>
</li>
<li>
<a id="settings-download" class="item-link">
<a id="settings-document" class="item-link" data-page="#settings-document-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-doc-setup"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textDocumentSettings %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-download" class="item-link" data-page="#settings-download-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-download"></i>
@ -66,7 +78,7 @@
</a>
</li>
<li>
<a id="settings-document-info" class="item-link">
<a id="settings-document-info" class="item-link" data-page="#settings-info-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-info"></i>
@ -78,7 +90,7 @@
</a>
</li>
<!--<li>-->
<!--<a id="settings-history" class="item-link">-->
<!--<a id="settings-history" class="item-link" data-page="#settings-history-view">-->
<!--<div class="item-content">-->
<!--<div class="item-media">-->
<!--<i class="icon icon-versions"></i>-->
@ -102,7 +114,7 @@
</a>
</li>
<li>
<a id="settings-about" class="item-link">
<a id="settings-about" class="item-link" data-page="#settings-about-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-about"></i>
@ -120,6 +132,79 @@
</div>
</div>
<!-- Document Settings view -->
<div id="settings-document-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textDocumentSettings %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="settings-document-view">
<div class="page-content">
<div class="content-block-title">Orientation</div>
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="doc-orientation" value="true">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textPortrait %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="doc-orientation" value="false">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textLandscape %></div>
</div>
</label>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textFormat %></div>
<div class="list-block media-list">
<ul>
<li>
<a id="settings-document-format" class="item-link item-content" data-page="#settings-document-formats-view">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title"><%= scope.textCustom %></div>
</div>
<div class="item-subtitle"><%= scope.textCustomSize %></div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Document Formats view -->
<div id="settings-document-formats-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textDocumentFormats %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="settings-document-formats-view">
<div class="page-content">
<div class="list-block media-list">
<ul></ul>
</div>
</div>
</div>
</div>
</div>
<!-- Document Info view -->
<div id="settings-info-view">
<div class="navbar">

View file

@ -50,7 +50,7 @@ define([
DE.Views.Settings = Backbone.View.extend(_.extend((function() {
// private
var isEdit;
var _isEdit = false;
return {
// el: '.view-main',
@ -63,19 +63,14 @@ define([
initialize: function() {
Common.NotificationCenter.on('settingscontainer:show', _.bind(this.initEvents, this));
Common.Gateway.on('opendocument', _.bind(this.loadDocument, this));
this.on('page:show', _.bind(this.updateItemHandlers, this));
},
initEvents: function () {
var me = this;
$('#settings-document-info').single('click', _.bind(me.showDocumentInfo, me));
$('#settings-download').single('click', _.bind(me.showDownload, me));
$('#settings-history').single('click', _.bind(me.showHistory, me));
$('#settings-help').single('click', _.bind(me.showHelp, me));
$('#settings-about').single('click', _.bind(me.showAbout, me));
me.updateItemHandlers();
me.initControls();
},
@ -91,7 +86,7 @@ define([
},
setMode: function (mode) {
isEdit = (mode === 'edit')
_isEdit = (mode === 'edit')
},
rootLayout: function () {
@ -99,11 +94,12 @@ define([
var $layour = this.layout.find('#settings-root-view'),
isPhone = Common.SharedSettings.get('phone');
if (isEdit) {
if (_isEdit) {
$layour.find('#settings-edit-document').hide();
$layour.find('#settings-readermode').hide();
$layour.find('#settings-search .item-title').text(this.textFindAndReplace)
} else {
$layour.find('#settings-document').hide();
$layour.find('#settings-readermode input:checkbox')
.prop('checked', Common.SharedSettings.get('readerMode'));
}
@ -118,7 +114,18 @@ define([
//
},
showPage: function(templateId) {
updateItemHandlers: function () {
var selectorsDynamicPage = [
'.page[data-page=settings-root-view]',
'.page[data-page=settings-document-view]'
].map(function (selector) {
return selector + ' a.item-link[data-page]';
}).join(', ');
$(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this));
},
showPage: function(templateId, suspendEvent) {
var rootView = DE.getController('Settings').rootView();
if (rootView && this.layout) {
@ -133,41 +140,50 @@ define([
content: $content.html()
});
this.fireEvent('page:show', this);
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
}
},
showDocumentInfo: function() {
this.showPage('#settings-info-view');
onItemClick: function (e) {
var $target = $(e.currentTarget),
page = $target.data('page');
var api = DE.getController('Settings').api;
if (api) {
api.startGetDocInfo();
var document = Common.SharedSettings.get('document') || {},
info = document.info || {};
$('#settings-document-title').html(document.title ? document.title : this.unknownText);
$('#settings-document-autor').html(info.author ? info.author : this.unknownText);
$('#settings-document-date').html(info.created ? info.created : this.unknownText);
if (page && page.length > 0 ) {
this.showPage(page);
}
},
showDownload: function () {
this.showPage('#settings-download-view');
},
renderPageSizes: function(sizes, selectIndex) {
var $pageFormats = $('.page[data-page=settings-document-formats-view]'),
$list = $pageFormats.find('ul'),
items = [];
showHistory: function () {
this.showPage('#settings-history-view');
},
_.each(sizes, function (size, index) {
items.push(_.template([
'<li>',
'<label class="label-radio item-content">',
'<input type="radio" name="document-format" value="<%= item.value %>" <% if (index == selectIndex) { %>checked="checked"<% } %> >',
'<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>',
'<div class="item-inner">',
'<div class="item-title-row">',
'<div class="item-title"><%= item.caption %></div>',
'</div>',
// '<div class="item-subtitle"><%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[0]).toFixed(2)) %><%= Common.Utils.Metric.getCurrentMetricName() %> x <%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></div>',
'<div class="item-subtitle"><%= item.subtitle %></div>',
'</div>',
'</label>',
'</li>'
].join(''), {
android: Framework7.prototype.device.android,
item: size,
index: index,
selectIndex: selectIndex
}));
});
showHelp: function () {
window.open('http://support.onlyoffice.com/', "_blank");
DE.getController('Settings').hideModal();
},
showAbout: function () {
this.showPage('#settings-about-view');
$list.html(items.join(''));
},
loadDocument: function(data) {
@ -182,7 +198,6 @@ define([
}
},
unknownText: 'Unknown',
textFindAndReplace: 'Find and Replace',
textSettings: 'Settings',
textDone: 'Done',
@ -208,7 +223,14 @@ define([
textVersion: 'Version',
textAddress: 'address',
textEmail: 'email',
textTel: 'tel'
textTel: 'tel',
textDocumentSettings: 'Document Settings',
textPortrait: 'Portrait',
textLandscape: 'Landscape',
textFormat: 'Format',
textCustom: 'Custom',
textCustomSize: 'Custom Size',
textDocumentFormats: 'Document Formats'
}
})(), DE.Views.Settings || {}))

View file

@ -105,10 +105,10 @@
"DE.Views.Search.textCase": "Case sensitive",
"DE.Views.Search.textHighlight": "Highlight results",
"DE.Controllers.Settings.unknownText": "Unknown",
"DE.Controllers.Settings.txtLoading": "Loading...",
"DE.Controllers.Settings.notcriticalErrorTitle": "Warning",
"DE.Controllers.Settings.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
"DE.Views.Settings.unknownText": "Unknown",
"DE.Views.Settings.textFindAndReplace": "Find and Replace",
"DE.Views.Settings.textSettings": "Settings",
"DE.Views.Settings.textDone": "Done",
@ -135,6 +135,13 @@
"DE.Views.Settings.textAddress": "address",
"DE.Views.Settings.textEmail": "email",
"DE.Views.Settings.textTel": "tel",
"DE.Views.Settings.textDocumentSettings": "Document Settings",
"DE.Views.Settings.textPortrait": "Portrait",
"DE.Views.Settings.textLandscape": "Landscape",
"DE.Views.Settings.textFormat": "Format",
"DE.Views.Settings.textCustom": "Custom",
"DE.Views.Settings.textCustomSize": "Custom Size",
"DE.Views.Settings.textDocumentFormats": "Document Formats",
"DE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application",
"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.",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -35,6 +35,11 @@ i.icon {
height: 28px;
.encoded-svg-background('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-1 3 22 28" fill="@{themeColor}"><g><polygon points="10,5.6 10,21.2 11,21.2 11,5.6 14.6,9.3 15.3,8.5 10.5,3.6 5.7,8.5 6.4,9.3 "/><polygon points="13,12 13,13 19,13 19,30 2,30 2,13 8,13 8,12 1,12 1,13 1,30 1,31 20,31 20,30 20,13 20,12 "/></g></svg>');
}
&.icon-doc-setup {
width: 22px;
height: 22px;
.encoded-svg-background('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-4 6 22 22" fill="@{themeColor}"><g><path id="XMLID_2_" d="M15,27H-1V15h6V8l0,0h10V27z M16,7H4.2L-2,13.6V28h18V7z M4,8.8V14h-4.9L4,8.8z"/></g></svg>');
}
&.icon-info {
width: 22px;
height: 22px;

View file

@ -30,6 +30,11 @@ i.icon {
height: 28px;
.encoded-svg-background('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-1 3 22 28" fill="@{themeColor}"><g><polygon id="XMLID_3_" points="10,5.6 10,21.2 11,21.2 11,5.6 14.6,9.3 15.3,8.5 10.5,3.6 5.7,8.5 6.4,9.3 "/><polygon id="XMLID_6_" points="13,12 13,13 19,13 19,30 2,30 2,13 8,13 8,12 1,12 1,13 1,30 1,31 20,31 20,30 20,13 20,12 "/></g></svg>');
}
&.icon-doc-setup {
width: 22px;
height: 22px;
.encoded-svg-background('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-4 6 22 22" fill="@{themeColor}"><g><path id="XMLID_2_" d="M15,27H-1V15h6V8l0,0h10V27z M16,7H4.2L-2,13.6V28h18V7z M4,8.8V14h-4.9L4,8.8z"/></g></svg>');
}
&.icon-info {
width: 22px;
height: 22px;

View file

@ -145,7 +145,7 @@ define([
},
onApiShowPopMenu: function(posX, posY) {
if (_isPopMenuHidden || $('.popover.settings, .popup.settings, .picker-modal.settings').length > 0)
if (_isPopMenuHidden || $('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in').length > 0)
return;
var me = this,

View file

@ -151,7 +151,7 @@ define([
onApiShowPopMenu: function(posX, posY) {
// if ( !this.permitions.isEdit ) return;
if ($('.popover.settings, .popup.settings, .picker-modal.settings').length > 0) {
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in').length > 0) {
return;
}