Make admin_fields_edit be Angular-powered.
[bugdar.git] / static / admin.js
1 angular.module('bugdar.admin.settings', [])
2 .directive('settingType', ['$templateCache', function($templateCache) {
3 return {
4 restrict: 'A',
5 replace: false,
6 template: $templateCache.get('-/admin/settings/row.tpl'),
7 scope: {
8 title: '@',
9 description: '@',
10 settingType: '@',
11 name: '@',
12 value: '@'
13 }
14 };
15 }]);
16
17 angular.module('bugdar.admin.fields', [])
18 .controller('FieldEditor', ['$scope', function($scope) {
19 $scope.field = ModelData;
20 $scope.fieldTypes = FieldTypes;
21 }]);