Show application info
This commit is contained in:
parent
4d4b04b4a6
commit
e42c6f2b71
|
@ -682,6 +682,10 @@ define([
|
|||
'<td class="left"><label>' + this.txtPlacement + '</label></td>',
|
||||
'<td class="right"><label id="id-info-placement">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="appname">',
|
||||
'<td class="left"><label>' + this.txtAppName + '</label></td>',
|
||||
'<td class="right"><label id="id-info-appname">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="date">',
|
||||
'<td class="left"><label>' + this.txtDate + '</label></td>',
|
||||
'<td class="right"><label id="id-info-date">-</label></td>',
|
||||
|
@ -729,6 +733,7 @@ define([
|
|||
this.lblPlacement = $('#id-info-placement');
|
||||
this.lblDate = $('#id-info-date');
|
||||
this.lblAuthor = $('#id-info-author');
|
||||
this.lblApplication = $('#id-info-appname');
|
||||
this.lblStatPages = $('#id-info-pages');
|
||||
this.lblStatWords = $('#id-info-words');
|
||||
this.lblStatParagraphs = $('#id-info-paragraphs');
|
||||
|
@ -781,6 +786,12 @@ define([
|
|||
this._ShowHideInfoItem('placement', doc.info.folder!==undefined && doc.info.folder!==null);
|
||||
} else
|
||||
this._ShowHideDocInfo(false);
|
||||
var appname = (this.api) ? this.api.asc_getAppProps() : null;
|
||||
if (appname) {
|
||||
appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || '');
|
||||
this.lblApplication.text(appname);
|
||||
}
|
||||
this._ShowHideInfoItem('appname', !!appname);
|
||||
},
|
||||
|
||||
_ShowHideInfoItem: function(cls, visible) {
|
||||
|
@ -812,7 +823,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onDocInfo', _.bind(this._onDocInfo, this));
|
||||
this.api.asc_registerCallback('asc_onGetDocInfoEnd', _.bind(this._onGetDocInfoEnd, this));
|
||||
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
|
||||
|
||||
this.updateInfo(this.doc);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -873,7 +884,8 @@ define([
|
|||
txtParagraphs: 'Paragraphs',
|
||||
txtSymbols: 'Symbols',
|
||||
txtSpaces: 'Symbols with spaces',
|
||||
txtLoading: 'Loading...'
|
||||
txtLoading: 'Loading...',
|
||||
txtAppName: 'Application'
|
||||
}, DE.Views.FileMenuPanels.DocumentInfo || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({
|
||||
|
|
|
@ -1150,6 +1150,7 @@
|
|||
"DE.Views.FileMenuPanels.DocumentInfo.txtStatistics": "Statistics",
|
||||
"DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Symbols",
|
||||
"DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Document Title",
|
||||
"DE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application",
|
||||
"DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Words",
|
||||
"DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
|
||||
"DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
|
||||
|
|
|
@ -321,6 +321,7 @@ define([
|
|||
|
||||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.panels['info'].setApi(api);
|
||||
if (this.panels['protect']) this.panels['protect'].setApi(api);
|
||||
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
|
||||
},
|
||||
|
|
|
@ -575,6 +575,10 @@ define([
|
|||
'<td class="left"><label>' + this.txtPlacement + '</label></td>',
|
||||
'<td class="right"><label id="id-info-placement">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="appname">',
|
||||
'<td class="left"><label>' + this.txtAppName + '</label></td>',
|
||||
'<td class="right"><label id="id-info-appname">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="date">',
|
||||
'<td class="left"><label>' + this.txtDate + '</label></td>',
|
||||
'<td class="right"><label id="id-info-date">-</label></td>',
|
||||
|
@ -593,6 +597,7 @@ define([
|
|||
this.lblPlacement = $('#id-info-placement');
|
||||
this.lblDate = $('#id-info-date');
|
||||
this.lblAuthor = $('#id-info-author');
|
||||
this.lblApplication = $('#id-info-appname');
|
||||
|
||||
this.rendered = true;
|
||||
|
||||
|
@ -636,6 +641,12 @@ define([
|
|||
this._ShowHideInfoItem('placement', doc.info.folder!==undefined && doc.info.folder!==null);
|
||||
} else
|
||||
this._ShowHideDocInfo(false);
|
||||
var appname = (this.api) ? this.api.asc_getAppProps() : null;
|
||||
if (appname) {
|
||||
appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || '');
|
||||
this.lblApplication.text(appname);
|
||||
}
|
||||
this._ShowHideInfoItem('appname', !!appname);
|
||||
},
|
||||
|
||||
_ShowHideInfoItem: function(cls, visible) {
|
||||
|
@ -652,10 +663,17 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
setApi: function(o) {
|
||||
this.api = o;
|
||||
this.updateInfo(this.doc);
|
||||
return this;
|
||||
},
|
||||
|
||||
txtTitle: 'Document Title',
|
||||
txtAuthor: 'Author',
|
||||
txtPlacement: 'Placement',
|
||||
txtDate: 'Creation Date'
|
||||
txtDate: 'Creation Date',
|
||||
txtAppName: 'Application'
|
||||
}, PE.Views.FileMenuPanels.DocumentInfo || {}));
|
||||
|
||||
PE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({
|
||||
|
|
|
@ -974,6 +974,7 @@
|
|||
"PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location",
|
||||
"PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights",
|
||||
"PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Presentation Title",
|
||||
"PE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application",
|
||||
"PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
|
||||
"PE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning",
|
||||
|
|
|
@ -309,6 +309,7 @@ define([
|
|||
|
||||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.panels['info'].setApi(api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(api);
|
||||
if (this.panels['protect']) this.panels['protect'].setApi(api);
|
||||
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
|
||||
|
|
|
@ -1041,6 +1041,10 @@ define([
|
|||
'<td class="left"><label>' + this.txtPlacement + '</label></td>',
|
||||
'<td class="right"><label id="id-info-placement">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="appname">',
|
||||
'<td class="left"><label>' + this.txtAppName + '</label></td>',
|
||||
'<td class="right"><label id="id-info-appname">-</label></td>',
|
||||
'</tr>',
|
||||
'<tr class="date">',
|
||||
'<td class="left"><label>' + this.txtDate + '</label></td>',
|
||||
'<td class="right"><label id="id-info-date">-</label></td>',
|
||||
|
@ -1059,6 +1063,7 @@ define([
|
|||
this.lblPlacement = $('#id-info-placement');
|
||||
this.lblDate = $('#id-info-date');
|
||||
this.lblAuthor = $('#id-info-author');
|
||||
this.lblApplication = $('#id-info-appname');
|
||||
|
||||
this.rendered = true;
|
||||
|
||||
|
@ -1102,6 +1107,12 @@ define([
|
|||
this._ShowHideInfoItem('placement', doc.info.folder!==undefined && doc.info.folder!==null);
|
||||
} else
|
||||
this._ShowHideDocInfo(false);
|
||||
var appname = (this.api) ? this.api.asc_getAppProps() : null;
|
||||
if (appname) {
|
||||
appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || '');
|
||||
this.lblApplication.text(appname);
|
||||
}
|
||||
this._ShowHideInfoItem('appname', !!appname);
|
||||
},
|
||||
|
||||
_ShowHideInfoItem: function(cls, visible) {
|
||||
|
@ -1118,10 +1129,17 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
setApi: function(o) {
|
||||
this.api = o;
|
||||
this.updateInfo(this.doc);
|
||||
return this;
|
||||
},
|
||||
|
||||
txtTitle: 'Document Title',
|
||||
txtAuthor: 'Author',
|
||||
txtPlacement: 'Placement',
|
||||
txtDate: 'Creation Date'
|
||||
txtDate: 'Creation Date',
|
||||
txtAppName: 'Application'
|
||||
}, SSE.Views.FileMenuPanels.DocumentInfo || {}));
|
||||
|
||||
SSE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({
|
||||
|
|
|
@ -1289,6 +1289,7 @@
|
|||
"SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location",
|
||||
"SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights",
|
||||
"SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Spreadsheet Title",
|
||||
"SSE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application",
|
||||
"SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
|
||||
"SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply",
|
||||
|
|
Loading…
Reference in a new issue