Przeglądaj źródła

v0.1.2

tags/0.1.2
Robin Thoni 4 lat temu
rodzic
commit
cbda3e3104

+ 2
- 2
app.js
Plik diff jest za duży
Wyświetl plik


+ 8
- 0
css/app.less Wyświetl plik

@@ -2,6 +2,14 @@ body {
2 2
   padding-top: 70px;
3 3
 }
4 4
 
5
+/**
6
+========================================================
7
+**/
8
+
9
+.navbar-brand {
10
+  padding-right: 42px;
11
+}
12
+
5 13
 .caption {
6 14
   height: 100%;
7 15
   overflow: hidden;

+ 1
- 1
css/css.css
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
views/groups.html Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <!-- Page Content -->
2 2
 <div class="container">
3
-    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-12" ></lu-edit-table>
4 4
 </div>
5 5
 

+ 6
- 4
views/home.html Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 <!-- Page Content -->
2 2
 <div class="container">
3
-    <div class="row co-sm-8 col-sm-offset-2" lu-busy="form">
4
-        <form name="form" ng-submit="submit()">
3
+    <div class="row col-sm-9 col-sm-offset-1" lu-busy="form">
4
+        <form name="form" ng-submit="submit()" class="form-horizontal">
5 5
             <div class="form-group">
6 6
                 <label for="email" class="col-sm-2 control-label">Email</label>
7 7
                 <div class="col-sm-9">
@@ -55,8 +55,10 @@
55 55
                 </div>
56 56
             </div>
57 57
 
58
-            <div class="form-group col-sm-12">
59
-                <button class="btn btn-primary">Edit</button>
58
+            <div class="form-group">
59
+                <div class="col-sm-9 col-sm-offset-2">
60
+                    <button class="btn btn-primary btn-block">Edit</button>
61
+                </div>
60 62
             </div>
61 63
         </form>
62 64
     </div>

+ 0
- 8
views/lupickertable.html Wyświetl plik

@@ -1,8 +0,0 @@
1
-<div class="col-sm-3">
2
-    Selected items:
3
-    <div ng-repeat="item in pickerOptions.pickedItems" ng-click="unPickItem(item)"
4
-         class="col-sm-12 lu-picker-table-picked-items">
5
-        {{ pickerOptions.getItemText(item) }}
6
-    </div>
7
-</div>
8
-<lu-basic-table options="pickerOptions" class="col-sm-9"></lu-basic-table>

+ 14
- 9
views/modals/groupedit.html Wyświetl plik

@@ -6,14 +6,19 @@
6 6
         </div>
7 7
     </div>
8 8
     <div class="form-group">
9
-        <div class="col-sm-2"></div>
10
-        <button type="button" class="btn btn-primary"
11
-                ng-click="editPermissions(group)" ng-show="canEditPermissions()">
12
-            Edit permissions
13
-        </button>
14
-        <button type="button" class="btn btn-primary"
15
-                ng-click="editUsers(group)" ng-show="canEditUsers()">
16
-            Edit users
17
-        </button>
9
+        <div class="col-sm-9 col-sm-offset-2">
10
+            <div class="col-sm-6">
11
+                <button type="button" class="btn btn-primary btn-block"
12
+                        ng-click="editPermissions(group)" ng-show="canEditPermissions()">
13
+                    Edit permissions
14
+                </button>
15
+            </div>
16
+            <div class="col-sm-6">
17
+                <button type="button" class="btn btn-primary btn-block"
18
+                        ng-click="editUsers(group)" ng-show="canEditUsers()">
19
+                    Edit users
20
+                </button>
21
+            </div>
22
+        </div>
18 23
     </div>
19 24
 </dialog-ok-cancel>

+ 8
- 9
views/modals/permissionedit.html Wyświetl plik

@@ -8,15 +8,14 @@
8 8
     <div class="form-group">
9 9
         <label class="col-sm-2 control-label">Allowed</label>
10 10
         <div class="col-sm-9">
11
-            <div class="btn-group">
12
-                <button type="button" class="btn btn-primary dropdown-toggle btn-select" data-toggle="dropdown" href="" lu-enable-permission="{{ neededPermission }}">
13
-                    {{ permission.Value ? 'Yes' : 'No' }} <span class="caret"></span>
14
-                </button>
15
-                <ul class="dropdown-menu">
16
-                    <li><a href="" ng-click="permission.Value = false">No</a></li>
17
-                    <li><a href="" ng-click="permission.Value = true">Yes</a></li>
18
-                </ul>
19
-            </div>
11
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown" href="" lu-enable-permission="{{ neededPermission }}">
12
+                <span class="pull-left">{{ permission.Value ? 'Yes' : 'No' }}</span>
13
+                <span class="caret pull-right"></span>
14
+            </button>
15
+            <ul class="dropdown-menu col-sm-12">
16
+                <li><a href="" ng-click="permission.Value = false">No</a></li>
17
+                <li><a href="" ng-click="permission.Value = true">Yes</a></li>
18
+            </ul>
20 19
         </div>
21 20
     </div>
22 21
 </dialog-ok-cancel>

+ 70
- 0
views/modals/settingedit.html Wyświetl plik

@@ -0,0 +1,70 @@
1
+<dialog-ok-cancel title="{{ setting.IsNew ? 'Add' : 'Edit'}} setting {{ setting.Name }}">
2
+    <div class="form-group">
3
+        <label for="name" class="col-sm-2 control-label">Name</label>
4
+        <div class="col-sm-9">
5
+            <input autofocus id="name" class="form-control input-permission-name" ng-model="setting.Name" required ng-disabled="!setting.IsNew"/>
6
+        </div>
7
+    </div>
8
+    <div class="form-group">
9
+        <label class="col-sm-2 control-label">Blocked</label>
10
+        <div class="col-sm-9">
11
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown" href="" lu-enable-permission="{{ neededPermission }}">
12
+                <span class="pull-left">{{ setting.IsBlocked ? 'Yes' : 'No' }}</span>
13
+                <span class="caret pull-right"></span>
14
+            </button>
15
+            <ul class="dropdown-menu col-sm-12">
16
+                <li><a href="" ng-click="setting.IsBlocked = false">No</a></li>
17
+                <li><a href="" ng-click="setting.IsBlocked = true">Yes</a></li>
18
+            </ul>
19
+        </div>
20
+    </div>
21
+    <div class="form-group">
22
+        <label class="col-sm-2 control-label">Admin</label>
23
+        <div class="col-sm-9">
24
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown" href="" lu-enable-permission="{{ neededPermission }}">
25
+                <span class="pull-left">{{ setting.IsAdmin ? 'Yes' : 'No' }}</span>
26
+                <span class="caret pull-right"></span>
27
+            </button>
28
+            <ul class="dropdown-menu col-sm-12">
29
+                <li><a href="" ng-click="setting.IsAdmin = false">No</a></li>
30
+                <li><a href="" ng-click="setting.IsAdmin = true">Yes</a></li>
31
+            </ul>
32
+        </div>
33
+    </div>
34
+    <div class="form-group">
35
+        <label class="col-sm-2 control-label">Type</label>
36
+        <div class="col-sm-9">
37
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown"
38
+                    href="" lu-enable-permission="{{ neededPermission }}" ng-disabled="!setting.IsNew">
39
+                <span class="pull-left">{{ setting.Type }}</span>
40
+                <span class="caret pull-right"></span>
41
+            </button>
42
+            <ul class="dropdown-menu col-sm-12">
43
+                <li ng-repeat="type in types"><a href="" ng-click="setType(type)">{{ type }}</a></li>
44
+            </ul>
45
+        </div>
46
+    </div>
47
+    <div class="form-group">
48
+        <label class="col-sm-2 control-label" for="Value">Value</label>
49
+        <div class="col-sm-9">
50
+            <textarea id="Value" ng-model="setting.Value" ng-if="setting.Type == 'string'"
51
+                      class="form-control" lu-enable-permission="{{ neededPermission }}"></textarea>
52
+
53
+            <input id="Value" ng-model="setting.Value" ng-if="setting.Type == 'int' || setting.Type == 'float'"
54
+                   class="form-control" type="number" required lu-enable-permission="{{ neededPermission }}" />
55
+
56
+            <div class="col-sm-9" ng-if="setting.Type == 'object'">{{ setting.Value }}</div>
57
+
58
+            <div class="btn-group" ng-if="setting.Type == 'bool'">
59
+                <button type="button" class="btn btn-primary dropdown-toggle btn-select" data-toggle="dropdown"
60
+                        href="" lu-enable-permission="{{ neededPermission }}">
61
+                    {{ setting.Value ? 'Yes' : 'No' }} <span class="caret"></span>
62
+                </button>
63
+                <ul class="dropdown-menu">
64
+                    <li><a href="" ng-click="setting.Value = false">No</a></li>
65
+                    <li><a href="" ng-click="setting.Value = true">Yes</a></li>
66
+                </ul>
67
+            </div>
68
+        </div>
69
+    </div>
70
+</dialog-ok-cancel>

+ 34
- 10
views/modals/useredit.html Wyświetl plik

@@ -51,15 +51,39 @@
51 51
         </div>
52 52
     </div>
53 53
 
54
-    <div class="form-group">
55
-        <div class="col-sm-2"></div>
56
-        <button type="button" class="btn btn-primary"
57
-                ng-click="editPermissions(user)" ng-show="canEditPermissions()">
58
-            Edit permissions
59
-        </button>
60
-        <button type="button" class="btn btn-info" lu-show-permission="LU_PERM_EFFECTIVE_GET,LU_PERM_GET"
61
-                ng-click="showEffectivePermissions(user)" ng-show="user.Id != null">
62
-            Show effective permissions
63
-        </button>
54
+    <div class="form-group" ng-show="user.Id != null">
55
+        <div class="col-sm-offset-2 col-sm-9">
56
+            <div class="col-sm-6">
57
+                <button type="button" class="btn btn-primary btn-block" ng-click="editPermissions(user)"
58
+                        lu-show-permission="LU_PERM_USER_GET">
59
+                    Edit permissions
60
+                </button>
61
+            </div>
62
+            <div class="col-sm-6">
63
+                <button type="button" class="btn btn-info btn-block" ng-click="showEffectivePermissions(user)"
64
+                        lu-show-permission="LU_PERM_EFFECTIVE_GET,LU_PERM_GET">
65
+                    Show effective permissions
66
+                </button>
67
+            </div>
68
+        </div>
69
+        <div class="clearfix"></div>
70
+    </div>
71
+
72
+    <div class="form-group" ng-show="user.Id != null">
73
+        <div class="col-sm-offset-2 col-sm-9">
74
+            <div class="col-sm-6">
75
+                <button type="button" class="btn btn-primary btn-block" ng-click="editSettings(user)"
76
+                        lu-show-permission="LU_SETTING_USER_GET">
77
+                    Edit settings
78
+                </button>
79
+            </div>
80
+            <div class="col-sm-6">
81
+                <button type="button" class="btn btn-info btn-block" ng-click="showEffectiveSettings(user)"
82
+                        lu-show-permission="LU_SETTING_EFFECTIVE_GET,LU_SETTING_GET">
83
+                    Show effective settings
84
+                </button>
85
+            </div>
86
+        </div>
87
+        <div class="clearfix"></div>
64 88
     </div>
65 89
 </dialog-ok-cancel>

+ 74
- 0
views/modals/usersettings.html Wyświetl plik

@@ -0,0 +1,74 @@
1
+<!-- Page Content -->
2
+<dialog-close title="Edit {{ user.Username }} settings">
3
+
4
+    <div class="form-group">
5
+        <label class="col-sm-2 control-label">Name</label>
6
+        <div class="col-sm-9">
7
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown" href="">
8
+                <span class="pull-left">{{ tmpSetting.Name }} {{ userSettings[tmpSetting.Name] == null ? '' : '*' }}</span>
9
+                <span class="caret pull-right text-center"></span>
10
+            </button>
11
+            <ul class="dropdown-menu col-sm-12">
12
+                <li>
13
+                    <a href="" ng-repeat="setting in userEffectiveSettings" ng-click="setTmpSetting(setting.Name)">
14
+                        {{ setting.Name }} {{ userSettings[setting.Name] == null ? '' : '*' }}
15
+                    </a>
16
+                </li>
17
+            </ul>
18
+        </div>
19
+    </div>
20
+
21
+    <div class="form-group">
22
+        <label class="col-sm-2 control-label">Blocked</label>
23
+        <div class="col-sm-9">
24
+            <button type="button" class="btn btn-primary dropdown-toggle btn-select btn-block" data-toggle="dropdown" href="">
25
+                <span class="pull-left">{{ tmpSetting.IsBlocked ? 'Yes' : 'No' }}</span>
26
+                <span class="caret pull-right"></span>
27
+            </button>
28
+            <ul class="dropdown-menu col-sm-12">
29
+                <li><a href="" ng-click="tmpSetting.IsBlocked = false">No</a></li>
30
+                <li><a href="" ng-click="tmpSetting.IsBlocked = true">Yes</a></li>
31
+            </ul>
32
+        </div>
33
+    </div>
34
+
35
+    <div class="form-group">
36
+        <label class="col-sm-2 control-label" for="Value">Value</label>
37
+        <div class="col-sm-9">
38
+            <textarea id="Value" ng-model="tmpSetting.Value" ng-if="tmpSetting.Type == 'string'" class="form-control"
39
+                      ng-disabled="userEffectiveSettings.length == 0"></textarea>
40
+
41
+            <input id="Value" ng-model="tmpSetting.Value" ng-if="tmpSetting.Type == 'int' || tmpSetting.Type == 'float'"
42
+                   class="form-control" type="number" required ng-disabled="userEffectiveSettings.length == 0"/>
43
+
44
+            <div class="col-sm-9" ng-if="tmpSetting.Type == 'object'" ng-disabled="userEffectiveSettings.length == 0">{{ tmpSetting.Value }}</div>
45
+
46
+            <div class="btn-group" ng-if="tmpSetting.Type == 'bool'">
47
+                <button type="button" class="btn btn-primary dropdown-toggle btn-select" data-toggle="dropdown" href=""
48
+                        ng-disabled="userEffectiveSettings.length == 0">
49
+                    {{ tmpSetting.Value ? 'Yes' : 'No' }} <span class="caret"></span>
50
+                </button>
51
+                <ul class="dropdown-menu">
52
+                    <li><a href="" ng-click="tmpSetting.Value = false">No</a></li>
53
+                    <li><a href="" ng-click="tmpSetting.Value = true">Yes</a></li>
54
+                </ul>
55
+            </div>
56
+        </div>
57
+    </div>
58
+
59
+    <div class="form-group">
60
+        <div class="col-sm-9 col-sm-offset-2">
61
+            <div class="col-sm-6">
62
+                <button type="button" class="btn btn-primary btn-block" href="" ng-click="editSetting(tmpSetting)">
63
+                    Save
64
+                </button>
65
+            </div>
66
+            <div class="col-sm-6">
67
+                <button type="button" class="btn btn-danger btn-block" href="" ng-click="resetSetting(tmpSetting)">
68
+                    Reset
69
+                </button>
70
+            </div>
71
+        </div>
72
+    </div>
73
+
74
+</dialog-close>

+ 1
- 0
views/navbar.html Wyświetl plik

@@ -18,6 +18,7 @@
18 18
                 <li ui-sref-active="active"><a ui-sref="users" lu-show-permission="LU_USER_GET">Users</a></li>
19 19
                 <li ui-sref-active="active"><a ui-sref="groups" lu-show-permission="LU_GROUP_GET">Groups</a></li>
20 20
                 <li ui-sref-active="active"><a ui-sref="permissions" lu-show-permission="LU_PERM_GET">Permissions</a></li>
21
+                <li ui-sref-active="active"><a ui-sref="settings" lu-show-permission="LU_SETTING_GET">Settings</a></li>
21 22
                 <!--<li><a ui-sref="test" >Test</a></li>-->
22 23
             </ul>
23 24
             <ul class="nav navbar-nav navbar-right">

+ 1
- 1
views/permissions.html Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 <!-- Page Content -->
2 2
 <div class="container">
3
-    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-12" ></lu-edit-table>
4 4
 </div>

+ 4
- 0
views/settings.html Wyświetl plik

@@ -0,0 +1,4 @@
1
+<!-- Page Content -->
2
+<div class="container">
3
+    <lu-edit-table options="luTable" class="row col-sm-12" ></lu-edit-table>
4
+</div>

+ 1
- 1
views/users.html Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 <!-- Page Content -->
2 2
 <div class="container">
3
-    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2"></lu-edit-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-12"></lu-edit-table>
4 4
 </div>

Ładowanie…
Anuluj
Zapisz