1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

New: close modal dialogs by clicking outside of modal

This commit is contained in:
Mark McDowall 2014-08-10 22:36:51 -07:00
parent 9ffdf18935
commit 9f52daf78e
23 changed files with 645 additions and 687 deletions

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Select Folder</h3>
@ -29,4 +28,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,4 +1,3 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -27,4 +26,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="episode-detail-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -33,5 +32,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="history-detail-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -20,4 +19,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Keyboard Shortcuts</h3>
@ -44,4 +43,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="rename-preview-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -26,4 +25,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete {{title}}</h3>
@ -45,4 +44,3 @@
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>{{title}}</h3>
@ -94,4 +93,3 @@
<button class="btn btn-primary x-save">save</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Organize of Selected Series</h3>
@ -24,4 +23,3 @@
<button class="btn btn-danger x-confirm-organize">organize</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Add Download Client</h3>
@ -13,4 +12,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete Download Client</h3>
@ -12,4 +11,3 @@
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
{{#if id}}
@ -63,4 +62,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Add Indexer</h3>
@ -13,4 +12,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete Indexer</h3>
@ -12,4 +11,3 @@
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close x-close" aria-hidden="true">&times;</button>
{{#if id}}
@ -62,4 +61,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Edit</h3>
@ -42,4 +41,3 @@
<button class="btn btn-primary x-save">save</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Add Notification</h3>
@ -13,4 +12,3 @@
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete Notification</h3>
@ -12,4 +11,3 @@
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close x-cancel" data-dismiss="modal" aria-hidden="true">&times;</button>
{{#if id}}
@ -111,4 +110,3 @@
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete: {{name}}</h3>
@ -12,4 +11,3 @@
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close x-cancel" aria-hidden="true">&times;</button>
{{#if id}}
@ -34,4 +33,3 @@
<button class="btn btn-primary x-save">save</button>
</div>
</div>
</div>

View File

@ -27,9 +27,12 @@ define(
//https://github.com/twitter/bootstrap/issues/4663
this.$el.attr('tabindex', '-1');
this.$el.modal({
'show' : true,
'keyboard': true,
'backdrop': 'static'});
show : true,
keyboard : true,
backdrop : true
});
this.currentView.$el.addClass('modal-dialog');
},
closeModal: function () {

View File

@ -1,5 +1,4 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-content">
<div class="log-details-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@ -22,4 +21,3 @@
</div>
</div>
</div>
</div>