Merge pull request #82 from ammendonca/KEYCLOAK-118

KEYCLOAK-118: Several issues fixed:
This commit is contained in:
stianst 2013-10-25 01:44:44 -07:00
commit 26b28be04c
16 changed files with 76 additions and 70 deletions

View file

@ -25,22 +25,22 @@ body {
}
.alert.alert-success {
border-color: #4b9e39;
background-image: url(img/feedback-success-sign.svg);
background-image: url(img/feedback-success-sign.png);
background-color: #e4f1e1;
}
.alert.alert-error {
border-color: #b91415;
background-image: url(img/feedback-error-sign.svg);
background-image: url(img/feedback-error-sign.png);
background-color: #f8e7e7;
}
.alert.alert-warning {
border-color: #f17528;
background-image: url(img/feedback-warning-sign.svg);
background-image: url(img/feedback-warning-sign.png);
background-color: #fef1e9;
}
.alert.alert-info {
border-color: #5994b2;
background-image: url(img/feedback-info-sign.svg);
background-image: url(img/feedback-info-sign.png);
background-color: #e4f3fa;
}
/* Header */
@ -64,7 +64,7 @@ body {
border: 1px solid #676c6e;
border-radius: 2px;
padding: 0 0.54545454545455em;
background: #555a5e url(img/sprite-arrow-down.svg) no-repeat right -26px;
background: #555a5e url(img/sprite-arrow-down.png) no-repeat right -26px;
display: block;
&:hover,
@ -147,7 +147,7 @@ body {
vertical-align: middle;
background-color: #555a5e;
background-image: none;
background-image: url(img/sprite-arrow-down.svg);
background-image: url(img/sprite-arrow-down.png);
background-repeat: no-repeat;
background-position: right -26px;
border: 1px solid #676c6e;
@ -379,7 +379,7 @@ table + .feedback.inline.warning {
.tooltip-box {
position: absolute;
font-size: 1em;
background-image: url("img/tooltip-box-arrow-right-up.svg");
background-image: url("img/tooltip-box-arrow-right-up.png");
background-position: right top;
background-repeat: no-repeat;
padding-top: 1em;

View file

@ -37,25 +37,25 @@ body {
&.alert-success {
border-color: #4b9e39;
background-image: url(img/feedback-success-sign.svg);
background-image: url(img/feedback-success-sign.png);
background-color: #e4f1e1;
}
&.alert-error {
border-color: #b91415;
background-image: url(img/feedback-error-sign.svg);
background-image: url(img/feedback-error-sign.png);
background-color: #f8e7e7;
}
&.alert-warning {
border-color: #f17528;
background-image: url(img/feedback-warning-sign.svg);
background-image: url(img/feedback-warning-sign.png);
background-color: #fef1e9;
}
&.alert-info {
border-color: #5994b2;
background-image: url(img/feedback-info-sign.svg);
background-image: url(img/feedback-info-sign.png);
background-color: #e4f3fa;
}
}
@ -88,7 +88,7 @@ body {
vertical-align: middle;
background-color: #555a5e;
background-image: none;
background-image: url(img/sprite-arrow-down.svg);
background-image: url(img/sprite-arrow-down.png);
background-repeat: no-repeat;
background-position: right -26px;
border: 1px solid #676c6e;
@ -156,7 +156,7 @@ body {
border: 1px solid #676c6e;
border-radius: 2px;
padding: 0 0.54545454545455em;
background: #555a5e url(img/sprite-arrow-down.svg) no-repeat right -26px;
background: #555a5e url(img/sprite-arrow-down.png) no-repeat right -26px;
display: block;
&:hover,
@ -463,7 +463,7 @@ table {
.tooltip-box {
position: absolute;
font-size: 1em;
background-image: url("img/tooltip-box-arrow-right-up.svg");
background-image: url("img/tooltip-box-arrow-right-up.png");
background-position: right top;
background-repeat: no-repeat;
padding-top: 1em;

View file

@ -295,29 +295,29 @@ button.primary:focus,
background-position: 1.27272727272727em 1.63636363636364em;
}
.feedback.error {
background-image: url(img/feedback-error-arrow-down.svg);
background-image: url(img/feedback-error-arrow-down.png);
}
.feedback.error p {
border-color: #b91415;
background-image: url(img/feedback-error-sign.svg);
background-image: url(img/feedback-error-sign.png);
background-color: #f8e7e7;
}
.feedback.success {
background-image: url(img/feedback-success-arrow-down.svg);
background-image: url(img/feedback-success-arrow-down.png);
}
.feedback.success p {
border-color: #4b9e39;
background-image: url(img/feedback-success-sign.svg);
background-image: url(img/feedback-success-sign.png);
background-color: #e4f1e1;
}
.feedback.warning p {
border-color: #f17528;
background-image: url(img/feedback-warning-sign.svg);
background-image: url(img/feedback-warning-sign.png);
background-color: #fef1e9;
}
.feedback.info p {
border-color: #5994b2;
background-image: url(img/feedback-info-sign.svg);
background-image: url(img/feedback-info-sign.png);
background-color: #e4f3fa;
}
.feedback.inline {

View file

@ -337,21 +337,21 @@ button.primary,
}
&.error {
background-image: url(img/feedback-error-arrow-down.svg);
background-image: url(img/feedback-error-arrow-down.png);
p {
border-color: #b91415;
background-image: url(img/feedback-error-sign.svg);
background-image: url(img/feedback-error-sign.png);
background-color: #f8e7e7;
}
}
&.success {
background-image: url(img/feedback-success-arrow-down.svg);
background-image: url(img/feedback-success-arrow-down.png);
p {
border-color: #4b9e39;
background-image: url(img/feedback-success-sign.svg);
background-image: url(img/feedback-success-sign.png);
background-color: #e4f1e1;
}
}
@ -360,7 +360,7 @@ button.primary,
p {
border-color: #f17528;
background-image: url(img/feedback-warning-sign.svg);
background-image: url(img/feedback-warning-sign.png);
background-color: #fef1e9;
}
@ -370,7 +370,7 @@ button.primary,
p {
border-color: #5994b2;
background-image: url(img/feedback-info-sign.svg);
background-image: url(img/feedback-info-sign.png);
background-color: #e4f3fa;
}

View file

@ -40,7 +40,6 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l
};
$scope.showNav = function() {
var show = Current.realms.length > 0;
console.log('Show dropdown? ' + show);
return Auth.loggedIn && show;
}
});
@ -137,11 +136,12 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
};
$scope.cancel = function() {
$location.url("/realms");
//$location.url("/realms");
window.history.back();
};
$scope.remove = function() {
Dialog.confirmDelete($scope.realm.name, 'realm', function() {
Dialog.confirmDelete($scope.realm.realm, 'realm', function() {
Realm.remove($scope.realm, function() {
Current.realms = Realm.get();
$location.url("/realms");

View file

@ -134,7 +134,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
$scope.user = angular.copy(user);
$scope.create = !user.username;
$scope.changed = $scope.create;
$scope.changed = false; // $scope.create;
$scope.$watch('user', function() {
if (!angular.equals($scope.user, user)) {
@ -176,7 +176,7 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
};
$scope.remove = function() {
Dialog.confirmDelete($scope.user.userId, 'user', function() {
Dialog.confirmDelete($scope.user.username, 'user', function() {
$scope.user.$remove({
realm : realm.id,
userId : $scope.user.username

View file

@ -970,8 +970,8 @@ dialogModule.provider("$dialog", function(){
transitionClass: 'fade',
triggerClass: 'in',
resolve:{},
backdropFade: false,
dialogFade:false,
backdropFade: true,
dialogFade: true,
keyboard: true, // close with esc key
backdropClick: true // only in conjunction with backdrop=true
/* other options: template, templateUrl, controller */
@ -1027,6 +1027,7 @@ dialogModule.provider("$dialog", function(){
this.modalEl.addClass(options.transitionClass);
this.modalEl.removeClass(options.triggerClass);
}
this.modalEl.css("display", "block"); /* FIXME: For BS 3.x support */
this.handledEscapeKey = function(e) {
if (e.which === 27) {
@ -2997,6 +2998,8 @@ angular.module("template/datepicker/datepicker.html", []).run(["$templateCache",
angular.module("template/dialog/message.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("template/dialog/message.html",
"<div class=\"modal-dialog\">\n" +
"<div class=\"modal-content\">\n" +
"<div class=\"modal-header\">\n" +
" <h3>{{ title }}</h3>\n" +
"</div>\n" +
@ -3006,6 +3009,8 @@ angular.module("template/dialog/message.html", []).run(["$templateCache", functi
"<div class=\"modal-footer\">\n" +
" <button ng-repeat=\"btn in buttons\" ng-click=\"close(btn.result)\" class=\"btn\" ng-class=\"btn.cssClass\">{{ btn.label }}</button>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
"");
}]);

View file

@ -104,10 +104,9 @@
</div>
</fieldset>
<div class="form-actions" data-ng-show="create">
<button type="submit" data-ng-click="save()" class="primary">Save
<button type="submit" data-ng-click="save()" data-ng-show="changed" class="primary">Save
</button>
<button type="submit" data-ng-click="cancel()" data-ng-click="cancel()"
data-ng-show="changed">Cancel
<button type="submit" data-ng-click="cancel()">Cancel
</button>
</div>
@ -116,7 +115,7 @@
</button>
<button type="submit" data-ng-click="reset()" data-ng-show="changed">Clear changes
</button>
<button type="submit" data-ng-click="remove()" class="destructive">
<button type="submit" data-ng-click="remove()" class="destructive" data-ng-hide="changed">
Delete
</button>
</div>

View file

@ -16,14 +16,15 @@
<div class="feedback info inline" data-ng-show="!applications || applications.length == 0">
<p><strong>You have not configured applications.</strong> <a class="button" href="#/create/application/{{realm.id}}">Add Application</a></p>
</div>
<table>
<table data-ng-hide="applications.length == 0">
<thead>
<tr>
<th class="rcue-table-actions" colspan="3">
<div class="search-comp clearfix">
<input type="text" placeholder="Search..." class="search">
<button class="icon-search tooltipRightTrigger"
data-original-title="Search by application name.">
<input type="text" placeholder="Search..." class="search"
onkeyup="if(event.keyCode == 13){$(this).next('button').click();}">
<button class="icon-search" tooltip-placement="right"
tooltip="Search by application name.">
Icon: search
</button>
</div>
@ -32,7 +33,7 @@
</div>
</th>
</tr>
<tr>
<tr data-ng-show="applications.length > 0">
<th>Application Name</th>
<th>Enabled</th>
<th>Base URL</th>
@ -58,7 +59,7 @@
</tr>
</tbody>
</table>
<div class="feedback warning inline">
<div class="feedback warning inline" data-ng-show="search && applications.length == 0">
<p><strong>Your search returned no results.</strong><br>Try modifying the query and try again.</p>
</div>
</div>

View file

@ -40,8 +40,8 @@
<th class="rcue-table-actions" colspan="2">
<div class="search-comp clearfix">
<input type="text" placeholder="Search..." class="search">
<button class="icon-search tooltipRightTrigger"
data-original-title="Search by role name.">
<button class="icon-search" tooltip-placement="right"
tooltip="Search by role name.">
Icon: search
</button>
</div>

View file

@ -35,8 +35,8 @@
</select>
</div>
<div class="middle-buttons">
<button type="submit" ng-click="addRealmRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteRealmRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
<button type="submit" ng-click="addRealmRole()" tooltip="Move right" tooltip-placement="right"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteRealmRole()" tooltip="Move left" tooltip-placement="right"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="assigned">Assigned Roles</label>
@ -57,11 +57,12 @@
<div class="input-group">
<div class="select-rcue">
<select id="applications" name="applications" ng-change="changeApplication()" ng-model="targetApp" ng-options="a.name for a in applications">
<option value="" selected> Select an Application </option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="form-group" ng-show="targetApp">
<div class="controls changing-selectors application">
<div class="select-title">
<label for="app-available">Available Roles</label>
@ -72,8 +73,8 @@
</select>
</div>
<div class="middle-buttons">
<button type="submit" ng-click="addApplicationRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
<button type="submit" ng-click="addApplicationRole()" tooltip="Move right" tooltip-placement="right"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" tooltip="Move left" tooltip-placement="right"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="app-assigned">Assigned Roles</label>

View file

@ -119,8 +119,7 @@
<div class="form-actions" data-ng-show="createRealm">
<button type="submit" data-ng-click="save()" class="primary" data-ng-show="changed">Save
</button>
<button type="submit" data-ng-click="cancel()" data-ng-click="cancel()"
data-ng-show="changed">Cancel
<button type="submit" data-ng-click="cancel()">Cancel
</button>
</div>

View file

@ -36,8 +36,8 @@
<th class="rcue-table-actions" colspan="2">
<div class="search-comp clearfix">
<input type="text" placeholder="Search..." class="search">
<button class="icon-search tooltipRightTrigger"
data-original-title="Search by role name.">
<button class="icon-search" tooltip-placement="right"
tooltip="Search by role name.">
Icon: search
</button>
</div>

View file

@ -6,7 +6,7 @@
<ul class="rcue-tabs" >
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}">Attributes</a></li>
<li><a href="#">Credentials</a></li>
<li class="active"><a href="#">Role Mappings</a></li>
<li class="active"><a href="#/realms/{{realm.id}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
</ul>
</div>
<div id="content">
@ -32,8 +32,8 @@
</select>
</div>
<div class="middle-buttons">
<button type="submit" ng-click="addRealmRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteRealmRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
<button type="submit" ng-click="addRealmRole()" tooltip="Move right" tooltip-placement="right"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteRealmRole()" tooltip="Move left" tooltip-placement="right"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="assigned">Assigned Roles</label>
@ -54,6 +54,7 @@
<div class="input-group">
<div class="select-rcue">
<select id="applications" name="applications" ng-change="changeApplication()" ng-model="application" ng-options="a.name for a in applications">
<option value="" selected> Select an Application </option>
</select>
</div>
</div>
@ -69,8 +70,8 @@
</select>
</div>
<div class="middle-buttons">
<button type="submit" ng-click="addApplicationRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
<button type="submit" ng-click="addApplicationRole()" tooltip="Move right" tooltip-placement="right"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" tooltip="Move left" tooltip-placement="right"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="assigned-app">Assigned Roles</label>

View file

@ -9,7 +9,7 @@
</div>
<div class="top-nav" data-ng-show="!create">
<ul class="rcue-tabs" >
<li class="active"><a href="#">Attributes</a></li>
<li class="active"><a href="#/realms/{{realm.id}}/users/{{user.username}}">Attributes</a></li>
<li><a href="#">Credentials</a></li>
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
</ul>
@ -67,10 +67,9 @@
</div>
</fieldset>
<div class="form-actions" data-ng-show="create">
<button type="submit" data-ng-click="save()" class="primary">Save
<button type="submit" data-ng-click="save()" class="primary" data-ng-show="changed">Save
</button>
<button type="submit" data-ng-click="cancel()" data-ng-click="cancel()"
data-ng-show="changed">Cancel
<button type="submit" data-ng-click="cancel()">Cancel
</button>
</div>
@ -79,7 +78,7 @@
</button>
<button type="submit" data-ng-click="reset()" data-ng-show="changed">Clear changes
</button>
<button type="submit" data-ng-click="remove()" class="destructive">
<button type="submit" data-ng-click="remove()" class="destructive" data-ng-hide="changed">
Delete
</button>
</div>

View file

@ -19,10 +19,11 @@
<tr>
<th class="rcue-table-actions" colspan="4">
<div class="search-comp clearfix">
<input type="text" placeholder="Search..." data-ng-model="search" class="search">
<button data-ng-click="searchQuery()"
class="icon-search tooltipRightTrigger"
data-original-title="Search by full name, last name, email, or username.">
<input type="text" placeholder="Search..." data-ng-model="search" class="search"
onkeyup="if(event.keyCode == 13){$(this).next('button').click();}">
<button data-ng-click="searchQuery()" type="submit"
class="icon-search" tooltip-placement="right"
tooltip="Search by full name, last name, email, or username.">
Icon: search
</button>
</div>
@ -32,7 +33,7 @@
</th>
</tr>
<tr>
<tr data-ng-show="users && search">
<tr data-ng-show="users.length > 0">
<th>Username</th>
<th>Last Name</th>
<th>First Name</th>
@ -61,7 +62,7 @@
</tr>
</tbody>
</table>
<div class="feedback warning inline">
<div class="feedback warning inline" data-ng-show="users.length == 0">
<p><strong>Your search returned no results.</strong><br>Try modifying the query and try again.</p>
</div>
</div>