mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Added less.js for developing and debugging .less. Set USE_MINIFIED_JS=False in django settings to run with .less rather than minified .css
This commit is contained in:
parent
71c31a919f
commit
b9c8002409
@ -377,8 +377,18 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
var nodeType = $($node).attr('type');
|
||||
if (nodeType == 'inventory') {
|
||||
return {
|
||||
editInventory: {
|
||||
label: 'Inventory Properties',
|
||||
action: function(obj) {
|
||||
scope.group_id = null;
|
||||
if (!scope.$$phase) {
|
||||
scope.$digest();
|
||||
}
|
||||
InventoryEdit({ "inventory_id": id, group_id: null });
|
||||
}
|
||||
},
|
||||
addGroup: {
|
||||
label: 'Add Group',
|
||||
label: 'Create Group',
|
||||
action: function(obj) {
|
||||
scope.group_id = null;
|
||||
if (!scope.$$phase) {
|
||||
@ -442,8 +452,10 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
url = node.attr('all');
|
||||
scope.groupAddHide = false;
|
||||
scope.groupEditHide =false;
|
||||
scope.inventoryEditHide=true;
|
||||
scope.groupDeleteHide = false;
|
||||
scope.createButtonShow = true;
|
||||
scope.addGroupTitle = 'Add Group';
|
||||
scope.group_id = node.attr('group_id');
|
||||
scope.groupName = n.data;
|
||||
scope.groupTitle = '<h4>' + n.data + '</h4>';
|
||||
@ -453,7 +465,9 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
url = node.attr('hosts');
|
||||
scope.groupAddHide = false;
|
||||
scope.groupEditHide =true;
|
||||
scope.inventoryEditHide=false;
|
||||
scope.groupDeleteHide = true;
|
||||
scope.addGroupTitle = 'Create Group';
|
||||
scope.createButtonShow = false;
|
||||
scope.groupName = 'All Hosts';
|
||||
scope.groupTitle = '<h4>All Hosts</h4>';
|
||||
|
||||
@ -522,9 +522,15 @@ input[type="text"].job-successful {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #e3e3e3;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.groups-menu .navbar-brand {
|
||||
color: ;
|
||||
|
||||
/* the brand won't really be a link */
|
||||
.navbar-brand {
|
||||
color: @black;
|
||||
}
|
||||
.navbar-brand:hover {
|
||||
color: @black;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.inventory-title {
|
||||
|
||||
@ -916,12 +916,14 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
html += "<div class=\"navbar groups-menu\">\n";
|
||||
html += "<a class=\"navbar-brand\" ng-bind=\"selectedNodeName\" href=\"\"></a>\n";
|
||||
html += "<ul class=\"nav navbar-nav\">\n";
|
||||
html += "<li><a href=\"\" ng-click=\"editInventory()\" ng-hide=\"inventoryEditHide\" " +
|
||||
"aw-tool-tip=\"Edit inventory properties\" data-placement=\"bottom\"><i class=\"icon-edit\"></i> Inventory Properties</a></li>\n";
|
||||
html += "<li><a href=\"\" ng-click=\"editGroup()\" ng-hide=\"groupEditHide\" " +
|
||||
"aw-tool-tip=\"Edit the selected group\" data-placement=\"bottom\"><i class=\"icon-edit\"></i> Edit</a></li>\n";
|
||||
"aw-tool-tip=\"Edit the selected group\" data-placement=\"bottom\"><i class=\"icon-edit\"></i> Edit Group</a></li>\n";
|
||||
html += "<li><a href=\"\" ng-click=\"addGroup()\" ng-hide=\"groupAddHide\" " +
|
||||
"aw-tool-tip=\"Add a new group\" data-placement=\"bottom\"><i class=\"icon-plus\"></i> Add</a></li>\n";
|
||||
"aw-tool-tip=\"Add a new group\" data-placement=\"bottom\"><i class=\"icon-plus\"></i> \{\{ addGroupTitle \}\}</a></li>\n";
|
||||
html += "<li><a href=\"\" ng-click=\"deleteGroup()\" ng-hide=\"groupDeleteHide\" " +
|
||||
"aw-tool-tip=\"Delete the group\" data-placement=\"bottom\"><i class=\"icon-trash\"></i> Delete</a></li>\n";
|
||||
"aw-tool-tip=\"Delete the group\" data-placement=\"bottom\"><i class=\"icon-trash\"></i> Delete Group</a></li>\n";
|
||||
html += "</ul>\n";
|
||||
html += "</div><!-- navbar -->\n";
|
||||
html += "<div id=\"tree-view\" class=\"tree-container\"></div>\n";
|
||||
|
||||
11
awx/ui/static/lib/less/less-1.4.1.min.js
vendored
Normal file
11
awx/ui/static/lib/less/less-1.4.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -7,7 +7,12 @@
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/custom-theme/jquery-ui-1.10.3.custom.css" />
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/font-awesome.min.css" />
|
||||
{% if settings.USE_MINIFIED_JS %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/awx.min.css" />
|
||||
{% else %}
|
||||
<link rel="stylesheet/less" type="text/css" href="{{ STATIC_URL }}less/ansible-ui.less" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico" />
|
||||
|
||||
<script src="{{ STATIC_URL }}js/config.js"></script>
|
||||
@ -15,8 +20,8 @@
|
||||
<script src="{{ STATIC_URL }}lib/angular/angular-resource.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/angular/angular-cookies.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/angular/angular-sanitize.min.js"></script>
|
||||
{% if settings.USE_MINIFIED_JS %} {# FIXME: Change to use minified JS once we are building it. #}
|
||||
<script src="{{ STATIC_URL }}js/awx-min.js"></script> <!-- FIXME: Change to whatever we end up calling the minified file. -->
|
||||
{% if settings.USE_MINIFIED_JS %}
|
||||
<script src="{{ STATIC_URL }}js/awx-min.js"></script>
|
||||
{% else %}
|
||||
<script src="{{ STATIC_URL }}js/app.js"></script>
|
||||
<script src="{{ STATIC_URL }}lib/ansible/authenticate.js"></script>
|
||||
@ -89,8 +94,11 @@
|
||||
<script src="{{ STATIC_URL }}js/helpers/md5.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/helpers/Access.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/helpers/Selection.js"></script>
|
||||
|
||||
<script src="{{ STATIC_URL }}lib/less/less-1.4.1.min.js"></script>
|
||||
|
||||
{% endif %}
|
||||
<!-- <script src="{{ STATIC_URL }}lib/angular/http-auth-interceptor.js"></script> -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user