From: phasefx Date: Mon, 2 May 2011 14:05:56 +0000 (+0000) Subject: Fix bug and typo in stat cat editor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d76f76ba9220f1eeca9ea38f28ca1fecaad35c4;p=evergreen%2Fpines.git Fix bug and typo in stat cat editor Specifically, disabling the ability to select a stat cat type on no permissions on current type. If you don't have permissions on ASSET you could never get to ACTOR. If you picked ACTOR without rights you couldn't get back to ASSET. Also, re-enable the library selector and new buttons when you do change to one you can add for. Author: Thomas Berezansky Signed-off-by: Thomas Berezansky Signed-off-by: Jason Etheridge git-svn-id: svn://svn.open-ils.org/ILS/trunk@20371 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js b/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js index ae896a73c0..55bad5853c 100644 --- a/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js +++ b/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js @@ -52,7 +52,7 @@ function scSetPerms() { PERMS[ASSET].update_stat_cat_entry = OILS_WORK_PERMS.UPDATE_COPY_STAT_CAT_ENTRY; PERMS[ASSET].delete_stat_cat_entry = OILS_WORK_PERMS.DELETE_COPY_STAT_CAT_ENTRY; - // set up the fitler select + // set up the filter select var fselector = $('sc_org_filter'); var org_list = PERMS[currentlyVisible].update_stat_cat; buildMergedOrgSel(fselector, org_list, 0, 'shortname'); @@ -296,10 +296,13 @@ function scBuildNew() { var org_list = PERMS[type].create_stat_cat; if(org_list.length == 0) { /* no create perms */ $('sc_new').disabled = true; - typeSel.disabled = true; libSel.disabled = true; return; } + else { + $('sc_new').disabled = false; + libSel.disabled = false; + } buildMergedOrgSel(libSel, org_list, 0, 'shortname'); }