Merge remote-tracking branch 'remotes/origin/develop' into feature/sse-pivot-settings

This commit is contained in:
Sergey Konovalov 2019-07-25 17:17:02 +03:00
commit 8be45ececf
No known key found for this signature in database
GPG key ID: 9BC70BEFF12CC5AE
48 changed files with 911 additions and 190 deletions

View file

@ -44,7 +44,7 @@
newDocumentPage.focus();
}
}
, dialogPrint: function(url) {
, dialogPrint: function(url, api) {
$('#id-print-frame').remove();
if ( !!url ) {
@ -59,10 +59,14 @@
document.body.appendChild(iframePrint);
iframePrint.onload = function () {
iframePrint.contentWindow.focus();
iframePrint.contentWindow.print();
iframePrint.contentWindow.blur();
window.focus();
try {
iframePrint.contentWindow.focus();
iframePrint.contentWindow.print();
iframePrint.contentWindow.blur();
window.focus();
} catch (e) {
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
}
};
iframePrint.src = url;

View file

@ -113,7 +113,7 @@ define([
Common.Gateway.requestRestore(record.get('revision'));
else {
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;
}

View file

@ -339,14 +339,14 @@ define([
switch (this.type) {
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;
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;
case Common.Utils.importTextType.Paste:
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;
}
},

View file

@ -204,11 +204,11 @@ DE.ApplicationController = new(function(){
function onPrint() {
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) {
common.utils.dialogPrint(url);
common.utils.dialogPrint(url, api);
}
function hidePreloader() {
@ -259,7 +259,7 @@ DE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
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');
@ -458,7 +458,7 @@ DE.ApplicationController = new(function(){
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
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

View file

@ -237,7 +237,7 @@ define([
if ( isopts ) close_menu = false;
else this.clickSaveCopyAsFormat(undefined);
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 'edit':
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
@ -302,13 +302,35 @@ define([
buttons: ['ok', 'cancel'],
callback: _.bind(function(btn){
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();
}
}, 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 {
this.api.asc_DownloadAs(format);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
} else
@ -326,14 +348,38 @@ define([
callback: _.bind(function(btn){
if (btn == 'ok') {
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();
}
}, 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 {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(format, true);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
menu.hide();
}
} 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.',
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?',
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 || {}));
});

View file

@ -195,6 +195,7 @@ define([
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
this.isShowOpenDialog = false;
@ -463,7 +464,7 @@ define([
if ( !_format || _supported.indexOf(_format) < 0 )
_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);
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());
function checkWarns() {
@ -1945,25 +1949,28 @@ define([
this.getApplication().getController('Toolbar').getView().updateMetricUnit();
},
onAdvancedOptions: function(advOptions, mode) {
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
me._state.openDlg = new Common.Views.OpenDialog({
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'TXT'),
closable: (mode==2), // if save settings
type: Common.Utils.importTextType.TXT,
preview: advOptions.asc_getOptions().asc_getData(),
codepages: advOptions.asc_getOptions().asc_getCodePages(),
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
preview: advOptions.asc_getData(),
codepages: advOptions.asc_getCodePages(),
settings: advOptions.asc_getRecommendedSettings(),
api: me.api,
handler: function (result, encoding) {
me.isShowOpenDialog = false;
if (result == 'ok') {
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();
}
}
@ -2002,7 +2009,7 @@ define([
},
onTryUndoInFastCollaborative: function() {
if (!window.localStorage.getBool("de-hide-try-undoredo"))
if (!Common.localStorage.getBool("de-hide-try-undoredo"))
Common.UI.info({
width: 500,
msg: this.textTryUndoRedo,
@ -2012,7 +2019,7 @@ define([
customButtonText: this.textStrict,
dontshow: true,
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') {
Common.localStorage.setItem("de-settings-coauthmode", 0);
Common.Utils.InternalSettings.set("de-settings-coauthmode", false);
@ -2070,7 +2077,7 @@ define([
if (!this.appOptions.canPrint || this.isModalShowed) return;
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');
},
@ -2090,10 +2097,14 @@ define([
this.iframePrint.style.bottom = "0";
document.body.appendChild(this.iframePrint);
this.iframePrint.onload = function() {
try {
me.iframePrint.contentWindow.focus();
me.iframePrint.contentWindow.print();
me.iframePrint.contentWindow.blur();
window.focus();
} catch (e) {
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
}
};
}
if (url) this.iframePrint.src = url;

View file

@ -152,7 +152,7 @@ define([
if ( !_format || _supported.indexOf(_format) < 0 )
_format = Asc.c_oAscFileType.PDF;
_main.api.asc_DownloadAs(_format);
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
},
'go:editor': function() {
Common.Gateway.requestEditRights();
@ -966,7 +966,7 @@ define([
onPrint: function(e) {
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);

View file

@ -198,6 +198,10 @@ define([
'<td class="left"><label><%= scope.textAlignGuides %></label></td>',
'<td class="right"><span id="fms-chb-align-guides" /></td>',
'</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">',
'<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>',
'<td class="right"><span id="fms-chb-autosave" /></td>',
@ -270,6 +274,11 @@ define([
labelText: this.strSpellCheckMode
});
this.chCompatible = new Common.UI.CheckBox({
el: $('#fms-chb-compatible'),
labelText: this.textOldVersions
});
this.chAutosave = new Common.UI.CheckBox({
el: $('#fms-chb-autosave'),
labelText: this.strAutosave
@ -448,6 +457,7 @@ define([
this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck"));
this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible"));
},
applySettings: function() {
@ -469,6 +479,8 @@ define([
if (this.mode.canForcesave)
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-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.localStorage.save();
@ -531,7 +543,9 @@ define([
txtFitWidth: 'Fit to Width',
textForceSave: 'Save to Server',
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.RecentFiles = Common.UI.BaseView.extend({

View file

@ -364,7 +364,7 @@ define([
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)
lang.setChecked(true);
else {

View file

@ -330,6 +330,7 @@
"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.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.applyChangesTitleText": "Loading the Changes",
"DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.",
@ -1423,6 +1424,8 @@
"DE.Views.FileMenuPanels.Settings.txtPt": "Point",
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
"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.textBottomLeft": "Bottom left",
"DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page",

View file

@ -322,7 +322,7 @@ define([
if (type && typeof type[1] === 'string') {
this.api.asc_DownloadOrigin(true)
} 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);
},
onAdvancedOptions: function(advOptions) {
onAdvancedOptions: function(type, advOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
var picker,
pages = [],
pagesName = [];
_.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) {
_.each(advOptions.asc_getCodePages(), function(page) {
pages.push(page.asc_getCodePage());
pagesName.push(page.asc_getCodePageName());
});
@ -1150,7 +1149,7 @@ define([
var encoding = picker.value;
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) {
me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
@ -1166,7 +1165,7 @@ define([
container: '#txt-encoding',
toolbar: false,
rotateEffect: true,
value: [advOptions.asc_getOptions().asc_getRecommendedSettings().asc_getCodePage()],
value: [advOptions.asc_getRecommendedSettings().asc_getCodePage()],
cols: [{
values: pages,
displayValues: pagesName

View file

@ -415,9 +415,38 @@ define([
var document = Common.SharedSettings.get('document') || {},
info = document.info || {};
$('#settings-document-title').html(document.title ? document.title : me.unknownText);
$('#settings-document-autor').html(info.author ? info.author : me.unknownText);
$('#settings-document-date').html(info.created ? info.created : me.unknownText);
document.title ? $('#settings-document-title').html(document.title) : $('.display-document-title').remove();
info.author ? $('#settings-document-owner').html(info.author) : $('.display-owner').remove();
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.notcriticalErrorTitle,
function () {
me.api.asc_DownloadAs(format);
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
}
);
});
} else {
_.defer(function () {
me.api.asc_DownloadAs(format);
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
});
}

View file

@ -302,22 +302,32 @@
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textAuthor %></div>
<div class="list-block">
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
<div class="list-block display-owner">
<ul>
<li class="item-content">
<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>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textCreateDate %></div>
<div class="list-block">
<div class="content-block-title display-location"><%= scope.textLocation %></div>
<div class="list-block display-location">
<ul>
<li class="item-content">
<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>
</li>
</ul>
@ -357,6 +367,87 @@
</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-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>

View file

@ -289,7 +289,18 @@ define([
textCollaboration: 'Collaboration',
textCommentingDisplay: 'Commenting Display',
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 || {}))

View file

@ -495,6 +495,16 @@
"DE.Views.Settings.textCommentingDisplay": "Commenting Display",
"DE.Views.Settings.textDisplayComments": "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",
"Common.Views.Collaboration.textCollaboration": "Collaboration",
"Common.Views.Collaboration.textReviewing": "Review",

View file

@ -201,11 +201,11 @@ PE.ApplicationController = new(function(){
function onPrint() {
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) {
common.utils.dialogPrint(url);
common.utils.dialogPrint(url, api);
}
function hidePreloader() {
@ -267,7 +267,7 @@ PE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
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');
@ -558,7 +558,7 @@ PE.ApplicationController = new(function(){
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
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
// -------------------------

View file

@ -215,7 +215,7 @@ define([
case 'back': break;
case 'save': this.api.asc_Save(); 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 'edit':
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);
@ -247,13 +247,13 @@ define([
},
clickSaveAsFormat: function(menu, format) {
this.api.asc_DownloadAs(format);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
},
clickSaveCopyAsFormat: function(menu, format, ext) {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(format, true);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
menu.hide();
},

View file

@ -419,7 +419,7 @@ define([
if ( !_format || _supported.indexOf(_format) < 0 )
_format = Asc.c_oAscFileType.PPTX;
this.api.asc_DownloadAs(_format, true);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
},
onProcessMouse: function(data) {
@ -1758,7 +1758,7 @@ define([
if (!this.appOptions.canPrint || this.isModalShowed) return;
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');
},
@ -1778,20 +1778,23 @@ define([
this.iframePrint.style.bottom = "0";
document.body.appendChild(this.iframePrint);
this.iframePrint.onload = function() {
try {
me.iframePrint.contentWindow.focus();
me.iframePrint.contentWindow.print();
me.iframePrint.contentWindow.blur();
window.focus();
} catch (e) {
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
}
};
}
if (url) this.iframePrint.src = url;
},
onAdvancedOptions: function(advOptions) {
onAdvancedOptions: function(type, advOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
me._state.openDlg = new Common.Views.OpenDialog({
title: Common.Views.OpenDialog.prototype.txtTitleProtected,

View file

@ -161,7 +161,7 @@ define([
if ( !_format || _supported.indexOf(_format) < 0 )
_format = Asc.c_oAscFileType.PDF;
_main.api.asc_DownloadAs(_format);
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
},
'go:editor': function() {
Common.Gateway.requestEditRights();
@ -893,7 +893,7 @@ define([
onPrint: function(e) {
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);
@ -1962,24 +1962,42 @@ define([
var themeStore = this.getCollection('SlideThemes'),
mainController = this.getApplication().getController('Main');
if (themeStore) {
var arr = [];
_.each(defaultThemes.concat(docThemes), function(theme) {
arr.push(new Common.UI.DataViewModel({
imageUrl: theme.get_Image(),
var arr1 = [], arr2 = [];
_.each(defaultThemes, function(theme, index) {
var tip = mainController.translationTable[theme.get_Name()] || theme.get_Name();
arr1.push(new Common.UI.DataViewModel({
uid : Common.UI.getId(),
themeId : theme.get_Index(),
tip : mainController.translationTable[theme.get_Name()] || theme.get_Name(),
itemWidth : 85,
itemHeight : 38
tip : tip,
offsety : index * 38
}));
me.toolbar.listTheme.menuPicker.store.add({
imageUrl: theme.get_Image(),
arr2.push({
uid : Common.UI.getId(),
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){

View file

@ -5,18 +5,28 @@
<tr><td class="padding-large">
<table id="hf-dlg-tbl-datetime" cols="2" style="margin-left: 22px;">
<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>
<div id="hf-dlg-combo-format" style="width: 100%;"></div>
</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>
<div id="hf-dlg-combo-lang" style="width: 100%;"></div>
</td>
</tr>
<tr>
<td colspan="2" style="padding-bottom: 4px;">
<div id="hf-dlg-radio-fixed"></div>
</td>
</tr>
<tr>
<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>
</tr>
</table>

View file

@ -2031,8 +2031,8 @@ define([
style: 'max-height: 300px;',
store : PE.getCollection('SlideThemes'),
itemTemplate: _.template([
'<div class="style" id="<%= id %>" style="width: <%= itemWidth %>px;">',
'<div style="background-image: url(<%= imageUrl %>); width: <%= itemWidth %>px; height: <%= itemHeight %>px;"/>',
'<div class="style" id="<%= id %>"">',
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"/>',
'</div>'
].join(''))
}).on('item:click', function(picker, item, record, e) {

View file

@ -48,7 +48,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
PE.Views.HeaderFooterDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
options: {
contentWidth: 360,
height: 340
height: 380
},
initialize : function(options) {
@ -152,12 +152,27 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
});
this.dateControls.push(this.cmbFormat);
this.chUpdate = new Common.UI.CheckBox({
el: $('#hf-dlg-chb-update'),
this.radioUpdate = new Common.UI.RadioBox({
el: $('#hf-dlg-radio-update'),
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({
el: $('#hf-dlg-chb-not-title'),
@ -186,6 +201,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
_.each(this.dateControls, function(item) {
item.setDisabled(!newValue);
});
newValue && this.setDateTimeType(this.radioFixed.getValue() ? 'fixed' : 'update', null, true);
this.props.put_ShowDateTime(newValue);
} else if (type == 'slide') {
this.props.put_ShowSlideNum(newValue);
@ -196,7 +212,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
this.props.updateView();
},
updateFormats: function(lang, format) {
updateFormats: function(lang) {
var props = new AscCommonSlide.CAscDateTime();
props.put_Lang(lang);
var data = props.get_DateTimeExamples(),
@ -210,17 +226,25 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
}
}
this.cmbFormat.setData(arr);
format = format || this.defaultFormats[lang];
var format = this.defaultFormats[lang];
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) {
format = format || this.cmbFormat.getValue();
if (this.chUpdate.getValue()=='checked') {
if (this.radioUpdate.getValue()) {
format = format || this.cmbFormat.getValue();
this.props.get_DateTime().put_DateTime(format);
} else {
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,
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.cmbLang.setValue(this._originalLang);
if (val) {
format = datetime.get_DateTime();
this.chUpdate.setValue(!!format, true);
!format && (format = datetime.get_CustomDateTime());
!format ? this.radioFixed.setValue(true) : this.radioUpdate.setValue(true);
!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();
this.chSlide.setValue(val, true);
@ -323,7 +348,8 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
textNotTitle: 'Don\'t show on title slide',
textPreview: 'Preview',
diffLanguage: 'You cant 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 || {}))
});

View file

@ -351,7 +351,7 @@ define([
$parent.find('#status-label-lang').text(info.displayValue);
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)
lang.setChecked(true);
else {

View file

@ -804,12 +804,12 @@ define([
me.listTheme.fieldPicker.itemTemplate = _.template([
'<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>'
].join(''));
me.listTheme.menuPicker.itemTemplate = _.template([
'<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>'
].join(''));

View file

@ -1240,6 +1240,7 @@
"PE.Views.HeaderFooterDialog.textPreview": "Preview",
"PE.Views.HeaderFooterDialog.diffLanguage": "You cant 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.textFixed": "Fixed",
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Display",

View file

@ -332,4 +332,11 @@
z-index: @zindex-dropdown - 20;
background-color: @gray-light;
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
}

View file

@ -311,7 +311,7 @@ define([
return;
}
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) {
@ -1089,11 +1089,10 @@ define([
this.isThumbnailsShow = isShow;
},
onAdvancedOptions: function(advOptions) {
onAdvancedOptions: function(type, advOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
$(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask);

View file

@ -190,9 +190,51 @@ define([
me.initPageApplicationSettings();
} else if ('#color-schemes-view' == pageId) {
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() {
PE.getController('Common.Controllers.Collaboration').showModal();
},
@ -339,7 +381,7 @@ define([
if (format) {
_.defer(function () {
me.api.asc_DownloadAs(format);
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
});
}

View file

@ -143,8 +143,8 @@
<div class="pages">
<div class="page" data-page="settings-info-view">
<div class="page-content">
<div class="content-block-title"><%= scope.textPresentTitle %></div>
<div class="list-block">
<div class="content-block-title display-presentation-title"><%= scope.textPresentTitle %></div>
<div class="list-block display-presentation-title">
<ul>
<li class="item-content">
<div class="item-inner">
@ -153,22 +153,112 @@
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textAuthor %></div>
<div class="list-block">
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
<div class="list-block display-owner">
<ul>
<li class="item-content">
<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>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textCreateDate %></div>
<div class="list-block">
<div class="content-block-title display-location"><%= scope.textLocation %></div>
<div class="list-block display-location">
<ul>
<li class="item-content">
<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>
</li>
</ul>

View file

@ -168,13 +168,6 @@ define([
showInfo: function () {
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 () {
@ -248,7 +241,17 @@ define([
textPoint: 'Point',
textInch: 'Inch',
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 || {}))
});

View file

@ -476,6 +476,16 @@
"PE.Views.Settings.textColorSchemes": "Color Schemes",
"PE.Views.Settings.unknownText": "Unknown",
"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",
"Common.Views.Collaboration.textCollaboration": "Collaboration",
"Common.Views.Collaboration.textСomments": "Сomments",

View file

@ -156,11 +156,11 @@ SSE.ApplicationController = new(function(){
function onPrint() {
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) {
common.utils.dialogPrint(url);
common.utils.dialogPrint(url, api);
}
function hidePreloader() {
@ -204,7 +204,7 @@ SSE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
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');
@ -464,7 +464,7 @@ SSE.ApplicationController = new(function(){
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
return;
}
api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
}
function onApiMouseMove(array) {

View file

@ -68,7 +68,7 @@ define([
});
this._state = {
CSVOptions: new Asc.asc_CCSVAdvancedOptions(0, 4, '')
CSVOptions: new Asc.asc_CTextOptions(0, 4, '')
};
},
onLaunch: function () {
@ -177,7 +177,7 @@ define([
handler: function (result, encoding, delimiter, delimiterChar) {
if (result == 'ok') {
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));
}
}
}

View file

@ -159,6 +159,9 @@ define([
view.pmiTextCut.on('click', _.bind(me.onCopyPaste, me));
view.pmiTextCopy.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.pmiDeleteEntire.on('click', _.bind(me.onDeleteEntire, me));
view.pmiInsertCells.menu.on('item:click', _.bind(me.onInsertCells, me));
@ -1514,7 +1517,10 @@ define([
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;
isimagemenu = isshapemenu = ischartmenu = false;
@ -2198,7 +2204,7 @@ define([
if (me && me.api) {
var props = new Asc.SpecialPasteProps();
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._state.lastSpecPasteChecked = item;

View file

@ -264,7 +264,7 @@ define([
buttons: ['ok', 'cancel'],
callback: _.bind(function(btn){
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();
}
}, this)
@ -273,7 +273,7 @@ define([
menu.hide();
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format);
} else {
this.api.asc_DownloadAs(format);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
},
@ -287,7 +287,7 @@ define([
callback: _.bind(function(btn){
if (btn == 'ok') {
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();
}
}, this)
@ -298,7 +298,7 @@ define([
Common.NotificationCenter.trigger('download:settings', this.leftMenu, format, true);
} else {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(format, true);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
menu.hide();
}
},

View file

@ -168,6 +168,7 @@ define([
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
this.stackLongActions = new Common.IrregularStack({
strongCompare : this._compareActionStrong,
@ -434,7 +435,7 @@ define([
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
Common.NotificationCenter.trigger('download:settings', this, _format, true);
else
this.api.asc_DownloadAs(_format, true);
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true));
},
onProcessMouse: function(data) {
@ -1602,25 +1603,28 @@ define([
return false;
},
onAdvancedOptions: function(advOptions, mode) {
onAdvancedOptions: function(type, advOptions, mode, formatOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
me._state.openDlg = new Common.Views.OpenDialog({
title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'CSV'),
closable: (mode==2), // if save settings
type: Common.Utils.importTextType.CSV,
preview: advOptions.asc_getOptions().asc_getData(),
codepages: advOptions.asc_getOptions().asc_getCodePages(),
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
preview: advOptions.asc_getData(),
codepages: advOptions.asc_getCodePages(),
settings: advOptions.asc_getRecommendedSettings(),
api: me.api,
handler: function (result, encoding, delimiter, delimiterChar) {
me.isShowOpenDialog = false;
if (result == 'ok') {
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();
}
}
@ -2015,10 +2019,16 @@ define([
this.iframePrint.style.bottom = "0";
document.body.appendChild(this.iframePrint);
this.iframePrint.onload = function() {
try {
me.iframePrint.contentWindow.focus();
me.iframePrint.contentWindow.print();
me.iframePrint.contentWindow.blur();
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;

View file

@ -266,10 +266,15 @@ define([
this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea());
Common.localStorage.setItem("sse-print-settings-range", printtype);
if ( this.printSettingsDlg.type=='print' )
this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
else
this.api.asc_DownloadAs(this.downloadFormat, this.asUrl, this.adjPrintParams);
if ( this.printSettingsDlg.type=='print' ) {
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
opts.asc_setAdvancedOptions(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('ToolBar', (this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs');
Common.NotificationCenter.trigger('edit:complete', view);
@ -348,7 +353,11 @@ define([
this._changedProps[panel.cmbSheet.getValue()] = this.getPageOptions(panel);
}
},
getPrintParams: function() {
return this.adjPrintParams;
},
warnCheckMargings: 'Margins are incorrect',
strAllSheets: 'All Sheets',
textWarning: 'Warning',

View file

@ -113,7 +113,7 @@ define([
if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA)
Common.NotificationCenter.trigger('download:settings', this.toolbar, _format);
else
_main.api.asc_DownloadAs(_format);
_main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format));
},
'go:editor': function() {
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()),
{ array: this.btnsComment });
toolbar.lockToolbar(SSE.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: [this.toolbar.btnEditHeader]});
},
onApiSelectionChanged_DiagramEditor: function(info) {

View file

@ -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({
maxHeight: 200,
cyclic: false,

View file

@ -179,8 +179,17 @@ define([
});
this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()=='checked');
if (this.HFObject)
this.HFObject.setDifferentFirst(checked);
var id = (this.HFObject) ? this.HFObject.setDifferentFirst(checked) : null;
if (id) {
var me = this;
this.showError(function() {
field.setValue(!checked, true);
_.delay(function(){
me.onCanvasClick(id);
},50);
});
return;
}
this.btnFirst.setVisible(checked);
if (!checked && this.btnFirst.isActive())
@ -193,8 +202,17 @@ define([
});
this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()=='checked');
if (this.HFObject)
this.HFObject.setDifferentOddEven(checked);
var id = (this.HFObject) ? this.HFObject.setDifferentOddEven(checked) : null;
if (id) {
var me = this;
this.showError(function() {
field.setValue(!checked, true);
_.delay(function(){
me.onCanvasClick(id);
},50);
});
return;
}
this.btnOdd.setVisible(checked);
this.btnEven.setVisible(checked);
@ -372,6 +390,9 @@ define([
data: data
}));
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.headerControls.push(this.cmbFontSize[0]);
@ -385,6 +406,8 @@ define([
data: data
}));
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.footerControls.push(this.cmbFontSize[1]);
@ -686,16 +709,33 @@ define([
},
_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) {
this.options.handler.call(this, this, state);
}
if (this.HFObject) {
this.HFObject.destroy(state=='ok');
this.HFObject = null;
}
this.close();
},
showError: function(callback) {
Common.UI.warning({
title: this.notcriticalErrorTitle,
msg : this.textMaxError,
callback: callback
});
},
scrollerUpdate: function() {
for (var name in this.scrollers) {
this.scrollers[name] && this.scrollers[name].update();
@ -758,6 +798,7 @@ define([
},
onPresetSelect: function(footer, combo, record) {
combo.setValue(this.textPresets);
if (this.HFObject)
this.HFObject.applyPreset(record.value, !!footer);
this.onCanvasClick(footer ? '#footer-left-img' : '#header-left-img');
@ -782,6 +823,36 @@ define([
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) {
if (this.HFObject) {
this.HFObject.setBold(btn.pressed);
@ -840,8 +911,34 @@ define([
},
onPageTypeToggle: function(type, btn, state) {
if (this._pagetype) return;
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.onCanvasClick(this.currentCanvas, undefined, true);
}
@ -951,7 +1048,8 @@ define([
textFirst: 'First page',
textOdd: 'Odd 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 || {}))
});

View file

@ -285,7 +285,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
xy = me.$window.offset(),
rec = this.rangeList.getSelectedRec(),
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({
api: me.api,

View file

@ -88,7 +88,8 @@ define([
docPropsLock: 'doc-props-lock',
printAreaLock: 'print-area-lock',
namedRangeLock: 'named-range-lock',
multiselectCols:'is-multiselect-cols'
multiselectCols:'is-multiselect-cols',
headerLock: 'header-lock'
};
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
@ -1340,7 +1341,7 @@ define([
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-editheader',
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({

View file

@ -1662,6 +1662,7 @@
"SSE.Views.HeaderFooterDialog.textOdd": "Odd page",
"SSE.Views.HeaderFooterDialog.textEven": "Even page",
"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.strDisplay": "Display",
"SSE.Views.HyperlinkSettingsDialog.strLinkTo": "Link to",

View file

@ -319,7 +319,7 @@ define([
return;
}
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) {
@ -1213,17 +1213,16 @@ define([
Common.Utils.ThemeColor.setColors(colors, standart_colors);
},
onAdvancedOptions: function(advOptions) {
onAdvancedOptions: function(type, advOptions) {
if (this._state.openDlg) return;
var type = advOptions.asc_getOptionId(),
me = this;
var me = this;
if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
var picker,
pages = [],
pagesName = [];
_.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) {
_.each(advOptions.asc_getCodePages(), function(page) {
pages.push(page.asc_getCodePage());
pagesName.push(page.asc_getCodePageName());
});
@ -1252,7 +1251,7 @@ define([
delimiter = picker.cols[1].value;
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) {
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({
container: '#txt-encoding',

View file

@ -244,6 +244,8 @@ define([
me.initFormulaLang();
} else if ('#regional-settings-view' == pageId) {
me.initRegSettings();
} else if ('#settings-info-view' == pageId) {
me.initPageInfo();
} else {
var _userCount = SSE.getController('Main').returnUserCount();
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() {
var value = Number(Common.localStorage.getItem('sse-settings-regional'));
this.getView('Settings').renderRegSettings(value ? value : 0x0409, _regdata);
@ -634,11 +676,11 @@ define([
me.warnDownloadAs,
me.notcriticalErrorTitle,
function () {
me.api.asc_DownloadAs(format);
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
}
);
} else {
me.api.asc_DownloadAs(format);
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
}
me.hideModal();

View file

@ -155,32 +155,122 @@
<div class="pages">
<div class="page" data-page="settings-info-view">
<div class="page-content">
<div class="content-block-title"><%= scope.textDocTitle %></div>
<div class="list-block">
<div class="content-block-title display-spreadsheet-title"><%= scope.textDocTitle %></div>
<div class="list-block display-spreadsheet-title">
<ul>
<li class="item-content">
<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>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textAuthor %></div>
<div class="list-block">
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
<div class="list-block display-owner">
<ul>
<li class="item-content">
<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>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textCreateDate %></div>
<div class="list-block">
<div class="content-block-title display-location"><%= scope.textLocation %></div>
<div class="list-block display-location">
<ul>
<li class="item-content">
<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>
</li>
</ul>

View file

@ -203,15 +203,6 @@ define([
showDocumentInfo: function() {
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 () {
@ -386,7 +377,17 @@ define([
textRegionalSettings: 'Regional Settings',
textCommentingDisplay: 'Commenting Display',
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 || {}))
});

View file

@ -558,6 +558,16 @@
"SSE.Views.Settings.textCommentingDisplay": "Commenting Display",
"SSE.Views.Settings.textDisplayComments": "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",
"Common.Views.Collaboration.textCollaboration": "Collaboration",
"Common.Views.Collaboration.textСomments": "Сomments",