Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Use multiple selector external module
Browse files Browse the repository at this point in the history
New function LangUtils.objectValues() to replace Object.values()
  • Loading branch information
cdujeu committed Aug 26, 2015
1 parent 1cea9ba commit 9dd21d0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions core/src/plugins/gui.ajax/res/js/core/util/LangUtils.js
Expand Up @@ -113,6 +113,14 @@ var LangUtils = (function () {
return newObject;
};

LangUtils.objectValues = function objectValues(object) {
var results = [];
for (var property in object) if (object.hasOwnProperty(property)) {
results.push(object[property]);
}
return results;
};

return LangUtils;
})();

Expand Down
9 changes: 9 additions & 0 deletions core/src/plugins/gui.ajax/res/js/es6/util/LangUtils.es6
Expand Up @@ -111,6 +111,15 @@ class LangUtils{
return newObject;
}

static objectValues(object) {
var results = [];
for (var property in object)
if(object.hasOwnProperty(property)){
results.push(object[property]);
}
return results;
}

}

LangUtils.slugTable = [
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/gui.ajax/res/js/vendor/nodejs/export.js
Expand Up @@ -6,4 +6,5 @@ window.Infinite = require('react-infinite');
window.injectTapEventPlugin = require("react-tap-event-plugin");
window.ReactGridLayout = require('react-grid-layout');
window.ReactChart = require('react-chartjs');
window.ReactSelect = require('react-select');
window.injectTapEventPlugin();
3 changes: 2 additions & 1 deletion core/src/plugins/gui.ajax/res/js/vendor/nodejs/package.json
Expand Up @@ -9,6 +9,7 @@
"react-grid-layout": "^0.8.3",
"react-infinite": "^0.3.4",
"react-tap-event-plugin": "^0.1.7",
"reactify": "^1.1.1"
"reactify": "^1.1.1",
"react-select":"^0.6.5"
}
}

0 comments on commit 9dd21d0

Please sign in to comment.