fixed various issues in scheduler and apply
[unfold.git] / plugins / apply / static / js / apply.js
index 676babc..1973028 100644 (file)
             // XXX how do we handle status reset ?
 
             // Jordan : I don't understand this. I added this test otherwise we have string = ""..."" double quoted twice.
-            if (typeof(data.value) !== "string")
-                data.value = JSON.stringify(data.value);
             data.selected_resources = this.selected_resources;
             row = this.find_row(data.value);
-            newline = [action, data.key, data.value, msg, button];
+            if (typeof(data.value) !== "string")
+                newline = [action, data.key, JSON.stringify(data.value), msg, button];
+            else
+                newline = [action, data.key, data.value, msg, button];
             if (!row) {
                 // XXX second parameter refresh = false can improve performance. todo in querytable also
                 this.table.fnAddData(newline);