From 879ab7951d8a553d701ee8f242fe690bba607ffc Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Sun, 5 Nov 2017 17:30:45 +0100 Subject: [PATCH] fix build --- docs-web/src/main/webapp/src/index.html | 1 - .../angular.translate-loader-static-files.js | 112 ----------------- .../main/webapp/src/lib/angular.translate.js | 113 ++++++++++++++++++ 3 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 docs-web/src/main/webapp/src/lib/angular.translate-loader-static-files.js diff --git a/docs-web/src/main/webapp/src/index.html b/docs-web/src/main/webapp/src/index.html index 3b0e642d..42c0ae2f 100644 --- a/docs-web/src/main/webapp/src/index.html +++ b/docs-web/src/main/webapp/src/index.html @@ -30,7 +30,6 @@ - diff --git a/docs-web/src/main/webapp/src/lib/angular.translate-loader-static-files.js b/docs-web/src/main/webapp/src/lib/angular.translate-loader-static-files.js deleted file mode 100644 index 2e3afe29..00000000 --- a/docs-web/src/main/webapp/src/lib/angular.translate-loader-static-files.js +++ /dev/null @@ -1,112 +0,0 @@ -/*! - * angular-translate - v2.16.0 - 2017-11-01 - * - * Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT - */ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module unless amdModuleId is set - define([], function () { - return (factory()); - }); - } else if (typeof module === 'object' && module.exports) { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - factory(); - } -}(this, function () { - -$translateStaticFilesLoader.$inject = ['$q', '$http']; -angular.module('pascalprecht.translate') -/** - * @ngdoc object - * @name pascalprecht.translate.$translateStaticFilesLoader - * @requires $q - * @requires $http - * - * @description - * Creates a loading function for a typical static file url pattern: - * "lang-en_US.json", "lang-de_DE.json", etc. Using this builder, - * the response of these urls must be an object of key-value pairs. - * - * @param {object} options Options object, which gets prefix, suffix, key, and fileMap - */ -.factory('$translateStaticFilesLoader', $translateStaticFilesLoader); - -function $translateStaticFilesLoader($q, $http) { - - 'use strict'; - - return function (options) { - - if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) { - throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!'); - } - - if (!options.files) { - options.files = [{ - prefix: options.prefix, - suffix: options.suffix - }]; - } - - var load = function (file) { - if (!file || (!angular.isString(file.prefix) || !angular.isString(file.suffix))) { - throw new Error('Couldn\'t load static file, no prefix or suffix specified!'); - } - - var fileUrl = [ - file.prefix, - options.key, - file.suffix - ].join(''); - - if (angular.isObject(options.fileMap) && options.fileMap[fileUrl]) { - fileUrl = options.fileMap[fileUrl]; - } - - return $http(angular.extend({ - url: fileUrl, - method: 'GET' - }, options.$http)) - .then(function(result) { - return result.data; - }, function () { - return $q.reject(options.key); - }); - }; - - var promises = [], - length = options.files.length; - - for (var i = 0; i < length; i++) { - promises.push(load({ - prefix: options.files[i].prefix, - key: options.key, - suffix: options.files[i].suffix - })); - } - - return $q.all(promises) - .then(function (data) { - var length = data.length, - mergedData = {}; - - for (var i = 0; i < length; i++) { - for (var key in data[i]) { - mergedData[key] = data[i][key]; - } - } - - return mergedData; - }); - }; -} - -$translateStaticFilesLoader.displayName = '$translateStaticFilesLoader'; -return 'pascalprecht.translate'; - -})); diff --git a/docs-web/src/main/webapp/src/lib/angular.translate.js b/docs-web/src/main/webapp/src/lib/angular.translate.js index bad0b2f3..d00424ff 100644 --- a/docs-web/src/main/webapp/src/lib/angular.translate.js +++ b/docs-web/src/main/webapp/src/lib/angular.translate.js @@ -3756,3 +3756,116 @@ $translationCache.displayName = '$translationCache'; return 'pascalprecht.translate'; })); + +/*! + * angular-translate - v2.16.0 - 2017-11-01 + * + * Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT + */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define([], function () { + return (factory()); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + factory(); + } +}(this, function () { + + $translateStaticFilesLoader.$inject = ['$q', '$http']; + angular.module('pascalprecht.translate') + /** + * @ngdoc object + * @name pascalprecht.translate.$translateStaticFilesLoader + * @requires $q + * @requires $http + * + * @description + * Creates a loading function for a typical static file url pattern: + * "lang-en_US.json", "lang-de_DE.json", etc. Using this builder, + * the response of these urls must be an object of key-value pairs. + * + * @param {object} options Options object, which gets prefix, suffix, key, and fileMap + */ + .factory('$translateStaticFilesLoader', $translateStaticFilesLoader); + + function $translateStaticFilesLoader($q, $http) { + + 'use strict'; + + return function (options) { + + if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) { + throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!'); + } + + if (!options.files) { + options.files = [{ + prefix: options.prefix, + suffix: options.suffix + }]; + } + + var load = function (file) { + if (!file || (!angular.isString(file.prefix) || !angular.isString(file.suffix))) { + throw new Error('Couldn\'t load static file, no prefix or suffix specified!'); + } + + var fileUrl = [ + file.prefix, + options.key, + file.suffix + ].join(''); + + if (angular.isObject(options.fileMap) && options.fileMap[fileUrl]) { + fileUrl = options.fileMap[fileUrl]; + } + + return $http(angular.extend({ + url: fileUrl, + method: 'GET' + }, options.$http)) + .then(function(result) { + return result.data; + }, function () { + return $q.reject(options.key); + }); + }; + + var promises = [], + length = options.files.length; + + for (var i = 0; i < length; i++) { + promises.push(load({ + prefix: options.files[i].prefix, + key: options.key, + suffix: options.files[i].suffix + })); + } + + return $q.all(promises) + .then(function (data) { + var length = data.length, + mergedData = {}; + + for (var i = 0; i < length; i++) { + for (var key in data[i]) { + mergedData[key] = data[i][key]; + } + } + + return mergedData; + }); + }; + } + + $translateStaticFilesLoader.displayName = '$translateStaticFilesLoader'; + return 'pascalprecht.translate'; + +}));