Unverified Commit 857e9e02 by Sam Padgett Committed by GitHub

Merge pull request #295 from rhamilto/delete-project-modal

Align delete project modal with PatternFly standard
parents 9f3787f5 36bcb221
.delete-resource-modal {
background-color: @gray-lighter;
h1 {
font-size: 21px;
font-weight: 500;
margin-bottom: 20px;
word-wrap: break-word; // firefox, IE
word-break: break-word; // non-standard for webkit
overflow-wrap: break-word; // new name as per the CSS3 spec
min-width: 0; // firefox (1)
}
p {
font-size: @font-size-large + 1;
}
.help-block {
margin-top: 0px;
margin-bottom: 10px;
}
}
.dialog-btn { .dialog-btn {
float: right !important; float: right !important;
margin-right: 10px; margin-right: 10px;
......
...@@ -322,8 +322,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -322,8 +322,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
"<div class=\"delete-resource-modal\">\n" + "<div class=\"delete-resource-modal\">\n" +
" <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" + " <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" +
" <form>\n" + " <form>\n" +
" <div class=\"modal-header\">\n" +
" <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" aria-label=\"Close\" ng-click=\"cancel()\">\n" +
" <span class=\"pficon pficon-close\"></span>\n" +
" </button>\n" +
" <h1 class=\"modal-title\">Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" </div>\n" +
" <div class=\"modal-body\">\n" + " <div class=\"modal-body\">\n" +
" <h1>Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" <p>\n" + " <p>\n" +
" This will <strong>delete all resources</strong> associated with\n" + " This will <strong>delete all resources</strong> associated with\n" +
" the project {{project | displayName}} and <strong>cannot be\n" + " the project {{project | displayName}} and <strong>cannot be\n" +
...@@ -346,8 +351,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -346,8 +351,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" </div>\n" + " </div>\n" +
" </div>\n" + " </div>\n" +
" <div class=\"modal-footer\">\n" + " <div class=\"modal-footer\">\n" +
" <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-lg btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" + " <button class=\"btn btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" +
" <button class=\"btn btn-lg btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" + " <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" +
" </div>\n" + " </div>\n" +
" </form>\n" + " </form>\n" +
"</div>\n" "</div>\n"
...@@ -687,7 +692,6 @@ angular.module("openshiftCommonUI") ...@@ -687,7 +692,6 @@ angular.module("openshiftCommonUI")
// opening the modal with settings scope as parent // opening the modal with settings scope as parent
var modalInstance = $uibModal.open({ var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'src/components/delete-project/delete-project-modal.html', templateUrl: 'src/components/delete-project/delete-project-modal.html',
controller: 'DeleteProjectModalController', controller: 'DeleteProjectModalController',
scope: scope scope: scope
...@@ -723,7 +727,6 @@ angular.module("openshiftCommonUI") ...@@ -723,7 +727,6 @@ angular.module("openshiftCommonUI")
} }
}; };
}); });
;'use strict'; ;'use strict';
/* jshint unused: false */ /* jshint unused: false */
......
...@@ -122,25 +122,6 @@ ...@@ -122,25 +122,6 @@
font-size: 36px; font-size: 36px;
} }
} }
.delete-resource-modal {
background-color: #f1f1f1;
}
.delete-resource-modal h1 {
font-size: 21px;
font-weight: 500;
margin-bottom: 20px;
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
min-width: 0;
}
.delete-resource-modal p {
font-size: 15px;
}
.delete-resource-modal .help-block {
margin-top: 0px;
margin-bottom: 10px;
}
.dialog-btn { .dialog-btn {
float: right !important; float: right !important;
margin-right: 10px; margin-right: 10px;
......
...@@ -478,8 +478,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -478,8 +478,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
"<div class=\"delete-resource-modal\">\n" + "<div class=\"delete-resource-modal\">\n" +
" <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" + " <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" +
" <form>\n" + " <form>\n" +
" <div class=\"modal-header\">\n" +
" <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" aria-label=\"Close\" ng-click=\"cancel()\">\n" +
" <span class=\"pficon pficon-close\"></span>\n" +
" </button>\n" +
" <h1 class=\"modal-title\">Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" </div>\n" +
" <div class=\"modal-body\">\n" + " <div class=\"modal-body\">\n" +
" <h1>Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" <p>\n" + " <p>\n" +
" This will <strong>delete all resources</strong> associated with\n" + " This will <strong>delete all resources</strong> associated with\n" +
" the project {{project | displayName}} and <strong>cannot be\n" + " the project {{project | displayName}} and <strong>cannot be\n" +
...@@ -502,8 +507,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -502,8 +507,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" </div>\n" + " </div>\n" +
" </div>\n" + " </div>\n" +
" <div class=\"modal-footer\">\n" + " <div class=\"modal-footer\">\n" +
" <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-lg btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" + " <button class=\"btn btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" +
" <button class=\"btn btn-lg btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" + " <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" +
" </div>\n" + " </div>\n" +
" </form>\n" + " </form>\n" +
"</div>\n" "</div>\n"
...@@ -843,7 +848,6 @@ angular.module("openshiftCommonUI") ...@@ -843,7 +848,6 @@ angular.module("openshiftCommonUI")
// opening the modal with settings scope as parent // opening the modal with settings scope as parent
var modalInstance = $uibModal.open({ var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'src/components/delete-project/delete-project-modal.html', templateUrl: 'src/components/delete-project/delete-project-modal.html',
controller: 'DeleteProjectModalController', controller: 'DeleteProjectModalController',
scope: scope scope: scope
...@@ -879,7 +883,6 @@ angular.module("openshiftCommonUI") ...@@ -879,7 +883,6 @@ angular.module("openshiftCommonUI")
} }
}; };
}]); }]);
;'use strict'; ;'use strict';
/* jshint unused: false */ /* jshint unused: false */
......
...@@ -293,8 +293,13 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac ...@@ -293,8 +293,13 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
"<div class=\"delete-resource-modal\">\n" + "<div class=\"delete-resource-modal\">\n" +
" <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" + " <!-- Use a form so that the enter key submits when typing a project name to confirm. -->\n" +
" <form>\n" + " <form>\n" +
" <div class=\"modal-header\">\n" +
" <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" aria-label=\"Close\" ng-click=\"cancel()\">\n" +
" <span class=\"pficon pficon-close\"></span>\n" +
" </button>\n" +
" <h1 class=\"modal-title\">Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" </div>\n" +
" <div class=\"modal-body\">\n" + " <div class=\"modal-body\">\n" +
" <h1>Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>\n" +
" <p>\n" + " <p>\n" +
" This will <strong>delete all resources</strong> associated with\n" + " This will <strong>delete all resources</strong> associated with\n" +
" the project {{project | displayName}} and <strong>cannot be\n" + " the project {{project | displayName}} and <strong>cannot be\n" +
...@@ -317,8 +322,8 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac ...@@ -317,8 +322,8 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" </div>\n" + " </div>\n" +
" </div>\n" + " </div>\n" +
" <div class=\"modal-footer\">\n" + " <div class=\"modal-footer\">\n" +
" <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-lg btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" + " <button class=\"btn btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" +
" <button class=\"btn btn-lg btn-default\" type=\"button\" ng-click=\"cancel()\">Cancel</button>\n" + " <button ng-disabled=\"typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)\" class=\"btn btn-danger\" type=\"submit\" ng-click=\"delete()\">Delete</button>\n" +
" </div>\n" + " </div>\n" +
" </form>\n" + " </form>\n" +
"</div>\n" "</div>\n"
......
<div class="delete-resource-modal"> <div class="delete-resource-modal">
<!-- Use a form so that the enter key submits when typing a project name to confirm. --> <!-- Use a form so that the enter key submits when typing a project name to confirm. -->
<form> <form>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" aria-label="Close" ng-click="cancel()">
<span class="pficon pficon-close"></span>
</button>
<h1 class="modal-title">Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>
</div>
<div class="modal-body"> <div class="modal-body">
<h1>Are you sure you want to delete the project '<strong>{{project | displayName}}</strong>'?</h1>
<p> <p>
This will <strong>delete all resources</strong> associated with This will <strong>delete all resources</strong> associated with
the project {{project | displayName}} and <strong>cannot be the project {{project | displayName}} and <strong>cannot be
...@@ -25,8 +30,8 @@ ...@@ -25,8 +30,8 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button ng-disabled="typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)" class="btn btn-lg btn-danger" type="submit" ng-click="delete()">Delete</button> <button class="btn btn-default" type="button" ng-click="cancel()">Cancel</button>
<button class="btn btn-lg btn-default" type="button" ng-click="cancel()">Cancel</button> <button ng-disabled="typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)" class="btn btn-danger" type="submit" ng-click="delete()">Delete</button>
</div> </div>
</form> </form>
</div> </div>
...@@ -59,7 +59,6 @@ angular.module("openshiftCommonUI") ...@@ -59,7 +59,6 @@ angular.module("openshiftCommonUI")
// opening the modal with settings scope as parent // opening the modal with settings scope as parent
var modalInstance = $uibModal.open({ var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'src/components/delete-project/delete-project-modal.html', templateUrl: 'src/components/delete-project/delete-project-modal.html',
controller: 'DeleteProjectModalController', controller: 'DeleteProjectModalController',
scope: scope scope: scope
...@@ -95,4 +94,3 @@ angular.module("openshiftCommonUI") ...@@ -95,4 +94,3 @@ angular.module("openshiftCommonUI")
} }
}; };
}); });
.delete-resource-modal {
background-color: @gray-lighter;
h1 {
font-size: 21px;
font-weight: 500;
margin-bottom: 20px;
word-wrap: break-word; // firefox, IE
word-break: break-word; // non-standard for webkit
overflow-wrap: break-word; // new name as per the CSS3 spec
min-width: 0; // firefox (1)
}
p {
font-size: @font-size-large + 1;
}
.help-block {
margin-top: 0px;
margin-bottom: 10px;
}
}
.dialog-btn { .dialog-btn {
float: right !important; float: right !important;
margin-right: 10px; margin-right: 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment