diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 38ef6543..52b3af84 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -24,11 +24,6 @@ $(document).ready(function() { (event.type == 'mouseover')? $(this).addClass('ui-state-hover') : $(this).removeClass('ui-state-hover'); }); - /** - * We don't want our checkboxes viewable initially - */ - $('.views').hide(); - /** * Handling the viewing and hiding of our item checkboxes */ diff --git a/public/javascripts/hover_dialog.js b/public/javascripts/hover_dialog.js index 09434060..64ddc3a7 100644 --- a/public/javascripts/hover_dialog.js +++ b/public/javascripts/hover_dialog.js @@ -2,21 +2,20 @@ $(document).ready(function() { // Create acessors for our hover dialog - var $formAction = $('form').attr('action'), - formIdArray = $('form').attr('id').split('_'); + var formIdArray = $('form').attr('id').split('_'); resourceSingular = formIdArray[1], resourcePlural = resourceSingular.pluralize(), $tagInput = $('input#'+ resourceSingular + '_tag_list'), $tagInputWrapper = $('li#'+ resourceSingular + '_tag_list_input'), $hoverDialog = $("
") - .addClass('hover ui-widget ui-widget-content ui-corner-all') - .insertAfter($tagInput) - .hide(); + .addClass('hover ui-widget ui-widget-content ui-corner-all') + .insertAfter($tagInput) + .hide(); $tagInput.keyup(function() { - $url = '/' + resourcePlural + "/tags.json"; + var url = '/' + resourcePlural + "/tags.json"; $.ajax({ - url: $url, + url: url, data: $tagInput.serialize(), dataType: 'json', type: 'GET', @@ -51,7 +50,7 @@ $(document).ready(function() { // if there are no more tags we should hide the dialog panel // @todo cleanup as this could be done cleaner - if ($hoverDialog.html() == (' ' || ' ') ) { + if ($hoverDialog.html().trim() == '') { $hoverDialog.fadeOut(); } return false;