diff --git a/apps/common/main/lib/util/LanguageInfo.js b/apps/common/main/lib/util/LanguageInfo.js
index 618868ead..25c078385 100644
--- a/apps/common/main/lib/util/LanguageInfo.js
+++ b/apps/common/main/lib/util/LanguageInfo.js
@@ -100,6 +100,7 @@ Common.util.LanguageInfo = new(function() {
0x0402 : ["bg-BG", "Български (България)"],
0x0003 : ["ca", "Català"],
0x0403 : ["ca-ES", "Català (Català)"],
+ 0x0803 : ["ca-ES-valencia", "Català (Valencià)"],
0x7804 : ["zh", "中文"],
0x0004 : ["zh-Hans", "中文(简体)"],
0x0804 : ["zh-CN", "中文(中华人民共和国)"],
@@ -315,7 +316,7 @@ Common.util.LanguageInfo = new(function() {
0x181A : ["sr-Latn-BA", "Srpski (Bosna i Hercegovina)"],
0x2C1A : ["sr-Latn-ME", "Srpski (Crna Gora)"],
0x081A : ["sr-Latn-CS", "Srpski (Srbija i Crna Gora (Prethodno))"],
- 0x241A : ["sr-Latn-RS", "Srpski (Srbija)"],
+ 0x241A : ["sr-Latn-RS", "Srpski (Srbija, Latinica)"],
0x006C : ["nso", "Sesotho sa Leboa"],
0x046C : ["nso-ZA", "Sesotho sa Leboa (Afrika Borwa)"],
0x0032 : ["tn", "Setswana"],
diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js
index 0c171546b..2e0c9d42a 100644
--- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js
+++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js
@@ -86,6 +86,7 @@ define([
me.api.asc_registerCallback('asc_onHideForeignCursorLabel', _.bind(me.onApiHideForeignCursorLabel, me));
me.api.asc_registerCallback('asc_onAuthParticipantsChanged',_.bind(me.onApiUsersChanged, me));
me.api.asc_registerCallback('asc_onConnectionStateChanged', _.bind(me.onApiUserConnection, me));
+ me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
me.api.asc_coAuthoringGetUsers();
},
@@ -259,6 +260,10 @@ define([
}
},
+ onApiDocumentContentReady: function () {
+ _view = this.createView('DocumentHolder').render();
+ },
+
// Internal
_openLink: function(url) {
diff --git a/apps/documenteditor/mobile/app/view/DocumentHolder.js b/apps/documenteditor/mobile/app/view/DocumentHolder.js
index b4310296a..c9b3625f4 100644
--- a/apps/documenteditor/mobile/app/view/DocumentHolder.js
+++ b/apps/documenteditor/mobile/app/view/DocumentHolder.js
@@ -68,7 +68,10 @@ define([
// Render layout
render: function() {
var el = $(this.el);
- el.append(this.template({}));
+
+ if (el.length > 0 && el.find('#' + _anchorId).length < 1) {
+ el.append(this.template());
+ }
return this;
},
diff --git a/apps/presentationeditor/mobile/app/controller/DocumentHolder.js b/apps/presentationeditor/mobile/app/controller/DocumentHolder.js
index 4e4535f0e..34da8550d 100644
--- a/apps/presentationeditor/mobile/app/controller/DocumentHolder.js
+++ b/apps/presentationeditor/mobile/app/controller/DocumentHolder.js
@@ -77,8 +77,9 @@ define([
me.api = api;
- me.api.asc_registerCallback('asc_onShowPopMenu', _.bind(me.onApiShowPopMenu, me));
- me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
+ me.api.asc_registerCallback('asc_onShowPopMenu', _.bind(me.onApiShowPopMenu, me));
+ me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
+ me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
},
setMode: function (mode) {
@@ -161,6 +162,10 @@ define([
_view && _view.hideMenu();
},
+ onApiDocumentContentReady: function () {
+ _view = this.createView('DocumentHolder').render();
+ },
+
// Internal
_openLink: function(url) {
diff --git a/apps/presentationeditor/mobile/app/view/DocumentHolder.js b/apps/presentationeditor/mobile/app/view/DocumentHolder.js
index de46fad96..db0377eb8 100644
--- a/apps/presentationeditor/mobile/app/view/DocumentHolder.js
+++ b/apps/presentationeditor/mobile/app/view/DocumentHolder.js
@@ -68,7 +68,9 @@ define([
// Render layout
render: function() {
var el = $(this.el);
- el.append(this.template({}));
+ if (el.length > 0 && el.find('#' + _anchorId).length < 1) {
+ el.append(this.template());
+ }
return this;
},
diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
index cd7528c4b..c6b114db6 100644
--- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
@@ -338,10 +338,31 @@ define([
onSortCells: function(menu, item) {
if (this.api) {
- this.api.asc_sortColFilter(item.value, '', undefined, (item.value==Asc.c_oAscSortOptions.ByColorFill) ? this.documentHolder.ssMenu.cellColor : this.documentHolder.ssMenu.fontColor);
+ var res = this.api.asc_sortCellsRangeExpand();
+ if (res) {
+ var config = {
+ width: 500,
+ title: this.txtSorting,
+ msg: this.txtExpandSort,
+ iconCls: 'warn',
+ buttons: [ {caption: this.txtExpand, primary: true, value: 'expand'},
+ {caption: this.txtSortSelected, primary: true, value: 'sort'},
+ 'cancel'],
+ callback: _.bind(function(btn){
+ if (btn == 'expand' || btn == 'sort') {
+ this.api.asc_sortColFilter(item.value, '', undefined, (item.value==Asc.c_oAscSortOptions.ByColorFill) ? this.documentHolder.ssMenu.cellColor : this.documentHolder.ssMenu.fontColor, btn == 'expand');
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
+ Common.component.Analytics.trackEvent('DocumentHolder', 'Sort Cells');
+ }, this)
+ };
+ Common.UI.alert(config);
+ } else {
+ this.api.asc_sortColFilter(item.value, '', undefined, (item.value==Asc.c_oAscSortOptions.ByColorFill) ? this.documentHolder.ssMenu.cellColor : this.documentHolder.ssMenu.fontColor, res !== null);
- Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
- Common.component.Analytics.trackEvent('DocumentHolder', 'Sort Cells');
+ Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
+ Common.component.Analytics.trackEvent('DocumentHolder', 'Sort Cells');
+ }
}
},
@@ -2299,7 +2320,11 @@ define([
deleteText : 'Delete',
deleteRowText : 'Delete Row',
deleteColumnText : 'Delete Column',
- txtNoChoices: 'There are no choices for filling the cell.
Only text values from the column can be selected for replacement.'
+ txtNoChoices: 'There are no choices for filling the cell.
Only text values from the column can be selected for replacement.',
+ txtExpandSort: 'The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?',
+ txtExpand: 'Expand and sort',
+ txtSorting: 'Sorting',
+ txtSortSelected: 'Sort selected'
}, SSE.Controllers.DocumentHolder || {}));
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js
index 777ad7f0e..61dea8682 100644
--- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js
+++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js
@@ -104,6 +104,7 @@ define([
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
/** coauthoring end **/
this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this));
+ this.api.asc_registerCallback('asc_onFilterInfo', _.bind(this.onApiFilterInfo , this));
this.statusbar.setApi(api);
},
@@ -185,6 +186,11 @@ define([
this.statusbar.updateTabbarBorders();
},
+ onApiFilterInfo: function(countFilter, countRecords) {
+ this.statusbar.setFilteredInfo(countFilter, countRecords);
+ this.statusbar.updateTabbarBorders();
+ },
+
onApiEditCell: function(state) {
var disableAdd = (state == Asc.c_oAscCellEditorState.editFormula),
disable = (state != Asc.c_oAscCellEditorState.editEnd),
diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
index f9460c963..38d001d64 100644
--- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
@@ -839,8 +839,27 @@ define([
},
onSortType: function(type, btn) {
- if (this.api)
- this.api.asc_sortColFilter(type, '');
+ if (this.api) {
+ var res = this.api.asc_sortCellsRangeExpand();
+ if (res) {
+ var config = {
+ width: 500,
+ title: this.txtSorting,
+ msg: this.txtExpandSort,
+ iconCls: 'warn',
+ buttons: [ {caption: this.txtExpand, primary: true, value: 'expand'},
+ {caption: this.txtSortSelected, primary: true, value: 'sort'},
+ 'cancel'],
+ callback: _.bind(function(btn){
+ if (btn == 'expand' || btn == 'sort') {
+ this.api.asc_sortColFilter(type, '', undefined, undefined, btn == 'expand');
+ }
+ }, this)
+ };
+ Common.UI.alert(config);
+ } else
+ this.api.asc_sortColFilter(type, '', undefined, undefined, res !== null);
+ }
},
onSearch: function(type, btn) {
@@ -1936,6 +1955,7 @@ define([
need_disable = this._state.controlsdisabled.filters || !filterInfo || (filterInfo.asc_getIsApplyAutoFilter()!==true);
toolbar.lockToolbar(SSE.enumLock.ruleDelFilter, need_disable, {array:[toolbar.btnClearAutofilter,toolbar.mnuitemClearFilter]});
+ this.getApplication().getController('Statusbar').onApiFilterInfo(!need_disable);
this._state.multiselect = info.asc_getFlags().asc_getMultiselect();
toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink]});
@@ -2965,6 +2985,11 @@ define([
txtMatrix_2_2_LineBracket : 'Empty Matrix with Brackets',
txtMatrix_2_2_DLineBracket : 'Empty Matrix with Brackets',
txtMatrix_Flat_Round : 'Sparse Matrix',
- txtMatrix_Flat_Square : 'Sparse Matrix'
+ txtMatrix_Flat_Square : 'Sparse Matrix',
+ txtExpandSort: 'The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?',
+ txtExpand: 'Expand and sort',
+ txtSorting: 'Sorting',
+ txtSortSelected: 'Sort selected'
+
}, SSE.Controllers.Toolbar || {}));
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template
index edf69d514..adb030fc1 100644
--- a/apps/spreadsheeteditor/main/app/template/StatusBar.template
+++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template
@@ -39,6 +39,10 @@
+