[DE] Show tip for save as form button
This commit is contained in:
parent
70a00507d2
commit
5c1ff8633e
|
@ -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 || {}));
|
||||
|
|
Loading…
Reference in a new issue