diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js index e014f45ef..c42c7b29b 100644 --- a/js/controller/BoardController.js +++ b/js/controller/BoardController.js @@ -158,6 +158,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St $scope.labelUpdate = function(label) { label.edit = false; LabelService.update(label); + console.log(label); } $scope.aclAdd = function(sharee) { diff --git a/js/filters/orderObjectBy.js b/js/filters/orderObjectBy.js index 4e55e46d5..1ea7cce82 100644 --- a/js/filters/orderObjectBy.js +++ b/js/filters/orderObjectBy.js @@ -9,7 +9,7 @@ app.filter('orderObjectBy', function(){ array.sort(function(a, b){ a = parseInt(a[attribute]); b = parseInt(b[attribute]); - return a - b; + return a < b; }); return array; } diff --git a/js/public/app.js b/js/public/app.js index 76737436e..da6ba0782 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -508,7 +508,7 @@ app.filter('orderObjectBy', function(){ array.sort(function(a, b){ a = parseInt(a[attribute]); b = parseInt(b[attribute]); - return a - b; + return a < b; }); return array; } @@ -733,7 +733,12 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ var self = this; $http.get(this.baseUrl + '/' + id).then(function (response) { data = response.data; - self.data[data.id] = response.data; + if(self.data[data.id]===undefined) { + self.data[data.id] = response.data; + } + $.each(response.data, function(key, value) { + self.data[data.id][key] = value; + }); deferred.resolve(response.data); }, function (error) { @@ -815,6 +820,12 @@ app.factory('ApiService', ["$http", "$q", function($http, $q){ return this.data[this.id]; } + ApiService.prototype.getData = function() { + return $.map(this.data, function(value, index) { + return [value]; + }); + }; + ApiService.prototype.getAll = function () { return this.data; } diff --git a/js/service/ApiService.js b/js/service/ApiService.js index 07ed52799..466bfb655 100644 --- a/js/service/ApiService.js +++ b/js/service/ApiService.js @@ -37,7 +37,12 @@ app.factory('ApiService', function($http, $q){ var self = this; $http.get(this.baseUrl + '/' + id).then(function (response) { data = response.data; - self.data[data.id] = response.data; + if(self.data[data.id]===undefined) { + self.data[data.id] = response.data; + } + $.each(response.data, function(key, value) { + self.data[data.id][key] = value; + }); deferred.resolve(response.data); }, function (error) { @@ -119,6 +124,12 @@ app.factory('ApiService', function($http, $q){ return this.data[this.id]; } + ApiService.prototype.getData = function() { + return $.map(this.data, function(value, index) { + return [value]; + }); + }; + ApiService.prototype.getAll = function () { return this.data; } diff --git a/templates/part.navigation.php b/templates/part.navigation.php index 5e6aa05fd..9353fc36e 100644 --- a/templates/part.navigation.php +++ b/templates/part.navigation.php @@ -7,11 +7,12 @@
  • Public Boards
  • //--> -
  • +
  • {{ b.title }}
    @@ -26,7 +27,6 @@
    Deleted X
    -