mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
rename website/client to website/client-old
This commit is contained in:
24
website/client-old/js/controllers/sortableInventoryCtrl.js
Normal file
24
website/client-old/js/controllers/sortableInventoryCtrl.js
Normal file
@@ -0,0 +1,24 @@
|
||||
habitrpg.controller('SortableInventoryController', ['$scope',
|
||||
function ($scope) {
|
||||
var attributeSort = {
|
||||
constitution: ['-(_effectiveCon)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||
intelligence: ['-(_effectiveInt)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||
perception: ['-(_effectivePer)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||
strength: ['-(_effectiveStr)', '-(_effectiveCon+_effectiveInt+_effectivePer+_effectiveStr)'],
|
||||
set: 'set'
|
||||
}
|
||||
|
||||
$scope.setOrder = function (order) {
|
||||
$scope.orderChoice = order;
|
||||
if (order in attributeSort) {
|
||||
$scope.order = attributeSort[order];
|
||||
}
|
||||
};
|
||||
|
||||
$scope.setGrouping = function (grouping) {
|
||||
$scope.groupingChoice = grouping;
|
||||
};
|
||||
|
||||
$scope.orderChoice = 'set';
|
||||
$scope.setOrder($scope.orderChoice);
|
||||
}]);
|
||||
Reference in New Issue
Block a user