Fix menu File
This commit is contained in:
parent
d9d09c6740
commit
b5ed433369
|
@ -250,21 +250,20 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
applyMode: function() {
|
applyMode: function() {
|
||||||
this.miPrint[this.mode.canPrint?'show':'hide']();
|
|
||||||
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
|
||||||
this.miProtect[this.mode.canProtect ?'show':'hide']();
|
|
||||||
this.miProtect.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
|
||||||
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
|
|
||||||
this.miNew[this.mode.canCreateNew?'show':'hide']();
|
|
||||||
this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
|
||||||
|
|
||||||
this.miDownload[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
this.miDownload[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||||
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
||||||
this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||||
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
|
|
||||||
|
|
||||||
this.miSave[this.mode.isEdit?'show':'hide']();
|
this.miSave[this.mode.isEdit?'show':'hide']();
|
||||||
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
||||||
|
this.miPrint[this.mode.canPrint?'show':'hide']();
|
||||||
|
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||||
|
this.miProtect[this.mode.canProtect ?'show':'hide']();
|
||||||
|
var isVisible = this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
|
||||||
|
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp;
|
||||||
|
this.miProtect.$el.find('+.devider')[isVisible && !this.mode.isDisconnected?'show':'hide']();
|
||||||
|
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
|
||||||
|
this.miNew[this.mode.canCreateNew?'show':'hide']();
|
||||||
|
this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||||
|
|
||||||
this.miAccess[(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info &&
|
this.miAccess[(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info &&
|
||||||
(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
||||||
|
|
|
@ -245,23 +245,21 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
applyMode: function() {
|
applyMode: function() {
|
||||||
|
this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||||
|
this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
||||||
|
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||||
|
this.miSave[this.mode.isEdit?'show':'hide']();
|
||||||
|
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
||||||
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.miProtect[this.mode.canProtect ?'show':'hide']();
|
this.miProtect[this.mode.canProtect ?'show':'hide']();
|
||||||
this.miProtect.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
var isVisible = this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
|
||||||
|
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp;
|
||||||
|
this.miProtect.$el.find('+.devider')[isVisible && !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']();
|
||||||
|
|
||||||
this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
|
||||||
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
|
||||||
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
|
||||||
|
|
||||||
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
|
|
||||||
|
|
||||||
this.miSave[this.mode.isEdit?'show':'hide']();
|
|
||||||
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
|
||||||
|
|
||||||
this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
||||||
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();
|
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();
|
||||||
|
|
||||||
|
|
|
@ -234,22 +234,21 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
applyMode: function() {
|
applyMode: function() {
|
||||||
|
this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||||
|
this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
||||||
|
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||||
|
this.miSave[this.mode.isEdit?'show':'hide']();
|
||||||
|
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
||||||
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.miProtect[this.mode.canProtect ?'show':'hide']();
|
this.miProtect[this.mode.canProtect ?'show':'hide']();
|
||||||
this.miProtect.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
var isVisible = this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
|
||||||
|
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp;
|
||||||
|
this.miProtect.$el.find('+.devider')[isVisible && !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']();
|
||||||
|
|
||||||
this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
|
||||||
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide']();
|
|
||||||
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
|
||||||
// this.hkSaveAs[this.mode.canDownload?'enable':'disable']();
|
|
||||||
|
|
||||||
this.miSave[this.mode.isEdit?'show':'hide']();
|
|
||||||
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
|
||||||
|
|
||||||
this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
||||||
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();
|
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue