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-04-19 20:29:44 +0300
committerOlivier Paroz <github@oparoz.com>2015-04-19 20:29:44 +0300
commitbcfe7fe9e2caf0bc5fb1d7e8394c511d5ffd8add (patch)
treea828f38b118a061b9f373dc198c426bf20a5f570 /js/galleryfileaction.js
parenta42adab4bab5c66420fe810bd3863737813bce2a (diff)
Differentiate between global and album config
Diffstat (limited to 'js/galleryfileaction.js')
-rw-r--r--js/galleryfileaction.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js
index afc040c5..2c1f1752 100644
--- a/js/galleryfileaction.js
+++ b/js/galleryfileaction.js
@@ -1,6 +1,6 @@
/* global OC ,OCA, $, oc_requesttoken, SlideShow */
var galleryFileAction = {
- requestToken: null,
+ config: null,
mediaTypes: {},
/**
@@ -107,8 +107,14 @@ $(document).ready(function () {
return true;
}
- var url = galleryFileAction.buildGalleryUrl('mediatypes', '', {slideshow: 1});
- // We're asking for a list of supported media types.
- // Media files are retrieved through the Files context
- $.getJSON(url, {}, galleryFileAction.register);
+ var url = galleryFileAction.buildGalleryUrl('config', '', {});
+ $.getJSON(url).then(function (config) {
+ if (config) {
+ galleryFileAction.config = config;
+ }
+ url = galleryFileAction.buildGalleryUrl('mediatypes', '', {slideshow: 1});
+ // We're asking for a list of supported media types.
+ // Media files are retrieved through the Files context
+ $.getJSON(url, {}, galleryFileAction.register);
+ });
}); \ No newline at end of file