[DE] Adding signature from the left menu.
This commit is contained in:
parent
c99107bfa4
commit
6034531a2d
|
@ -8,6 +8,7 @@
|
||||||
<li id="fm-btn-save-desktop" class="fm-btn" />
|
<li id="fm-btn-save-desktop" class="fm-btn" />
|
||||||
<li id="fm-btn-print" class="fm-btn" />
|
<li id="fm-btn-print" class="fm-btn" />
|
||||||
<li id="fm-btn-rename" class="fm-btn" />
|
<li id="fm-btn-rename" class="fm-btn" />
|
||||||
|
<li id="fm-btn-protect" class="fm-btn" />
|
||||||
<li class="devider" />
|
<li class="devider" />
|
||||||
<li id="fm-btn-recent" class="fm-btn" />
|
<li id="fm-btn-recent" class="fm-btn" />
|
||||||
<li id="fm-btn-create" class="fm-btn" />
|
<li id="fm-btn-create" class="fm-btn" />
|
||||||
|
@ -30,4 +31,5 @@
|
||||||
<div id="panel-rights" class="content-box" />
|
<div id="panel-rights" class="content-box" />
|
||||||
<div id="panel-settings" class="content-box" />
|
<div id="panel-settings" class="content-box" />
|
||||||
<div id="panel-help" class="content-box" />
|
<div id="panel-help" class="content-box" />
|
||||||
|
<div id="panel-protect" class="content-box" />
|
||||||
</div>
|
</div>
|
|
@ -168,6 +168,12 @@ define([
|
||||||
this.miSaveAs,
|
this.miSaveAs,
|
||||||
this.miPrint,
|
this.miPrint,
|
||||||
this.miRename,
|
this.miRename,
|
||||||
|
new Common.UI.MenuItem({
|
||||||
|
el : $('#fm-btn-protect',this.el),
|
||||||
|
action : 'protect',
|
||||||
|
caption : this.btnProtectCaption,
|
||||||
|
canFocused: false
|
||||||
|
}),
|
||||||
this.miRecent,
|
this.miRecent,
|
||||||
this.miNew,
|
this.miNew,
|
||||||
new Common.UI.MenuItem({
|
new Common.UI.MenuItem({
|
||||||
|
@ -235,6 +241,8 @@ define([
|
||||||
this.miPrint[this.mode.canPrint?'show':'hide']();
|
this.miPrint[this.mode.canPrint?'show':'hide']();
|
||||||
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||||
this.miRename.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
this.miRename.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||||
|
this.items[7][(this.mode.isDesktopApp) ?'show':'hide']();
|
||||||
|
this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||||
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
|
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
|
||||||
this.miNew[this.mode.canCreateNew?'show':'hide']();
|
this.miNew[this.mode.canCreateNew?'show':'hide']();
|
||||||
this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||||
|
@ -272,6 +280,7 @@ define([
|
||||||
|
|
||||||
if (this.mode.isDesktopApp) {
|
if (this.mode.isDesktopApp) {
|
||||||
// this.$el.find('#fm-btn-back').hide();
|
// this.$el.find('#fm-btn-back').hide();
|
||||||
|
this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mode.canDownload) {
|
if (this.mode.canDownload) {
|
||||||
|
@ -360,6 +369,7 @@ define([
|
||||||
btnSaveAsCaption : 'Save as',
|
btnSaveAsCaption : 'Save as',
|
||||||
textDownload : 'Download',
|
textDownload : 'Download',
|
||||||
btnRenameCaption : 'Rename...',
|
btnRenameCaption : 'Rename...',
|
||||||
btnCloseMenuCaption : 'Close Menu'
|
btnCloseMenuCaption : 'Close Menu',
|
||||||
|
btnProtectCaption: 'Protect\\Sign'
|
||||||
}, DE.Views.FileMenu || {}));
|
}, DE.Views.FileMenu || {}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1083,4 +1083,83 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
DE.Views.FileMenuPanels.ProtectDoc = Common.UI.BaseView.extend(_.extend({
|
||||||
|
el: '#panel-protect',
|
||||||
|
menu: undefined,
|
||||||
|
|
||||||
|
template: _.template([
|
||||||
|
'<label style="font-size: 18px;"><%= scope.strProtect %></label>',
|
||||||
|
'<table><tbody>',
|
||||||
|
'<tr>',
|
||||||
|
'<td><button id="fms-btn-final" class="btn btn-text-default" style="min-width:100px;width: auto;"><%= scope.strMarkAsFinal %></button></td>',
|
||||||
|
'</tr>',
|
||||||
|
'<tr>',
|
||||||
|
'<td><button id="fms-btn-invisible-sign" class="btn btn-text-default" style="min-width:190px;width: auto;"><%= scope.strInvisibleSign %></button></td>',
|
||||||
|
'</tr>',
|
||||||
|
'<tr>',
|
||||||
|
'<td><button id="fms-btn-visible-sign" class="btn btn-text-default" style="min-width:190px;width: auto;"><%= scope.strVisibleSign %></button></td>',
|
||||||
|
'</tr>',
|
||||||
|
'</tbody></table>'
|
||||||
|
].join('')),
|
||||||
|
|
||||||
|
initialize: function(options) {
|
||||||
|
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||||
|
|
||||||
|
this.menu = options.menu;
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
$(this.el).html(this.template({scope: this}));
|
||||||
|
|
||||||
|
this.btnFinal = new Common.UI.Button({
|
||||||
|
el: '#fms-btn-final'
|
||||||
|
});
|
||||||
|
this.btnFinal.on('click', _.bind(this.markAsFinal, this));
|
||||||
|
|
||||||
|
this.btnAddInvisibleSign = new Common.UI.Button({
|
||||||
|
el: '#fms-btn-invisible-sign'
|
||||||
|
});
|
||||||
|
this.btnAddInvisibleSign.on('click', _.bind(this.addInvisibleSign, this));
|
||||||
|
|
||||||
|
this.btnAddVisibleSign = new Common.UI.Button({
|
||||||
|
el: '#fms-btn-visible-sign'
|
||||||
|
});
|
||||||
|
this.btnAddVisibleSign.on('click', _.bind(this.addVisibleSign, this));
|
||||||
|
|
||||||
|
if (_.isUndefined(this.scroller)) {
|
||||||
|
this.scroller = new Common.UI.Scroller({
|
||||||
|
el: $(this.el),
|
||||||
|
suppressScrollX: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
show: function() {
|
||||||
|
Common.UI.BaseView.prototype.show.call(this,arguments);
|
||||||
|
},
|
||||||
|
|
||||||
|
setMode: function(mode) {
|
||||||
|
this.mode = mode;
|
||||||
|
},
|
||||||
|
|
||||||
|
markAsFinal: function() {
|
||||||
|
},
|
||||||
|
|
||||||
|
addInvisibleSign: function() {
|
||||||
|
},
|
||||||
|
|
||||||
|
addVisibleSign: function() {
|
||||||
|
},
|
||||||
|
|
||||||
|
strProtect: 'Protect Document',
|
||||||
|
strMarkAsFinal: 'Mark as final',
|
||||||
|
strInvisibleSign: 'Add invisible digital signature',
|
||||||
|
strVisibleSign: 'Add visible signature'
|
||||||
|
|
||||||
|
|
||||||
|
}, DE.Views.FileMenuPanels.ProtectDoc || {}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -77,4 +77,19 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60
|
||||||
-webkit-transform: rotate(180deg);
|
-webkit-transform: rotate(180deg);
|
||||||
-o-transform: rotate(180deg);
|
-o-transform: rotate(180deg);
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel-protect {
|
||||||
|
#file-menu-panel & {
|
||||||
|
padding: 30px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
margin: 20px 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue