parent
3d25b8b571
commit
b4f76a7932
|
@ -49,7 +49,7 @@
|
||||||
md-highlight-flags="gi">{{ identity.full }}</span>
|
md-highlight-flags="gi">{{ identity.full }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="sg-md-body">
|
<div class="sg-md-body">
|
||||||
<i ng-bind-html="editor.account.getTextSignature($index)"><!-- signature --></i>
|
<i ng-bind-html="editor.account.getTextSignature(identity)"><!-- signature --></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</md-item-template>
|
</md-item-template>
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sg-md-body">
|
<div class="sg-md-body">
|
||||||
<i ng-bind-html="$AccountDialogController.account.getTextSignature($index)"><!-- signature --></i>
|
<i ng-bind-html="$AccountDialogController.account.getTextSignature(identity)"><!-- signature --></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<md-button class="sg-icon-button" type="button"
|
<md-button class="sg-icon-button" type="button"
|
||||||
|
|
|
@ -327,19 +327,14 @@
|
||||||
* @desc Create a plain text representation of the signature for the specified identity index.
|
* @desc Create a plain text representation of the signature for the specified identity index.
|
||||||
* @returns a plain text version of the signature
|
* @returns a plain text version of the signature
|
||||||
*/
|
*/
|
||||||
Account.prototype.getTextSignature = function(index) {
|
Account.prototype.getTextSignature = function(identity) {
|
||||||
if (index < this.identities.length) {
|
if (identity.signature) {
|
||||||
var identity = this.identities[index];
|
var element = angular.element('<div>' + identity.signature + '</div>');
|
||||||
if (identity.signature) {
|
identity.textSignature = _.map(element.contents(), 'textContent').join(' ').trim();
|
||||||
var element = angular.element('<div>' + identity.signature + '</div>');
|
|
||||||
identity.textSignature = _.map(element.contents(), 'textContent').join(' ').trim();
|
|
||||||
} else {
|
|
||||||
identity.textSignature = '';
|
|
||||||
}
|
|
||||||
return identity.textSignature;
|
|
||||||
} else {
|
} else {
|
||||||
throw Error('Index of identity is out of range');
|
identity.textSignature = '';
|
||||||
}
|
}
|
||||||
|
return identity.textSignature;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue