Created
October 14, 2011 17:29
-
-
Save mikewaters/1287749 to your computer and use it in GitHub Desktop.
Add a submit button to Flexigrid quicksearch bar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** flexigrid.js.orig 2011-10-14 13:25:31.162849505 -0400 | |
--- flexigrid.js 2011-10-14 13:24:35.582840402 -0400 | |
*************** | |
*** 1034,1040 **** | |
} | |
$(g.sDiv).append("<div class='sDiv2'>" + p.findtext + | |
" <input type='text' value='" + p.query +"' size='30' name='q' class='qsbox' /> "+ | |
! " <select name='qtype'>" + sopt + "</select></div>"); | |
//Split into separate selectors because of bug in jQuery 1.3.2 | |
$('input[name=q]', g.sDiv).keydown(function (e) { | |
if (e.keyCode == 13) { | |
--- 1034,1040 ---- | |
} | |
$(g.sDiv).append("<div class='sDiv2'>" + p.findtext + | |
" <input type='text' value='" + p.query +"' size='30' name='q' class='qsbox' /> "+ | |
! " <select name='qtype'>" + sopt + "</select><input type='submit' id='grid-submit'></input></div>"); | |
//Split into separate selectors because of bug in jQuery 1.3.2 | |
$('input[name=q]', g.sDiv).keydown(function (e) { | |
if (e.keyCode == 13) { | |
*************** | |
*** 1051,1056 **** | |
--- 1051,1059 ---- | |
p.query = ''; | |
g.doSearch(); | |
}); | |
+ $('input#grid-submit', g.sDiv).click(function() { | |
+ g.doSearch(); | |
+ }); | |
$(g.bDiv).after(g.sDiv); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment