Permalink
Browse files

This takes the end of the href after the underscore on the Left Pane,…

… Tab Strip in Model admin. Just in case the label text in the link is not the same as the managed DataObject.
  • Loading branch information...
1 parent 3e3f795 commit 129851049b850b21167266ae218fe44a002863dc @jamesbolitho committed Jun 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascript/jquery.dataobjectaspageadmin.js
@@ -1,8 +1,8 @@
(function($) {
$(document).ready(function() {
var doList = function() {
- var currentModel = $('#ModelClassSelector').children('select');
- var currentModelName = $('#SearchForm_holder .tabstrip a').text();
+ var currentModel = $('#SearchForm_holder .tabstrip a').attr('href');
+ var currentModelName = currentModel.substr(currentModel.indexOf("_") + 1);
var strFormname = "#Form_SearchForm_" + currentModelName;
$(strFormname).submit();
return false;

0 comments on commit 1298510

Please sign in to comment.