chore: import keycloak theme from upstream
https://github.com/keycloak/keycloak/tree/main/themes/src/main/resources/theme/keycloak
This commit is contained in:
commit
e522d75730
59 changed files with 8770 additions and 0 deletions
1
entropia/common/resources/lib/angular/errors.json
Normal file
1
entropia/common/resources/lib/angular/errors.json
Normal file
File diff suppressed because one or more lines are too long
20
entropia/common/resources/lib/angular/treeview/LICENSE
Normal file
20
entropia/common/resources/lib/angular/treeview/LICENSE
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Steve
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
122
entropia/common/resources/lib/angular/treeview/README.md
Normal file
122
entropia/common/resources/lib/angular/treeview/README.md
Normal file
|
@ -0,0 +1,122 @@
|
|||
Angular Treeview
|
||||
================
|
||||
|
||||
Pure [AngularJS](https://www.angularjs.org) based tree menu directive.
|
||||
|
||||
[](https://jsfiddle.net/eu81273/8LWUc/)
|
||||
|
||||
## Installation
|
||||
|
||||
Copy the script and css into your project and add a script and link tag to your page.
|
||||
|
||||
```html
|
||||
<script type="text/javascript" src="/angular.treeview.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/angular.treeview.css">
|
||||
```
|
||||
|
||||
Add a dependency to your application module.
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', ['angularTreeview']);
|
||||
```
|
||||
|
||||
Add a tree to your application. See [Usage](#usage).
|
||||
|
||||
## Usage
|
||||
|
||||
Attributes of angular treeview are below.
|
||||
|
||||
- angular-treeview: the treeview directive.
|
||||
- tree-id : each tree's unique id.
|
||||
- tree-model : the tree model on $scope.
|
||||
- node-id : each node's id.
|
||||
- node-label : each node's label.
|
||||
- node-children: each node's children.
|
||||
|
||||
Here is a simple example.
|
||||
|
||||
|
||||
```html
|
||||
<div
|
||||
data-angular-treeview="true"
|
||||
data-tree-id="abc"
|
||||
data-tree-model="treedata"
|
||||
data-node-id="id"
|
||||
data-node-label="label"
|
||||
data-node-children="children" >
|
||||
</div>
|
||||
```
|
||||
|
||||
Example model:
|
||||
|
||||
```javascript
|
||||
$scope.treedata =
|
||||
[
|
||||
{ "label" : "User", "id" : "role1", "children" : [
|
||||
{ "label" : "subUser1", "id" : "role11", "children" : [] },
|
||||
{ "label" : "subUser2", "id" : "role12", "children" : [
|
||||
{ "label" : "subUser2-1", "id" : "role121", "children" : [
|
||||
{ "label" : "subUser2-1-1", "id" : "role1211", "children" : [] },
|
||||
{ "label" : "subUser2-1-2", "id" : "role1212", "children" : [] }
|
||||
]}
|
||||
]}
|
||||
]},
|
||||
{ "label" : "Admin", "id" : "role2", "children" : [] },
|
||||
{ "label" : "Guest", "id" : "role3", "children" : [] }
|
||||
];
|
||||
```
|
||||
|
||||
## Selection
|
||||
|
||||
If tree node is selected, then that selected tree node is saved to $scope."TREE ID".currentNode. By using $watch, the controller can recognize the tree selection.
|
||||
|
||||
|
||||
```javascript
|
||||
$scope.$watch( 'abc.currentNode', function( newObj, oldObj ) {
|
||||
if( $scope.abc && angular.isObject($scope.abc.currentNode) ) {
|
||||
console.log( 'Node Selected!!' );
|
||||
console.log( $scope.abc.currentNode );
|
||||
}
|
||||
}, false);
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
#### Basic example
|
||||
[](https://jsfiddle.net/eu81273/8LWUc/)
|
||||
|
||||
[jsFiddle - http://jsfiddle.net/eu81273/8LWUc/](https://jsfiddle.net/eu81273/8LWUc/)
|
||||
|
||||
#### Multiple treeview example
|
||||
[](https://jsfiddle.net/eu81273/b9Pnw/)
|
||||
|
||||
[jsFiddle - http://jsfiddle.net/eu81273/b9Pnw/](https://jsfiddle.net/eu81273/b9Pnw/)
|
||||
|
||||
## Browser Compatibility
|
||||
|
||||
Same with AngularJS. Safari, Chrome, Firefox, Opera, IE8, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari).
|
||||
|
||||
## Changelogs
|
||||
|
||||
#### version 0.1.6
|
||||
- Fixed the bug that 'null' string appears before each 'div' generated. (Thanks to Iaac)
|
||||
|
||||
#### version 0.1.5
|
||||
- support multiple treeview. (Thanks to Axel Pesme)
|
||||
|
||||
#### version 0.1.4
|
||||
- prevented memory leaks.
|
||||
|
||||
#### version 0.1.3
|
||||
- removed unnecessary codes.
|
||||
|
||||
#### version 0.1.2
|
||||
- removed some jQuery dependency. (Issue #2)
|
||||
|
||||
## License
|
||||
|
||||
The MIT License.
|
||||
|
||||
Copyright ⓒ 2013 AHN JAE-HA.
|
||||
|
||||
See [LICENSE](https://github.com/eu81273/angular.treeview/blob/master/LICENSE)
|
95
entropia/common/resources/lib/angular/treeview/angular.treeview.js
Executable file
95
entropia/common/resources/lib/angular/treeview/angular.treeview.js
Executable file
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
@license Angular Treeview version 0.1.6
|
||||
ⓒ 2013 AHN JAE-HA http://github.com/eu81273/angular.treeview
|
||||
License: MIT
|
||||
|
||||
|
||||
[TREE attribute]
|
||||
angular-treeview: the treeview directive
|
||||
tree-id : each tree's unique id.
|
||||
tree-model : the tree model on $scope.
|
||||
node-id : each node's id
|
||||
node-label : each node's label
|
||||
node-children: each node's children
|
||||
|
||||
<div
|
||||
data-angular-treeview="true"
|
||||
data-tree-id="tree"
|
||||
data-tree-model="roleList"
|
||||
data-node-id="roleId"
|
||||
data-node-label="roleName"
|
||||
data-node-children="children" >
|
||||
</div>
|
||||
*/
|
||||
|
||||
(function ( angular ) {
|
||||
'use strict';
|
||||
|
||||
angular.module( 'angularTreeview', [] ).directive( 'treeModel', ['$compile', function( $compile ) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function ( scope, element, attrs ) {
|
||||
//tree id
|
||||
var treeId = attrs.treeId;
|
||||
|
||||
//tree model
|
||||
var treeModel = attrs.treeModel;
|
||||
|
||||
//node id
|
||||
var nodeId = attrs.nodeId || 'id';
|
||||
|
||||
//node label
|
||||
var nodeLabel = attrs.nodeLabel || 'label';
|
||||
|
||||
//children
|
||||
var nodeChildren = attrs.nodeChildren || 'children';
|
||||
|
||||
//tree template
|
||||
var template =
|
||||
'<ul>' +
|
||||
'<li data-ng-repeat="node in ' + treeModel + '">' +
|
||||
'<i ng-class="getGroupClass(node)" data-ng-click="' + treeId + '.selectNodeHead(node)"></i>' +
|
||||
'<span data-ng-class="getSelectedClass(node)" ng-dblclick="edit(node)" data-ng-click="' + treeId + '.selectNodeLabel(node)">{{node.' + nodeLabel + '}}</span>' +
|
||||
'<div data-ng-hide="node.collapsed" data-tree-id="' + treeId + '" data-tree-model="node.' + nodeChildren + '" data-node-id=' + nodeId + ' data-node-label=' + nodeLabel + ' data-node-children=' + nodeChildren + '></div>' +
|
||||
'</li>' +
|
||||
'</ul>';
|
||||
|
||||
//check tree id, tree model
|
||||
if( treeId && treeModel ) {
|
||||
//root node
|
||||
if( attrs.angularTreeview ) {
|
||||
|
||||
//create tree object if not exists
|
||||
scope[treeId] = scope[treeId] || {};
|
||||
|
||||
//if node head clicks,
|
||||
scope[treeId].selectNodeHead = scope[treeId].selectNodeHead || function( selectedNode ){
|
||||
|
||||
//Collapse or Expand
|
||||
selectedNode.collapsed = !selectedNode.collapsed;
|
||||
scope[treeId].selectNodeLabel(selectedNode);
|
||||
};
|
||||
|
||||
//if node label clicks,
|
||||
scope[treeId].selectNodeLabel = scope[treeId].selectNodeLabel || function( selectedNode ){
|
||||
|
||||
//remove highlight from previous node
|
||||
if( scope[treeId].currentNode && scope[treeId].currentNode.selected ) {
|
||||
scope[treeId].currentNode.selected = undefined;
|
||||
}
|
||||
|
||||
//set highlight to selected node
|
||||
selectedNode.selected = 'selected';
|
||||
|
||||
//set currentNode
|
||||
scope[treeId].currentNode = selectedNode;
|
||||
};
|
||||
}
|
||||
|
||||
//Rendering template.
|
||||
element.html('').append( $compile( template )( scope ) );
|
||||
}
|
||||
}
|
||||
};
|
||||
}]);
|
||||
})( angular );
|
9
entropia/common/resources/lib/angular/treeview/angular.treeview.min.js
vendored
Normal file
9
entropia/common/resources/lib/angular/treeview/angular.treeview.min.js
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
@license Angular Treeview version 0.1.6
|
||||
ⓒ 2013 AHN JAE-HA http://github.com/eu81273/angular.treeview
|
||||
License: MIT
|
||||
*/
|
||||
|
||||
(function(f){f.module("angularTreeview",[]).directive("treeModel",function($compile){return{restrict:"A",link:function(b,h,c){var a=c.treeId,g=c.treeModel,e=c.nodeLabel||"label",d=c.nodeChildren||"children",e='<ul><li data-ng-repeat="node in '+g+'"><i class="collapsed" data-ng-show="node.'+d+'.length && node.collapsed" data-ng-click="'+a+'.selectNodeHead(node)"></i><i class="expanded" data-ng-show="node.'+d+'.length && !node.collapsed" data-ng-click="'+a+'.selectNodeHead(node)"></i><i class="normal" data-ng-hide="node.'+
|
||||
d+'.length"></i> <span data-ng-class="node.selected" data-ng-click="'+a+'.selectNodeLabel(node)">{{node.'+e+'}}</span><div data-ng-hide="node.collapsed" data-tree-id="'+a+'" data-tree-model="node.'+d+'" data-node-id='+(c.nodeId||"id")+" data-node-label="+e+" data-node-children="+d+"></div></li></ul>";a&&g&&(c.angularTreeview&&(b[a]=b[a]||{},b[a].selectNodeHead=b[a].selectNodeHead||function(a){a.collapsed=!a.collapsed},b[a].selectNodeLabel=b[a].selectNodeLabel||function(c){b[a].currentNode&&b[a].currentNode.selected&&
|
||||
(b[a].currentNode.selected=void 0);c.selected="selected";b[a].currentNode=c}),h.html('').append($compile(e)(b)))}}})})(angular);
|
99
entropia/common/resources/lib/angular/treeview/css/angular.treeview.css
Executable file
99
entropia/common/resources/lib/angular/treeview/css/angular.treeview.css
Executable file
|
@ -0,0 +1,99 @@
|
|||
div[angular-treeview] {
|
||||
/* prevent user selection */
|
||||
-moz-user-select: -moz-none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
/* default */
|
||||
font-family: Tahoma;
|
||||
font-size:13px;
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div[tree-model] ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div[tree-model] li {
|
||||
position: relative;
|
||||
padding: 0 0 0 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
div[tree-model] li .expanded {
|
||||
padding: 1px 10px;
|
||||
background-image: url("../img/folder.png");
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
div[tree-model] li .collapsed {
|
||||
padding: 1px 10px;
|
||||
background-image: url("../img/folder-closed.png");
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
div[tree-model] li .normal {
|
||||
padding: 1px 10px;
|
||||
background-image: url("../img/file.png");
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
div[tree-model] li i, div[tree-model] li span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div[tree-model] li .selected {
|
||||
background-color: #aaddff;
|
||||
font-weight: bold;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
div[tree-model] li .cut {
|
||||
font-weight: bold;
|
||||
color: gray
|
||||
}
|
||||
|
||||
/*
|
||||
.angular-ui-tree-handle {
|
||||
cursor: grab;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
min-height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
*/
|
||||
|
||||
.angular-ui-tree-handle {
|
||||
/* background: #f8faff; */
|
||||
/*
|
||||
color: #7c9eb2; */
|
||||
border: 1px solid #dae2ea;
|
||||
padding: 10px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.expanded-folder {
|
||||
padding: 1px 10px;
|
||||
background-image: url("../img/folder.png");
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collapsed-folder {
|
||||
padding: 1px 10px;
|
||||
background-image: url("../img/folder-closed.png");
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
BIN
entropia/common/resources/lib/angular/treeview/img/file.png
Normal file
BIN
entropia/common/resources/lib/angular/treeview/img/file.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 B |
Binary file not shown.
After Width: | Height: | Size: 281 B |
BIN
entropia/common/resources/lib/angular/treeview/img/folder.png
Normal file
BIN
entropia/common/resources/lib/angular/treeview/img/folder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 289 B |
4116
entropia/common/resources/lib/angular/ui-bootstrap-tpls-0.11.0.js
Normal file
4116
entropia/common/resources/lib/angular/ui-bootstrap-tpls-0.11.0.js
Normal file
File diff suppressed because it is too large
Load diff
1
entropia/common/resources/lib/angular/version.json
Executable file
1
entropia/common/resources/lib/angular/version.json
Executable file
|
@ -0,0 +1 @@
|
|||
{"raw":"v1.4.4","major":1,"minor":4,"patch":4,"prerelease":[],"build":[],"version":"1.4.4","codeName":"pylon-requirement","full":"1.4.4","branch":"v1.4.x","cdn":{"raw":"v1.4.3","major":1,"minor":4,"patch":3,"prerelease":[],"build":[],"version":"1.4.3","docsUrl":"http://code.angularjs.org/1.4.3/docs"}}
|
Loading…
Add table
Add a link
Reference in a new issue