[SSE mobile] Hide modal when remove filter
This commit is contained in:
parent
f7b39baa0b
commit
b6c6bcf6fe
|
@ -52,7 +52,8 @@ define([
|
||||||
// Private
|
// Private
|
||||||
var rootView,
|
var rootView,
|
||||||
dataFilter,
|
dataFilter,
|
||||||
indChecked = [];
|
indChecked = [],
|
||||||
|
modalView;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
models: [],
|
models: [],
|
||||||
|
@ -86,7 +87,6 @@ define([
|
||||||
showModal: function(posX,posY) {
|
showModal: function(posX,posY) {
|
||||||
var me = this,
|
var me = this,
|
||||||
isAndroid = Framework7.prototype.device.android === true,
|
isAndroid = Framework7.prototype.device.android === true,
|
||||||
modalView,
|
|
||||||
mainView = SSE.getController('Editor').getView('Editor').f7View;
|
mainView = SSE.getController('Editor').getView('Editor').f7View;
|
||||||
|
|
||||||
uiApp.closeModal();
|
uiApp.closeModal();
|
||||||
|
@ -124,9 +124,9 @@ define([
|
||||||
'</div>';
|
'</div>';
|
||||||
var $target = $('#context-menu-target')
|
var $target = $('#context-menu-target')
|
||||||
.css({left: posX, top: Math.max(0, posY)});
|
.css({left: posX, top: Math.max(0, posY)});
|
||||||
var popover = uiApp.popover(popoverHTML, $target);
|
modalView = uiApp.popover(popoverHTML, $target);
|
||||||
if (Common.SharedSettings.get('android')) {
|
if (Common.SharedSettings.get('android')) {
|
||||||
Common.Utils.androidMenuTop($(popover), $target);
|
Common.Utils.androidMenuTop($(modalView), $target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +166,12 @@ define([
|
||||||
dataFilter = config;
|
dataFilter = config;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideModal: function() {
|
||||||
|
if (modalView) {
|
||||||
|
uiApp.closeModal(modalView);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onClickSort: function(type) {
|
onClickSort: function(type) {
|
||||||
this.api.asc_sortColFilter(type == 'down' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, '');
|
this.api.asc_sortColFilter(type == 'down' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, '');
|
||||||
},
|
},
|
||||||
|
@ -189,6 +195,7 @@ define([
|
||||||
var tablename = (formatTableInfo) ? formatTableInfo.asc_getTableName() : undefined;
|
var tablename = (formatTableInfo) ? formatTableInfo.asc_getTableName() : undefined;
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_changeAutoFilter(tablename, Asc.c_oAscChangeFilterOptions.filter, false);
|
this.api.asc_changeAutoFilter(tablename, Asc.c_oAscChangeFilterOptions.filter, false);
|
||||||
|
this.hideModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
setClearDisable: function() {
|
setClearDisable: function() {
|
||||||
|
|
Loading…
Reference in a new issue