diff options
author | Olivier Paroz <github@oparoz.com> | 2015-04-19 20:29:44 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-04-19 20:29:44 +0300 |
commit | bcfe7fe9e2caf0bc5fb1d7e8394c511d5ffd8add (patch) | |
tree | a828f38b118a061b9f373dc198c426bf20a5f570 /js/galleryfileaction.js | |
parent | a42adab4bab5c66420fe810bd3863737813bce2a (diff) |
Differentiate between global and album config
Diffstat (limited to 'js/galleryfileaction.js')
-rw-r--r-- | js/galleryfileaction.js | 16 |
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 |