diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 212e91fd2..8ff677ee9 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -98,7 +98,7 @@ define([ me.api = new Asc.spreadsheet_api({ 'id-view' : 'editor_sdk', 'id-input' : 'ce-cell-content' - ,'mobile' : true + ,'mobile' : true }); if (me.api){ @@ -115,6 +115,7 @@ define([ me.api.asc_registerCallback('asc_onPrintUrl', _.bind(me.onPrintUrl, me)); me.api.asc_registerCallback('asc_onDocumentName', _.bind(me.onDocumentName, me)); me.api.asc_registerCallback('asc_onEndAction', _.bind(me.onLongActionEnd, me)); + me.api.asc_registerCallback('asc_onSelectionNameChanged', _.bind(me.onApiCellSelection, me)); /**/ // this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); // this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this)); @@ -313,6 +314,15 @@ define([ // } }, + onApiCellSelection: function(info) { + if ( info ) { + if ( !this.$cellname ) + this.$cellname = $('#ce-cell-name'); + + this.$cellname.html(typeof(info)=='string' ? info : info.asc_getName()); + } + }, + onLongActionBegin: function(type, id) { var action = {id: id, type: type}; this.stackLongActions.push(action); diff --git a/apps/spreadsheeteditor/mobile/app/template/Editor.template b/apps/spreadsheeteditor/mobile/app/template/Editor.template index e01e15aef..d312c48a1 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Editor.template +++ b/apps/spreadsheeteditor/mobile/app/template/Editor.template @@ -2,6 +2,18 @@