[PE] Open encrypted pptx.

This commit is contained in:
Julia Radzhabova 2016-09-29 16:06:22 +03:00
parent 24c332b914
commit a398c46d8d
3 changed files with 37 additions and 1 deletions

View file

@ -48,6 +48,7 @@ define([
'common/main/lib/component/Tooltip',
'common/main/lib/controller/Fonts',
'common/main/lib/collection/TextArt',
'common/main/lib/view/OpenDialog',
'presentationeditor/main/app/collection/ShapeGroups',
'presentationeditor/main/app/collection/SlideLayouts'
], function () { 'use strict';
@ -122,9 +123,12 @@ define([
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this));
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onAdvancedOptions', _.bind(this.onAdvancedOptions, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
this.isShowOpenDialog = false;
// Initialize api gateway
this.editorConfig = {};
this.appOptions = {};
@ -473,7 +477,9 @@ define([
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
this.loadMask.setTitle(title);
this.loadMask.show();
if (!this.isShowOpenDialog)
this.loadMask.show();
}
else {
this.getApplication().getController('Statusbar').setStatusCaption(text);
@ -1514,6 +1520,29 @@ define([
if (url) this.iframePrint.src = url;
},
onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId(),
me = this, dlg;
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
dlg = new Common.Views.OpenDialog({
type: type,
handler: function (value) {
me.isShowOpenDialog = false;
if (me && me.api) {
me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(value));
me.loadMask && me.loadMask.show();
}
}
});
}
if (dlg) {
this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide();
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show();
}
},
updatePlugins: function(plugins) { // plugins from config
if (!plugins || !plugins.pluginsData || plugins.pluginsData.length<1) return;

View file

@ -95,6 +95,12 @@
"Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.",
"Common.Views.InsertTableDialog.txtRows": "Number of Rows",
"Common.Views.InsertTableDialog.txtTitle": "Table Size",
"Common.Views.OpenDialog.cancelButtonText": "Cancel",
"Common.Views.OpenDialog.okButtonText": "OK",
"Common.Views.OpenDialog.txtEncoding": "Encoding ",
"Common.Views.OpenDialog.txtPassword": "Password",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.PluginDlg.textLoading": "Loading",
"Common.Views.Plugins.strPlugins": "Plugins",
"Common.Views.Plugins.textLoading": "Loading",

View file

@ -109,6 +109,7 @@
@import "../../../../common/main/resources/less/scroller.less";
@import "../../../../common/main/resources/less/synchronize-tip.less";
@import "../../../../common/main/resources/less/common.less";
@import "../../../../common/main/resources/less/opendialog.less";
@import "../../../../common/main/resources/less/plugins.less";
// App