=== removed file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-static-files.min.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-static-files.min.js 2014-03-05 11:07:39 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-static-files.min.js 1970-01-01 00:00:00 +0000 @@ -1,20 +0,0 @@ -angular.module("pascalprecht.translate") - .factory("$translateStaticFilesLoader", ["$q", "$http", function(a, b) { - return function(c) { - if (!c || !c.prefix || !c.suffix) - throw new Error( - "Couldn't load static files, no prefix or suffix specified!"); - var d = a.defer(); - return b( - { - url : [ c.prefix, c.key, c.suffix ] - .join(""), - method : "GET", - params : "" - }).success(function(a) { - d.resolve(a) - }).error(function() { - d.reject(c.key) - }), d.promise - } -} ]); \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-url.min.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-url.min.js 2014-03-05 11:07:39 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate-loader-url.min.js 1970-01-01 00:00:00 +0000 @@ -1,26 +0,0 @@ -angular - .module("pascalprecht.translate") - .factory( - "$translateUrlLoader", - [ - "$q", - "$http", - function(a, b) { - return function(c) { - if (!c || !c.url) - throw new Error( - "Couldn't use urlLoader since no url is given!"); - var d = a.defer(); - return b({ - url : c.url, - params : { - lang : c.key - }, - method : "GET" - }).success(function(a) { - d.resolve(a) - }).error(function() { - d.reject(c.key) - }), d.promise - } - } ]); \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate.min.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate.min.js 2014-03-05 11:07:39 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angular-translate.min.js 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(a){var b=a.storageKey(),c=a.storage();c?c.get(b)?a.uses(c.get(b)):angular.isString(a.preferredLanguage())?a.uses(a.preferredLanguage()):c.set(b,a.uses()):angular.isString(a.preferredLanguage())&&a.uses(a.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n={},o=a,p=[],q=".",r=function(a,b){if(!a&&!b)return n;if(a&&!b){if(angular.isString(a))return n[a];angular.extend(n,s(a))}else angular.isObject(n[a])||(n[a]={}),angular.extend(n[a],s(b));return this},s=function(a,b,c,d){var e,f,g;b||(b=[]),c||(c={});for(e in a)a.hasOwnProperty(e)&&(g=a[e],angular.isObject(g)?s(g,b.concat(e),c,e):(f=b.length?""+b.join(q)+q+e:e,b.length&&e===d&&(keyWithShortPath=""+b.join(q),c[keyWithShortPath]="@:"+f),c[f]=g));return c};this.translations=r,this.addInterpolation=function(a){return p.push(a),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(a){return i=a,this},this.preferredLanguage=function(a){return a?(b=a,this):b},this.translationNotFoundIndicator=function(a){return this.translationNotFoundIndicatorLeft(a),this.translationNotFoundIndicatorRight(a),this},this.translationNotFoundIndicatorLeft=function(a){return a?(l=a,this):l},this.translationNotFoundIndicatorRight=function(a){return a?(m=a,this):m},this.fallbackLanguage=function(a){return a?(("string"==typeof a||angular.isArray(a))&&(c=a),this):c},this.uses=function(a){if(a){if(!n[a]&&!j)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+a+"'");return d=a,this}return d};var t=function(a){return a?(o=a,void 0):g?g+o:o};this.storageKey=t,this.useUrlLoader=function(a){return this.useLoader("$translateUrlLoader",{url:a})},this.useStaticFilesLoader=function(a){return this.useLoader("$translateStaticFilesLoader",a)},this.useLoader=function(a,b){return j=a,k=b||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(a){return f=a,this},this.storagePrefix=function(a){return a?(g=a,this):a},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(a){return h=a,this},this.$get=["$log","$injector","$rootScope","$q",function(a,g,o,q){var s,u=g.get(i||"$translateDefaultInterpolation"),v=!1,w={},x=function(a){if(!a)throw"No language key specified for loading.";var b=q.defer();return o.$broadcast("$translateLoadingStart"),v=!0,g.get(j)(angular.extend(k,{key:a})).then(function(c){o.$broadcast("$translateLoadingSuccess");var d={};angular.isArray(c)?angular.forEach(c,function(a){angular.extend(d,a)}):angular.extend(d,c),v=!1,b.resolve({key:a,table:d}),o.$broadcast("$translateLoadingEnd")},function(a){o.$broadcast("$translateLoadingError"),b.reject(a),o.$broadcast("$translateLoadingEnd")}),b.promise};if(f&&(s=g.get(f),!s.get||!s.set))throw new Error("Couldn't use storage '"+f+"', missing get() or set() method!");p.length>0&&angular.forEach(p,function(a){var c=g.get(a);c.setLocale(b||d),w[c.getInterpolationIdentifier()]=c});var y=function(a){if(a&&c){if(angular.isArray(c)){for(var b=c.length,e=0;b>e;e++)if(d===n[c[e]])return!1;return!0}return a!==c}return!1},z=function(a,b,e){var f=d?n[d]:n,i=e?w[e]:u;if(f&&f.hasOwnProperty(a))return angular.isString(f[a])&&"@:"===f[a].substr(0,2)?z(f[a].substr(2),b,e):i.interpolate(f[a],b);h&&!v&&g.get(h)(a,d);var j;if(d&&c&&y(d)){"string"==typeof c?(j=[],j.push(c)):j=c;for(var k=j.length,o=0;k>o;o++)if(d!==n[j[o]]){var p=n[j[o]][a];if(p){var q;return i.setLocale(j[o]),q=i.interpolate(p,b),i.setLocale(d),q}}}return l&&(a=[l,a].join(" ")),m&&(a=[a,m].join(" ")),a};if(z.preferredLanguage=function(){return b},z.fallbackLanguage=function(){return c},z.proposedLanguage=function(){return e},z.storage=function(){return s},z.uses=function(a){function b(a){d=a,o.$broadcast("$translateChangeSuccess"),f&&s.set(z.storageKey(),d),u.setLocale(d),angular.forEach(w,function(a,b){w[b].setLocale(d)}),c.resolve(a),o.$broadcast("$translateChangeEnd")}if(!a)return d;var c=q.defer();return o.$broadcast("$translateChangeStart"),!n[a]&&j?(e=a,x(a).then(function(a){e=void 0,r(a.key,a.table),b(a.key)},function(a){e=void 0,o.$broadcast("$translateChangeError"),c.reject(a),o.$broadcast("$translateChangeEnd")})):b(a),c.promise},z.storageKey=function(){return t()},z.refresh=function(a){function b(){f.resolve(),o.$broadcast("$translateRefreshEnd")}function e(){f.reject(),o.$broadcast("$translateRefreshEnd")}if(!j)throw new Error("Couldn't refresh translation table, no loader registered!");var f=q.defer();if(a)if(n.hasOwnProperty(a)){o.$broadcast("$translateRefreshStart");var g=x(a);a===d?g.then(function(c){n[a]=c.table,z.uses(d),b()},function(){o.$broadcast("$translateChangeError"),e()}):g.then(function(c){n[a]=c.table,b()},e)}else f.reject();else{o.$broadcast("$translateRefreshStart");var h=[];if(c)if("string"==typeof c)h.push(x(c));else for(var i=c.length,k=0;i>k;k++)h.push(x(c[k]));d&&h.push(x(d)),h.length>0?q.all(h).then(function(a){for(var c in n)n.hasOwnProperty(c)&&delete n[c];for(var e=0,f=a.length;f>e;e++)r(a[e].key,a[e].table);d&&z.uses(d),b()},function(a){a===d&&o.$broadcast("$translateChangeError"),e()}):b()}return f.promise},j&&(angular.equals(n,{})&&z.uses(z.uses()),c))if("string"!=typeof c||n[c])for(var A=c.length,B=0;A>B;B++)n[c[B]]||x(c[B]);else x(c);return z}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(a){var b,c={},d="default";return c.setLocale=function(a){b=a},c.getInterpolationIdentifier=function(){return d},c.interpolate=function(b,c){return a(b)(c)},c}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$filter","$interpolate","$parse",function(a,b,c){var d=a("translate");return{restrict:"AE",scope:!0,link:function(a,e,f){f.translateInterpolation&&(a.interpolation=f.translateInterpolation),f.$observe("translate",function(c){a.translationId=angular.equals(c,"")||void 0===c?b(e.text().replace(/^\s+|\s+$/g,""))(a.$parent):c}),f.$observe("translateValues",function(b){b&&a.$parent.$watch(function(){a.interpolateParams=c(b)(a.$parent)})}),a.$on("$translateChangeSuccess",function(){e.html(d(a.translationId,a.interpolateParams,a.interpolation))}),a.$watch("[translationId, interpolateParams]",function(){a.translationId&&e.html(d(a.translationId,a.interpolateParams,a.interpolation))},!0)}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(a,b){return function(c,d,e){return angular.isObject(d)||(d=a(d)()),b(c,d,e)}}]); \ No newline at end of file === removed file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angularLocalStorage.js' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angularLocalStorage.js 2014-03-05 11:07:39 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/angularLocalStorage.js 1970-01-01 00:00:00 +0000 @@ -1,159 +0,0 @@ -angular.module('angularLocalStorage', ['ngCookies']).factory('storage', ['$parse', '$cookieStore', '$window', '$log', function ($parse, $cookieStore, $window, $log) { - /** - * Global Vars - */ - var storage = (typeof $window.localStorage === 'undefined') ? undefined : $window.localStorage; - var supported = !(typeof storage === 'undefined'); - - var privateMethods = { - /** - * Pass any type of a string from the localStorage to be parsed so it returns a usable version (like an Object) - * @param res - a string that will be parsed for type - * @returns {*} - whatever the real type of stored value was - */ - parseValue: function (res) { - var val; - try { - val = angular.fromJson(res); - if (typeof val === 'undefined') { - val = res; - } - if (val === 'true') { - val = true; - } - if (val === 'false') { - val = false; - } - if ($window.parseFloat(val) === val && !angular.isObject(val)) { - val = $window.parseFloat(val); - } - } catch (e) { - val = res; - } - return val; - } - }; - - var publicMethods = { - /** - * Set - let's you set a new localStorage key pair set - * @param key - a string that will be used as the accessor for the pair - * @param value - the value of the localStorage item - * @returns {*} - will return whatever it is you've stored in the local storage - */ - set: function (key, value) { - if (!supported) { - try { - $cookieStore.put(key, value); - return value; - } catch(e) { - $log.log('Local Storage not supported, make sure you have angular-cookies enabled.'); - } - } - var saver = angular.toJson(value); - storage.setItem(key, saver); - return privateMethods.parseValue(saver); - }, - - /** - * Get - let's you get the value of any pair you've stored - * @param key - the string that you set as accessor for the pair - * @returns {*} - Object,String,Float,Boolean depending on what you stored - */ - get: function (key) { - if (!supported) { - try { - return privateMethods.parseValue($.cookie(key)); - } catch (e) { - return null; - } - } - var item = storage.getItem(key); - return privateMethods.parseValue(item); - }, - - /** - * Remove - let's you nuke a value from localStorage - * @param key - the accessor value - * @returns {boolean} - if everything went as planned - */ - remove: function (key) { - if (!supported) { - try { - $cookieStore.remove(key); - return true; - } catch (e) { - return false; - } - } - storage.removeItem(key); - return true; - }, - - /** - * Bind - let's you directly bind a localStorage value to a $scope variable - * @param {Angular $scope} $scope - the current scope you want the variable available in - * @param {String} key - the name of the variable you are binding - * @param {Object} opts - (optional) custom options like default value or unique store name - * Here are the available options you can set: - * * defaultValue: the default value - * * storeName: add a custom store key value instead of using the scope variable name - * @returns {*} - returns whatever the stored value is - */ - bind: function ($scope, key, opts) { - var defaultOpts = { - defaultValue: '', - storeName: '' - }; - // Backwards compatibility with old defaultValue string - if (angular.isString(opts)) { - opts = angular.extend({},defaultOpts,{defaultValue:opts}); - } else { - // If no defined options we use defaults otherwise extend defaults - opts = (angular.isUndefined(opts)) ? defaultOpts : angular.extend(defaultOpts,opts); - } - - // Set the storeName key for the localStorage entry - // use user defined in specified - var storeName = opts.storeName || key; - - // If a value doesn't already exist store it as is - if (!publicMethods.get(storeName)) { - publicMethods.set(storeName, opts.defaultValue); - } - - // If it does exist assign it to the $scope value - $parse(key).assign($scope, publicMethods.get(storeName)); - - // Register a listener for changes on the $scope value - // to update the localStorage value - $scope.$watch(key, function (val) { - if (angular.isDefined(val)) { - publicMethods.set(storeName, val); - } - }, true); - - return publicMethods.get(storeName); - }, - /** - * Unbind - let's you unbind a variable from localStorage while removing the value from both - * the localStorage and the local variable and sets it to null - * @param $scope - the scope the variable was initially set in - * @param key - the name of the variable you are unbinding - * @param storeName - (optional) if you used a custom storeName you will have to specify it here as well - */ - unbind: function($scope,key,storeName) { - storeName = storeName || key; - $parse(key).assign($scope, null); - $scope.$watch(key, function () { }); - publicMethods.remove(storeName); - }, - /** - * Clear All - let's you clear out ALL localStorage variables, use this carefully! - */ - clearAll: function() { - storage.clear(); - } - }; - return publicMethods; -}]); === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js 2014-03-17 15:59:31 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js 2014-03-19 17:01:46 +0000 @@ -13,7 +13,7 @@ 'angularLocalStorage', 'pascalprecht.translate']) -.value('DHIS2URL', '../..') +.value('DHIS2URL', '../') .config(function($httpProvider, $routeProvider, $translateProvider) { === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-03-19 16:58:56 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-03-19 17:01:46 +0000 @@ -216,7 +216,6 @@ $scope.showEnrollment = function(){ $scope.displayEnrollment = true; }; - }) //Controller for the profile section @@ -238,11 +237,9 @@ //listen for the selected items $scope.$on('selectedItems', function(event, args) { $scope.selectedEntity = args.selectedEntity; - }); - + }); }) - //Controller for the enrollment section .controller('EnrollmentController', function($scope,