Index: trunk/kernel/admin/include/toolbar/browse.php =================================================================== diff -u -r1333 -r1566 --- trunk/kernel/admin/include/toolbar/browse.php (.../browse.php) (revision 1333) +++ trunk/kernel/admin/include/toolbar/browse.php (.../browse.php) (revision 1566) @@ -218,7 +218,7 @@ addCommonActions(); initToolbar('mainToolBar', actionHandler); initCheckBoxes(); - toggleMenu(); + //toggleMenu(); } function AddButtonAction(actionname,actionval) @@ -236,7 +236,7 @@ a = actionlist[i]; if(button.action==a[0]) { - //alert('Button action '+a[0]+' is '+a[1]); +// alert('Button action '+a[0]+' is '+a[1]); eval(a[1]); break; } @@ -366,18 +366,25 @@ var action_prefix =''; if ((activeTab) && (!isAnyChecked('categories'))) - { - form_name = activeTab.id; - action_prefix = activeTab.getAttribute("ActionPrefix"); - if(page.length==0) - page = activeTab.getAttribute("EditURL"); + { + form_name = activeTab.id; + action_prefix = activeTab.getAttribute("ActionPrefix"); + if(page.length==0) + page = activeTab.getAttribute("EditURL"); + + if ( action_prefix.match("k4:(.*)") ) { + act = RegExp.$1; + act = act.replace('$\$event$$', actionValue); + eval(act); + return; + } } - else - { - form_name = 'categories'; - action_prefix = 'm_cat_'; - if(page.length==0) - page="$admin" + '/category/addcategory'; + else + { + form_name = 'categories'; + action_prefix = 'm_cat_'; + if(page.length==0) + page="$admin" + '/category/addcategory'; } var f = document.getElementsByName(form_name+'_form')[0]; @@ -569,13 +576,12 @@ var categories = document.getElementById('categories'); if (!categories) return; toggleCategories(instant); - - document.getElementById('l_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active_l" : "tab_inactive_l") + ".gif" - document.getElementById('m_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif" - document.getElementById('m1_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif" - document.getElementById('r_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active_r" : "tab_inactive_r") + ".gif" - //tabHeader.setAttribute("background", '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif") - + var active_str = '$imagesURL'+'/itemtabs/' + (categories.active ? 'tab_active' : 'tab_inactive'); + SetBackground('l_cat', active_str + '_l.gif'); + SetBackground('m_cat', active_str + '.gif'); + SetBackground('m1_cat', active_str + '.gif'); + SetBackground('r_cat', active_str + '_r.gif'); + var images = tabHeader.getElementsByTagName("IMG"); if (images.length < 1) return; images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif"; @@ -631,7 +637,7 @@ var images = tabHeader.getElementsByTagName("IMG"); if (images.length < 1) continue; - images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif"; + images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_dn") + ".gif"; } } @@ -702,7 +708,7 @@ var images = tabHeader.getElementsByTagName("IMG"); if (images.length < 1) continue; - images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif"; + images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_dn") + ".gif"; } }