Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f5f4689e
Commit
f5f4689e
authored
Mar 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Worked on styling for confirm dialogs, #1554
parent
259d3308
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
50 deletions
+36
-50
src/app/features/admin/adminUsersCtrl.js
+1
-2
src/app/features/dashboard/dashboardNavCtrl.js
+5
-4
src/app/features/dashboard/rowCtrl.js
+2
-4
src/app/partials/confirm_modal.html
+2
-22
src/app/partials/unsaved-changes.html
+17
-15
src/app/services/alertSrv.js
+2
-0
src/css/less/grafana.less
+6
-2
src/css/less/variables.light.less
+1
-1
No files found.
src/app/features/admin/adminUsersCtrl.js
View file @
f5f4689e
...
...
@@ -20,8 +20,7 @@ function (angular) {
$scope
.
deleteUser
=
function
(
user
)
{
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Delete user'
,
text
:
'Are you sure you want to delete user: '
+
user
.
login
,
title
:
'Do you want to delete '
+
user
.
login
+
'?'
,
onConfirm
:
function
()
{
backendSrv
.
delete
(
'/api/admin/users/'
+
user
.
id
).
then
(
function
()
{
$scope
.
getUsers
();
...
...
src/app/features/dashboard/dashboardNavCtrl.js
View file @
f5f4689e
...
...
@@ -78,7 +78,8 @@ function (angular, _, moment) {
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Someone else has updated this dashboard!'
,
text
:
"Do you STILL want to save?"
,
text
:
"Would you still like to save this dashboard?"
,
yesText
:
"Save & Overwrite"
,
icon
:
"fa-warning"
,
onConfirm
:
function
()
{
$scope
.
saveDashboard
({
overwrite
:
true
});
...
...
@@ -91,7 +92,8 @@ function (angular, _, moment) {
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Another dashboard with the same name exists'
,
text
:
"Do you STILL want to save and ovewrite it?"
,
text
:
"Would you still like to save this dashboard?"
,
yesText
:
"Save & Overwrite"
,
icon
:
"fa-warning"
,
onConfirm
:
function
()
{
$scope
.
saveDashboard
({
overwrite
:
true
});
...
...
@@ -102,8 +104,7 @@ function (angular, _, moment) {
$scope
.
deleteDashboard
=
function
()
{
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Delete dashboard'
,
text
:
'Do you want to delete dashboard '
+
$scope
.
dashboard
.
title
+
'?'
,
title
:
'Do you want to delete dashboard '
+
$scope
.
dashboard
.
title
+
'?'
,
onConfirm
:
function
()
{
$scope
.
deleteDashboardConfirmed
();
}
...
...
src/app/features/dashboard/rowCtrl.js
View file @
f5f4689e
...
...
@@ -49,8 +49,7 @@ function (angular, app, _, config) {
$scope
.
delete_row
=
function
()
{
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Delete row'
,
text
:
'Are you sure you want to delete this row?'
,
title
:
'Are you sure you want to delete this row?'
,
onConfirm
:
function
()
{
$scope
.
dashboard
.
rows
=
_
.
without
(
$scope
.
dashboard
.
rows
,
$scope
.
row
);
}
...
...
@@ -82,8 +81,7 @@ function (angular, app, _, config) {
$scope
.
remove_panel_from_row
=
function
(
row
,
panel
)
{
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Remove panel'
,
text
:
'Are you sure you want to remove this panel?'
,
title
:
'Are you sure you want to remove this panel?'
,
onConfirm
:
function
()
{
row
.
panels
=
_
.
without
(
row
.
panels
,
panel
);
}
...
...
src/app/partials/confirm_modal.html
View file @
f5f4689e
...
...
@@ -17,29 +17,9 @@
</div>
<div
class=
"confirm-modal-buttons"
>
<button
type=
"button"
class=
"btn btn-inverse"
ng-click=
"dismiss()"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-danger"
ng-click=
"onConfirm();dismiss();"
>
Save
&
Overwrite
</button>
<button
type=
"button"
class=
"btn btn-inverse"
ng-click=
"dismiss()"
>
{{noText}}
</button>
<button
type=
"button"
class=
"btn btn-danger"
ng-click=
"onConfirm();dismiss();"
>
{{yesText}}
</button>
</div>
<!-- <div class="gf-box-header"> -->
<!-- <div class="gf-box-title"> -->
<!-- <i class="fa {{icon}}"></i> -->
<!-- {{title}} -->
<!-- </div> -->
<!-- </div> -->
<!-- -->
<!-- <div class="gf-box-body" style="min-height: 0px;"> -->
<!-- <p class="row-fluid text-center large"> -->
<!-- {{text}} -->
<!-- <br> -->
<!-- <br> -->
<!-- </p> -->
<!-- <div class="row-fluid"> -->
<!-- <span class="span4"></span> -->
<!-- <button type="button" class="btn btn-primary span2" ng-click="dismiss()">No</button> -->
<!-- <button type="button" class="btn btn-danger span2" ng-click="onConfirm();dismiss();">Yes</button> -->
<!-- <span class="span4"></span> -->
<!-- </div> -->
</div>
src/app/partials/unsaved-changes.html
View file @
f5f4689e
<div
class=
"modal-body gf-box gf-box-no-margin"
>
<div
class=
"gf-box-header text-center"
>
<span
class=
"gf-box-title"
>
<i
class=
"fa fa-exclamation"
></i>
Unsaved changes
</span>
<button
class=
"gf-box-header-close-btn"
ng-click=
"dismiss();"
>
<i
class=
"fa fa-remove"
></i>
</button>
<div
class=
"modal-body"
>
<a
class=
"modal-close"
ng-click=
"dismiss();"
>
<i
class=
"fa fa-remove"
></i>
</a>
<div
class=
"confirm-modal-icon"
>
<i
class=
"fa fa-exclamation"
></i>
</div>
<div
class=
"gf-box-body"
style=
"min-height: 0;"
>
<div
class=
"row-fluid text-center"
>
<button
type=
"button"
class=
"btn btn-success span4"
ng-click=
"save();dismiss();"
>
Save
</button>
<button
type=
"button"
class=
"btn btn-danger span4"
ng-click=
"ignore();dismiss();"
>
Ignore
</button>
<button
type=
"button"
class=
"btn btn-inverse span4"
ng-click=
"dismiss()"
>
Cancel
</button>
</div>
<div
class=
"confirm-modal-title"
>
Unsaved changes
</div>
<div
class=
"confirm-modal-buttons"
>
<button
type=
"button"
class=
"btn btn-inverse"
ng-click=
"dismiss()"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-danger"
ng-click=
"ignore();dismiss()"
>
Ignore
</button>
<button
type=
"button"
class=
"btn btn-success"
ng-click=
"save();dismiss();"
>
Save
</button>
</div>
</div>
src/app/services/alertSrv.js
View file @
f5f4689e
...
...
@@ -65,6 +65,8 @@ function (angular, _) {
scope
.
text
=
payload
.
text
;
scope
.
onConfirm
=
payload
.
onConfirm
;
scope
.
icon
=
payload
.
icon
||
"fa-check"
;
scope
.
yesText
=
payload
.
yesText
||
"Yes"
;
scope
.
noText
=
payload
.
noText
||
"Cancel"
;
var
confirmModal
=
$modal
({
template
:
'./app/partials/confirm_modal.html'
,
...
...
src/css/less/grafana.less
View file @
f5f4689e
...
...
@@ -259,7 +259,7 @@
.confirm-modal {
border: 1px solid @grafanaTargetFuncBackground;
max-width: 500px;
background-color: @
moda
lBackground;
background-color: @
grafanaPane
lBackground;
text-align: center;
.modal-close {
...
...
@@ -267,22 +267,26 @@
font-size: 140%;
padding: 10px;
}
.confirm-modal-icon {
padding-top: 41px;
font-size: 280%;
color: @green;
padding-bottom: 20px;
}
.confirm-modal-title {
font-size: 18px;
color: @linkColor;
margin-bottom: 15px;
}
.confirm-modal-text {
font-size: 16px;
margin-bottom: 25px;
}
.confirm-modal-buttons {
margin-top: 35px;
margin-bottom: 35px;
button {
margin-right: 5px
...
...
src/css/less/variables.light.less
View file @
f5f4689e
...
...
@@ -54,7 +54,7 @@
@grafanaTargetFuncBackground: darken(@grafanaTargetBackground, 5%);
@grafanaTargetFuncHightlight: darken(@grafanaTargetBackground, 10%);
@modalBackground: @
white
;
@modalBackground: @
bodyBackground
;
// Scaffolding
// -------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment