kopia lustrzana https://github.com/wagtail/wagtail
linted
rodzic
5aea7dd51e
commit
41dafc9c6a
1
.jscsrc
1
.jscsrc
|
@ -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",
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
Ładowanie…
Reference in New Issue