Browse Source

Revert "Fix comboSelect"

This reverts commit f64a1fbf0c33f6292bd4dffd3cab4b678fcf8fb3.
Namdak Tonpa 4 years ago
parent
commit
ecb43d344c
1 changed files with 9 additions and 16 deletions
  1. 9 16
      priv/js/comboLookup.js

+ 9 - 16
priv/js/comboLookup.js

@@ -5,22 +5,15 @@ function comboClear(dom) {
 }
 
 function comboSelect(dom, row, feed, mod, id) {
-  let elem = qi(dom); comboClear(dom);
-  let selected_value = string(row);
-
-  if (qi(id)) {
-    let bind = qi(id).getAttribute('data-bind')
-    elem.setAttribute("data-bind", bind);
-    selected_value = dec(unbase64(bind));
-  }
-
-  elem.value = row;
-  elem.style.backgroundColor = 'white';
-  direct(tuple(atom('comboSelect'),
-               selected_value,
-               string(dom),
-               string(feed),
-               atom(mod)));
+    let elem = qi(dom); comboClear(dom);
+    if (qi(id)) elem.setAttribute("data-bind", qi(id).getAttribute('data-bind'));
+    elem.value = row;
+    elem.style.backgroundColor = 'white';
+    direct(tuple(atom('comboSelect'),
+                 string(dom),
+                 string(row),
+                 string(feed),
+                 atom(mod)));
 }
 
 function comboLookupChange(dom) {