]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: array-assignment fix from Chome
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 10 Feb 2014 14:24:48 +0000 (14:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 9 Mar 2014 19:22:34 +0000 (12:22 -0700)
Apparently the JS engine in Chrome can't handle assignments to an array,
so I'm patching this up by using an intermediate array to hold the
values.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
lib/toaster/toastergui/templates/base.html
lib/toaster/toastergui/templates/basetable_bottom.html

index c8c1daeb75ad7e326d9aaf026bf713148dce33c2..2d2bfcaf99eb3eb78192fcdd12f55191bd4b3e44 100644 (file)
@@ -22,7 +22,8 @@
 <script>
 function reload_params(params) {
     uri = window.location.href;
-    [url, parameters] = uri.split("?");
+    splitlist = uri.split("?");
+    url = splitlist[0], parameters=splitlist[1];
     // deserialize the call parameters
     cparams = parameters.split("&");
     nparams = {}
index 4eb303da79272003f02467232fda20d6ff0e90bb..ac14363798b1c72f497b6c1988b7914db815d500 100644 (file)
@@ -44,7 +44,8 @@
     setting = save.split(';');
     for ( i = 0; i < setting.length; i++) {
         if (setting[i].length > 0) {
-            [id, v] = setting[i].split(':');
+            splitlist = setting[i].split(':');
+            id = splitlist[0], v = splitlist[1];
             if (v == 'true') {
                 $('.chbxtoggle#'+id).prop('checked', true);
             }