Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-14 14:57:34 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-14 14:57:34 +0300
commit3d5eebd57f8c658b1382420d03ecbe225f45ec20 (patch)
tree9d01027877c80df7bb2c83e2163c403b70effd26 /js/galleryfileaction.js
parent2f30dc24efa99b8a3a1cfaf62778d500fa27b769 (diff)
Rebuild buildFeaturesList after refactoring of galleryconfig
Diffstat (limited to 'js/galleryfileaction.js')
-rw-r--r--js/galleryfileaction.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js
index 88a4a7cd..e0a74645 100644
--- a/js/galleryfileaction.js
+++ b/js/galleryfileaction.js
@@ -53,16 +53,18 @@
/**
* Prepares the features array
*
+ * This is duplicated from a method found in galleryconfig. It's done that way in order to
+ * avoid having to load the whole utility class in the Files app
+ *
* @param configFeatures
* @returns {Array}
*/
buildFeaturesList: function (configFeatures) {
var features = [];
- var feature = null;
- if (!$.isEmptyObject(configFeatures)) {
- for (var i = 0, keys = Object.keys(configFeatures); i < keys.length; i++) {
- feature = keys[i];
- features.push(feature);
+ var i, configFeaturesLength = configFeatures.length;
+ if (configFeaturesLength) {
+ for (i = 0; i < configFeaturesLength; i++) {
+ features.push(configFeatures[i]);
}
}