12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- angular.module('luticate')
- .controller('SettingsController', ['$scope', 'luticateAuthSettings', 'luticateAuthCache',
- function($scope, luticateAuthSettings, luticateAuthCache) {
-
- $scope.luTable = {
- columns: [
- {
- name: "Name",
- width: 3,
- getValue: function (item) {
- return item.Name;
- }
- }, {
- name: "Type",
- width: 1,
- getValue: function (item) {
- return item.Type;
- }
- }, {
- name: "Blocked",
- width: 1,
- getValue: function (item) {
- return item.IsBlocked ? "Yes" : "No";
- }
- }, {
- name: "Admin",
- width: 1,
- getValue: function (item) {
- return item.IsAdmin ? "Yes" : "No";
- }
- }, {
- name: "Value",
- width: 6,
- getValue: function (item) {
- return item.Value;
- }
- }
- ],
-
- canAdd: 'LU_SETTING_ADD',
-
- canDel: 'LU_SETTING_DEL',
-
- canEdit: function()
- {
- return true;
- },
-
- getLoadPagePromise: function (page, perPage, query, promise) {
- return luticateAuthSettings.getAll({page: page, perPage: perPage, query: query}, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthSettings.del({setting_name: id}, promise);
- },
-
- getEditController: function () {
- return "SettingEdit";
- },
-
- getItemId: function (item) {
- return item.Name;
- },
-
- perPage: luticateAuthCache.getEffectiveSettingValue("LU_SETTINGS_PER_PAGE")
- }
- }]);
|