From b3a501b8dad71d57b09e3826dcabb1972f9ca36e Mon Sep 17 00:00:00 2001 From: Adam Young Date: Tue, 28 Sep 2010 08:20:16 -0400 Subject: Fix the 'add' button THe Add button was located using the DOm, and the scheme used to find it was fragile enough to be broken by the I18N approach. This is a little more robust, using a JQuery selector based on the class of the controls, and the entity name. Also remove Makefile, which should be autogenerated --- install/static/entity.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'install/static/entity.js') diff --git a/install/static/entity.js b/install/static/entity.js index 79027526..7fb19fc7 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -75,9 +75,13 @@ function ipa_entity_setup(jobj) function setup_search_facet() { var filter = $.bbq.getState(obj_name + '-filter', true); search_create(obj_name, ipa_entity_search_list[obj_name], jobj); - var input = jobj.find('input[value=find]'); - input.after(''); - input.next().click(new_on_click); + + $('',{ + type:"submit", + value: ipa_messages.button.add, + click:new_on_click + }).appendTo($( "div#" + obj_name + " > div.search-controls")); + if (typeof filter != 'undefined') search_load(obj_name, filter, null, null); }; -- cgit