-
+
- + + +
- + + +
diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js index b879b7aa5..c0d74b8c5 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js @@ -61,6 +61,12 @@ define([ initialize: function () { Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this)); + + this.addListeners({ + 'EditHyperlink': { + 'page:show' : this.onPageShow + } + }); }, setApi: function (api) { @@ -84,80 +90,105 @@ define([ me.initSettings(); }, + onPageShow: function (view, pageId) { + var me = this; - initSettings: function () { - var me = this, - cellInfo = me.api.asc_getCellInfo(), - linkInfo = cellInfo.asc_getHyperlink(), - sheetCount = me.api.asc_getWorksheetsCount(), - isLock = cellInfo.asc_getFlags().asc_getLockText(), - i = -1, - sheets = []; + me.initSettings(pageId); + }, - while (++i < sheetCount) { - if (!me.api.asc_isWorksheetHidden(i)) { - sheets.push(Common.Utils.String.format('', me.api.asc_getWorksheetName(i), me.api.asc_getWorksheetName(i))); + initSettings: function (pageId) { + var me = this; + + if ('#edit-link-type-view' == pageId) { + var $radioLinkType = $('.page[data-page=edit-link-type-view]').find('input:radio[name=link-type]'); + $radioLinkType.val([me.linkType]); + $radioLinkType.single('change', _.bind(me.onTypeChange, me)); + } else if ('#edit-link-sheet-view' == pageId) { + var sheetCount = me.api.asc_getWorksheetsCount(), + i = -1, + template = ''; + while (++i < sheetCount) { + if (!me.api.asc_isWorksheetHidden(i)) { + template += '