refactor sliceplus core for users, return user ids and names in sliceplus object
[plstackapi.git] / planetstack / core / xoslib / static / js / xoslib / xos-util.js
index 1d135f4..7a57d8a 100644 (file)
@@ -100,7 +100,7 @@ function array_pair_lookup(x, names, values)
             return names[index];
         }
     }
-    return undefined;
+    return "object #" + x;
 }
 
 function all_options(selector) {
@@ -111,3 +111,10 @@ function all_options(selector) {
     });
     return result;
 }
+
+function make_same_width(containerSelector, itemSelector) {
+    var maxWidth = 0;
+    $(containerSelector).find(itemSelector).each( function(index) { maxWidth = Math.max(maxWidth, $(this).width()); });\r
+    console.log(maxWidth);\r
+    $(containerSelector).find(itemSelector).each( function(index) { $(this).width(maxWidth); });
+}