pull/1075/head
Dave Cranwell 2015-09-01 16:49:03 +01:00
rodzic 5aea7dd51e
commit 41dafc9c6a
2 zmienionych plików z 20 dodań i 18 usunięć

Wyświetl plik

@ -11,6 +11,7 @@
"node_modules/**", "node_modules/**",
"**/*.min.js", "**/*.min.js",
"**/vendor/**/*.js", "**/vendor/**/*.js",
"./wagtail/wagtailadmin/static/**",
"./wagtail/wagtailadmin/templates/wagtailadmin/edit_handlers/inline_panel.js", "./wagtail/wagtailadmin/templates/wagtailadmin/edit_handlers/inline_panel.js",
"./wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js", "./wagtail/contrib/wagtailsearchpromotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js",
"./wagtail/wagtailusers/templates/wagtailusers/groups/includes/page_permissions_formset.js", "./wagtail/wagtailusers/templates/wagtailusers/groups/includes/page_permissions_formset.js",

Wyświetl plik

@ -83,8 +83,8 @@ $(function() {
/* close all dropdowns on body clicks */ /* close all dropdowns on body clicks */
$(document).on('click', function(e) { $(document).on('click', function(e) {
var targ = e.target; var relTarg = e.relatedTarget || e.toElement;
if(!$(targ).hasClass('dropdown-toggle') && !$(targ).closest('.dropdown').length){ if (!$(relTarg).hasClass('dropdown-toggle')) {
$('.dropdown').removeClass('open'); $('.dropdown').removeClass('open');
} }
}); });
@ -134,7 +134,6 @@ $(function() {
} }
} }
/* Functions that need to run/rerun when active tabs are changed */ /* Functions that need to run/rerun when active tabs are changed */
$(document).on('shown.bs.tab', function(e) { $(document).on('shown.bs.tab', function(e) {
// Resize autosize textareas // Resize autosize textareas
@ -152,6 +151,7 @@ $(function() {
// Disabling a button prevents it submitting the form, so disabling // Disabling a button prevents it submitting the form, so disabling
// must occur on a brief timeout only after this function returns. // must occur on a brief timeout only after this function returns.
var timeout = setTimeout(function() { var timeout = setTimeout(function() {
if (!$self.data(dataName)) { if (!$self.data(dataName)) {
// Button re-enables after a timeout to prevent button becoming // Button re-enables after a timeout to prevent button becoming
@ -178,6 +178,7 @@ $(function() {
// modified in the normal way, it would seem. // modified in the normal way, it would seem.
$self.addClass('button-longrunning-active').prop('disabled', 'true'); $self.addClass('button-longrunning-active').prop('disabled', 'true');
} }
clearTimeout(timeout); clearTimeout(timeout);
}, 10); }, 10);
}); });