git://git.onelab.eu
/
plstackapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set dirty if users edited, warning message if change slice while dirty
[plstackapi.git]
/
planetstack
/
core
/
xoslib
/
static
/
js
/
xoslib
/
xos-util.js
diff --git
a/planetstack/core/xoslib/static/js/xoslib/xos-util.js
b/planetstack/core/xoslib/static/js/xoslib/xos-util.js
index
59fb06e
..
1c42e26
100644
(file)
--- a/
planetstack/core/xoslib/static/js/xoslib/xos-util.js
+++ b/
planetstack/core/xoslib/static/js/xoslib/xos-util.js
@@
-105,6
+105,12
@@
function array_subtract(a1, a2)
return result;
}
return result;
}
+function array_same_elements(arr1, arr2)
+{
+ // return true if arrays have same elements, even if order is different
+ return ($(arr1).not(arr2).length == 0 && $(arr2).not(arr1).length == 0);
+}
+
function array_pair_lookup(x, names, values)
{
for (index in values) {
function array_pair_lookup(x, names, values)
{
for (index in values) {