Quick Print for all editors
This commit is contained in:
parent
fc8e344dd9
commit
07390eb428
|
@ -1495,8 +1495,7 @@ define([
|
||||||
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
||||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||||
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
|
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
|
||||||
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
|
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization;
|
||||||
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
|
|
||||||
this.appOptions.canRename = this.editorConfig.canRename;
|
this.appOptions.canRename = this.editorConfig.canRename;
|
||||||
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
||||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||||
|
|
|
@ -1068,10 +1068,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
var _main = this.getApplication().getController('Main');
|
var _main = this.getApplication().getController('Main');
|
||||||
_main.onPrintQuick();
|
_main.onPrintQuick();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('Print');
|
Common.component.Analytics.trackEvent('Print');
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Print');
|
Common.component.Analytics.trackEvent('ToolBar', 'Print');
|
||||||
|
|
||||||
|
@ -1080,14 +1077,13 @@ define([
|
||||||
onPrintMenu: function (btn, e){
|
onPrintMenu: function (btn, e){
|
||||||
var oldType = this.toolbar.btnPrint.options.printType;
|
var oldType = this.toolbar.btnPrint.options.printType;
|
||||||
var newType = e.value;
|
var newType = e.value;
|
||||||
//this.toolbar.btnPrint.toggle(true);
|
|
||||||
|
|
||||||
if(newType != oldType) {
|
if(newType != oldType) {
|
||||||
this.toolbar.btnPrint.changeIcon({
|
this.toolbar.btnPrint.changeIcon({
|
||||||
next: e.options.iconClsForMainBtn,
|
next: e.options.iconClsForMainBtn,
|
||||||
curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn
|
curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn
|
||||||
});
|
});
|
||||||
this.toolbar.btnPrint.updateHint([e.caption, this.views.Toolbar.prototype.tipInsertText]);
|
this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]);
|
||||||
this.toolbar.btnPrint.options.printType = newType;
|
this.toolbar.btnPrint.options.printType = newType;
|
||||||
}
|
}
|
||||||
this.onPrint(e);
|
this.onPrint(e);
|
||||||
|
|
|
@ -781,7 +781,7 @@ define([
|
||||||
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
|
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
|
||||||
$('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide']();
|
$('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide']();
|
||||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||||
if ( !Common.UI.Themes.available() ) {
|
if ( !Common.UI.Themes.available() ) {
|
||||||
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
||||||
|
|
|
@ -191,9 +191,9 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-print no-mask',
|
iconCls: 'toolbar__icon btn-print no-mask',
|
||||||
lock: [_set.cantPrint, _set.disableOnStart],
|
lock: [_set.cantPrint, _set.disableOnStart],
|
||||||
signals: ['disabled'],
|
signals: ['disabled'],
|
||||||
|
split: config.canQuickPrint,
|
||||||
|
menu: config.canQuickPrint,
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
split: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false),
|
|
||||||
menu: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false),
|
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
dataHintTitle: 'P',
|
dataHintTitle: 'P',
|
||||||
printType: 'print'
|
printType: 'print'
|
||||||
|
@ -1747,23 +1747,25 @@ define([
|
||||||
})).then(function () {
|
})).then(function () {
|
||||||
if ( !config.isEdit ) return;
|
if ( !config.isEdit ) return;
|
||||||
|
|
||||||
if(me.btnPrint && config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false)){
|
if(me.btnPrint.menu){
|
||||||
me.btnPrint.setMenu(
|
me.btnPrint.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
caption: 'Print',
|
caption: me.tipPrint,
|
||||||
iconCls: 'menu__icon btn-print',
|
iconCls: 'menu__icon btn-print',
|
||||||
toggleGroup: 'viewPrint',
|
toggleGroup: 'viewPrint',
|
||||||
value: 'print',
|
value: 'print',
|
||||||
iconClsForMainBtn: 'btn-print'
|
iconClsForMainBtn: 'btn-print',
|
||||||
|
platformKey: Common.Utils.String.platformKey('Ctrl+P')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
caption: 'QuickPrint',
|
caption: me.tipPrintQuick,
|
||||||
iconCls: 'menu__icon btn-quick-print',
|
iconCls: 'menu__icon btn-quick-print',
|
||||||
toggleGroup: 'viewPrint',
|
toggleGroup: 'viewPrint',
|
||||||
value: 'print-quick',
|
value: 'print-quick',
|
||||||
iconClsForMainBtn: 'btn-quick-print'
|
iconClsForMainBtn: 'btn-quick-print',
|
||||||
|
platformKey: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
|
@ -2695,6 +2697,7 @@ define([
|
||||||
tipUndo: 'Undo',
|
tipUndo: 'Undo',
|
||||||
tipRedo: 'Redo',
|
tipRedo: 'Redo',
|
||||||
tipPrint: 'Print',
|
tipPrint: 'Print',
|
||||||
|
tipPrintQuick: 'Quick print',
|
||||||
tipSave: 'Save',
|
tipSave: 'Save',
|
||||||
tipIncFont: 'Increment font size',
|
tipIncFont: 'Increment font size',
|
||||||
tipDecFont: 'Decrement font size',
|
tipDecFont: 'Decrement font size',
|
||||||
|
|
|
@ -2934,6 +2934,7 @@
|
||||||
"DE.Views.Toolbar.tipPaste": "Paste",
|
"DE.Views.Toolbar.tipPaste": "Paste",
|
||||||
"DE.Views.Toolbar.tipPrColor": "Paragraph background color",
|
"DE.Views.Toolbar.tipPrColor": "Paragraph background color",
|
||||||
"DE.Views.Toolbar.tipPrint": "Print",
|
"DE.Views.Toolbar.tipPrint": "Print",
|
||||||
|
"DE.Views.Toolbar.tipPrintQuick": "Quick print",
|
||||||
"DE.Views.Toolbar.tipRedo": "Redo",
|
"DE.Views.Toolbar.tipRedo": "Redo",
|
||||||
"DE.Views.Toolbar.tipSave": "Save",
|
"DE.Views.Toolbar.tipSave": "Save",
|
||||||
"DE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.",
|
"DE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.",
|
||||||
|
|
|
@ -1166,8 +1166,7 @@ define([
|
||||||
}
|
}
|
||||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||||
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
|
this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp;
|
||||||
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
|
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization;
|
||||||
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
|
|
||||||
this.appOptions.canRename = this.editorConfig.canRename;
|
this.appOptions.canRename = this.editorConfig.canRename;
|
||||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||||
|
|
|
@ -284,6 +284,7 @@ define([
|
||||||
toolbar.btnPreview.menu.on('item:click', _.bind(this.onPreviewItemClick, this));
|
toolbar.btnPreview.menu.on('item:click', _.bind(this.onPreviewItemClick, this));
|
||||||
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
||||||
toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled'));
|
toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled'));
|
||||||
|
toolbar.btnPrint.menu && toolbar.btnPrint.menu.on('item:click', _.bind(this.onPrintMenu, this));
|
||||||
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
||||||
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
||||||
toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled'));
|
toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled'));
|
||||||
|
@ -1065,13 +1066,33 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrint: function(e) {
|
onPrint: function(e) {
|
||||||
Common.NotificationCenter.trigger('file:print', this.toolbar);
|
if (this.toolbar.btnPrint.options.printType == 'print') {
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('file:print', this.toolbar);
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
|
} else {
|
||||||
|
var _main = this.getApplication().getController('Main');
|
||||||
|
_main.onPrintQuick();
|
||||||
|
}
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('Print');
|
Common.component.Analytics.trackEvent('Print');
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Print');
|
Common.component.Analytics.trackEvent('ToolBar', 'Print');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPrintMenu: function (btn, e){
|
||||||
|
var oldType = this.toolbar.btnPrint.options.printType;
|
||||||
|
var newType = e.value;
|
||||||
|
|
||||||
|
if(newType != oldType) {
|
||||||
|
this.toolbar.btnPrint.changeIcon({
|
||||||
|
next: e.options.iconClsForMainBtn,
|
||||||
|
curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn
|
||||||
|
});
|
||||||
|
this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]);
|
||||||
|
this.toolbar.btnPrint.options.printType = newType;
|
||||||
|
}
|
||||||
|
this.onPrint(e);
|
||||||
|
},
|
||||||
|
|
||||||
onSave: function(e) {
|
onSave: function(e) {
|
||||||
var toolbar = this.toolbar;
|
var toolbar = this.toolbar;
|
||||||
if (this.api && this.api.asc_isDocumentCanSave) {
|
if (this.api && this.api.asc_isDocumentCanSave) {
|
||||||
|
|
|
@ -612,7 +612,7 @@ define([
|
||||||
$('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
$('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
||||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||||
$('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide']();
|
$('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide']();
|
||||||
$('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide']();
|
$('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide']();
|
||||||
|
|
||||||
if ( !Common.UI.Themes.available() ) {
|
if ( !Common.UI.Themes.available() ) {
|
||||||
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
||||||
|
|
|
@ -211,9 +211,12 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-print no-mask',
|
iconCls: 'toolbar__icon btn-print no-mask',
|
||||||
lock: [_set.slideDeleted, _set.noSlides, _set.cantPrint, _set.disableOnStart],
|
lock: [_set.slideDeleted, _set.noSlides, _set.cantPrint, _set.disableOnStart],
|
||||||
signals: ['disabled'],
|
signals: ['disabled'],
|
||||||
|
split: config.canQuickPrint,
|
||||||
|
menu: config.canQuickPrint,
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
dataHintTitle: 'P'
|
dataHintTitle: 'P',
|
||||||
|
printType: 'print'
|
||||||
});
|
});
|
||||||
me.slideOnlyControls.push(me.btnPrint);
|
me.slideOnlyControls.push(me.btnPrint);
|
||||||
|
|
||||||
|
@ -1301,6 +1304,30 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!config.isEdit) return;
|
if (!config.isEdit) return;
|
||||||
|
|
||||||
|
if(me.btnPrint.menu) {
|
||||||
|
me.btnPrint.setMenu(
|
||||||
|
new Common.UI.Menu({
|
||||||
|
items:[
|
||||||
|
{
|
||||||
|
caption: me.tipPrint,
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
|
toggleGroup: 'viewPrint',
|
||||||
|
value: 'print',
|
||||||
|
iconClsForMainBtn: 'btn-print',
|
||||||
|
platformKey: Common.Utils.String.platformKey('Ctrl+P')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
caption: me.tipPrintQuick,
|
||||||
|
iconCls: 'menu__icon btn-quick-print',
|
||||||
|
toggleGroup: 'viewPrint',
|
||||||
|
value: 'print-quick',
|
||||||
|
iconClsForMainBtn: 'btn-quick-print',
|
||||||
|
platformKey: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
me.btnsInsertImage.forEach(function (btn) {
|
me.btnsInsertImage.forEach(function (btn) {
|
||||||
btn.updateHint(me.tipInsertImage);
|
btn.updateHint(me.tipInsertImage);
|
||||||
btn.setMenu(
|
btn.setMenu(
|
||||||
|
@ -1907,6 +1934,7 @@ define([
|
||||||
tipUndo: 'Undo',
|
tipUndo: 'Undo',
|
||||||
tipRedo: 'Redo',
|
tipRedo: 'Redo',
|
||||||
tipPrint: 'Print',
|
tipPrint: 'Print',
|
||||||
|
tipPrintQuick: 'Quick print',
|
||||||
tipSave: 'Save',
|
tipSave: 'Save',
|
||||||
tipFontColor: 'Font color',
|
tipFontColor: 'Font color',
|
||||||
tipMarkers: 'Bullets',
|
tipMarkers: 'Bullets',
|
||||||
|
|
|
@ -2319,6 +2319,7 @@
|
||||||
"PE.Views.Toolbar.tipPaste": "Paste",
|
"PE.Views.Toolbar.tipPaste": "Paste",
|
||||||
"PE.Views.Toolbar.tipPreview": "Start slideshow",
|
"PE.Views.Toolbar.tipPreview": "Start slideshow",
|
||||||
"PE.Views.Toolbar.tipPrint": "Print",
|
"PE.Views.Toolbar.tipPrint": "Print",
|
||||||
|
"PE.Views.Toolbar.tipPrintQuick": "Quick print",
|
||||||
"PE.Views.Toolbar.tipRedo": "Redo",
|
"PE.Views.Toolbar.tipRedo": "Redo",
|
||||||
"PE.Views.Toolbar.tipSave": "Save",
|
"PE.Views.Toolbar.tipSave": "Save",
|
||||||
"PE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.",
|
"PE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.",
|
||||||
|
|
|
@ -1291,8 +1291,7 @@ define([
|
||||||
this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.permissions.edit !== false && this.editorConfig.mode !== 'view';
|
this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.permissions.edit !== false && this.editorConfig.mode !== 'view';
|
||||||
this.appOptions.canDownload = (this.permissions.download !== false);
|
this.appOptions.canDownload = (this.permissions.download !== false);
|
||||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||||
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp &&
|
this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization;
|
||||||
!(this.editorConfig.customization && this.editorConfig.customization.compactHeader);
|
|
||||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) &&
|
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) &&
|
||||||
(typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
(typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||||
|
|
|
@ -359,6 +359,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
toolbar.btnPrint.on('click', _.bind(this.onPrint, this));
|
||||||
toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled'));
|
toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled'));
|
||||||
|
toolbar.btnPrint.menu && toolbar.btnPrint.menu.on('item:click', _.bind(this.onPrintMenu, this));
|
||||||
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
toolbar.btnSave.on('click', _.bind(this.onSave, this));
|
||||||
toolbar.btnSave.on('disabled', _.bind(this.onBtnChangeState, this, 'save:disabled'));
|
toolbar.btnSave.on('disabled', _.bind(this.onBtnChangeState, this, 'save:disabled'));
|
||||||
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
toolbar.btnUndo.on('click', _.bind(this.onUndo, this));
|
||||||
|
@ -523,7 +524,27 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPrint: function(e) {
|
onPrint: function(e) {
|
||||||
Common.NotificationCenter.trigger('print', this.toolbar);
|
if (this.toolbar.btnPrint.options.printType == 'print') {
|
||||||
|
Common.NotificationCenter.trigger('print', this.toolbar);
|
||||||
|
} else {
|
||||||
|
var _main = this.getApplication().getController('Main');
|
||||||
|
_main.onPrintQuick();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPrintMenu: function (btn, e){
|
||||||
|
var oldType = this.toolbar.btnPrint.options.printType;
|
||||||
|
var newType = e.value;
|
||||||
|
|
||||||
|
if(newType != oldType) {
|
||||||
|
this.toolbar.btnPrint.changeIcon({
|
||||||
|
next: e.options.iconClsForMainBtn,
|
||||||
|
curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn
|
||||||
|
});
|
||||||
|
this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]);
|
||||||
|
this.toolbar.btnPrint.options.printType = newType;
|
||||||
|
}
|
||||||
|
this.onPrint(e);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSave: function(e) {
|
onSave: function(e) {
|
||||||
|
|
|
@ -799,7 +799,7 @@ define([
|
||||||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
||||||
$('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
$('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
|
||||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||||
$('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide']();
|
$('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide']();
|
||||||
|
|
||||||
if ( !Common.UI.Themes.available() ) {
|
if ( !Common.UI.Themes.available() ) {
|
||||||
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
$('tr.themes, tr.themes + tr.divider', this.el).hide();
|
||||||
|
|
|
@ -800,10 +800,13 @@ define([
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'toolbar__icon btn-print no-mask',
|
iconCls : 'toolbar__icon btn-print no-mask',
|
||||||
lock : [_set.editCell, _set.cantPrint, _set.disableOnStart],
|
lock : [_set.editCell, _set.cantPrint, _set.disableOnStart],
|
||||||
signals: ['disabled'],
|
signals : ['disabled'],
|
||||||
|
split : config.canQuickPrint,
|
||||||
|
menu : config.canQuickPrint,
|
||||||
dataHint : '1',
|
dataHint : '1',
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
dataHintTitle: 'P'
|
dataHintTitle: 'P',
|
||||||
|
printType: 'print'
|
||||||
});
|
});
|
||||||
|
|
||||||
me.btnSave = new Common.UI.Button({
|
me.btnSave = new Common.UI.Button({
|
||||||
|
@ -2963,6 +2966,31 @@ define([
|
||||||
if (!this.mode.isEdit || this.mode.isEditMailMerge || this.mode.isEditDiagram || this.mode.isEditOle) return;
|
if (!this.mode.isEdit || this.mode.isEditMailMerge || this.mode.isEditDiagram || this.mode.isEditOle) return;
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
if(me.btnPrint.menu) {
|
||||||
|
me.btnPrint.setMenu(
|
||||||
|
new Common.UI.Menu({
|
||||||
|
items:[
|
||||||
|
{
|
||||||
|
caption: me.tipPrint,
|
||||||
|
iconCls: 'menu__icon btn-print',
|
||||||
|
toggleGroup: 'viewPrint',
|
||||||
|
value: 'print',
|
||||||
|
iconClsForMainBtn: 'btn-print',
|
||||||
|
platformKey: Common.Utils.String.platformKey('Ctrl+P')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
caption: me.tipPrintQuick,
|
||||||
|
iconCls: 'menu__icon btn-quick-print',
|
||||||
|
toggleGroup: 'viewPrint',
|
||||||
|
value: 'print-quick',
|
||||||
|
iconClsForMainBtn: 'btn-quick-print',
|
||||||
|
platformKey: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
var _holder_view = SSE.getController('DocumentHolder').getView('DocumentHolder');
|
var _holder_view = SSE.getController('DocumentHolder').getView('DocumentHolder');
|
||||||
me.btnImgForward.updateHint(me.tipSendForward);
|
me.btnImgForward.updateHint(me.tipSendForward);
|
||||||
me.btnImgForward.setMenu(new Common.UI.Menu({
|
me.btnImgForward.setMenu(new Common.UI.Menu({
|
||||||
|
@ -3061,6 +3089,7 @@ define([
|
||||||
tipUndo: 'Undo',
|
tipUndo: 'Undo',
|
||||||
tipRedo: 'Redo',
|
tipRedo: 'Redo',
|
||||||
tipPrint: 'Print',
|
tipPrint: 'Print',
|
||||||
|
tipPrintQuick: 'Quick print',
|
||||||
tipSave: 'Save',
|
tipSave: 'Save',
|
||||||
tipFontColor: 'Font color',
|
tipFontColor: 'Font color',
|
||||||
tipPrColor: 'Background color',
|
tipPrColor: 'Background color',
|
||||||
|
|
|
@ -3538,6 +3538,7 @@
|
||||||
"SSE.Views.Toolbar.tipPrColor": "Fill color",
|
"SSE.Views.Toolbar.tipPrColor": "Fill color",
|
||||||
"SSE.Views.Toolbar.tipPrint": "Print",
|
"SSE.Views.Toolbar.tipPrint": "Print",
|
||||||
"SSE.Views.Toolbar.tipPrintArea": "Print area",
|
"SSE.Views.Toolbar.tipPrintArea": "Print area",
|
||||||
|
"SSE.Views.Toolbar.tipPrintQuick": "Quick print",
|
||||||
"SSE.Views.Toolbar.tipPrintTitles": "Print titles",
|
"SSE.Views.Toolbar.tipPrintTitles": "Print titles",
|
||||||
"SSE.Views.Toolbar.tipRedo": "Redo",
|
"SSE.Views.Toolbar.tipRedo": "Redo",
|
||||||
"SSE.Views.Toolbar.tipSave": "Save",
|
"SSE.Views.Toolbar.tipSave": "Save",
|
||||||
|
|
Loading…
Reference in a new issue