[DE] Signature - use api methods.
This commit is contained in:
parent
8f08bacf02
commit
1828f40de5
|
@ -680,8 +680,7 @@ define([
|
||||||
win = new DE.Views.SignSettingsDialog({
|
win = new DE.Views.SignSettingsDialog({
|
||||||
handler: function(dlg, result) {
|
handler: function(dlg, result) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
var props = dlg.getSettings();
|
me.api.asc_AddSignatureLine2(dlg.getSettings());
|
||||||
// me.api.asc_addSignature(dlg.getSettings());
|
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
@ -702,7 +701,7 @@ define([
|
||||||
handler: function(dlg, result) {
|
handler: function(dlg, result) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
var props = dlg.getSettings();
|
var props = dlg.getSettings();
|
||||||
// me.api.asc_addInvisibleSignature(dlg.getSettings());
|
me.api.asc_Sign();
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1187,12 +1187,14 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updateSignatures: function(){
|
updateSignatures: function(){
|
||||||
// this.cntRequestedSign.html(this.templateRequested({signatures: this.api.asc_getRequestedSignatures(), header: this.strRequested}));
|
var requested = this.api.asc_getRequestSignatures(),
|
||||||
|
valid = this.api.asc_getSignatures();
|
||||||
|
// this.cntRequestedSign.html(this.templateRequested({signatures: this.api.asc_getRequestSignatures(), header: this.strRequested}));
|
||||||
// this.cntValidSign.html(this.templateValid({signatures: this.api.asc_getValidSignatures(), header: this.strValid}));
|
// this.cntValidSign.html(this.templateValid({signatures: this.api.asc_getValidSignatures(), header: this.strValid}));
|
||||||
// this.cntInvalidSign.html(this.templateInvalid({signatures: this.api.asc_getInvalidSignatures(), header: this.strInvalid}));
|
// this.cntInvalidSign.html(this.templateInvalid({signatures: this.api.asc_getInvalidSignatures(), header: this.strInvalid}));
|
||||||
this.cntRequestedSign.html(this.templateRequested({signatures: ['Hammish Mitchell', 'Someone Somewhere', 'Mary White', 'John Black'], header: this.strRequested}));
|
// this.cntRequestedSign.html(this.templateRequested({signatures: ['Hammish Mitchell', 'Someone Somewhere', 'Mary White', 'John Black'], header: this.strRequested}));
|
||||||
this.cntValidSign.html(this.templateValid({signatures: [{name: 'Hammish Mitchell', date: '18/05/2017'}, {name: 'Someone Somewhere', date: '18/05/2017'}], header: this.strValid}));
|
// this.cntValidSign.html(this.templateValid({signatures: [{name: 'Hammish Mitchell', date: '18/05/2017'}, {name: 'Someone Somewhere', date: '18/05/2017'}], header: this.strValid}));
|
||||||
this.cntInvalidSign.html(this.templateValid({signatures: [{name: 'Mary White', date: '18/05/2017'}, {name: 'John Black', date: '18/05/2017'}], header: this.strInvalid}));
|
// this.cntInvalidSign.html(this.templateValid({signatures: [{name: 'Mary White', date: '18/05/2017'}, {name: 'John Black', date: '18/05/2017'}], header: this.strInvalid}));
|
||||||
},
|
},
|
||||||
|
|
||||||
strProtect: 'Protect Document',
|
strProtect: 'Protect Document',
|
||||||
|
|
|
@ -82,7 +82,6 @@ define([
|
||||||
'<label>' + this.textInstructions + '</label>',
|
'<label>' + this.textInstructions + '</label>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<textarea id="id-dlg-sign-settings-instructions" class="form-control" style="width: 100%;height: 35px;margin-bottom: 10px;resize: none;"></textarea>',
|
'<textarea id="id-dlg-sign-settings-instructions" class="form-control" style="width: 100%;height: 35px;margin-bottom: 10px;resize: none;"></textarea>',
|
||||||
'<div id="id-dlg-sign-settings-comment" style="margin-bottom: 5px;"></div>',
|
|
||||||
'<div id="id-dlg-sign-settings-date"></div>',
|
'<div id="id-dlg-sign-settings-date"></div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="footer center">',
|
'<div class="footer center">',
|
||||||
|
@ -125,11 +124,6 @@ define([
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.chComment = new Common.UI.CheckBox({
|
|
||||||
el: $('#id-dlg-sign-settings-comment'),
|
|
||||||
labelText: this.textAllowComment
|
|
||||||
});
|
|
||||||
|
|
||||||
this.chDate = new Common.UI.CheckBox({
|
this.chDate = new Common.UI.CheckBox({
|
||||||
el: $('#id-dlg-sign-settings-date'),
|
el: $('#id-dlg-sign-settings-date'),
|
||||||
labelText: this.textShowDate
|
labelText: this.textShowDate
|
||||||
|
@ -160,20 +154,19 @@ define([
|
||||||
// me.inputEmail.setValue(value ? value : '');
|
// me.inputEmail.setValue(value ? value : '');
|
||||||
// value = props.asc_getInstructions();
|
// value = props.asc_getInstructions();
|
||||||
// me.textareaInstructions.val(value ? value : '');
|
// me.textareaInstructions.val(value ? value : '');
|
||||||
// me.chComment.setValue(props.asc_getAllowComment());
|
|
||||||
// me.chDate.setValue(props.asc_getDate());
|
// me.chDate.setValue(props.asc_getDate());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings: function () {
|
getSettings: function () {
|
||||||
var me = this, props;
|
var me = this,
|
||||||
|
props = new AscCommon.asc_CSignatureLine();
|
||||||
|
|
||||||
// props.asc_putName(me.inputName.getValue());
|
props.asc_setSigner1(me.inputName.getValue());
|
||||||
// props.asc_putTitile(me.inputTitle.getValue());
|
props.asc_setSigner2(me.inputTitle.getValue());
|
||||||
// props.asc_putEmail(me.inputEmail.getValue());
|
props.asc_setEmail(me.inputEmail.getValue());
|
||||||
// props.asc_putInstructions(me.textareaInstructions.val());
|
props.asc_setInstructions(me.textareaInstructions.val());
|
||||||
// props.asc_putAllowComment(me.chComment.getValue()=='checked');
|
props.asc_setShowDate(me.chDate.getValue()=='checked');
|
||||||
// props.asc_putDate(me.chDate.getValue()=='checked');
|
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
},
|
},
|
||||||
|
@ -197,7 +190,7 @@ define([
|
||||||
|
|
||||||
textInfo: 'Signer Info',
|
textInfo: 'Signer Info',
|
||||||
textInfoName: 'Name',
|
textInfoName: 'Name',
|
||||||
textInfoTitle: 'Title',
|
textInfoTitle: 'Signer Title',
|
||||||
textInfoEmail: 'E-mail',
|
textInfoEmail: 'E-mail',
|
||||||
textInstructions: 'Instructions for Signer',
|
textInstructions: 'Instructions for Signer',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
|
|
Loading…
Reference in a new issue