Add 'Do not notify of these changes' checkbox to list

This commit is contained in:
Nathan Gray 2011-03-09 17:42:52 +00:00
parent f28fb14572
commit bc39d9ab5b
3 changed files with 10 additions and 9 deletions

View File

@ -1269,7 +1269,7 @@ class calendar_boupdate extends calendar_bo
* @param boolean $ignore_acl=false true for no ACL check, default do ACL check
* @return boolean true on success, false on error (usually permission denied)
*/
function delete($cal_id,$recur_date=0,$ignore_acl=false)
function delete($cal_id,$recur_date=0,$ignore_acl=false,$skip_notification=false)
{
if (!($event = $this->read($cal_id,$recur_date)) ||
!$ignore_acl && !$this->check_perms(EGW_ACL_DELETE,$event))
@ -1278,7 +1278,7 @@ class calendar_boupdate extends calendar_bo
}
// Don't send notification if the event has already been deleted
if(!$event['deleted'])
if(!$event['deleted'] && !$skip_notification)
{
$this->send_update(MSG_DELETED,$event['participants'],$event);
}

View File

@ -131,7 +131,7 @@ class calendar_uilist extends calendar_ui
else
{
if ($this->action($content['action'],$content['nm']['rows']['checked'],$content['use_all'],
$success,$failed,$action_msg,'calendar_list',$msg))
$success,$failed,$action_msg,'calendar_list',$msg, $content['no_notifications']))
{
$msg .= lang('%1 event(s) %2',$success,$action_msg);
}
@ -478,7 +478,7 @@ class calendar_uilist extends calendar_ui
* @param string/array $session_name 'calendar_list'
* @return boolean true if all actions succeded, false otherwise
*/
function action($action,$checked,$use_all,&$success,&$failed,&$action_msg,$session_name,&$msg)
function action($action,$checked,$use_all,&$success,&$failed,&$action_msg,$session_name,&$msg,$skip_notification=false)
{
//echo '<p>' . __METHOD__ . "('$action',".print_r($checked,true).','.(int)$use_all.",...)</p>\n";
$success = $failed = 0;
@ -550,7 +550,7 @@ class calendar_uilist extends calendar_ui
$action_msg = lang('deleted');
if ($id && $this->bo->check_perms(EGW_ACL_DELETE,$id))
{
if($this->bo->delete($id, $recur_date))
if($this->bo->delete($id, $recur_date,false,$skip_notification))
{
$success++;
}
@ -583,7 +583,8 @@ class calendar_uilist extends calendar_ui
{
//echo "<p>$uid: status changed '$data[old_status]' --> '$status<'/p>\n";
$new_status = calendar_so::combine_status($status, $quantity, $role);
if ($this->bo->set_status($id,$GLOBALS['egw_info']['user']['account_id'],$new_status,$recur_date))
if ($this->bo->set_status($id,$GLOBALS['egw_info']['user']['account_id'],$new_status,$recur_date,
false,true,$skip_notification))
{
$success++;
$msg = lang('Status changed');

View File

@ -2,7 +2,7 @@
/**
* eGroupWare - eTemplates for Application calendar
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-03-09 10:24
* generated by soetemplate::dump4setup() 2011-03-09 10:37
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package calendar
@ -55,7 +55,7 @@ $templ_data[] = array('name' => 'calendar.freetimesearch.rows','template' => '',
$templ_data[] = array('name' => 'calendar.import','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"iCal file";}s:1:"B";a:3:{s:4:"type";s:4:"file";s:4:"name";s:9:"ical_file";s:6:"needed";s:1:"1";}}i:3;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Import";s:4:"name";s:6:"import";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:5:"align";s:6:"center";s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1131469789',);
$templ_data[] = array('name' => 'calendar.list','template' => '','lang' => '','group' => '0','version' => '1.7.003','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:2:"h2";s:6:",!@msg";s:2:"h1";s:6:",!@css";s:2:"c4";s:7:"noPrint";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:3:"css";}}i:2;a:1:{s:1:"A";a:5:{s:5:"align";s:6:"center";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";}}i:3;a:1:{s:1:"A";a:3:{s:4:"name";s:2:"nm";s:4:"size";s:18:"calendar.list.rows";s:4:"type";s:9:"nextmatch";}}i:4;a:1:{s:1:"A";a:6:{s:5:"align";s:5:"right";s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:5:{s:5:"label";s:11:"whole query";s:8:"onchange";s:121:"if (this.checked==true && !confirm(\'Apply the action on the whole query, NOT only the shown events\')) this.checked=false;";s:4:"name";s:7:"use_all";s:4:"type";s:8:"checkbox";s:4:"help";s:62:"Apply the action on the whole query, NOT only the shown events";}i:2;a:6:{s:8:"onchange";s:16:"do_action(this);";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"action";s:4:"size";s:19:"Select an action...";s:4:"type";s:6:"select";s:4:"help";s:16:"Select an action";}i:3;a:8:{s:5:"label";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"cols";i:1;s:4:"rows";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.noWrap { white-space: nowrap; }
$templ_data[] = array('name' => 'calendar.list','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:4:{s:2:"h2";s:6:",!@msg";s:2:"h1";s:6:",!@css";s:2:"c4";s:7:"noPrint";s:1:"B";s:3:"30%";}i:1;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:3:"css";}}i:2;a:2:{s:1:"A";a:5:{s:5:"align";s:6:"center";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";}s:1:"B";a:5:{s:5:"align";s:6:"center";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";}}i:3;a:2:{s:1:"A";a:4:{s:4:"name";s:2:"nm";s:4:"size";s:18:"calendar.list.rows";s:4:"type";s:9:"nextmatch";s:4:"span";s:3:"all";}s:1:"B";a:3:{s:4:"name";s:2:"nm";s:4:"size";s:18:"calendar.list.rows";s:4:"type";s:9:"nextmatch";}}i:4;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:5:{s:5:"label";s:11:"whole query";s:8:"onchange";s:121:"if (this.checked==true && !confirm(\'Apply the action on the whole query, NOT only the shown events\')) this.checked=false;";s:4:"name";s:7:"use_all";s:4:"type";s:8:"checkbox";s:4:"help";s:62:"Apply the action on the whole query, NOT only the shown events";}i:2;a:6:{s:8:"onchange";s:16:"do_action(this);";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"action";s:4:"size";s:19:"Select an action...";s:4:"type";s:6:"select";s:4:"help";s:16:"Select an action";}i:3;a:9:{s:5:"label";s:9:"Check all";s:7:"onclick";s:70:"toggle_all(this.form,form::name(\'nm[rows][checked][]\')); return false;";s:6:"needed";s:1:"1";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";s:5:"align";s:5:"right";}}}i:5;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:5:"2,0,0";i:1;a:4:{s:5:"label";s:30:"Do not notify of these changes";s:4:"name";s:16:"no_notifications";s:4:"type";s:8:"checkbox";s:4:"help";s:30:"Do not notify of these changes";}i:2;a:3:{s:8:"onchange";s:16:"do_action(this);";s:7:"no_lang";s:1:"1";s:4:"type";s:5:"label";}}}}s:4:"cols";i:2;s:4:"rows";i:5;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.noWrap { white-space: nowrap; }
.image16 img {
height: 16px;
@ -63,7 +63,7 @@ $templ_data[] = array('name' => 'calendar.list','template' => '','lang' => '','g
.listVbox {
width: 100%;
}','modified' => '1272317107',);
}','modified' => '1299691693',);
$templ_data[] = array('name' => 'calendar.list.dates','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:2:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1173420675',);