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

Loading…
Cancel
Save