Browse Source

Avoid javascript error in Servers page

tags/1.1.1RC2
Safihre 9 years ago
committed by shypike
parent
commit
637c00dcff
  1. 14
      interfaces/Config/templates/config_server.tmpl

14
interfaces/Config/templates/config_server.tmpl

@ -279,8 +279,8 @@
this.submit() this.submit()
}) })
}) })
/** /**
Color the priority labels Color the priority labels
**/ **/
// They are already sorted // They are already sorted
@ -298,7 +298,7 @@
\$(this).css('background-color', theColor) \$(this).css('background-color', theColor)
}) })
/** /**
Message on no Default category selected Message on no Default category selected
**/ **/
function checkServerCats() { function checkServerCats() {
@ -309,10 +309,10 @@
// See if this server is enabled // See if this server is enabled
if(!\$(this).parents('.section').find('.col2').hasClass('server-disabled') ) { if(!\$(this).parents('.section').find('.col2').hasClass('server-disabled') ) {
// Is there Default? // Is there Default?
if(\$(this).val().indexOf('Default') > -1) { if(\$(this).val() && \$(this).val().indexOf('Default') > -1) {
// Hide // Hide
\$('.alert-no-category').hide() \$('.alert-no-category').hide()
hasDefault = true hasDefault = true
// All good! // All good!
return true return true
} }
@ -323,8 +323,8 @@
} }
\$('select[name="categories"]').on('change', checkServerCats) \$('select[name="categories"]').on('change', checkServerCats)
checkServerCats() checkServerCats()
/** /**
Click events Click events
**/ **/

Loading…
Cancel
Save