forked from extern/egroupware
- Change category group filtering to allow multiple groups
- Give warning when removing access from a group
This commit is contained in:
parent
5dc47a9044
commit
81f58ab129
@ -187,9 +187,23 @@ class admin_categories
|
|||||||
}
|
}
|
||||||
$content['msg'] = $msg;
|
$content['msg'] = $msg;
|
||||||
$sel_options['icon'] = self::get_icons();
|
$sel_options['icon'] = self::get_icons();
|
||||||
|
$sel_options['owner'] = array(0 => lang('All users'));
|
||||||
|
$accs = $GLOBALS['egw']->accounts->get_list('groups');
|
||||||
|
foreach($accs as $acc)
|
||||||
|
{
|
||||||
|
if ($acc['account_type'] == 'g')
|
||||||
|
{
|
||||||
|
$sel_options['owner'][$acc['account_id']] = ExecMethod2('etemplate.select_widget.accountInfo',$acc['account_id'],$acc,$type2,$type=='both');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
egw_framework::validate_file('.','global_categories','admin');
|
||||||
|
egw_framework::set_onload('$(document).ready(function() {
|
||||||
|
cat_original_owner = [' . ($content['owner'] ? $content['owner'] : '0') .'];
|
||||||
|
permission_prompt = \'' . lang('cat_permission_confirm').'\';
|
||||||
|
});');
|
||||||
|
|
||||||
$readonlys['button[delete]'] = !$content['id'] || !self::$acl_delete; // cant delete not yet saved category
|
$readonlys['button[delete]'] = !$content['id'] || !self::$acl_delete; // cant delete not yet saved category
|
||||||
$readonlys['owner'] = $content['id'] > 0;
|
|
||||||
|
|
||||||
$tmpl = new etemplate('admin.categories.edit');
|
$tmpl = new etemplate('admin.categories.edit');
|
||||||
$tmpl->exec('admin.admin_categories.edit',$content,$sel_options,$readonlys,$content+array(
|
$tmpl->exec('admin.admin_categories.edit',$content,$sel_options,$readonlys,$content+array(
|
||||||
|
43
admin/js/global_categories.js
Normal file
43
admin/js/global_categories.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* Javascript for Admin / Global categories
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Record original value
|
||||||
|
var cat_original_owner;
|
||||||
|
var permission_prompt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see if admin has taken away access to a category
|
||||||
|
*/
|
||||||
|
function check_owner(element_id) {
|
||||||
|
var checkboxes = $(':checkbox', document.getElementById(element_id));
|
||||||
|
var all_users = $(document.getElementById(element_id + '[0]'));
|
||||||
|
|
||||||
|
// If they checked all users, uncheck the others
|
||||||
|
if(all_users.attr("checked")) {
|
||||||
|
checkboxes.attr("checked",false);
|
||||||
|
all_users.attr("checked", true);
|
||||||
|
checkboxes = $(':checkbox', document.getElementById(element_id)).filter(':checked');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find out what changed
|
||||||
|
var seen = [], diff = [], labels = [];
|
||||||
|
for ( var i = 0; i < cat_original_owner.length; i++) {
|
||||||
|
var checkbox = checkboxes.filter('[value="'+cat_original_owner[i]+'"]');
|
||||||
|
if(checkbox.filter(':checked').length == 0) {
|
||||||
|
diff.push(cat_original_owner[i]);
|
||||||
|
labels.push($(checkbox.get(0).nextSibling).text());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Somebody will lose permission, give warning.
|
||||||
|
if(diff.length > 0) {
|
||||||
|
var msg = permission_prompt;
|
||||||
|
for( var i = 0; i < labels.length; i++) {
|
||||||
|
msg += labels[i];
|
||||||
|
}
|
||||||
|
return confirm(msg);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -108,6 +108,7 @@ calendar recurrence horizont in days (default 1000) admin en Calendar recurrence
|
|||||||
can change password admin en Can change password
|
can change password admin en Can change password
|
||||||
cancel testjob! admin en Cancel TestJob!
|
cancel testjob! admin en Cancel TestJob!
|
||||||
cancel this scheduled command admin en Cancel this scheduled command
|
cancel this scheduled command admin en Cancel this scheduled command
|
||||||
|
cat_permission_confirm admin en Removing access for groups may cause problems for data in this category. Are you sure? Users in these groups may no longer have access:
|
||||||
categories list admin en Categories list
|
categories list admin en Categories list
|
||||||
category %1 has been saved ! admin en Category %1 has been saved!
|
category %1 has been saved ! admin en Category %1 has been saved!
|
||||||
category deleted. admin en Category deleted.
|
category deleted. admin en Category deleted.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* EGroupware - eTemplates for Application admin
|
* EGroupware - eTemplates for Application admin
|
||||||
* http://www.egroupware.org
|
* http://www.egroupware.org
|
||||||
* generated by soetemplate::dump4setup() 2011-05-18 11:27
|
* generated by soetemplate::dump4setup() 2011-06-14 12:43
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package admin
|
* @package admin
|
||||||
@ -22,7 +22,7 @@ $templ_data[] = array('name' => 'admin.applications','template' => '','lang' =>
|
|||||||
|
|
||||||
$templ_data[] = array('name' => 'admin.applications.rows','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:7:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"A";s:5:"1px,1";s:1:"E";s:4:"80px";s:1:"D";s:5:"120px";s:1:"F";s:2:"80";s:1:"B";s:5:"120px";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"align";s:6:"center";}s:1:"C";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"D";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";}s:1:"E";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:5:"Order";s:4:"name";s:5:"order";}s:1:"F";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:7:"actions";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:14:"${row}[app_id]";}s:1:"B";a:3:{s:4:"type";s:5:"image";s:4:"name";s:13:"${row}[image]";s:5:"align";s:6:"center";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[app_name]";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[app_version]";s:8:"readonly";s:1:"1";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"name";s:17:"${row}[app_order]";s:7:"no_lang";s:1:"1";s:8:"readonly";s:1:"1";}s:1:"F";a:5:{s:4:"type";s:4:"hbox";s:8:"readonly";s:1:"1";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:3:"up2";s:5:"label";s:2:"up";s:4:"name";s:21:"up[$row_cont[app_id]]";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"size";s:5:"down2";s:5:"label";s:4:"down";s:4:"name";s:23:"down[$row_cont[app_id]]";}}}}s:4:"rows";i:2;s:4:"cols";i:6;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1275405742',);
|
$templ_data[] = array('name' => 'admin.applications.rows','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:7:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"A";s:5:"1px,1";s:1:"E";s:4:"80px";s:1:"D";s:5:"120px";s:1:"F";s:2:"80";s:1:"B";s:5:"120px";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"align";s:6:"center";}s:1:"C";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"D";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";}s:1:"E";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:5:"Order";s:4:"name";s:5:"order";}s:1:"F";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:7:"actions";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:14:"${row}[app_id]";}s:1:"B";a:3:{s:4:"type";s:5:"image";s:4:"name";s:13:"${row}[image]";s:5:"align";s:6:"center";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[app_name]";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[app_version]";s:8:"readonly";s:1:"1";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"name";s:17:"${row}[app_order]";s:7:"no_lang";s:1:"1";s:8:"readonly";s:1:"1";}s:1:"F";a:5:{s:4:"type";s:4:"hbox";s:8:"readonly";s:1:"1";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:3:"up2";s:5:"label";s:2:"up";s:4:"name";s:21:"up[$row_cont[app_id]]";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"size";s:5:"down2";s:5:"label";s:4:"down";s:4:"name";s:23:"down[$row_cont[app_id]]";}}}}s:4:"rows";i:2;s:4:"cols";i:6;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1275405742',);
|
||||||
|
|
||||||
$templ_data[] = array('name' => 'admin.categories.delete','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:20:"Delete this category";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:2:"h3";s:2:"40";s:2:"h1";s:2:"30";s:2:"c2";s:11:"confirmSubs";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:47:"Are you sure you want to delete this category ?";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:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:53:"Do you also want to delete all global subcategories ?";s:4:"name";s:12:"delete[subs]";s:4:"span";s:3:"all";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"delete[delete]";s:5:"align";s:6:"center";}s:1:"B";a:5:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"delete[cancel]";s:5:"align";s:6:"center";s:7:"onclick";s:64:"set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'none\');";}}}s:4:"rows";i:3;s:4:"cols";i:2;s:7:"options";a:0:{}}s:4:"span";s:14:",confirmDelete";}}}s:4:"rows";i:1;s:4:"cols";i:1;}i:1;a:3:{s:4:"type";s:4:"text";s:4:"name";s:14:"delete[cat_id]";s:4:"span";s:12:",hiddenCatid";}}','size' => '','style' => '.confirmDelete {
|
$templ_data[] = array('name' => 'admin.categories.delete','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:6:{s:5:"class";s:13:"confirmDelete";s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:20:"Delete this category";i:1;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:2:"h1";s:2:"30";s:2:"c2";s:11:"confirmSubs";s:2:"h3";s:2:"40";}i:1;a:2:{s:1:"A";a:4:{s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"type";s:5:"label";s:5:"label";s:47:"Are you sure you want to delete this category ?";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:5:{s:5:"label";s:53:"Do you also want to delete all global subcategories ?";s:4:"span";s:3:"all";s:5:"align";s:6:"center";s:4:"name";s:12:"delete[subs]";s:4:"type";s:8:"checkbox";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:14:"delete[delete]";s:4:"type";s:6:"button";}s:1:"B";a:5:{s:5:"label";s:6:"Cancel";s:5:"align";s:6:"center";s:7:"onclick";s:64:"set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'none\');";s:4:"name";s:14:"delete[cancel]";s:4:"type";s:10:"buttononly";}}}s:4:"cols";i:2;s:4:"rows";i:3;}s:4:"span";s:14:",confirmDelete";}}}s:4:"cols";i:1;s:4:"rows";i:1;}i:1;a:3:{s:4:"name";s:14:"delete[cat_id]";s:4:"type";s:4:"text";s:4:"span";s:12:",hiddenCatid";}}','size' => '','style' => '.confirmDelete {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 120px;
|
left: 120px;
|
||||||
top: 80px;
|
top: 80px;
|
||||||
@ -35,9 +35,9 @@ $templ_data[] = array('name' => 'admin.categories.delete','template' => '','lang
|
|||||||
}
|
}
|
||||||
.confirmSubs
|
.confirmSubs
|
||||||
{
|
{
|
||||||
}','modified' => '1264754384',);
|
}','modified' => '1308076484',);
|
||||||
|
|
||||||
$templ_data[] = array('name' => 'admin.categories.edit','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:11:{i:0;a:12:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c5";s:3:"row";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";s:2:"h7";s:15:",@appname=phpgw";s:2:"h2";s:2:"25";s:2:"h1";s:6:",!@msg";s:2:"c9";s:3:"row";s:2:"c8";s:3:"row";s:2:"h9";s:11:",!@last_mod";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,parent";s:5:"label";s:15:"Parent category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"size";s:25:"None,,,$cont[appname],,-1";s:4:"name";s:6:"parent";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,description";s:5:"label";s:11:"Description";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"5,50";s:4:"name";s:11:"description";}}i:5;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,cat_data[color]";s:5:"label";s:5:"Color";}s:1:"B";a:2:{s:4:"type";s:11:"colorpicker";s:4:"name";s:11:"data[color]";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,data[icon]";s:5:"label";s:4:"Icon";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:10:"data[icon]";s:4:"size";s:4:"None";s:8:"onchange";s:73:"document.getElementById(\'icon_url\').src = \'$cont[base_url]\' + this.value;";}i:2;a:3:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";}}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";}s:1:"B";a:4:{s:4:"type";s:10:"select-app";s:4:"name";s:7:"appname";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All applications";}}i:8;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:19:"Limit to members of";}s:1:"B";a:4:{s:4:"type";s:14:"select-account";s:4:"size";s:16:"All users,groups";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";}}i:9;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"last_mod";s:8:"readonly";s:1:"1";}}i:10;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";}}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}i:2;a:6:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:14:"button[delete]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:157:"set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\');";}}}}s:4:"rows";i:10;s:4:"cols";i:2;}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '','style' => '','modified' => '1264740967',);
|
$templ_data[] = array('name' => 'admin.categories.edit','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:11:{i:0;a:12:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c5";s:3:"row";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";s:2:"h7";s:15:",@appname=phpgw";s:2:"h2";s:2:"25";s:2:"h1";s:6:",!@msg";s:2:"c9";s:3:"row";s:2:"c8";s:3:"row";s:2:"h9";s:11:",!@last_mod";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,parent";s:5:"label";s:15:"Parent category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"size";s:25:"None,,,$cont[appname],,-1";s:4:"name";s:6:"parent";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,description";s:5:"label";s:11:"Description";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"5,50";s:4:"name";s:11:"description";}}i:5;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,cat_data[color]";s:5:"label";s:5:"Color";}s:1:"B";a:2:{s:4:"type";s:11:"colorpicker";s:4:"name";s:11:"data[color]";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,data[icon]";s:5:"label";s:4:"Icon";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:10:"data[icon]";s:4:"size";s:4:"None";s:8:"onchange";s:73:"document.getElementById(\'icon_url\').src = \'$cont[base_url]\' + this.value;";}i:2;a:3:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";}}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";}s:1:"B";a:4:{s:4:"type";s:10:"select-app";s:4:"name";s:7:"appname";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All applications";}}i:8;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:19:"Limit to members of";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"size";s:1:"3";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";}}i:9;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"last_mod";s:8:"readonly";s:1:"1";}}i:10;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}i:2;a:6:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:14:"button[delete]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:157:"set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\');";}}}}s:4:"rows";i:10;s:4:"cols";i:2;}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '','style' => '','modified' => '1308076611',);
|
||||||
|
|
||||||
$templ_data[] = array('name' => 'admin.categories.index','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:2:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";s:4:"span";s:13:"all,redItalic";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:193:"window.open(egw::link(\'/index.php\',\'menuaction=admin.admin_categories.edit&appname={$cont[nm][appname]}\'),\'_blank\',\'dependent=yes,width=600,height=300,scrollbars=yes,status=yes\'); return false;";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '100%','style' => '.level0 { font-weight: bold; }','modified' => '1264657515',);
|
$templ_data[] = array('name' => 'admin.categories.index','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:2:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";s:4:"span";s:13:"all,redItalic";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:193:"window.open(egw::link(\'/index.php\',\'menuaction=admin.admin_categories.edit&appname={$cont[nm][appname]}\'),\'_blank\',\'dependent=yes,width=600,height=300,scrollbars=yes,status=yes\'); return false;";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '100%','style' => '.level0 { font-weight: bold; }','modified' => '1264657515',);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
<overlay>
|
<overlay>
|
||||||
<template id="admin.categories.delete" template="" lang="" group="0" version="1.7.001">
|
<template id="admin.categories.delete" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -17,14 +17,14 @@
|
|||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row height="30">
|
<row height="30">
|
||||||
<description span="all" value="Are you sure you want to delete this category ?" align="center"/>
|
<description align="center" value="Are you sure you want to delete this category ?" span="all"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="confirmSubs">
|
<row class="confirmSubs">
|
||||||
<checkbox label="Do you also want to delete all global subcategories ?" id="delete[subs]" span="all" align="center"/>
|
<checkbox align="center" label="Do you also want to delete all global subcategories ?" id="delete[subs]" span="all"/>
|
||||||
</row>
|
</row>
|
||||||
<row height="40">
|
<row height="40">
|
||||||
<button label="Delete" id="delete[delete]" align="center"/>
|
<button align="center" label="Delete" id="delete[delete]"/>
|
||||||
<buttononly label="Cancel" id="delete[cancel]" align="center" onclick="set_style_by_class('fieldset','confirmDelete','display','none');"/>
|
<buttononly align="center" label="Cancel" id="delete[cancel]" onclick="set_style_by_class('fieldset','confirmDelete','display','none');"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
}
|
}
|
||||||
</styles>
|
</styles>
|
||||||
</template>
|
</template>
|
||||||
<template id="admin.categories.edit" template="" lang="" group="0" version="1.7.001">
|
<template id="admin.categories.edit" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -58,32 +58,32 @@
|
|||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row disabled="!@msg">
|
<row disabled="!@msg">
|
||||||
<description span="all" class="redItalic" align="center" id="msg"/>
|
<description align="center" id="msg" span="all" class="redItalic"/>
|
||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row class="th" height="25">
|
<row class="th" height="25">
|
||||||
<description options=",,,parent" value="Parent category"/>
|
<description value="Parent category" options=",,,parent"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-cat" options="None,,,$cont[appname],,-1" id="parent"/>
|
<menupopup type="select-cat" id="parent" options="None,,,$cont[appname],,-1"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options=",,,name" value="Name"/>
|
<description value="Name" options=",,,name"/>
|
||||||
<textbox size="50" maxlength="150" id="name"/>
|
<textbox id="name" size="50" maxlength="150"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="row" valign="top">
|
<row class="row" valign="top">
|
||||||
<description options=",,,description" value="Description"/>
|
<description value="Description" options=",,,description"/>
|
||||||
<textbox multiline="true" rows="5" cols="50" id="description"/>
|
<textbox multiline="true" id="description" rows="5" cols="50"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options=",,,cat_data[color]" value="Color"/>
|
<description value="Color" options=",,,cat_data[color]"/>
|
||||||
<colorpicker id="data[color]"/>
|
<colorpicker id="data[color]"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options=",,,data[icon]" value="Icon"/>
|
<description value="Icon" options=",,,data[icon]"/>
|
||||||
<hbox options="0,0">
|
<hbox options="0,0">
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup id="data[icon]" options="None" onchange="document.getElementById('icon_url').src = '$cont[base_url]' + this.value;"/>
|
<menupopup id="data[icon]" onchange="document.getElementById('icon_url').src = '$cont[base_url]' + this.value;" options="None"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<image src="icon_url" class="leftPad5"/>
|
<image src="icon_url" class="leftPad5"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
@ -95,10 +95,8 @@
|
|||||||
</menulist>
|
</menulist>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options=",,,owner" value="Limit to members of"/>
|
<description value="Limit to members of" options=",,,owner"/>
|
||||||
<menulist>
|
<listbox statustext="Limit global category to members of a certain group" id="owner" rows="3"/>
|
||||||
<menupopup type="select-account" options="All users,groups" id="owner" statustext="Limit global category to members of a certain group"/>
|
|
||||||
</menulist>
|
|
||||||
</row>
|
</row>
|
||||||
<row class="row" disabled="!@last_mod">
|
<row class="row" disabled="!@last_mod">
|
||||||
<description value="Modified"/>
|
<description value="Modified"/>
|
||||||
@ -106,12 +104,12 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<hbox>
|
<hbox>
|
||||||
<button label="Save" id="button[save]"/>
|
<button label="Save" id="button[save]" onclick="return check_owner(form::name('owner'));"/>
|
||||||
<button label="Apply" id="button[apply]"/>
|
<button label="Apply" id="button[apply]" onclick="return check_owner(form::name('owner'));"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<buttononly id="button[cancel]" label="Cancel" onclick="window.close();"/>
|
<buttononly label="Cancel" id="button[cancel]" onclick="window.close();"/>
|
||||||
<buttononly label="Delete" align="right" id="button[delete]" statustext="Delete this category" onclick="set_style_by_class('tr','confirmSubs','visibility','$cont[children]'?'visible':'collapse'); set_style_by_class('fieldset','confirmDelete','display','block');"/>
|
<buttononly align="right" statustext="Delete this category" label="Delete" id="button[delete]" onclick="set_style_by_class('tr','confirmSubs','visibility','$cont[children]'?'visible':'collapse'); set_style_by_class('fieldset','confirmDelete','display','block');"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
@ -693,6 +693,7 @@ class categories
|
|||||||
'cat_data' => is_array($values['data']) ? serialize($values['data']) : $values['data'],
|
'cat_data' => is_array($values['data']) ? serialize($values['data']) : $values['data'],
|
||||||
'cat_parent' => $values['parent'],
|
'cat_parent' => $values['parent'],
|
||||||
'cat_access' => $values['access'],
|
'cat_access' => $values['access'],
|
||||||
|
'cat_owner' => $values['owner'],
|
||||||
'cat_main' => $values['main'],
|
'cat_main' => $values['main'],
|
||||||
'cat_level' => $values['level'],
|
'cat_level' => $values['level'],
|
||||||
'last_mod' => time(),
|
'last_mod' => time(),
|
||||||
|
Loading…
Reference in New Issue
Block a user