[DE] Doc info: get editing time and authors
This commit is contained in:
parent
e9391d3079
commit
63762a25bd
|
@ -916,11 +916,20 @@ define([
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
props = (this.api) ? this.api.asc_getCoreProps() : null;
|
props = (this.api) ? this.api.asc_getCoreProps() : null,
|
||||||
|
app = (this.api) ? this.api.asc_getAppProps() : null,
|
||||||
|
value;
|
||||||
|
|
||||||
|
if (app) {
|
||||||
|
value = app.asc_getTotalTime();
|
||||||
|
if (value)
|
||||||
|
this.lblEditTime.text(value + ' ' + this.txtMinutes);
|
||||||
|
}
|
||||||
|
this._ShowHideInfoItem(this.lblEditTime, !!value);
|
||||||
|
|
||||||
if (props) {
|
if (props) {
|
||||||
var visible = false;
|
var visible = false;
|
||||||
|
value = props.asc_getModified();
|
||||||
var value = props.asc_getModified();
|
|
||||||
if (value)
|
if (value)
|
||||||
this.lblModifyDate.text(value.toLocaleString());
|
this.lblModifyDate.text(value.toLocaleString());
|
||||||
visible = visible || this._ShowHideInfoItem(this.lblModifyDate, !!value);
|
visible = visible || this._ShowHideInfoItem(this.lblModifyDate, !!value);
|
||||||
|
@ -930,10 +939,6 @@ define([
|
||||||
visible = visible || this._ShowHideInfoItem(this.lblModifyBy, !!value);
|
visible = visible || this._ShowHideInfoItem(this.lblModifyBy, !!value);
|
||||||
$('tr.divider.modify', this.el)[visible?'show':'hide']();
|
$('tr.divider.modify', this.el)[visible?'show':'hide']();
|
||||||
|
|
||||||
value = '';//props.asc_getEditingTime();
|
|
||||||
if (value)
|
|
||||||
this.lblEditTime.text(value);
|
|
||||||
this._ShowHideInfoItem(this.lblEditTime, !!value);
|
|
||||||
value = props.asc_getTitle();
|
value = props.asc_getTitle();
|
||||||
this.inputTitle.setValue(value || '');
|
this.inputTitle.setValue(value || '');
|
||||||
value = props.asc_getSubject();
|
value = props.asc_getSubject();
|
||||||
|
@ -942,8 +947,8 @@ define([
|
||||||
this.inputComment.setValue(value || '');
|
this.inputComment.setValue(value || '');
|
||||||
|
|
||||||
this.tblAuthor.find('tr:not(:last-of-type)').remove();
|
this.tblAuthor.find('tr:not(:last-of-type)').remove();
|
||||||
value = ['123"""<>', '456'];//props.asc_getAuthor();
|
value = props.asc_getCreator();//"123\"\"\"\<\>,456";
|
||||||
value && value.forEach(function(item) {
|
value && value.split(/\s*[,;]\s*/).forEach(function(item) {
|
||||||
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(item)));
|
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(item)));
|
||||||
me.trAuthor.before(div);
|
me.trAuthor.before(div);
|
||||||
});
|
});
|
||||||
|
@ -1050,7 +1055,8 @@ define([
|
||||||
txtDate: 'Created',
|
txtDate: 'Created',
|
||||||
txtAuthor: 'Author',
|
txtAuthor: 'Author',
|
||||||
txtAddAuthor: 'Add Author',
|
txtAddAuthor: 'Add Author',
|
||||||
txtAddText: 'Add Text'
|
txtAddText: 'Add Text',
|
||||||
|
txtMinutes: 'min'
|
||||||
}, DE.Views.FileMenuPanels.DocumentInfo || {}));
|
}, DE.Views.FileMenuPanels.DocumentInfo || {}));
|
||||||
|
|
||||||
DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({
|
DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({
|
||||||
|
|
Loading…
Reference in a new issue