Skip to content

Commit

Permalink
PREAPPS-7930: Shared folder synchronization to mobile options are alw…
Browse files Browse the repository at this point in the history
…ays enabled

- Considering the zimbraFeatureMobileSyncEnabled LDAP attribute for showing mobile sync option on share folder.
  • Loading branch information
miteshsavani810 authored and silentsakky committed Sep 25, 2024
1 parent 1f903e0 commit 518cc8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions WebRoot/js/zimbraMail/prefs/view/ZmSharingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function() {
var folders = folderTree && folderTree.asList({remoteOnly:true});
this._mountedShareListView.set(AjxVector.fromArray([]));
var mountedShareComment = document.getElementById(this._pageId + "_mountedSharesComment");
var shareFolderMobileSyncEnabled = appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED);
var shareFolderMobileSyncEnabled = appCtxt.get(ZmSetting.MOBILE_SYNC_ENABLED) && appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED);

if (mountedShareComment) {
mountedShareComment.style.display = shareFolderMobileSyncEnabled ? 'block' : 'none';
Expand Down Expand Up @@ -824,7 +824,7 @@ function() {
headerList.push(new DwtListHeaderItem({field:ZmSharingView.F_FOLDER, text:ZmMsg.sharingFolder, width:ZmMsg.COLUMN_WIDTH_FOLDER_SH}));
}
headerList.push(new DwtListHeaderItem({field:ZmSharingView.F_WITH, text:ZmMsg.sharingWith, width:ZmMsg.COLUMN_WIDTH_WITH_SH}));
if (this.status === ZmSharingView.MOUNTED && appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED)) {
if (this.status === ZmSharingView.MOUNTED && appCtxt.get(ZmSetting.MOBILE_SYNC_ENABLED) && appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED)) {
headerList.push(new DwtListHeaderItem({field:ZmSharingView.F_SYNC, text:ZmMsg.syncToMobile, width:ZmMsg.COLUMN_WIDTH_SYNC_SH, align:"center" }));
}
} else {
Expand Down Expand Up @@ -908,6 +908,7 @@ function(params) {
if (
this.status === ZmSharingView.MOUNTED &&
params.ctrlKey &&
appCtxt.get(ZmSetting.MOBILE_SYNC_ENABLED) &&
appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED)
) {
// handle selection of mobile sync checkbox using keyboard shortcut Ctrl + `.
Expand Down Expand Up @@ -954,7 +955,7 @@ function(ev) {
cell.innerHTML = this._getCellContents([], 0, share, ZmSharingView.F_ROLE, null, {returnText:true});
}

if (appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED)) {
if (appCtxt.get(ZmSetting.MOBILE_SYNC_ENABLED) && appCtxt.get(ZmSetting.SHARED_FOLDER_MOBILE_SYNC_ENABLED)) {
var syncToMobileCell = document.getElementById(this._getCellId(share, ZmSharingView.F_SYNC));
if (syncToMobileCell) {
syncToMobileCell.innerHTML = this._getCellContents([], 0, share, ZmSharingView.F_SYNC, null, {returnText:true});
Expand Down
2 changes: 1 addition & 1 deletion WebRoot/js/zimbraMail/share/model/ZmSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ function() {
this.registerSetting("RESET_PASSWORD_RECOVERY_CODE_EXPIRY", {name:"zimbraResetPasswordRecoveryCodeExpiry", type:ZmSetting.T_COS, dataType:ZmSetting.D_STRING});
this.registerSetting("PASSWORD_RECOVERY_CODE_VALIDITY", {name:"zimbraRecoveryAccountCodeValidity", type:ZmSetting.T_COS, dataType:ZmSetting.D_STRING});
this.registerSetting("PASSWORD_RECOVERY_SUSPENSION_TIME", {name:"zimbraFeatureResetPasswordSuspensionTime", type:ZmSetting.T_COS, dataType:ZmSetting.D_STRING});
this.registerSetting("SHARED_FOLDER_MOBILE_SYNC_ENABLED", {name:"zimbraFeatureSharedFolderMobileSyncEnabled", type:ZmSetting.T_COS, dataType:ZmSetting.D_BOOLEAN, defaultValue:true});
this.registerSetting("SHARED_FOLDER_MOBILE_SYNC_ENABLED", {name:"zimbraFeatureSharedFolderMobileSyncEnabled", type:ZmSetting.T_COS, dataType:ZmSetting.D_BOOLEAN});

// user metadata (included with COS since the user can't change them)
this.registerSetting("LICENSE_STATUS", {type:ZmSetting.T_COS, defaultValue:ZmSetting.LICENSE_GOOD});
Expand Down

0 comments on commit 518cc8b

Please sign in to comment.