Skip to content

Commit

Permalink
bug fixes with release 21
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlewis committed Jul 17, 2015
1 parent 57b19f9 commit 56cb08e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ else if (mdAttributeConcrete instanceof MdAttributeCharacterDTO || mdAttributeCo
}

req.setAttribute("categoryType", this.getCategoryType(mdAttributeConcrete));
req.setAttribute("polygoncategories", style.getCategoryPolygonStyles().toString());
req.setAttribute("pointcategories", style.getCategoryPointStyles().toString());
req.setAttribute("secondaryCategories", style.getSecondaryCategories().toString());
req.setAttribute("polygoncategories", this.encode(style.getCategoryPolygonStyles()));
req.setAttribute("pointcategories", this.encode(style.getCategoryPointStyles()));
req.setAttribute("secondaryCategories", this.encode(style.getSecondaryCategories()));

/*
* Secondary attribute objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
var catsJSONObj = $(this._storeId).data("categoriesstore");

if(catsJSONObj){
catsJSONObj = JSON.parse(decodeURIComponent(catsJSONObj));
var catsJSONArr = catsJSONObj.catLiElems;

if(catsJSONArr == null && Array.isArray(catsJSONObj)) {
Expand All @@ -250,7 +250,8 @@
}

var catColorSelectorId = catInputId + "-color-selector";
$("#"+catInputId).val(cat.val);
// replace() is due to a encoding/decoding issue where spaces are replaced with + signs and not decoded in js
$("#"+catInputId).val(cat.val.replace("+", " "));
$("#"+catColorSelectorId).css("background", cat.color);
catOtherEnabled = cat.otherEnabled;
}
Expand Down Expand Up @@ -449,7 +450,7 @@
var catsJSONObj = $(this._storeId).data("categoriesstore");

if(catsJSONObj){
catsJSONObj = JSON.parse(decodeURIComponent(catsJSONObj));
var catsJSONArr = catsJSONObj.catLiElems;

if(catsJSONArr == null && Array.isArray(catsJSONObj)) {
Expand Down Expand Up @@ -1256,8 +1257,9 @@
var otherEnabled = true;

var catStore = $("#categories-polygon-input").data("categoriesstore");
catStore = JSON.parse(decodeURIComponent(catStore));

if(catStore !== null && catStore !== "" && catStore.catLiElems.length > 0){
if(catStore !== null && catStore !== "" && catStore.length > 0){
var catJSON = catStore.catLiElems;

for(var i=0; i<catJSON.length; i++){
Expand Down Expand Up @@ -1317,8 +1319,9 @@
var otherEnabled = true;

var catStore = $("#categories-point-input").data("categoriesstore");
catStore = JSON.parse(decodeURIComponent(catStore));

if(catStore !== null && catStore !== "" && catStore.catLiElems.length > 0){
if(catStore !== null && catStore !== "" && catStore.length > 0){
var catJSON = catStore.catLiElems;

for(var i=0; i<catJSON.length; i++){
Expand Down Expand Up @@ -1386,7 +1389,7 @@
}
else {
this._renderSecondaryCategoryGroup(secondaryAttribute, type);
this._loadExistingCategories("#secondaryCategories", "secondaryCat", "#secondary-tree", false);
//this._loadExistingCategories("#secondaryCategories", "secondaryCat", "#secondary-tree", false);
}
}

Expand Down

0 comments on commit 56cb08e

Please sign in to comment.