diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js index 293cf4a0c..87a70e1b2 100644 --- a/apps/documenteditor/main/app/controller/FormsTab.js +++ b/apps/documenteditor/main/app/controller/FormsTab.js @@ -98,6 +98,9 @@ define([ 'forms:goto': this.onGoTo, 'forms:submit': this.onSubmitClick, 'forms:save': this.onSaveFormClick + }, + 'Toolbar': { + 'tab:active': this.onActiveTab } }); }, @@ -188,6 +191,11 @@ define([ oPr = new AscCommon.CSdtTextFormPr(); this.api.asc_AddContentControlTextForm(oPr, oFormPr); } + + var me = this; + setTimeout(function() { + me.showSaveFormTip(); + }, 500); Common.NotificationCenter.trigger('edit:complete', this.toolbar); }, @@ -385,6 +393,35 @@ define([ }); tip.show(); } + }, + + showSaveFormTip: function() { + if (!Common.localStorage.getItem("de-hide-saveform-tip") && !this.tipSaveForm) { + var me = this; + me.tipSaveForm = new Common.UI.SynchronizeTip({ + extCls: 'colored', + placement: 'bottom-right', + target: this.view.btnSaveForm.$el, + text: this.view.tipSaveForm, + showLink: false, + closable: false, + showButton: true, + textButton: this.view.textGotIt + }); + me.tipSaveForm.on({ + 'buttonclick': function() { + Common.localStorage.setItem("de-hide-saveform-tip", 1); + me.tipSaveForm.close(); + } + }); + me.tipSaveForm.show(); + } + }, + + onActiveTab: function(tab) { + if (tab !== 'forms') { + this.tipSaveForm && this.tipSaveForm.close(); + } } }, DE.Controllers.FormsTab || {})); diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js index 9e83a0b4f..4e45e2c23 100644 --- a/apps/documenteditor/main/app/view/FormsTab.js +++ b/apps/documenteditor/main/app/view/FormsTab.js @@ -269,6 +269,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon previous-field', caption: this.capBtnPrev, + disabled: true, dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' @@ -279,6 +280,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon next-field', caption: this.capBtnNext, + disabled: true, dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' @@ -290,6 +292,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon submit-form', caption: this.capBtnSubmit, + disabled: true, dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' @@ -301,6 +304,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon save-form', caption: this.capBtnSaveForm, + disabled: true, dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small'