3.1.1 additional bug fixes

This commit is contained in:
Trevor Squillario 2013-11-10 18:57:11 -05:00
parent 4b116d0024
commit 223cce0dc4
7 changed files with 45 additions and 35 deletions

View file

@ -550,6 +550,30 @@ function AppCtrl($scope, $rootScope, $document, $location, utils, globals, model
}
});
}
$scope.updateFavorite = function (item) {
var id = item.id;
var starred = item.starred;
var url;
if (starred) {
url = globals.BaseURL() + '/unstar.view?' + globals.BaseParams() + '&id=' + id;
item.starred = undefined;
} else {
url = globals.BaseURL() + '/star.view?' + globals.BaseParams() + '&id=' + id;
item.starred = true;
}
$.ajax({
url: url,
method: 'GET',
dataType: globals.settings.Protocol,
timeout: globals.settings.Timeout,
success: function () {
notifications.updateMessage('Favorite Updated!', true);
}
});
}
/* Launch on Startup */
$scope.loadSettings();