Index: applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-edit-selector.vm
===================================================================
--- applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-edit-selector.vm (revision 600768)
+++ applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-edit-selector.vm (working copy)
@@ -1,9 +1,9 @@
#*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -64,7 +64,7 @@
Keywords:
-
+
@@ -109,7 +109,7 @@
}
function saveOffKeywords()
{
- var keywords = document.getElementById('keywords');
+ var keywords = document.getElementById('${renderResponse.namespace}keywords');
if (window.jsLastIndex > -1)
{
if (jsCategories[window.jsLastIndex].keywords != keywords.value)
@@ -126,7 +126,7 @@
{
var catList = document.getElementById('jsSelectCat');
saveOffKeywords();
- var keywords = document.getElementById('keywords');
+ var keywords = document.getElementById('${renderResponse.namespace}keywords');
keywords.value = jsCategories[catList.selectedIndex].keywords;
window.jsLastIndex = catList.selectedIndex;
}
@@ -155,7 +155,8 @@
jsCategories[newIndex].state = "new";
var catList = document.getElementById('jsSelectCat');
var opt = new Option(catName, catName);
- catList.add(opt, null);
+ catList.options[newIndex] = opt;
+ //catList.add(opt, null);
}
dojo.widget.byId("AddCategoryDialog").hide();
}
@@ -165,7 +166,7 @@
if (catList.selectedIndex != -1)
{
window.jsLastIndex = -1;
- var keywords = document.getElementById('keywords');
+ var keywords = document.getElementById('${renderResponse.namespace}keywords');
keywords.value = "";
jsRemoves[jsRemoves.length] = jsCategories[catList.selectedIndex].name;
// shift up
@@ -179,7 +180,7 @@
j = j + 1;
}
}
- delete jsCategories;
+ //delete jsCategories;
jsCategories = temp;
catList.remove(catList.selectedIndex);
}