fix for form_inputs not being defined

This commit is contained in:
Oliver Gorwits
2013-04-23 22:49:00 +01:00
parent 9663fb5f2a
commit 7940e1aeda
3 changed files with 8 additions and 2 deletions

View File

@@ -169,8 +169,6 @@ $(document).ready(function() {
// sidebar form fields should change colour and have bin/copy icon // sidebar form fields should change colour and have bin/copy icon
$('.field_copy_icon').hide(); $('.field_copy_icon').hide();
$('.field_clear_icon').hide(); $('.field_clear_icon').hide();
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// activate typeahead on the main search box, for device names only // activate typeahead on the main search box, for device names only
$('#nq').typeahead({ $('#nq').typeahead({

View File

@@ -99,6 +99,10 @@
} }
$(document).ready(function() { $(document).ready(function() {
// sidebar form fields should change colour and have bin/copy icon
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// sidebar collapser events trigger change of up/down arrow // sidebar collapser events trigger change of up/down arrow
$('.collapse').on('show', function() { $('.collapse').on('show', function() {
$(this).siblings().find('.arrow-up-down') $(this).siblings().find('.arrow-up-down')

View File

@@ -14,6 +14,10 @@
// on load, check initial Device Search Options form state, // on load, check initial Device Search Options form state,
// and on each change to the form fields // and on each change to the form fields
$(document).ready(function() { $(document).ready(function() {
// sidebar form fields should change colour and have bin/copy icon
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// handler for copy icon in search option // handler for copy icon in search option
$('.field_copy_icon').click(function() { $('.field_copy_icon').click(function() {
var name = $(this).data('btn-for'); var name = $(this).data('btn-for');