Commit 8bc1af9d by Torkel Ödegaard

ux(): work on new modal design #4191

parent fd1a0edf
...@@ -160,6 +160,7 @@ export class DashNavCtrl { ...@@ -160,6 +160,7 @@ export class DashNavCtrl {
$scope.appEvent('show-modal', { $scope.appEvent('show-modal', {
src: 'public/app/features/dashboard/partials/saveDashboardAs.html', src: 'public/app/features/dashboard/partials/saveDashboardAs.html',
scope: newScope, scope: newScope,
modalClass: 'modal--narrow'
}); });
}; };
......
<div class="modal-body gf-box gf-box-no-margin" ng-controller="SaveDashboardAsCtrl" ng-init="init();"> <div class="modal-body" ng-controller="SaveDashboardAsCtrl" ng-init="init();">
<div class="gf-box-header"> <div class="modal-header">
<div class="gf-box-title"> <h2 class="modal-header-title">
<i class="fa fa-copy"></i> <i class="fa fa-copy"></i>
Save As... <span class="p-l-1">Save As...</span>
</div> </h2>
<button class="gf-box-header-close-btn" ng-click="dismiss();"> <a class="modal-header-close" ng-click="dismiss();">
<i class="fa fa-remove"></i> <i class="fa fa-remove"></i>
</button> </a>
</div> </div>
<div class="gf-box-body"> <div class="modal-content">
<div class="text-center"> <div class="p-t-2">
<h4>New title</h4> <div class="gf-form">
<label class="gf-form-label">New name</label>
<input type="text" class="input input-fluid" ng-model="clone.title" give-focus="true" ng-keydown="keyDown($event)"> <input type="text" class="gf-form-input" ng-model="clone.title" give-focus="true" ng-keydown="keyDown($event)">
<br> </div>
<br> </div>
<div class="gf-form-button-row text-center">
<a class="btn btn-success" ng-click="saveClone();">Save</a> <a class="btn btn-success" ng-click="saveClone();">Save</a>
<a class="btn-text" ng-click="dismiss();">Cancel</a> <a class="btn-text" ng-click="dismiss();">Cancel</a>
</div> </div>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</a> </a>
</div> </div>
<div class="gf-box-body" ng-repeat="tab in tabs" ng-if="editor.index == $index"> <div class="modal-content" ng-repeat="tab in tabs" ng-if="editor.index == $index">
<div ng-include src="tab.src" class="share-modal-body"></div> <div ng-include src="tab.src" class="share-modal-body"></div>
</div> </div>
...@@ -86,10 +86,8 @@ ...@@ -86,10 +86,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="gf-form-group"> <div class="gf-form position-center" ng-show="modeSharePanel">
<div class="gf-form position-center" ng-show="modeSharePanel"> <a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a>
<a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a>
</div>
</div> </div>
</script> </script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</a> </a>
</div> </div>
<div class="p-a-2"> <div class="modal-content">
<div class="modal-tagline p-b-2"> <div class="modal-tagline p-b-2">
Send invite or add existing Grafana users to the organization Send invite or add existing Grafana users to the organization
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="gf-form-inline gf-form-group"> <div class="gf-form-inline gf-form-group">
<div class="gf-form"> <div class="gf-form">
<a class="btn btn-secondary gf-form-btn" ng-click="addInvite()"> <a class="btn btn-inverse btn-small" ng-click="addInvite()">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
Invite another Invite another
</a> </a>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@include background-clip(padding-box); @include background-clip(padding-box);
outline: none; outline: none;
max-width: 800px; max-width: 750px;
left: 0; left: 0;
right: 0; right: 0;
margin-left: auto; margin-left: auto;
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
.modal-header-close { .modal-header-close {
float: right; float: right;
padding: ($tabs-padding-top + $tabs-top-margin/2) $spacer $tabs-padding-bottom; padding: 0.75rem $spacer;
} }
// Body (where all modal content resides) // Body (where all modal content resides)
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
overflow-y: auto; overflow-y: auto;
} }
.modal-content {
padding: $spacer*2;
}
// Remove bottom margin if need be // Remove bottom margin if need be
.modal-form { .modal-form {
margin-bottom: 0; margin-bottom: 0;
...@@ -98,6 +102,10 @@ ...@@ -98,6 +102,10 @@
} }
} }
.modal--narrow {
max-width: 500px;
}
.confirm-modal { .confirm-modal {
max-width: 500px; max-width: 500px;
......
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