This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit 3114d11fdbb7f3849cb85aaf9c581962a9075e44 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Jun 17 11:19:49 2014 +0200 add FavoriteList and FavoriteListMember in service --- pollen-ui-angular/src/main/webapp/js/services.js | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/pollen-ui-angular/src/main/webapp/js/services.js b/pollen-ui-angular/src/main/webapp/js/services.js index c4dd105..332f70e 100644 --- a/pollen-ui-angular/src/main/webapp/js/services.js +++ b/pollen-ui-angular/src/main/webapp/js/services.js @@ -20,6 +20,10 @@ */ angular.module('pollenServices', ['ngResource']) +////////////////////////////////////// +///// POLL RESOURCE ///// +////////////////////////////////////// + .factory('Poll', ['$resource', function ($resource) { return $resource(conf.restURL+'/polls/:pollId', {pollId:'@id'}, { 'skeletonNew' : { @@ -161,6 +165,10 @@ angular.module('pollenServices', ['ngResource']) }]) +////////////////////////////////////// +///// USER RESOURCE ///// +////////////////////////////////////// + .factory('User', ['$resource', function ($resource) { var transformParam = function (data) { return 'user='+encodeURIComponent(JSON.stringify(data))+'&generatePassword=false'; @@ -234,6 +242,47 @@ angular.module('pollenServices', ['ngResource']) }) }]) + +////////////////////////////////////// +///// FAVORITE LIST RESOURCE ///// +////////////////////////////////////// + +.factory('FavoriteList', ['$resource', function ($resource) { + var transformParam = function (data) { + return 'favoriteList='+encodeURIComponent(JSON.stringify(data)); + } + + return $resource(conf.restURL+'/favoriteLists/:favoriteListId', {favoriteListId:'@id'}, + { + 'add' : { + method:'POST', + transformRequest: function (data, headersGetter) { + return transformParam(data); + } + } + }) +}]) + +.factory('FavoriteListMember', ['$resource', function ($resource) { + var transformParam = function (data) { + return 'member='+encodeURIComponent(JSON.stringify(data)); + } + + return $resource(conf.restURL+'/favoriteLists/:favoriteListId/members/:memberId', {favoriteListId:'@id'}, + { + 'add' : { + method:'POST', + transformRequest: function (data, headersGetter) { + return transformParam(data); + } + } + }) +}]) + +////////////////////////////////////// +///// SESSION STORAGE RESOURCE ///// +////////////////////////////////////// + .factory('SessionStorage', [function () { var storageId='sessionStorage'; var session = JSON.parse(localStorage.getItem(storageId) || '{}'); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.