1 /*
  2  * ***** BEGIN LICENSE BLOCK *****
  3  * Zimbra Collaboration Suite Web Client
  4  * Copyright (C) 2011, 2013, 2014, 2016 Synacor, Inc.
  5  *
  6  * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License");
  7  * you may not use this file except in compliance with the License.
  8  * You may obtain a copy of the License at: https://www.zimbra.com/license
  9  * The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15
 10  * have been added to cover use of software over a computer network and provide for limited attribution
 11  * for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
 12  *
 13  * Software distributed under the License is distributed on an "AS IS" basis,
 14  * WITHOUT WARRANTY OF ANY KIND, either express or implied.
 15  * See the License for the specific language governing rights and limitations under the License.
 16  * The Original Code is Zimbra Open Source Web Client.
 17  * The Initial Developer of the Original Code is Zimbra, Inc.  All rights to the Original Code were
 18  * transferred by Zimbra, Inc. to Synacor, Inc. on September 14, 2015.
 19  *
 20  * All portions of the code are Copyright (C) 2011, 2013, 2014, 2016 Synacor, Inc. All Rights Reserved.
 21  * ***** END LICENSE BLOCK *****
 22  */
 23 
 24 /**
 25  * @overview
 26  * This file defines the Zimbra Retention Warning dialog, when attempting to delete
 27  * items that a retention policy specifies should be kept.
 28  *
 29  */
 30 
 31 /**
 32  * Creates a retention warning dialog.
 33  * @class
 34  * Creates an retention warning can have a "Delete All", "Delete Valid" or Cancel buttons
 35  * "Delete All"   will delete all the messages that the user chose for deletion.
 36  * "Delete Valid" will delete those messages of the ones chosen that are unaffected by the
 37  *                retention policy (i.e. they are older than now - retention_policy_keep_period, or
 38  *                are in a folder that does not have a retention policy).
 39  *
 40  * @param	{Object}	parent		the parent
 41  *
 42  * @extends DwtMessageDialog
 43  */
 44 
 45 ZmRetentionWarningDialog = function(parent) {
 46 
 47 	var deleteAllButton   = new DwtDialog_ButtonDescriptor(ZmRetentionWarningDialog.DELETE_ALL_BUTTON,   ZmMsg.retentionDeleteAll,   DwtDialog.ALIGN_LEFT);
 48     var deleteValidButton = new DwtDialog_ButtonDescriptor(ZmRetentionWarningDialog.DELETE_VALID_BUTTON, ZmMsg.retentionDeleteValid, DwtDialog.ALIGN_LEFT);
 49 	DwtMessageDialog.call(this, {parent:parent, buttons:[DwtDialog.CANCEL_BUTTON],
 50                           extraButtons:[deleteAllButton, deleteValidButton], id:"RetentionWarningDialog"});
 51 };
 52 
 53 ZmRetentionWarningDialog.prototype = new DwtMessageDialog;
 54 ZmRetentionWarningDialog.prototype.constructor = ZmRetentionWarningDialog;
 55 
 56 ZmRetentionWarningDialog.prototype.toString =
 57 function() {
 58 	return "ZmRetentionWarningDialog";
 59 };
 60 
 61 //
 62 // Consts
 63 //
 64 
 65 ZmRetentionWarningDialog.DELETE_ALL_BUTTON   = "RetentionDeleteAll";
 66 ZmRetentionWarningDialog.DELETE_VALID_BUTTON = "RetentionDeleteValid";
 67 
 68