Get category edit working in et2

This commit is contained in:
Nathan Gray 2012-04-24 23:13:57 +00:00
parent e74f753978
commit e92163ef31
3 changed files with 6 additions and 6 deletions

View File

@ -33,8 +33,8 @@ function check_owner(element_id) {
// Single selection?
if(checkboxes.length == 0) {
var new_group = $j(document.getElementById(element_id));
if(new_group.attr('value') != 0 && cat_original_owner.length > 0) {
var new_group = $j('input#'+element_id);
if(new_group.length > 0 && new_group.attr('value') != 0 && cat_original_owner.length > 0) {
diff.push(cat_original_owner[0]);
var selector = 'option[value="'+cat_original_owner[0]+'"]';
labels.push("\n"+$j(selector, new_group).text());
@ -68,7 +68,7 @@ function change_icon(_icon)
img.src = img.src.replace(/\/[^\/]*$/,'\/'+_icon.value);
img.style.display = 'block';
}
else
else if (img)
{
img.style.display = 'none';
}

View File

@ -2,7 +2,7 @@
/**
* EGroupware - eTemplates for Application admin
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2012-04-11 10:31
* generated by soetemplate::dump4setup() 2012-04-24 16:36
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package admin
@ -37,7 +37,7 @@ $templ_data[] = array('name' => 'admin.categories.delete','template' => '','lang
{
}','modified' => '1308076484',);
$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:12:{i:0;a:14:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";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:3:"c10";s:3:"row";s:3:"h10";s:11:",!@last_mod";s:2:"h8";s:15:",@appname=phpgw";s:2:"h5";s:12:",@no_private";s:2:"c5";s:3:"nmr";}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:36:"None,$cont[all_cats],,$cont[appname]";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:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";}}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:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:6:"access";s:4:"size";s:14:"private,public";}}i:6;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:7;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:18:"change_icon(this);";}i:2;a:3:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";}}}i:8;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:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:14:"Category owner";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";s:6:"needed";s:1:"1";s:4:"size";s:1:"3";}}i:10;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:11;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:11;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.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:12:{i:0;a:14:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";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:3:"c10";s:3:"row";s:3:"h10";s:11:",!@last_mod";s:2:"h8";s:15:",@appname=phpgw";s:2:"h5";s:12:",@no_private";s:2:"c5";s:3:"nmr";}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:36:"None,$cont[all_cats],,$cont[appname]";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:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";}}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:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:6:"access";s:4:"size";s:14:"private,public";}}i:6;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:7;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:18:"change_icon(this);";}i:2;a:4:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";s:4:"size";s:12:",,,,icon_url";}}}i:8;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:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:14:"Category owner";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";s:6:"needed";s:1:"1";s:4:"size";s:1:"3";}}i:10;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:11;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:11;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.9.002','data' => 'a:3:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:1:"B";s:34:",!@nm[selectcols]=/legacy_actions/";}i:1;a:2:{s:1:"A";a:4:{s:5:"align";s:6:"center";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:4:{s:4:"name";s:2:"nm";s:4:"size";s:27:"admin.categories.index.rows";s:4:"type";s:9:"nextmatch";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:5:"label";s:3:"Add";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=$cont[add_link]&cat_id=&appname=$cont[nm][appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:3:"add";s:4:"type";s:10:"buttononly";}s:1:"B";a:6:{s:5:"align";s:5:"right";s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:5:"label";s:13:"Select action";s:7:"onclick";s:192:"if (!egw_globalObjectManager.getObjectById(\'admin.categories.index.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";s:4:"name";s:14:"legacy_actions";s:4:"type";s:10:"buttononly";s:4:"help";s:13:"Select action";}i:2;a:8:{s:5:"label";s:9:"Check all";s:6:"needed";s:1:"1";s:7:"onclick";s:103:"egw_globalObjectManager.getObjectById(\'admin.categories.index.rows\').toggleAllSelected(); return false;";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:2;s:4:"rows";i:3;s:4:"size";s:4:"100%";}i:1;a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:3:{s:4:"name";s:13:"delete_prompt";s:4:"type";s:5:"label";s:5:"label";s:24:"Delete selected entries?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:12:"Yes - Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:34:"Yes - Delete including sub-entries";s:7:"onclick";s:71:"nm_popup_action.id = \'delete_sub\'; nm_submit_popup(this); return false;";s:4:"name";s:10:"delete_sub";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:11:"No - Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}i:2;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:11:"owner_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"4";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"Change owner";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Select owner";}i:3;a:5:{s:7:"no_lang";s:1:"1";s:4:"name";s:5:"owner";s:4:"type";s:6:"select";s:4:"size";s:1:"4";s:4:"span";s:21:",action_popup-content";}i:4;a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:5:"label";s:3:"Add";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:17:"owner_action[add]";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:6:"Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:20:"owner_action[delete]";s:4:"type";s:6:"button";}i:3;a:4:{s:8:"disabled";s:4:"true";s:5:"label";s:2:"OK";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";}i:4;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:34:"nm_hide_popup(this,\'owner_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}','size' => '100%','style' => '.level0 { font-weight: bold; }

View File

@ -89,7 +89,7 @@
<menulist>
<menupopup id="data[icon]" onchange="change_icon(this);" options="None"/>
</menulist>
<image src="icon_url" class="leftPad5"/>
<image src="icon_url" id="icon_url" class="leftPad5"/>
</hbox>
</row>
<row class="row" disabled="@appname=phpgw">