Merge remote-tracking branch 'remotes/origin/develop' into feature/sse-pivot-settings
This commit is contained in:
commit
8be45ececf
|
@ -44,7 +44,7 @@
|
||||||
newDocumentPage.focus();
|
newDocumentPage.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, dialogPrint: function(url) {
|
, dialogPrint: function(url, api) {
|
||||||
$('#id-print-frame').remove();
|
$('#id-print-frame').remove();
|
||||||
|
|
||||||
if ( !!url ) {
|
if ( !!url ) {
|
||||||
|
@ -59,10 +59,14 @@
|
||||||
document.body.appendChild(iframePrint);
|
document.body.appendChild(iframePrint);
|
||||||
|
|
||||||
iframePrint.onload = function () {
|
iframePrint.onload = function () {
|
||||||
iframePrint.contentWindow.focus();
|
try {
|
||||||
iframePrint.contentWindow.print();
|
iframePrint.contentWindow.focus();
|
||||||
iframePrint.contentWindow.blur();
|
iframePrint.contentWindow.print();
|
||||||
window.focus();
|
iframePrint.contentWindow.blur();
|
||||||
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
iframePrint.src = url;
|
iframePrint.src = url;
|
||||||
|
|
|
@ -113,7 +113,7 @@ define([
|
||||||
Common.Gateway.requestRestore(record.get('revision'));
|
Common.Gateway.requestRestore(record.get('revision'));
|
||||||
else {
|
else {
|
||||||
this.isFromSelectRevision = record.get('revision');
|
this.isFromSelectRevision = record.get('revision');
|
||||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,14 +339,14 @@ define([
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case Common.Utils.importTextType.CSV:
|
case Common.Utils.importTextType.CSV:
|
||||||
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this));
|
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this));
|
||||||
break;
|
break;
|
||||||
case Common.Utils.importTextType.TXT:
|
case Common.Utils.importTextType.TXT:
|
||||||
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTXTAdvancedOptions(encoding), _.bind(this.previewCallback, this));
|
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding), _.bind(this.previewCallback, this));
|
||||||
break;
|
break;
|
||||||
case Common.Utils.importTextType.Paste:
|
case Common.Utils.importTextType.Paste:
|
||||||
case Common.Utils.importTextType.Columns:
|
case Common.Utils.importTextType.Columns:
|
||||||
this.api.asc_TextImport(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
this.api.asc_TextImport(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -204,11 +204,11 @@ DE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function onPrint() {
|
function onPrint() {
|
||||||
if ( permissions.print!==false )
|
if ( permissions.print!==false )
|
||||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
@ -259,7 +259,7 @@ DE.ApplicationController = new(function(){
|
||||||
common.utils.openLink(embedConfig.saveUrl);
|
common.utils.openLink(embedConfig.saveUrl);
|
||||||
} else
|
} else
|
||||||
if (api && permissions.print!==false){
|
if (api && permissions.print!==false){
|
||||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Analytics.trackEvent('Save');
|
Common.Analytics.trackEvent('Save');
|
||||||
|
@ -458,7 +458,7 @@ DE.ApplicationController = new(function(){
|
||||||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
|
|
@ -237,7 +237,7 @@ define([
|
||||||
if ( isopts ) close_menu = false;
|
if ( isopts ) close_menu = false;
|
||||||
else this.clickSaveCopyAsFormat(undefined);
|
else this.clickSaveCopyAsFormat(undefined);
|
||||||
break;
|
break;
|
||||||
case 'print': this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); break;
|
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break;
|
||||||
case 'exit': Common.NotificationCenter.trigger('goback'); break;
|
case 'exit': Common.NotificationCenter.trigger('goback'); break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
|
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
|
||||||
|
@ -302,13 +302,35 @@ define([
|
||||||
buttons: ['ok', 'cancel'],
|
buttons: ['ok', 'cancel'],
|
||||||
callback: _.bind(function(btn){
|
callback: _.bind(function(btn){
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
this.api.asc_DownloadAs(format);
|
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
}, this)
|
}, this)
|
||||||
});
|
});
|
||||||
|
} else if (format == Asc.c_oAscFileType.DOCX) {
|
||||||
|
if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") && this.api.asc_isCompatibilityMode()) {
|
||||||
|
Common.UI.warning({
|
||||||
|
closable: false,
|
||||||
|
width: 600,
|
||||||
|
title: this.notcriticalErrorTitle,
|
||||||
|
msg: this.txtCompatible,
|
||||||
|
buttons: ['ok', 'cancel'],
|
||||||
|
dontshow: true,
|
||||||
|
callback: _.bind(function(btn, dontshow){
|
||||||
|
if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
|
||||||
|
if (btn == 'ok') {
|
||||||
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
|
menu.hide();
|
||||||
|
}
|
||||||
|
}, this)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX);
|
||||||
|
opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
|
||||||
|
this.api.asc_DownloadAs(opts);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.api.asc_DownloadAs(format);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
@ -326,14 +348,38 @@ define([
|
||||||
callback: _.bind(function(btn){
|
callback: _.bind(function(btn){
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
this.isFromFileDownloadAs = ext;
|
this.isFromFileDownloadAs = ext;
|
||||||
this.api.asc_DownloadAs(format, true);
|
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
}, this)
|
}, this)
|
||||||
});
|
});
|
||||||
|
} else if (format == Asc.c_oAscFileType.DOCX) {
|
||||||
|
if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") && this.api.asc_isCompatibilityMode()) {
|
||||||
|
Common.UI.warning({
|
||||||
|
closable: false,
|
||||||
|
width: 600,
|
||||||
|
title: this.notcriticalErrorTitle,
|
||||||
|
msg: this.txtCompatible,
|
||||||
|
buttons: ['ok', 'cancel'],
|
||||||
|
dontshow: true,
|
||||||
|
callback: _.bind(function(btn, dontshow){
|
||||||
|
if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
|
||||||
|
if (btn == 'ok') {
|
||||||
|
this.isFromFileDownloadAs = ext;
|
||||||
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||||
|
menu.hide();
|
||||||
|
}
|
||||||
|
}, this)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.isFromFileDownloadAs = ext;
|
||||||
|
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true);
|
||||||
|
opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
|
||||||
|
this.api.asc_DownloadAs(opts);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isFromFileDownloadAs = ext;
|
this.isFromFileDownloadAs = ext;
|
||||||
this.api.asc_DownloadAs(format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -822,6 +868,8 @@ define([
|
||||||
leavePageText: 'All unsaved changes in this document will be lost.<br> Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.',
|
leavePageText: 'All unsaved changes in this document will be lost.<br> Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.',
|
||||||
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?',
|
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?',
|
||||||
warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?',
|
warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?',
|
||||||
txtUntitled: 'Untitled'
|
txtUntitled: 'Untitled',
|
||||||
|
txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.<br>Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.'
|
||||||
|
|
||||||
}, DE.Controllers.LeftMenu || {}));
|
}, DE.Controllers.LeftMenu || {}));
|
||||||
});
|
});
|
|
@ -195,6 +195,7 @@ define([
|
||||||
|
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||||
|
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||||
|
|
||||||
this.isShowOpenDialog = false;
|
this.isShowOpenDialog = false;
|
||||||
|
|
||||||
|
@ -463,7 +464,7 @@ define([
|
||||||
|
|
||||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||||
_format = Asc.c_oAscFileType.DOCX;
|
_format = Asc.c_oAscFileType.DOCX;
|
||||||
this.api.asc_DownloadAs(_format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -890,6 +891,9 @@ define([
|
||||||
Common.Utils.InternalSettings.set("de-settings-spellcheck", value);
|
Common.Utils.InternalSettings.set("de-settings-spellcheck", value);
|
||||||
me.api.asc_setSpellCheck(value);
|
me.api.asc_setSpellCheck(value);
|
||||||
|
|
||||||
|
value = Common.localStorage.getBool("de-settings-compatible", false);
|
||||||
|
Common.Utils.InternalSettings.set("de-settings-compatible", value);
|
||||||
|
|
||||||
Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines());
|
Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines());
|
||||||
|
|
||||||
function checkWarns() {
|
function checkWarns() {
|
||||||
|
@ -1945,25 +1949,28 @@ define([
|
||||||
this.getApplication().getController('Toolbar').getView().updateMetricUnit();
|
this.getApplication().getController('Toolbar').getView().updateMetricUnit();
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions, mode) {
|
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
|
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'TXT'),
|
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'TXT'),
|
||||||
closable: (mode==2), // if save settings
|
closable: (mode==2), // if save settings
|
||||||
type: Common.Utils.importTextType.TXT,
|
type: Common.Utils.importTextType.TXT,
|
||||||
preview: advOptions.asc_getOptions().asc_getData(),
|
preview: advOptions.asc_getData(),
|
||||||
codepages: advOptions.asc_getOptions().asc_getCodePages(),
|
codepages: advOptions.asc_getCodePages(),
|
||||||
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
|
settings: advOptions.asc_getRecommendedSettings(),
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function (result, encoding) {
|
handler: function (result, encoding) {
|
||||||
me.isShowOpenDialog = false;
|
me.isShowOpenDialog = false;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me && me.api) {
|
if (me && me.api) {
|
||||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding));
|
if (mode==2) {
|
||||||
|
formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding));
|
||||||
|
me.api.asc_DownloadAs(formatOptions);
|
||||||
|
} else
|
||||||
|
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding));
|
||||||
me.loadMask && me.loadMask.show();
|
me.loadMask && me.loadMask.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2002,7 +2009,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onTryUndoInFastCollaborative: function() {
|
onTryUndoInFastCollaborative: function() {
|
||||||
if (!window.localStorage.getBool("de-hide-try-undoredo"))
|
if (!Common.localStorage.getBool("de-hide-try-undoredo"))
|
||||||
Common.UI.info({
|
Common.UI.info({
|
||||||
width: 500,
|
width: 500,
|
||||||
msg: this.textTryUndoRedo,
|
msg: this.textTryUndoRedo,
|
||||||
|
@ -2012,7 +2019,7 @@ define([
|
||||||
customButtonText: this.textStrict,
|
customButtonText: this.textStrict,
|
||||||
dontshow: true,
|
dontshow: true,
|
||||||
callback: _.bind(function(btn, dontshow){
|
callback: _.bind(function(btn, dontshow){
|
||||||
if (dontshow) window.localStorage.setItem("de-hide-try-undoredo", 1);
|
if (dontshow) Common.localStorage.setItem("de-hide-try-undoredo", 1);
|
||||||
if (btn == 'custom') {
|
if (btn == 'custom') {
|
||||||
Common.localStorage.setItem("de-settings-coauthmode", 0);
|
Common.localStorage.setItem("de-settings-coauthmode", 0);
|
||||||
Common.Utils.InternalSettings.set("de-settings-coauthmode", false);
|
Common.Utils.InternalSettings.set("de-settings-coauthmode", false);
|
||||||
|
@ -2070,7 +2077,7 @@ define([
|
||||||
if (!this.appOptions.canPrint || this.isModalShowed) return;
|
if (!this.appOptions.canPrint || this.isModalShowed) return;
|
||||||
|
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
||||||
Common.component.Analytics.trackEvent('Print');
|
Common.component.Analytics.trackEvent('Print');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2090,10 +2097,14 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
|
|
|
@ -152,7 +152,7 @@ define([
|
||||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||||
_format = Asc.c_oAscFileType.PDF;
|
_format = Asc.c_oAscFileType.PDF;
|
||||||
|
|
||||||
_main.api.asc_DownloadAs(_format);
|
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||||
},
|
},
|
||||||
'go:editor': function() {
|
'go:editor': function() {
|
||||||
Common.Gateway.requestEditRights();
|
Common.Gateway.requestEditRights();
|
||||||
|
@ -966,7 +966,7 @@ define([
|
||||||
|
|
||||||
onPrint: function(e) {
|
onPrint: function(e) {
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,10 @@ define([
|
||||||
'<td class="left"><label><%= scope.textAlignGuides %></label></td>',
|
'<td class="left"><label><%= scope.textAlignGuides %></label></td>',
|
||||||
'<td class="right"><span id="fms-chb-align-guides" /></td>',
|
'<td class="right"><span id="fms-chb-align-guides" /></td>',
|
||||||
'</tr>','<tr class="divider edit"></tr>',
|
'</tr>','<tr class="divider edit"></tr>',
|
||||||
|
'<tr class="edit">',
|
||||||
|
'<td class="left"><label><%= scope.textCompatible %></label></td>',
|
||||||
|
'<td class="right"><span id="fms-chb-compatible" /></td>',
|
||||||
|
'</tr>','<tr class="divider edit"></tr>',
|
||||||
'<tr class="autosave">',
|
'<tr class="autosave">',
|
||||||
'<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>',
|
'<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>',
|
||||||
'<td class="right"><span id="fms-chb-autosave" /></td>',
|
'<td class="right"><span id="fms-chb-autosave" /></td>',
|
||||||
|
@ -270,6 +274,11 @@ define([
|
||||||
labelText: this.strSpellCheckMode
|
labelText: this.strSpellCheckMode
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.chCompatible = new Common.UI.CheckBox({
|
||||||
|
el: $('#fms-chb-compatible'),
|
||||||
|
labelText: this.textOldVersions
|
||||||
|
});
|
||||||
|
|
||||||
this.chAutosave = new Common.UI.CheckBox({
|
this.chAutosave = new Common.UI.CheckBox({
|
||||||
el: $('#fms-chb-autosave'),
|
el: $('#fms-chb-autosave'),
|
||||||
labelText: this.strAutosave
|
labelText: this.strAutosave
|
||||||
|
@ -448,6 +457,7 @@ define([
|
||||||
|
|
||||||
this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck"));
|
this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck"));
|
||||||
this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
||||||
|
this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible"));
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
|
@ -469,6 +479,8 @@ define([
|
||||||
if (this.mode.canForcesave)
|
if (this.mode.canForcesave)
|
||||||
Common.localStorage.setItem("de-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
|
Common.localStorage.setItem("de-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
|
||||||
Common.localStorage.setItem("de-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0);
|
Common.localStorage.setItem("de-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0);
|
||||||
|
Common.localStorage.setItem("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0);
|
||||||
|
Common.Utils.InternalSettings.set("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0);
|
||||||
Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked());
|
Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked());
|
||||||
Common.localStorage.save();
|
Common.localStorage.save();
|
||||||
|
|
||||||
|
@ -531,7 +543,9 @@ define([
|
||||||
txtFitWidth: 'Fit to Width',
|
txtFitWidth: 'Fit to Width',
|
||||||
textForceSave: 'Save to Server',
|
textForceSave: 'Save to Server',
|
||||||
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
||||||
strResolvedComment: 'Turn on display of the resolved comments'
|
strResolvedComment: 'Turn on display of the resolved comments',
|
||||||
|
textCompatible: 'Compatibility',
|
||||||
|
textOldVersions: 'Make the files compatible with older MS Word versions when saved as DOCX'
|
||||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||||
|
|
||||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||||
|
|
|
@ -364,7 +364,7 @@ define([
|
||||||
|
|
||||||
this.langMenu.prevTip = info.value;
|
this.langMenu.prevTip = info.value;
|
||||||
|
|
||||||
var lang = this.langMenu.items.find(function(item){ return item.caption == info.displayValue; });
|
var lang = _.find(this.langMenu.items, function(item) { return item.caption == info.displayValue; });
|
||||||
if (lang)
|
if (lang)
|
||||||
lang.setChecked(true);
|
lang.setChecked(true);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -330,6 +330,7 @@
|
||||||
"DE.Controllers.LeftMenu.txtUntitled": "Untitled",
|
"DE.Controllers.LeftMenu.txtUntitled": "Untitled",
|
||||||
"DE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
|
"DE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
|
||||||
"DE.Controllers.LeftMenu.warnDownloadAsRTF": "If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?",
|
"DE.Controllers.LeftMenu.warnDownloadAsRTF": "If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?",
|
||||||
|
"DE.Controllers.LeftMenu.txtCompatible": "The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.<br>Use the 'Compatibility' option of the advanced settings if you want to make the files compatible with older MS Word versions.",
|
||||||
"DE.Controllers.Main.applyChangesTextText": "Loading the changes...",
|
"DE.Controllers.Main.applyChangesTextText": "Loading the changes...",
|
||||||
"DE.Controllers.Main.applyChangesTitleText": "Loading the Changes",
|
"DE.Controllers.Main.applyChangesTitleText": "Loading the Changes",
|
||||||
"DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.",
|
"DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.",
|
||||||
|
@ -1423,6 +1424,8 @@
|
||||||
"DE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
"DE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
||||||
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
|
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
|
||||||
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
||||||
|
"DE.Views.FileMenuPanels.Settings.textCompatible": "Compatibility",
|
||||||
|
"DE.Views.FileMenuPanels.Settings.textOldVersions": "Make the files compatible with older MS Word versions when saved as DOCX",
|
||||||
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center",
|
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center",
|
||||||
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left",
|
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left",
|
||||||
"DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page",
|
"DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page",
|
||||||
|
|
|
@ -322,7 +322,7 @@ define([
|
||||||
if (type && typeof type[1] === 'string') {
|
if (type && typeof type[1] === 'string') {
|
||||||
this.api.asc_DownloadOrigin(true)
|
this.api.asc_DownloadOrigin(true)
|
||||||
} else {
|
} else {
|
||||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1113,17 +1113,16 @@ define([
|
||||||
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions) {
|
onAdvancedOptions: function(type, advOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
|
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
|
||||||
var picker,
|
var picker,
|
||||||
pages = [],
|
pages = [],
|
||||||
pagesName = [];
|
pagesName = [];
|
||||||
|
|
||||||
_.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) {
|
_.each(advOptions.asc_getCodePages(), function(page) {
|
||||||
pages.push(page.asc_getCodePage());
|
pages.push(page.asc_getCodePage());
|
||||||
pagesName.push(page.asc_getCodePageName());
|
pagesName.push(page.asc_getCodePageName());
|
||||||
});
|
});
|
||||||
|
@ -1150,7 +1149,7 @@ define([
|
||||||
var encoding = picker.value;
|
var encoding = picker.value;
|
||||||
|
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding));
|
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding));
|
||||||
|
|
||||||
if (!me._isDocReady) {
|
if (!me._isDocReady) {
|
||||||
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
||||||
|
@ -1166,7 +1165,7 @@ define([
|
||||||
container: '#txt-encoding',
|
container: '#txt-encoding',
|
||||||
toolbar: false,
|
toolbar: false,
|
||||||
rotateEffect: true,
|
rotateEffect: true,
|
||||||
value: [advOptions.asc_getOptions().asc_getRecommendedSettings().asc_getCodePage()],
|
value: [advOptions.asc_getRecommendedSettings().asc_getCodePage()],
|
||||||
cols: [{
|
cols: [{
|
||||||
values: pages,
|
values: pages,
|
||||||
displayValues: pagesName
|
displayValues: pagesName
|
||||||
|
|
|
@ -415,9 +415,38 @@ define([
|
||||||
var document = Common.SharedSettings.get('document') || {},
|
var document = Common.SharedSettings.get('document') || {},
|
||||||
info = document.info || {};
|
info = document.info || {};
|
||||||
|
|
||||||
$('#settings-document-title').html(document.title ? document.title : me.unknownText);
|
document.title ? $('#settings-document-title').html(document.title) : $('.display-document-title').remove();
|
||||||
$('#settings-document-autor').html(info.author ? info.author : me.unknownText);
|
info.author ? $('#settings-document-owner').html(info.author) : $('.display-owner').remove();
|
||||||
$('#settings-document-date').html(info.created ? info.created : me.unknownText);
|
info.uploaded ? $('#settings-doc-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove();
|
||||||
|
info.folder ? $('#settings-doc-location').html(info.folder) : $('.display-location').remove();
|
||||||
|
|
||||||
|
var appProps = (this.api) ? this.api.asc_getAppProps() : null;
|
||||||
|
if (appProps) {
|
||||||
|
var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || '');
|
||||||
|
appName ? $('#settings-doc-application').html(appName) : $('.display-application').remove();
|
||||||
|
}
|
||||||
|
var props = (this.api) ? this.api.asc_getCoreProps() : null,
|
||||||
|
value;
|
||||||
|
if (props) {
|
||||||
|
value = props.asc_getTitle();
|
||||||
|
value ? $('#settings-doc-title').html(value) : $('.display-title').remove();
|
||||||
|
value = props.asc_getSubject();
|
||||||
|
value ? $('#settings-doc-subject').html(value) : $('.display-subject').remove();
|
||||||
|
value = props.asc_getDescription();
|
||||||
|
value ? $('#settings-doc-comment').html(value) : $('.display-comment').remove();
|
||||||
|
value = props.asc_getModified();
|
||||||
|
value ? $('#settings-doc-last-mod').html(value.toLocaleString()) : $('.display-last-mode').remove();
|
||||||
|
value = props.asc_getLastModifiedBy();
|
||||||
|
value ? $('#settings-doc-mod-by').html(value) : $('.display-mode-by').remove();
|
||||||
|
value = props.asc_getCreated();
|
||||||
|
value ? $('#settings-doc-date').html(value.toLocaleString()) : $('.display-created-date').remove();
|
||||||
|
value = props.asc_getCreator();
|
||||||
|
var templateCreator = "";
|
||||||
|
value && value.split(/\s*[,;]\s*/).forEach(function(item) {
|
||||||
|
templateCreator = templateCreator + "<li class='item-content'><div class='item-inner'><div class='item-title'>" + item + "</div></div></li>";
|
||||||
|
});
|
||||||
|
templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -538,13 +567,13 @@ define([
|
||||||
me.warnDownloadAs,
|
me.warnDownloadAs,
|
||||||
me.notcriticalErrorTitle,
|
me.notcriticalErrorTitle,
|
||||||
function () {
|
function () {
|
||||||
me.api.asc_DownloadAs(format);
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
me.api.asc_DownloadAs(format);
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -302,22 +302,32 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textAuthor %></div>
|
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-owner">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-document-autor" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-document-owner" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textCreateDate %></div>
|
<div class="content-block-title display-location"><%= scope.textLocation %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-location">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-document-date" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-doc-location" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-uploaded"><%= scope.textUploaded %></div>
|
||||||
|
<div class="list-block display-uploaded">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-uploaded" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -357,6 +367,87 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="content-block-title display-subject"><%= scope.textSubject %></div>
|
||||||
|
<div class="list-block display-subject">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-subject" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-title"><%= scope.textTitle %></div>
|
||||||
|
<div class="list-block display-title">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-title" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-comment"><%= scope.textComment %></div>
|
||||||
|
<div class="list-block display-comment">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-comment" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-last-mode"><%= scope.textLastModified %></div>
|
||||||
|
<div class="list-block display-last-mode">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-last-mod" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-mode-by"><%= scope.textLastModifiedBy %></div>
|
||||||
|
<div class="list-block display-mode-by">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-mod-by" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-created-date"><%= scope.textCreated %></div>
|
||||||
|
<div class="list-block display-created-date">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-date" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-application"><%= scope.textApplication %></div>
|
||||||
|
<div class="list-block display-application">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-application" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-author"><%= scope.textAuthor %></div>
|
||||||
|
<div class="list-block display-author">
|
||||||
|
<ul id="list-creator">
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-doc-author" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -289,7 +289,18 @@ define([
|
||||||
textCollaboration: 'Collaboration',
|
textCollaboration: 'Collaboration',
|
||||||
textCommentingDisplay: 'Commenting Display',
|
textCommentingDisplay: 'Commenting Display',
|
||||||
textDisplayComments: 'Comments',
|
textDisplayComments: 'Comments',
|
||||||
textDisplayResolvedComments: 'Resolved Comments'
|
textDisplayResolvedComments: 'Resolved Comments',
|
||||||
|
textSubject: 'Subject',
|
||||||
|
textTitle: 'Title',
|
||||||
|
textComment: 'Comment',
|
||||||
|
textOwner: 'Owner',
|
||||||
|
textApplication : 'Application',
|
||||||
|
textLocation: 'Location',
|
||||||
|
textUploaded: 'Uploaded',
|
||||||
|
textLastModified: 'Last Modified',
|
||||||
|
textLastModifiedBy: 'Last Modified By',
|
||||||
|
textCreated: 'Created'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})(), DE.Views.Settings || {}))
|
})(), DE.Views.Settings || {}))
|
||||||
|
|
|
@ -495,6 +495,16 @@
|
||||||
"DE.Views.Settings.textCommentingDisplay": "Commenting Display",
|
"DE.Views.Settings.textCommentingDisplay": "Commenting Display",
|
||||||
"DE.Views.Settings.textDisplayComments": "Comments",
|
"DE.Views.Settings.textDisplayComments": "Comments",
|
||||||
"DE.Views.Settings.textDisplayResolvedComments": "Resolved Comments",
|
"DE.Views.Settings.textDisplayResolvedComments": "Resolved Comments",
|
||||||
|
"DE.Views.Settings.textSubject": "Subject",
|
||||||
|
"DE.Views.Settings.textTitle": "Title",
|
||||||
|
"DE.Views.Settings.textComment": "Comment",
|
||||||
|
"DE.Views.Settings.textOwner": "Owner",
|
||||||
|
"DE.Views.Settings.textApplication": "Application",
|
||||||
|
"DE.Views.Settings.textLocation": "Location",
|
||||||
|
"DE.Views.Settings.textUploaded": "Uploaded",
|
||||||
|
"DE.Views.Settings.textLastModified": "Last Modified",
|
||||||
|
"DE.Views.Settings.textLastModifiedBy": "Last Modified By",
|
||||||
|
"DE.Views.Settings.textCreated": "Created",
|
||||||
"DE.Views.Toolbar.textBack": "Back",
|
"DE.Views.Toolbar.textBack": "Back",
|
||||||
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
||||||
"Common.Views.Collaboration.textReviewing": "Review",
|
"Common.Views.Collaboration.textReviewing": "Review",
|
||||||
|
|
|
@ -201,11 +201,11 @@ PE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function onPrint() {
|
function onPrint() {
|
||||||
if (permissions.print!==false)
|
if (permissions.print!==false)
|
||||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
@ -267,7 +267,7 @@ PE.ApplicationController = new(function(){
|
||||||
common.utils.openLink(embedConfig.saveUrl);
|
common.utils.openLink(embedConfig.saveUrl);
|
||||||
} else
|
} else
|
||||||
if (api && permissions.print!==false){
|
if (api && permissions.print!==false){
|
||||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Analytics.trackEvent('Save');
|
Common.Analytics.trackEvent('Save');
|
||||||
|
@ -558,7 +558,7 @@ PE.ApplicationController = new(function(){
|
||||||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
|
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true));
|
||||||
}
|
}
|
||||||
// Helpers
|
// Helpers
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
|
@ -215,7 +215,7 @@ define([
|
||||||
case 'back': break;
|
case 'back': break;
|
||||||
case 'save': this.api.asc_Save(); break;
|
case 'save': this.api.asc_Save(); break;
|
||||||
case 'save-desktop': this.api.asc_DownloadAs(); break;
|
case 'save-desktop': this.api.asc_DownloadAs(); break;
|
||||||
case 'print': this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); break;
|
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break;
|
||||||
case 'exit': Common.NotificationCenter.trigger('goback'); break;
|
case 'exit': Common.NotificationCenter.trigger('goback'); break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
|
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
|
||||||
|
@ -247,13 +247,13 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
clickSaveAsFormat: function(menu, format) {
|
clickSaveAsFormat: function(menu, format) {
|
||||||
this.api.asc_DownloadAs(format);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
clickSaveCopyAsFormat: function(menu, format, ext) {
|
clickSaveCopyAsFormat: function(menu, format, ext) {
|
||||||
this.isFromFileDownloadAs = ext;
|
this.isFromFileDownloadAs = ext;
|
||||||
this.api.asc_DownloadAs(format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,7 @@ define([
|
||||||
|
|
||||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||||
_format = Asc.c_oAscFileType.PPTX;
|
_format = Asc.c_oAscFileType.PPTX;
|
||||||
this.api.asc_DownloadAs(_format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||||
},
|
},
|
||||||
|
|
||||||
onProcessMouse: function(data) {
|
onProcessMouse: function(data) {
|
||||||
|
@ -1758,7 +1758,7 @@ define([
|
||||||
if (!this.appOptions.canPrint || this.isModalShowed) return;
|
if (!this.appOptions.canPrint || this.isModalShowed) return;
|
||||||
|
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
||||||
Common.component.Analytics.trackEvent('Print');
|
Common.component.Analytics.trackEvent('Print');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1778,20 +1778,23 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions) {
|
onAdvancedOptions: function(type, advOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
title: Common.Views.OpenDialog.prototype.txtTitleProtected,
|
title: Common.Views.OpenDialog.prototype.txtTitleProtected,
|
||||||
|
|
|
@ -161,7 +161,7 @@ define([
|
||||||
if ( !_format || _supported.indexOf(_format) < 0 )
|
if ( !_format || _supported.indexOf(_format) < 0 )
|
||||||
_format = Asc.c_oAscFileType.PDF;
|
_format = Asc.c_oAscFileType.PDF;
|
||||||
|
|
||||||
_main.api.asc_DownloadAs(_format);
|
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||||
},
|
},
|
||||||
'go:editor': function() {
|
'go:editor': function() {
|
||||||
Common.Gateway.requestEditRights();
|
Common.Gateway.requestEditRights();
|
||||||
|
@ -893,7 +893,7 @@ define([
|
||||||
|
|
||||||
onPrint: function(e) {
|
onPrint: function(e) {
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
|
|
||||||
|
@ -1962,24 +1962,42 @@ define([
|
||||||
var themeStore = this.getCollection('SlideThemes'),
|
var themeStore = this.getCollection('SlideThemes'),
|
||||||
mainController = this.getApplication().getController('Main');
|
mainController = this.getApplication().getController('Main');
|
||||||
if (themeStore) {
|
if (themeStore) {
|
||||||
var arr = [];
|
var arr1 = [], arr2 = [];
|
||||||
_.each(defaultThemes.concat(docThemes), function(theme) {
|
_.each(defaultThemes, function(theme, index) {
|
||||||
arr.push(new Common.UI.DataViewModel({
|
var tip = mainController.translationTable[theme.get_Name()] || theme.get_Name();
|
||||||
imageUrl: theme.get_Image(),
|
arr1.push(new Common.UI.DataViewModel({
|
||||||
uid : Common.UI.getId(),
|
uid : Common.UI.getId(),
|
||||||
themeId : theme.get_Index(),
|
themeId : theme.get_Index(),
|
||||||
tip : mainController.translationTable[theme.get_Name()] || theme.get_Name(),
|
tip : tip,
|
||||||
itemWidth : 85,
|
offsety : index * 38
|
||||||
itemHeight : 38
|
|
||||||
}));
|
}));
|
||||||
me.toolbar.listTheme.menuPicker.store.add({
|
arr2.push({
|
||||||
imageUrl: theme.get_Image(),
|
|
||||||
uid : Common.UI.getId(),
|
uid : Common.UI.getId(),
|
||||||
themeId : theme.get_Index(),
|
themeId : theme.get_Index(),
|
||||||
tip : mainController.translationTable[theme.get_Name()] || theme.get_Name()
|
tip : tip,
|
||||||
|
offsety : index * 38
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
themeStore.reset(arr);
|
_.each(docThemes, function(theme) {
|
||||||
|
var image = theme.get_Image(),
|
||||||
|
tip = mainController.translationTable[theme.get_Name()] || theme.get_Name();
|
||||||
|
arr1.push(new Common.UI.DataViewModel({
|
||||||
|
imageUrl: image,
|
||||||
|
uid : Common.UI.getId(),
|
||||||
|
themeId : theme.get_Index(),
|
||||||
|
tip : tip,
|
||||||
|
offsety : 0
|
||||||
|
}));
|
||||||
|
arr2.push({
|
||||||
|
imageUrl: image,
|
||||||
|
uid : Common.UI.getId(),
|
||||||
|
themeId : theme.get_Index(),
|
||||||
|
tip : tip,
|
||||||
|
offsety : 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
themeStore.reset(arr1);
|
||||||
|
me.toolbar.listTheme.menuPicker.store.reset(arr2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.toolbar.listTheme.menuPicker.store.length > 0 && me.toolbar.listTheme.rendered){
|
if (me.toolbar.listTheme.menuPicker.store.length > 0 && me.toolbar.listTheme.rendered){
|
||||||
|
|
|
@ -5,18 +5,28 @@
|
||||||
<tr><td class="padding-large">
|
<tr><td class="padding-large">
|
||||||
<table id="hf-dlg-tbl-datetime" cols="2" style="margin-left: 22px;">
|
<table id="hf-dlg-tbl-datetime" cols="2" style="margin-left: 22px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding-small" style="width: 180px;">
|
<td colspan="2" style="padding-bottom: 4px;">
|
||||||
|
<div id="hf-dlg-radio-update"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="padding-small" style="padding-left: 22px;">
|
||||||
<label style="display:block;" class="input-label"><%= scope.textFormat %></label>
|
<label style="display:block;" class="input-label"><%= scope.textFormat %></label>
|
||||||
<div id="hf-dlg-combo-format" style="width: 100%;"></div>
|
<div id="hf-dlg-combo-format" style="width: 100%;"></div>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding-small" style="width: 180px; padding-left: 5px;">
|
<td class="padding-small" style="padding-left: 5px;">
|
||||||
<label style="display:block;" class="input-label"><%= scope.textLang %></label>
|
<label style="display:block;" class="input-label"><%= scope.textLang %></label>
|
||||||
<div id="hf-dlg-combo-lang" style="width: 100%;"></div>
|
<div id="hf-dlg-combo-lang" style="width: 100%;"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="padding-bottom: 4px;">
|
||||||
|
<div id="hf-dlg-radio-fixed"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div id="hf-dlg-chb-update"></div>
|
<div id="hf-dlg-input-fixed" class="input-row" style="margin-left: 22px;"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -2031,8 +2031,8 @@ define([
|
||||||
style: 'max-height: 300px;',
|
style: 'max-height: 300px;',
|
||||||
store : PE.getCollection('SlideThemes'),
|
store : PE.getCollection('SlideThemes'),
|
||||||
itemTemplate: _.template([
|
itemTemplate: _.template([
|
||||||
'<div class="style" id="<%= id %>" style="width: <%= itemWidth %>px;">',
|
'<div class="style" id="<%= id %>"">',
|
||||||
'<div style="background-image: url(<%= imageUrl %>); width: <%= itemWidth %>px; height: <%= itemHeight %>px;"/>',
|
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"/>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join(''))
|
].join(''))
|
||||||
}).on('item:click', function(picker, item, record, e) {
|
}).on('item:click', function(picker, item, record, e) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
PE.Views.HeaderFooterDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
|
PE.Views.HeaderFooterDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
|
||||||
options: {
|
options: {
|
||||||
contentWidth: 360,
|
contentWidth: 360,
|
||||||
height: 340
|
height: 380
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
|
@ -152,12 +152,27 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
});
|
});
|
||||||
this.dateControls.push(this.cmbFormat);
|
this.dateControls.push(this.cmbFormat);
|
||||||
|
|
||||||
this.chUpdate = new Common.UI.CheckBox({
|
this.radioUpdate = new Common.UI.RadioBox({
|
||||||
el: $('#hf-dlg-chb-update'),
|
el: $('#hf-dlg-radio-update'),
|
||||||
labelText: this.textUpdate,
|
labelText: this.textUpdate,
|
||||||
value: 'checked'
|
name: 'asc-radio-header-update',
|
||||||
|
checked: true
|
||||||
|
}).on('change', _.bind(this.setDateTimeType, this, 'update'));
|
||||||
|
this.dateControls.push(this.radioUpdate);
|
||||||
|
|
||||||
|
this.radioFixed = new Common.UI.RadioBox({
|
||||||
|
el: $('#hf-dlg-radio-fixed'),
|
||||||
|
labelText: this.textFixed,
|
||||||
|
name: 'asc-radio-header-update'
|
||||||
|
}).on('change', _.bind(this.setDateTimeType, this, 'fixed'));
|
||||||
|
this.dateControls.push(this.radioFixed);
|
||||||
|
|
||||||
|
this.inputFixed = new Common.UI.InputField({
|
||||||
|
el: $('#hf-dlg-input-fixed'),
|
||||||
|
validateOnBlur: false,
|
||||||
|
style : 'width: 100%;'
|
||||||
});
|
});
|
||||||
this.dateControls.push(this.chUpdate);
|
this.dateControls.push(this.inputFixed);
|
||||||
|
|
||||||
this.chNotTitle = new Common.UI.CheckBox({
|
this.chNotTitle = new Common.UI.CheckBox({
|
||||||
el: $('#hf-dlg-chb-not-title'),
|
el: $('#hf-dlg-chb-not-title'),
|
||||||
|
@ -186,6 +201,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
_.each(this.dateControls, function(item) {
|
_.each(this.dateControls, function(item) {
|
||||||
item.setDisabled(!newValue);
|
item.setDisabled(!newValue);
|
||||||
});
|
});
|
||||||
|
newValue && this.setDateTimeType(this.radioFixed.getValue() ? 'fixed' : 'update', null, true);
|
||||||
this.props.put_ShowDateTime(newValue);
|
this.props.put_ShowDateTime(newValue);
|
||||||
} else if (type == 'slide') {
|
} else if (type == 'slide') {
|
||||||
this.props.put_ShowSlideNum(newValue);
|
this.props.put_ShowSlideNum(newValue);
|
||||||
|
@ -196,7 +212,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
this.props.updateView();
|
this.props.updateView();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateFormats: function(lang, format) {
|
updateFormats: function(lang) {
|
||||||
var props = new AscCommonSlide.CAscDateTime();
|
var props = new AscCommonSlide.CAscDateTime();
|
||||||
props.put_Lang(lang);
|
props.put_Lang(lang);
|
||||||
var data = props.get_DateTimeExamples(),
|
var data = props.get_DateTimeExamples(),
|
||||||
|
@ -210,17 +226,25 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.cmbFormat.setData(arr);
|
this.cmbFormat.setData(arr);
|
||||||
format = format || this.defaultFormats[lang];
|
var format = this.defaultFormats[lang];
|
||||||
this.cmbFormat.setValue(format ? format : arr[0].value);
|
this.cmbFormat.setValue(format ? format : arr[0].value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setDateTimeType: function(type, field, newValue) {
|
||||||
|
if (newValue) {
|
||||||
|
this.cmbLang.setDisabled(type == 'fixed');
|
||||||
|
this.cmbFormat.setDisabled(type == 'fixed');
|
||||||
|
this.inputFixed.setDisabled(type == 'update');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onSelectFormat: function(format) {
|
onSelectFormat: function(format) {
|
||||||
format = format || this.cmbFormat.getValue();
|
if (this.radioUpdate.getValue()) {
|
||||||
if (this.chUpdate.getValue()=='checked') {
|
format = format || this.cmbFormat.getValue();
|
||||||
this.props.get_DateTime().put_DateTime(format);
|
this.props.get_DateTime().put_DateTime(format);
|
||||||
} else {
|
} else {
|
||||||
this.props.get_DateTime().put_DateTime(null);
|
this.props.get_DateTime().put_DateTime(null);
|
||||||
this.props.get_DateTime().put_CustomDateTime(format);
|
this.props.get_DateTime().put_CustomDateTime(this.inputFixed.getValue());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -236,16 +260,17 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
|
|
||||||
var format,
|
var format,
|
||||||
datetime = slideprops.get_DateTime(),
|
datetime = slideprops.get_DateTime(),
|
||||||
item = this.cmbLang.store.findWhere({value: datetime.get_Lang() || this.lang});
|
item = this.cmbLang.store.findWhere({value: datetime ? (datetime.get_Lang() || this.lang) : this.lang});
|
||||||
this._originalLang = item ? item.get('value') : 0x0409;
|
this._originalLang = item ? item.get('value') : 0x0409;
|
||||||
this.cmbLang.setValue(this._originalLang);
|
this.cmbLang.setValue(this._originalLang);
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
format = datetime.get_DateTime();
|
format = datetime.get_DateTime();
|
||||||
this.chUpdate.setValue(!!format, true);
|
!format ? this.radioFixed.setValue(true) : this.radioUpdate.setValue(true);
|
||||||
!format && (format = datetime.get_CustomDateTime());
|
!format && (this.inputFixed.setValue(datetime.get_CustomDateTime() || ''));
|
||||||
|
this.setDateTimeType(!format ? 'fixed' : 'update', null, true);
|
||||||
}
|
}
|
||||||
this.updateFormats(this.cmbLang.getValue(), format);
|
this.updateFormats(this.cmbLang.getValue());
|
||||||
|
|
||||||
val = slideprops.get_ShowSlideNum();
|
val = slideprops.get_ShowSlideNum();
|
||||||
this.chSlide.setValue(val, true);
|
this.chSlide.setValue(val, true);
|
||||||
|
@ -323,7 +348,8 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
textNotTitle: 'Don\'t show on title slide',
|
textNotTitle: 'Don\'t show on title slide',
|
||||||
textPreview: 'Preview',
|
textPreview: 'Preview',
|
||||||
diffLanguage: 'You can’t use a date format in a different language than the slide master.\nTo change the master, click \'Apply to all\' instead of \'Apply\'',
|
diffLanguage: 'You can’t use a date format in a different language than the slide master.\nTo change the master, click \'Apply to all\' instead of \'Apply\'',
|
||||||
notcriticalErrorTitle: 'Warning'
|
notcriticalErrorTitle: 'Warning',
|
||||||
|
textFixed: 'Fixed'
|
||||||
|
|
||||||
}, PE.Views.HeaderFooterDialog || {}))
|
}, PE.Views.HeaderFooterDialog || {}))
|
||||||
});
|
});
|
|
@ -351,7 +351,7 @@ define([
|
||||||
$parent.find('#status-label-lang').text(info.displayValue);
|
$parent.find('#status-label-lang').text(info.displayValue);
|
||||||
|
|
||||||
this.langMenu.prevTip = info.value;
|
this.langMenu.prevTip = info.value;
|
||||||
var lang = this.langMenu.items.find(function(item){ return item.caption == info.displayValue; });
|
var lang = _.find(this.langMenu.items, function(item) { return item.caption == info.displayValue; });
|
||||||
if (lang)
|
if (lang)
|
||||||
lang.setChecked(true);
|
lang.setChecked(true);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -804,12 +804,12 @@ define([
|
||||||
|
|
||||||
me.listTheme.fieldPicker.itemTemplate = _.template([
|
me.listTheme.fieldPicker.itemTemplate = _.template([
|
||||||
'<div class="style" id="<%= id %>">',
|
'<div class="style" id="<%= id %>">',
|
||||||
'<div style="background-image: url(<%= imageUrl %>); width: ' + me.listTheme.itemWidth + 'px; height: ' + me.listTheme.itemHeight + 'px;"/>',
|
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"/>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join(''));
|
].join(''));
|
||||||
me.listTheme.menuPicker.itemTemplate = _.template([
|
me.listTheme.menuPicker.itemTemplate = _.template([
|
||||||
'<div class="style" id="<%= id %>">',
|
'<div class="style" id="<%= id %>">',
|
||||||
'<div style="background-image: url(<%= imageUrl %>); width: ' + me.listTheme.itemWidth + 'px; height: ' + me.listTheme.itemHeight + 'px;"/>',
|
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"/>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join(''));
|
].join(''));
|
||||||
|
|
||||||
|
|
|
@ -1240,6 +1240,7 @@
|
||||||
"PE.Views.HeaderFooterDialog.textPreview": "Preview",
|
"PE.Views.HeaderFooterDialog.textPreview": "Preview",
|
||||||
"PE.Views.HeaderFooterDialog.diffLanguage": "You can’t use a date format in a different language than the slide master.<br>To change the master, click 'Apply to all' instead of 'Apply'",
|
"PE.Views.HeaderFooterDialog.diffLanguage": "You can’t use a date format in a different language than the slide master.<br>To change the master, click 'Apply to all' instead of 'Apply'",
|
||||||
"PE.Views.HeaderFooterDialog.notcriticalErrorTitle": "Warning",
|
"PE.Views.HeaderFooterDialog.notcriticalErrorTitle": "Warning",
|
||||||
|
"PE.Views.HeaderFooterDialog.textFixed": "Fixed",
|
||||||
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
|
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
|
||||||
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
|
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
|
||||||
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Display",
|
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Display",
|
||||||
|
|
|
@ -332,4 +332,11 @@
|
||||||
z-index: @zindex-dropdown - 20;
|
z-index: @zindex-dropdown - 20;
|
||||||
background-color: @gray-light;
|
background-color: @gray-light;
|
||||||
border: 1px solid @gray;
|
border: 1px solid @gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-theme {
|
||||||
|
width: 85px;
|
||||||
|
height: 38px;
|
||||||
|
.background-ximage('../../../../../../sdkjs/common/Images/themes_thumbnail.png', '../../../../../../sdkjs/common/Images/themes_thumbnail@2x.png', 85px);
|
||||||
|
background-size: cover
|
||||||
|
}
|
||||||
|
|
|
@ -311,7 +311,7 @@ define([
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._state.isFromGatewayDownloadAs = true;
|
this._state.isFromGatewayDownloadAs = true;
|
||||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true));
|
||||||
},
|
},
|
||||||
|
|
||||||
goBack: function(current) {
|
goBack: function(current) {
|
||||||
|
@ -1089,11 +1089,10 @@ define([
|
||||||
this.isThumbnailsShow = isShow;
|
this.isThumbnailsShow = isShow;
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions) {
|
onAdvancedOptions: function(type, advOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
$(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask);
|
$(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask);
|
||||||
|
|
|
@ -190,9 +190,51 @@ define([
|
||||||
me.initPageApplicationSettings();
|
me.initPageApplicationSettings();
|
||||||
} else if ('#color-schemes-view' == pageId) {
|
} else if ('#color-schemes-view' == pageId) {
|
||||||
me.initPageColorSchemes();
|
me.initPageColorSchemes();
|
||||||
|
} else if ('#settings-info-view' == pageId) {
|
||||||
|
me.initPageInfo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initPageInfo: function() {
|
||||||
|
var document = Common.SharedSettings.get('document') || {},
|
||||||
|
info = document.info || {};
|
||||||
|
|
||||||
|
document.title ? $('#settings-presentation-title').html(document.title) : $('.display-presentation-title').remove();
|
||||||
|
info.author ? $('#settings-pe-owner').html(info.author) : $('.display-owner').remove();
|
||||||
|
info.uploaded ? $('#settings-pe-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove();
|
||||||
|
info.folder ? $('#settings-pe-location').html(info.folder) : $('.display-location').remove();
|
||||||
|
|
||||||
|
var appProps = (this.api) ? this.api.asc_getAppProps() : null;
|
||||||
|
if (appProps) {
|
||||||
|
var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || '');
|
||||||
|
appName ? $('#settings-pe-application').html(appName) : $('.display-application').remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
var props = (this.api) ? this.api.asc_getCoreProps() : null,
|
||||||
|
value;
|
||||||
|
if (props) {
|
||||||
|
value = props.asc_getTitle();
|
||||||
|
value ? $('#settings-pe-title').html(value) : $('.display-title').remove();
|
||||||
|
value = props.asc_getSubject();
|
||||||
|
value ? $('#settings-pe-subject').html(value) : $('.display-subject').remove();
|
||||||
|
value = props.asc_getDescription();
|
||||||
|
value ? $('#settings-pe-comment').html(value) : $('.display-comment').remove();
|
||||||
|
value = props.asc_getModified();
|
||||||
|
value ? $('#settings-pe-last-mod').html(value.toLocaleString()) : $('.display-last-mode').remove();
|
||||||
|
value = props.asc_getLastModifiedBy();
|
||||||
|
value ? $('#settings-pe-mod-by').html(value) : $('.display-mode-by').remove();
|
||||||
|
value = props.asc_getCreated();
|
||||||
|
value ? $('#settings-pe-date').html(value.toLocaleString()) : $('.display-created-date').remove();
|
||||||
|
value = props.asc_getCreator();
|
||||||
|
var templateCreator = "";
|
||||||
|
value && value.split(/\s*[,;]\s*/).forEach(function(item) {
|
||||||
|
templateCreator = templateCreator + "<li class='item-content'><div class='item-inner'><div class='item-title'>" + item + "</div></div></li>";
|
||||||
|
});
|
||||||
|
templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
onCollaboration: function() {
|
onCollaboration: function() {
|
||||||
PE.getController('Common.Controllers.Collaboration').showModal();
|
PE.getController('Common.Controllers.Collaboration').showModal();
|
||||||
},
|
},
|
||||||
|
@ -339,7 +381,7 @@ define([
|
||||||
|
|
||||||
if (format) {
|
if (format) {
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
me.api.asc_DownloadAs(format);
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,8 +143,8 @@
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<div class="page" data-page="settings-info-view">
|
<div class="page" data-page="settings-info-view">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="content-block-title"><%= scope.textPresentTitle %></div>
|
<div class="content-block-title display-presentation-title"><%= scope.textPresentTitle %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-presentation-title">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
|
@ -153,22 +153,112 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textAuthor %></div>
|
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-owner">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-presentation-autor" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-pe-owner" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textCreateDate %></div>
|
<div class="content-block-title display-location"><%= scope.textLocation %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-location">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-presentation-date" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-pe-location" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-uploaded"><%= scope.textUploaded %></div>
|
||||||
|
<div class="list-block display-uploaded">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-uploaded" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-subject"><%= scope.textSubject %></div>
|
||||||
|
<div class="list-block display-subject">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-subject" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-title"><%= scope.textTitle %></div>
|
||||||
|
<div class="list-block display-title">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-title" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-comment"><%= scope.textComment %></div>
|
||||||
|
<div class="list-block display-comment">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-comment" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-last-mode"><%= scope.textLastModified %></div>
|
||||||
|
<div class="list-block display-last-mode">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-last-mod" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-mode-by"><%= scope.textLastModifiedBy %></div>
|
||||||
|
<div class="list-block display-mode-by">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-mod-by" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-created-date"><%= scope.textCreated %></div>
|
||||||
|
<div class="list-block display-created-date">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-date" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-application"><%= scope.textApplication %></div>
|
||||||
|
<div class="list-block display-application">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-application" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-author"><%= scope.textAuthor %></div>
|
||||||
|
<div class="list-block display-author">
|
||||||
|
<ul id="list-creator">
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-pe-author" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -168,13 +168,6 @@ define([
|
||||||
|
|
||||||
showInfo: function () {
|
showInfo: function () {
|
||||||
this.showPage('#settings-info-view');
|
this.showPage('#settings-info-view');
|
||||||
|
|
||||||
var document = Common.SharedSettings.get('document') || {},
|
|
||||||
info = document.info || {};
|
|
||||||
|
|
||||||
$('#settings-presentation-title').html(document.title ? document.title : this.unknownText);
|
|
||||||
$('#settings-presentation-autor').html(info.author ? info.author : this.unknownText);
|
|
||||||
$('#settings-presentation-date').html(info.created ? info.created : this.unknownText);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showDownload: function () {
|
showDownload: function () {
|
||||||
|
@ -248,7 +241,17 @@ define([
|
||||||
textPoint: 'Point',
|
textPoint: 'Point',
|
||||||
textInch: 'Inch',
|
textInch: 'Inch',
|
||||||
textColorSchemes: 'Color Schemes',
|
textColorSchemes: 'Color Schemes',
|
||||||
textCollaboration: 'Collaboration'
|
textCollaboration: 'Collaboration',
|
||||||
|
textSubject: 'Subject',
|
||||||
|
textTitle: 'Title',
|
||||||
|
textComment: 'Comment',
|
||||||
|
textOwner: 'Owner',
|
||||||
|
textApplication : 'Application',
|
||||||
|
textCreated: 'Created',
|
||||||
|
textLastModified: 'Last Modified',
|
||||||
|
textLastModifiedBy: 'Last Modified By',
|
||||||
|
textUploaded: 'Uploaded',
|
||||||
|
textLocation: 'Location'
|
||||||
}
|
}
|
||||||
})(), PE.Views.Settings || {}))
|
})(), PE.Views.Settings || {}))
|
||||||
});
|
});
|
|
@ -476,6 +476,16 @@
|
||||||
"PE.Views.Settings.textColorSchemes": "Color Schemes",
|
"PE.Views.Settings.textColorSchemes": "Color Schemes",
|
||||||
"PE.Views.Settings.unknownText": "Unknown",
|
"PE.Views.Settings.unknownText": "Unknown",
|
||||||
"PE.Views.Settings.textCollaboration": "Collaboration",
|
"PE.Views.Settings.textCollaboration": "Collaboration",
|
||||||
|
"PE.Views.Settings.textSubject": "Subject",
|
||||||
|
"PE.Views.Settings.textTitle": "Title",
|
||||||
|
"PE.Views.Settings. textComment": "Comment",
|
||||||
|
"PE.Views.Settings.textOwner": "Owner",
|
||||||
|
"PE.Views.Settings.textApplication": "Application",
|
||||||
|
"PE.Views.Settings.textCreated": "Created",
|
||||||
|
"PE.Views.Settings.textLastModified": "Last Modified",
|
||||||
|
"PE.Views.Settings.textLastModifiedBy": "Last Modified By",
|
||||||
|
"PE.Views.Settings.textUploaded": "Uploaded",
|
||||||
|
"PE.Views.Settings.textLocation": "Location",
|
||||||
"PE.Views.Toolbar.textBack": "Back",
|
"PE.Views.Toolbar.textBack": "Back",
|
||||||
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
||||||
"Common.Views.Collaboration.textСomments": "Сomments",
|
"Common.Views.Collaboration.textСomments": "Сomments",
|
||||||
|
|
|
@ -156,11 +156,11 @@ SSE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function onPrint() {
|
function onPrint() {
|
||||||
if ( permissions.print!==false )
|
if ( permissions.print!==false )
|
||||||
api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
@ -204,7 +204,7 @@ SSE.ApplicationController = new(function(){
|
||||||
common.utils.openLink(embedConfig.saveUrl);
|
common.utils.openLink(embedConfig.saveUrl);
|
||||||
} else
|
} else
|
||||||
if (permissions.print!==false){
|
if (permissions.print!==false){
|
||||||
api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera);
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Analytics.trackEvent('Save');
|
Common.Analytics.trackEvent('Save');
|
||||||
|
@ -464,7 +464,7 @@ SSE.ApplicationController = new(function(){
|
||||||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
|
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onApiMouseMove(array) {
|
function onApiMouseMove(array) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
this._state = {
|
this._state = {
|
||||||
CSVOptions: new Asc.asc_CCSVAdvancedOptions(0, 4, '')
|
CSVOptions: new Asc.asc_CTextOptions(0, 4, '')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
|
@ -177,7 +177,7 @@ define([
|
||||||
handler: function (result, encoding, delimiter, delimiterChar) {
|
handler: function (result, encoding, delimiter, delimiterChar) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me && me.api) {
|
if (me && me.api) {
|
||||||
me.api.asc_TextToColumns(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar));
|
me.api.asc_TextToColumns(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,9 @@ define([
|
||||||
view.pmiTextCut.on('click', _.bind(me.onCopyPaste, me));
|
view.pmiTextCut.on('click', _.bind(me.onCopyPaste, me));
|
||||||
view.pmiTextCopy.on('click', _.bind(me.onCopyPaste, me));
|
view.pmiTextCopy.on('click', _.bind(me.onCopyPaste, me));
|
||||||
view.pmiTextPaste.on('click', _.bind(me.onCopyPaste, me));
|
view.pmiTextPaste.on('click', _.bind(me.onCopyPaste, me));
|
||||||
|
view.pmiCommonCut.on('click', _.bind(me.onCopyPaste, me));
|
||||||
|
view.pmiCommonCopy.on('click', _.bind(me.onCopyPaste, me));
|
||||||
|
view.pmiCommonPaste.on('click', _.bind(me.onCopyPaste, me));
|
||||||
view.pmiInsertEntire.on('click', _.bind(me.onInsertEntire, me));
|
view.pmiInsertEntire.on('click', _.bind(me.onInsertEntire, me));
|
||||||
view.pmiDeleteEntire.on('click', _.bind(me.onDeleteEntire, me));
|
view.pmiDeleteEntire.on('click', _.bind(me.onDeleteEntire, me));
|
||||||
view.pmiInsertCells.menu.on('item:click', _.bind(me.onInsertCells, me));
|
view.pmiInsertCells.menu.on('item:click', _.bind(me.onInsertCells, me));
|
||||||
|
@ -1514,7 +1517,10 @@ define([
|
||||||
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = !internaleditor; break;
|
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = !internaleditor; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isimagemenu || isshapemenu || ischartmenu) {
|
if (this.api.asc_getHeaderFooterMode()) {
|
||||||
|
if (!documentHolder.copyPasteMenu || !showMenu && !documentHolder.copyPasteMenu.isVisible()) return;
|
||||||
|
if (showMenu) this.showPopupMenu(documentHolder.copyPasteMenu, {}, event);
|
||||||
|
} else if (isimagemenu || isshapemenu || ischartmenu) {
|
||||||
if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return;
|
if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return;
|
||||||
|
|
||||||
isimagemenu = isshapemenu = ischartmenu = false;
|
isimagemenu = isshapemenu = ischartmenu = false;
|
||||||
|
@ -2198,7 +2204,7 @@ define([
|
||||||
if (me && me.api) {
|
if (me && me.api) {
|
||||||
var props = new Asc.SpecialPasteProps();
|
var props = new Asc.SpecialPasteProps();
|
||||||
props.asc_setProps(Asc.c_oSpecialPasteProps.useTextImport);
|
props.asc_setProps(Asc.c_oSpecialPasteProps.useTextImport);
|
||||||
props.asc_setAdvancedOptions(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar));
|
props.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||||
me.api.asc_SpecialPaste(props);
|
me.api.asc_SpecialPaste(props);
|
||||||
}
|
}
|
||||||
me._state.lastSpecPasteChecked = item;
|
me._state.lastSpecPasteChecked = item;
|
||||||
|
|
|
@ -264,7 +264,7 @@ define([
|
||||||
buttons: ['ok', 'cancel'],
|
buttons: ['ok', 'cancel'],
|
||||||
callback: _.bind(function(btn){
|
callback: _.bind(function(btn){
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
this.api.asc_DownloadAs(format);
|
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
}, this)
|
}, this)
|
||||||
|
@ -273,7 +273,7 @@ define([
|
||||||
menu.hide();
|
menu.hide();
|
||||||
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format);
|
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format);
|
||||||
} else {
|
} else {
|
||||||
this.api.asc_DownloadAs(format);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -287,7 +287,7 @@ define([
|
||||||
callback: _.bind(function(btn){
|
callback: _.bind(function(btn){
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
this.isFromFileDownloadAs = ext;
|
this.isFromFileDownloadAs = ext;
|
||||||
this.api.asc_DownloadAs(format, true);
|
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
}, this)
|
}, this)
|
||||||
|
@ -298,7 +298,7 @@ define([
|
||||||
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format, true);
|
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format, true);
|
||||||
} else {
|
} else {
|
||||||
this.isFromFileDownloadAs = ext;
|
this.isFromFileDownloadAs = ext;
|
||||||
this.api.asc_DownloadAs(format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -168,6 +168,7 @@ define([
|
||||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||||
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
|
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
|
||||||
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
|
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
|
||||||
|
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||||
|
|
||||||
this.stackLongActions = new Common.IrregularStack({
|
this.stackLongActions = new Common.IrregularStack({
|
||||||
strongCompare : this._compareActionStrong,
|
strongCompare : this._compareActionStrong,
|
||||||
|
@ -434,7 +435,7 @@ define([
|
||||||
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
||||||
Common.NotificationCenter.trigger('download:settings', this, _format, true);
|
Common.NotificationCenter.trigger('download:settings', this, _format, true);
|
||||||
else
|
else
|
||||||
this.api.asc_DownloadAs(_format, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
|
||||||
},
|
},
|
||||||
|
|
||||||
onProcessMouse: function(data) {
|
onProcessMouse: function(data) {
|
||||||
|
@ -1602,25 +1603,28 @@ define([
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions, mode) {
|
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
|
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'CSV'),
|
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'CSV'),
|
||||||
closable: (mode==2), // if save settings
|
closable: (mode==2), // if save settings
|
||||||
type: Common.Utils.importTextType.CSV,
|
type: Common.Utils.importTextType.CSV,
|
||||||
preview: advOptions.asc_getOptions().asc_getData(),
|
preview: advOptions.asc_getData(),
|
||||||
codepages: advOptions.asc_getOptions().asc_getCodePages(),
|
codepages: advOptions.asc_getCodePages(),
|
||||||
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
|
settings: advOptions.asc_getRecommendedSettings(),
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function (result, encoding, delimiter, delimiterChar) {
|
handler: function (result, encoding, delimiter, delimiterChar) {
|
||||||
me.isShowOpenDialog = false;
|
me.isShowOpenDialog = false;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me && me.api) {
|
if (me && me.api) {
|
||||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar));
|
if (mode==2) {
|
||||||
|
formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||||
|
me.api.asc_DownloadAs(formatOptions);
|
||||||
|
} else
|
||||||
|
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||||
me.loadMask && me.loadMask.show();
|
me.loadMask && me.loadMask.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2015,10 +2019,16 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);
|
||||||
|
opts.asc_setAdvancedOptions(me.getApplication().getController('Print').getPrintParams());
|
||||||
|
me.api.asc_DownloadAs(opts);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
|
|
|
@ -266,10 +266,15 @@ define([
|
||||||
this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea());
|
this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea());
|
||||||
Common.localStorage.setItem("sse-print-settings-range", printtype);
|
Common.localStorage.setItem("sse-print-settings-range", printtype);
|
||||||
|
|
||||||
if ( this.printSettingsDlg.type=='print' )
|
if ( this.printSettingsDlg.type=='print' ) {
|
||||||
this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
|
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
|
||||||
else
|
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||||
this.api.asc_DownloadAs(this.downloadFormat, this.asUrl, this.adjPrintParams);
|
this.api.asc_Print(opts);
|
||||||
|
} else {
|
||||||
|
var opts = new Asc.asc_CDownloadOptions(this.downloadFormat, this.asUrl);
|
||||||
|
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||||
|
this.api.asc_DownloadAs(opts);
|
||||||
|
}
|
||||||
Common.component.Analytics.trackEvent((this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
Common.component.Analytics.trackEvent((this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
||||||
Common.component.Analytics.trackEvent('ToolBar', (this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
Common.component.Analytics.trackEvent('ToolBar', (this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
|
||||||
Common.NotificationCenter.trigger('edit:complete', view);
|
Common.NotificationCenter.trigger('edit:complete', view);
|
||||||
|
@ -348,7 +353,11 @@ define([
|
||||||
this._changedProps[panel.cmbSheet.getValue()] = this.getPageOptions(panel);
|
this._changedProps[panel.cmbSheet.getValue()] = this.getPageOptions(panel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getPrintParams: function() {
|
||||||
|
return this.adjPrintParams;
|
||||||
|
},
|
||||||
|
|
||||||
warnCheckMargings: 'Margins are incorrect',
|
warnCheckMargings: 'Margins are incorrect',
|
||||||
strAllSheets: 'All Sheets',
|
strAllSheets: 'All Sheets',
|
||||||
textWarning: 'Warning',
|
textWarning: 'Warning',
|
||||||
|
|
|
@ -113,7 +113,7 @@ define([
|
||||||
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
|
||||||
Common.NotificationCenter.trigger('download:settings', this.toolbar, _format);
|
Common.NotificationCenter.trigger('download:settings', this.toolbar, _format);
|
||||||
else
|
else
|
||||||
_main.api.asc_DownloadAs(_format);
|
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
|
||||||
},
|
},
|
||||||
'go:editor': function() {
|
'go:editor': function() {
|
||||||
Common.Gateway.requestEditRights();
|
Common.Gateway.requestEditRights();
|
||||||
|
@ -2324,6 +2324,8 @@ define([
|
||||||
|
|
||||||
toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()),
|
toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()),
|
||||||
{ array: this.btnsComment });
|
{ array: this.btnsComment });
|
||||||
|
|
||||||
|
toolbar.lockToolbar(SSE.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: [this.toolbar.btnEditHeader]});
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged_DiagramEditor: function(info) {
|
onApiSelectionChanged_DiagramEditor: function(info) {
|
||||||
|
|
|
@ -922,6 +922,29 @@ define([
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
me.pmiCommonCut = new Common.UI.MenuItem({
|
||||||
|
caption : me.txtCut,
|
||||||
|
value : 'cut'
|
||||||
|
});
|
||||||
|
|
||||||
|
me.pmiCommonCopy = new Common.UI.MenuItem({
|
||||||
|
caption : me.txtCopy,
|
||||||
|
value : 'copy'
|
||||||
|
});
|
||||||
|
|
||||||
|
me.pmiCommonPaste = new Common.UI.MenuItem({
|
||||||
|
caption : me.txtPaste,
|
||||||
|
value : 'paste'
|
||||||
|
});
|
||||||
|
|
||||||
|
this.copyPasteMenu = new Common.UI.Menu({
|
||||||
|
items: [
|
||||||
|
me.pmiCommonCut,
|
||||||
|
me.pmiCommonCopy,
|
||||||
|
me.pmiCommonPaste
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
this.entriesMenu = new Common.UI.Menu({
|
this.entriesMenu = new Common.UI.Menu({
|
||||||
maxHeight: 200,
|
maxHeight: 200,
|
||||||
cyclic: false,
|
cyclic: false,
|
||||||
|
|
|
@ -179,8 +179,17 @@ define([
|
||||||
});
|
});
|
||||||
this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
var checked = (field.getValue()=='checked');
|
var checked = (field.getValue()=='checked');
|
||||||
if (this.HFObject)
|
var id = (this.HFObject) ? this.HFObject.setDifferentFirst(checked) : null;
|
||||||
this.HFObject.setDifferentFirst(checked);
|
if (id) {
|
||||||
|
var me = this;
|
||||||
|
this.showError(function() {
|
||||||
|
field.setValue(!checked, true);
|
||||||
|
_.delay(function(){
|
||||||
|
me.onCanvasClick(id);
|
||||||
|
},50);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.btnFirst.setVisible(checked);
|
this.btnFirst.setVisible(checked);
|
||||||
if (!checked && this.btnFirst.isActive())
|
if (!checked && this.btnFirst.isActive())
|
||||||
|
@ -193,8 +202,17 @@ define([
|
||||||
});
|
});
|
||||||
this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
var checked = (field.getValue()=='checked');
|
var checked = (field.getValue()=='checked');
|
||||||
if (this.HFObject)
|
var id = (this.HFObject) ? this.HFObject.setDifferentOddEven(checked) : null;
|
||||||
this.HFObject.setDifferentOddEven(checked);
|
if (id) {
|
||||||
|
var me = this;
|
||||||
|
this.showError(function() {
|
||||||
|
field.setValue(!checked, true);
|
||||||
|
_.delay(function(){
|
||||||
|
me.onCanvasClick(id);
|
||||||
|
},50);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.btnOdd.setVisible(checked);
|
this.btnOdd.setVisible(checked);
|
||||||
this.btnEven.setVisible(checked);
|
this.btnEven.setVisible(checked);
|
||||||
|
@ -372,6 +390,9 @@ define([
|
||||||
data: data
|
data: data
|
||||||
}));
|
}));
|
||||||
this.cmbFontSize[0].on('selected', _.bind(this.onFontSizeSelect, this));
|
this.cmbFontSize[0].on('selected', _.bind(this.onFontSizeSelect, this));
|
||||||
|
this.cmbFontSize[0].on('changed:before', _.bind(this.onFontSizeChanged, this, true));
|
||||||
|
this.cmbFontSize[0].on('changed:after', _.bind(this.onFontSizeChanged, this, false));
|
||||||
|
|
||||||
this.cmbFontSize[0].setValue(this._state.fontsize);
|
this.cmbFontSize[0].setValue(this._state.fontsize);
|
||||||
this.headerControls.push(this.cmbFontSize[0]);
|
this.headerControls.push(this.cmbFontSize[0]);
|
||||||
|
|
||||||
|
@ -385,6 +406,8 @@ define([
|
||||||
data: data
|
data: data
|
||||||
}));
|
}));
|
||||||
this.cmbFontSize[1].on('selected', _.bind(this.onFontSizeSelect, this));
|
this.cmbFontSize[1].on('selected', _.bind(this.onFontSizeSelect, this));
|
||||||
|
this.cmbFontSize[1].on('changed:before', _.bind(this.onFontSizeChanged, this, true));
|
||||||
|
this.cmbFontSize[1].on('changed:after', _.bind(this.onFontSizeChanged, this, false));
|
||||||
this.cmbFontSize[1].setValue(this._state.fontsize);
|
this.cmbFontSize[1].setValue(this._state.fontsize);
|
||||||
this.footerControls.push(this.cmbFontSize[1]);
|
this.footerControls.push(this.cmbFontSize[1]);
|
||||||
|
|
||||||
|
@ -686,16 +709,33 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleInput: function(state) {
|
_handleInput: function(state) {
|
||||||
|
if (this.HFObject) {
|
||||||
|
var id = this.HFObject.destroy(state=='ok');
|
||||||
|
if (id) {
|
||||||
|
var me = this;
|
||||||
|
this.showError(function() {
|
||||||
|
_.delay(function(){
|
||||||
|
me.onCanvasClick(id);
|
||||||
|
},50);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.HFObject = null;
|
||||||
|
}
|
||||||
if (this.options.handler) {
|
if (this.options.handler) {
|
||||||
this.options.handler.call(this, this, state);
|
this.options.handler.call(this, this, state);
|
||||||
}
|
}
|
||||||
if (this.HFObject) {
|
|
||||||
this.HFObject.destroy(state=='ok');
|
|
||||||
this.HFObject = null;
|
|
||||||
}
|
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
showError: function(callback) {
|
||||||
|
Common.UI.warning({
|
||||||
|
title: this.notcriticalErrorTitle,
|
||||||
|
msg : this.textMaxError,
|
||||||
|
callback: callback
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
scrollerUpdate: function() {
|
scrollerUpdate: function() {
|
||||||
for (var name in this.scrollers) {
|
for (var name in this.scrollers) {
|
||||||
this.scrollers[name] && this.scrollers[name].update();
|
this.scrollers[name] && this.scrollers[name].update();
|
||||||
|
@ -758,6 +798,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPresetSelect: function(footer, combo, record) {
|
onPresetSelect: function(footer, combo, record) {
|
||||||
|
combo.setValue(this.textPresets);
|
||||||
if (this.HFObject)
|
if (this.HFObject)
|
||||||
this.HFObject.applyPreset(record.value, !!footer);
|
this.HFObject.applyPreset(record.value, !!footer);
|
||||||
this.onCanvasClick(footer ? '#footer-left-img' : '#header-left-img');
|
this.onCanvasClick(footer ? '#footer-left-img' : '#header-left-img');
|
||||||
|
@ -782,6 +823,36 @@ define([
|
||||||
this.onCanvasClick(this.currentCanvas);
|
this.onCanvasClick(this.currentCanvas);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onFontSizeChanged: function(before, combo, record, e) {
|
||||||
|
var value,
|
||||||
|
me = this;
|
||||||
|
|
||||||
|
if (before) {
|
||||||
|
var item = combo.store.findWhere({
|
||||||
|
displayValue: record.value
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!item) {
|
||||||
|
value = /^\+?(\d*\.?\d+)$|^\+?(\d+\.?\d*)$/.exec(record.value);
|
||||||
|
|
||||||
|
if (!value) {
|
||||||
|
value = combo.getValue();
|
||||||
|
combo.setRawValue(value);
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
value = parseFloat(record.value);
|
||||||
|
value = value > 409 ? 409 :
|
||||||
|
value < 1 ? 1 : Math.floor((value+0.4)*2)/2;
|
||||||
|
|
||||||
|
combo.setRawValue(value);
|
||||||
|
if (this.HFObject)
|
||||||
|
this.HFObject.setFontSize(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onBoldClick: function(btn, e) {
|
onBoldClick: function(btn, e) {
|
||||||
if (this.HFObject) {
|
if (this.HFObject) {
|
||||||
this.HFObject.setBold(btn.pressed);
|
this.HFObject.setBold(btn.pressed);
|
||||||
|
@ -840,8 +911,34 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageTypeToggle: function(type, btn, state) {
|
onPageTypeToggle: function(type, btn, state) {
|
||||||
|
if (this._pagetype) return;
|
||||||
|
|
||||||
if (state && this.HFObject) {
|
if (state && this.HFObject) {
|
||||||
this.HFObject.switchHeaderFooterType(type);
|
var prev = this.HFObject.getPageType(),
|
||||||
|
id = this.HFObject.switchHeaderFooterType(type);
|
||||||
|
if (id) {
|
||||||
|
this._pagetype = true;
|
||||||
|
var me = this;
|
||||||
|
this.showError(function() {
|
||||||
|
switch (prev) {
|
||||||
|
case Asc.c_oAscHeaderFooterType.odd:
|
||||||
|
me.btnOdd.isVisible() ? me.btnOdd.toggle(true) : me.btnAll.toggle(true);
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscHeaderFooterType.even:
|
||||||
|
me.btnEven.toggle(true);
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscHeaderFooterType.first:
|
||||||
|
me.btnFirst.toggle(true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_.delay(function(){
|
||||||
|
me.onCanvasClick(id);
|
||||||
|
},50);
|
||||||
|
me._pagetype = false;
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.scrollerScrollTop();
|
this.scrollerScrollTop();
|
||||||
this.onCanvasClick(this.currentCanvas, undefined, true);
|
this.onCanvasClick(this.currentCanvas, undefined, true);
|
||||||
}
|
}
|
||||||
|
@ -951,7 +1048,8 @@ define([
|
||||||
textFirst: 'First page',
|
textFirst: 'First page',
|
||||||
textOdd: 'Odd page',
|
textOdd: 'Odd page',
|
||||||
textEven: 'Even page',
|
textEven: 'Even page',
|
||||||
textAll: 'All pages'
|
textAll: 'All pages',
|
||||||
|
textMaxError: 'The text string you entered is too long. Reduce the number of characters used.'
|
||||||
|
|
||||||
}, SSE.Views.HeaderFooterDialog || {}))
|
}, SSE.Views.HeaderFooterDialog || {}))
|
||||||
});
|
});
|
|
@ -285,7 +285,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
|
||||||
xy = me.$window.offset(),
|
xy = me.$window.offset(),
|
||||||
rec = this.rangeList.getSelectedRec(),
|
rec = this.rangeList.getSelectedRec(),
|
||||||
idx = _.indexOf(this.rangeList.store.models, rec),
|
idx = _.indexOf(this.rangeList.store.models, rec),
|
||||||
oldname = (isEdit && rec.length>0) ? new Asc.asc_CDefName(rec.get('name'), rec.get('range'), rec.get('scope'), rec.get('isTable'), undefined, undefined, undefined, true) : null;
|
oldname = (isEdit && rec) ? new Asc.asc_CDefName(rec.get('name'), rec.get('range'), rec.get('scope'), rec.get('isTable'), undefined, undefined, undefined, true) : null;
|
||||||
|
|
||||||
var win = new SSE.Views.NamedRangeEditDlg({
|
var win = new SSE.Views.NamedRangeEditDlg({
|
||||||
api: me.api,
|
api: me.api,
|
||||||
|
|
|
@ -88,7 +88,8 @@ define([
|
||||||
docPropsLock: 'doc-props-lock',
|
docPropsLock: 'doc-props-lock',
|
||||||
printAreaLock: 'print-area-lock',
|
printAreaLock: 'print-area-lock',
|
||||||
namedRangeLock: 'named-range-lock',
|
namedRangeLock: 'named-range-lock',
|
||||||
multiselectCols:'is-multiselect-cols'
|
multiselectCols:'is-multiselect-cols',
|
||||||
|
headerLock: 'header-lock'
|
||||||
};
|
};
|
||||||
|
|
||||||
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
||||||
|
@ -1340,7 +1341,7 @@ define([
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
iconCls: 'btn-editheader',
|
iconCls: 'btn-editheader',
|
||||||
caption: me.capBtnInsHeader,
|
caption: me.capBtnInsHeader,
|
||||||
lock : [_set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth]
|
lock : [_set.editCell, _set.selRangeEdit, _set.headerLock, _set.lostConnect, _set.coAuth]
|
||||||
});
|
});
|
||||||
|
|
||||||
me.btnImgAlign = new Common.UI.Button({
|
me.btnImgAlign = new Common.UI.Button({
|
||||||
|
|
|
@ -1662,6 +1662,7 @@
|
||||||
"SSE.Views.HeaderFooterDialog.textOdd": "Odd page",
|
"SSE.Views.HeaderFooterDialog.textOdd": "Odd page",
|
||||||
"SSE.Views.HeaderFooterDialog.textEven": "Even page",
|
"SSE.Views.HeaderFooterDialog.textEven": "Even page",
|
||||||
"SSE.Views.HeaderFooterDialog.textAll": "All pages",
|
"SSE.Views.HeaderFooterDialog.textAll": "All pages",
|
||||||
|
"SSE.Views.HeaderFooterDialog.textMaxError": "The text string you entered is too long. Reduce the number of characters used.",
|
||||||
"SSE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
|
"SSE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
|
||||||
"SSE.Views.HyperlinkSettingsDialog.strDisplay": "Display",
|
"SSE.Views.HyperlinkSettingsDialog.strDisplay": "Display",
|
||||||
"SSE.Views.HyperlinkSettingsDialog.strLinkTo": "Link to",
|
"SSE.Views.HyperlinkSettingsDialog.strLinkTo": "Link to",
|
||||||
|
|
|
@ -319,7 +319,7 @@ define([
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._state.isFromGatewayDownloadAs = true;
|
this._state.isFromGatewayDownloadAs = true;
|
||||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
|
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
||||||
},
|
},
|
||||||
|
|
||||||
goBack: function(current) {
|
goBack: function(current) {
|
||||||
|
@ -1213,17 +1213,16 @@ define([
|
||||||
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
Common.Utils.ThemeColor.setColors(colors, standart_colors);
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdvancedOptions: function(advOptions) {
|
onAdvancedOptions: function(type, advOptions) {
|
||||||
if (this._state.openDlg) return;
|
if (this._state.openDlg) return;
|
||||||
|
|
||||||
var type = advOptions.asc_getOptionId(),
|
var me = this;
|
||||||
me = this;
|
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
|
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
|
||||||
var picker,
|
var picker,
|
||||||
pages = [],
|
pages = [],
|
||||||
pagesName = [];
|
pagesName = [];
|
||||||
|
|
||||||
_.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) {
|
_.each(advOptions.asc_getCodePages(), function(page) {
|
||||||
pages.push(page.asc_getCodePage());
|
pages.push(page.asc_getCodePage());
|
||||||
pagesName.push(page.asc_getCodePageName());
|
pagesName.push(page.asc_getCodePageName());
|
||||||
});
|
});
|
||||||
|
@ -1252,7 +1251,7 @@ define([
|
||||||
delimiter = picker.cols[1].value;
|
delimiter = picker.cols[1].value;
|
||||||
|
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter));
|
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding, delimiter));
|
||||||
|
|
||||||
if (!me._isDocReady) {
|
if (!me._isDocReady) {
|
||||||
me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
|
me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
|
||||||
|
@ -1264,7 +1263,7 @@ define([
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
var recommendedSettings = advOptions.asc_getOptions().asc_getRecommendedSettings();
|
var recommendedSettings = advOptions.asc_getRecommendedSettings();
|
||||||
|
|
||||||
picker = uiApp.picker({
|
picker = uiApp.picker({
|
||||||
container: '#txt-encoding',
|
container: '#txt-encoding',
|
||||||
|
|
|
@ -244,6 +244,8 @@ define([
|
||||||
me.initFormulaLang();
|
me.initFormulaLang();
|
||||||
} else if ('#regional-settings-view' == pageId) {
|
} else if ('#regional-settings-view' == pageId) {
|
||||||
me.initRegSettings();
|
me.initRegSettings();
|
||||||
|
} else if ('#settings-info-view' == pageId) {
|
||||||
|
me.initPageInfo();
|
||||||
} else {
|
} else {
|
||||||
var _userCount = SSE.getController('Main').returnUserCount();
|
var _userCount = SSE.getController('Main').returnUserCount();
|
||||||
if (_userCount > 0) {
|
if (_userCount > 0) {
|
||||||
|
@ -252,6 +254,46 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initPageInfo: function() {
|
||||||
|
var document = Common.SharedSettings.get('document') || {},
|
||||||
|
info = document.info || {};
|
||||||
|
|
||||||
|
document.title ? $('#settings-spreadsheet-title').html(document.title) : $('.display-spreadsheet-title').remove();
|
||||||
|
info.author ? $('#settings-sse-owner').html(info.author) : $('.display-owner').remove();
|
||||||
|
info.uploaded ? $('#settings-sse-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove();
|
||||||
|
info.folder ? $('#settings-sse-location').html(info.folder) : $('.display-location').remove();
|
||||||
|
|
||||||
|
var appProps = (this.api) ? this.api.asc_getAppProps() : null;
|
||||||
|
if (appProps) {
|
||||||
|
var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || '');
|
||||||
|
appName ? $('#settings-sse-application').html(appName) : $('.display-application').remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
var props = (this.api) ? this.api.asc_getCoreProps() : null,
|
||||||
|
value;
|
||||||
|
if (props) {
|
||||||
|
value = props.asc_getTitle();
|
||||||
|
value ? $('#settings-sse-title').html(value) : $('.display-title').remove();
|
||||||
|
value = props.asc_getSubject();
|
||||||
|
value ? $('#settings-sse-subject').html(value) : $('.display-subject').remove();
|
||||||
|
value = props.asc_getDescription();
|
||||||
|
value ? $('#settings-sse-comment').html(value) : $('.display-comment').remove();
|
||||||
|
value = props.asc_getModified();
|
||||||
|
value ? $('#settings-sse-last-mod').html(value.toLocaleString()) : $('.display-last-mode').remove();
|
||||||
|
value = props.asc_getLastModifiedBy();
|
||||||
|
value ? $('#settings-sse-mod-by').html(value) : $('.display-mode-by').remove();
|
||||||
|
value = props.asc_getCreated();
|
||||||
|
value ? $('#settings-sse-date').html(value.toLocaleString()) : $('.display-created-date').remove();
|
||||||
|
value = props.asc_getCreator();
|
||||||
|
var templateCreator = "";
|
||||||
|
value && value.split(/\s*[,;]\s*/).forEach(function(item) {
|
||||||
|
templateCreator = templateCreator + "<li class='item-content'><div class='item-inner'><div class='item-title'>" + item + "</div></div></li>";
|
||||||
|
});
|
||||||
|
templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
initRegSettings: function() {
|
initRegSettings: function() {
|
||||||
var value = Number(Common.localStorage.getItem('sse-settings-regional'));
|
var value = Number(Common.localStorage.getItem('sse-settings-regional'));
|
||||||
this.getView('Settings').renderRegSettings(value ? value : 0x0409, _regdata);
|
this.getView('Settings').renderRegSettings(value ? value : 0x0409, _regdata);
|
||||||
|
@ -634,11 +676,11 @@ define([
|
||||||
me.warnDownloadAs,
|
me.warnDownloadAs,
|
||||||
me.notcriticalErrorTitle,
|
me.notcriticalErrorTitle,
|
||||||
function () {
|
function () {
|
||||||
me.api.asc_DownloadAs(format);
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
me.api.asc_DownloadAs(format);
|
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
|
||||||
}
|
}
|
||||||
|
|
||||||
me.hideModal();
|
me.hideModal();
|
||||||
|
|
|
@ -155,32 +155,122 @@
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<div class="page" data-page="settings-info-view">
|
<div class="page" data-page="settings-info-view">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="content-block-title"><%= scope.textDocTitle %></div>
|
<div class="content-block-title display-spreadsheet-title"><%= scope.textDocTitle %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-spreadsheet-title">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-document-title" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-spreadsheet-title" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textAuthor %></div>
|
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-owner">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-document-autor" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-sse-owner" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block-title"><%= scope.textCreateDate %></div>
|
<div class="content-block-title display-location"><%= scope.textLocation %></div>
|
||||||
<div class="list-block">
|
<div class="list-block display-location">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item-content">
|
<li class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div id="settings-document-date" class="item-title"><%= scope.textLoading %></div>
|
<div id="settings-sse-location" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-uploaded"><%= scope.textUploaded %></div>
|
||||||
|
<div class="list-block display-uploaded">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-uploaded" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-subject"><%= scope.textSubject %></div>
|
||||||
|
<div class="list-block display-subject">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-subject" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-title"><%= scope.textTitle %></div>
|
||||||
|
<div class="list-block display-title">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-title" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-comment"><%= scope.textComment %></div>
|
||||||
|
<div class="list-block display-comment">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-comment" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-last-mode"><%= scope.textLastModified %></div>
|
||||||
|
<div class="list-block display-last-mode">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-last-mod" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-mode-by"><%= scope.textLastModifiedBy %></div>
|
||||||
|
<div class="list-block display-mode-by">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-mod-by" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-created-date"><%= scope.textCreated %></div>
|
||||||
|
<div class="list-block display-created-date">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-date" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-application"><%= scope.textApplication %></div>
|
||||||
|
<div class="list-block display-application">
|
||||||
|
<ul>
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-application" class="item-title"><%= scope.textLoading %></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block-title display-author"><%= scope.textAuthor %></div>
|
||||||
|
<div class="list-block display-author">
|
||||||
|
<ul id="list-creator">
|
||||||
|
<li class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div id="settings-sse-author" class="item-title"><%= scope.textLoading %></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -203,15 +203,6 @@ define([
|
||||||
|
|
||||||
showDocumentInfo: function() {
|
showDocumentInfo: function() {
|
||||||
this.showPage('#settings-info-view');
|
this.showPage('#settings-info-view');
|
||||||
|
|
||||||
var document = Common.SharedSettings.get('document') || {},
|
|
||||||
info = document.info || {};
|
|
||||||
|
|
||||||
$('#settings-document-title').html(document.title ? document.title : this.unknownText);
|
|
||||||
$('#settings-document-autor').html(info.author ? info.author : this.unknownText);
|
|
||||||
$('#settings-document-date').html(info.created ? info.created : this.unknownText);
|
|
||||||
|
|
||||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-info-view]', '.page[data-page=settings-info-view] .page-content');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showDownload: function () {
|
showDownload: function () {
|
||||||
|
@ -386,7 +377,17 @@ define([
|
||||||
textRegionalSettings: 'Regional Settings',
|
textRegionalSettings: 'Regional Settings',
|
||||||
textCommentingDisplay: 'Commenting Display',
|
textCommentingDisplay: 'Commenting Display',
|
||||||
textDisplayComments: 'Comments',
|
textDisplayComments: 'Comments',
|
||||||
textDisplayResolvedComments: 'Resolved Comments'
|
textDisplayResolvedComments: 'Resolved Comments',
|
||||||
|
textSubject: 'Subject',
|
||||||
|
textTitle: 'Title',
|
||||||
|
textComment: 'Comment',
|
||||||
|
textOwner: 'Owner',
|
||||||
|
textApplication : 'Application',
|
||||||
|
textCreated: 'Created',
|
||||||
|
textLastModified: 'Last Modified',
|
||||||
|
textLastModifiedBy: 'Last Modified By',
|
||||||
|
textUploaded: 'Uploaded',
|
||||||
|
textLocation: 'Location'
|
||||||
}
|
}
|
||||||
})(), SSE.Views.Settings || {}))
|
})(), SSE.Views.Settings || {}))
|
||||||
});
|
});
|
|
@ -558,6 +558,16 @@
|
||||||
"SSE.Views.Settings.textCommentingDisplay": "Commenting Display",
|
"SSE.Views.Settings.textCommentingDisplay": "Commenting Display",
|
||||||
"SSE.Views.Settings.textDisplayComments": "Comments",
|
"SSE.Views.Settings.textDisplayComments": "Comments",
|
||||||
"SSE.Views.Settings.textDisplayResolvedComments": "Resolved Comments",
|
"SSE.Views.Settings.textDisplayResolvedComments": "Resolved Comments",
|
||||||
|
"SSE.Views.Settings.textSubject": "Subject",
|
||||||
|
"SSE.Views.Settings.textTitle": "Title",
|
||||||
|
"SSE.Views.Settings.textComment": "Comment",
|
||||||
|
"SSE.Views.Settings.textOwner": "Owner",
|
||||||
|
"SSE.Views.Settings.textApplication": "Application",
|
||||||
|
"SSE.Views.Settings.textCreated": "Created",
|
||||||
|
"SSE.Views.Settings.textLastModified": "Last Modified",
|
||||||
|
"SSE.Views.Settings.textLastModifiedBy": "Last Modified By",
|
||||||
|
"SSE.Views.Settings.textUploaded": "Uploaded",
|
||||||
|
"SSE.Views.Settings. textLocation": "Location",
|
||||||
"SSE.Views.Toolbar.textBack": "Back",
|
"SSE.Views.Toolbar.textBack": "Back",
|
||||||
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
"Common.Views.Collaboration.textCollaboration": "Collaboration",
|
||||||
"Common.Views.Collaboration.textСomments": "Сomments",
|
"Common.Views.Collaboration.textСomments": "Сomments",
|
||||||
|
|
Loading…
Reference in a new issue