Permalink
Browse files

Fixing js for list view load and adding a template

  • Loading branch information...
1 parent b92aab7 commit 60afb486f316b20711ad8c770ffb89f920ee01e1 Marcus Dalgren committed Feb 20, 2012
Showing with 8 additions and 11 deletions.
  1. +8 −11 javascript/jquery.dataobjectaspageadmin.js
@@ -1,19 +1,17 @@
-
-
(function($) {
$(document).ready(function() {
- var doList = function() {
- var currentModel = $('#ModelClassSelector').children('select');
- var currentModelName = $('option:selected', currentModel).val();
- var strFormname = "#Form_SearchForm" + currentModelName.replace('Form','');
- $(strFormname).submit();
- return false;
- }
+ var doList = function() {
+ var currentModel = $('#ModelClassSelector').children('select');
+ var currentModelName = $('#SearchForm_holder .tabstrip a').text();
+ var strFormname = "#Form_SearchForm_" + currentModelName;
+ $(strFormname).submit();
+ return false;
+ }
$('#ModelClassSelector').live("change",doList);
$('#list_view').live("click",doList);
if($('#list_view_loading').length) {
- doList();
+ doList();
}
$('button[name=action_clearsearch]').click(doList);
@@ -48,5 +46,4 @@ $(document).ready(function() {
});
});
-
})(jQuery);

0 comments on commit 60afb48

Please sign in to comment.