Skip to content
Browse files

JS cleanups

  • Loading branch information...
1 parent c5ba5ca commit 73b7b65fdcf21e610835d99d080188a22cc75068 @rmg committed Mar 5, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/assets/javascripts/magic_grid.js
View
7 lib/assets/javascripts/magic_grid.js
@@ -33,9 +33,8 @@ $(function () {
html("<em>Loading...</em>");
});
$(".magic_grid[data-remote=true]").on( "click", ".pagination a, .sorter a", function (e) {
- var $a = $(this),
- $grid = $a.closest(".magic_grid[data-remote=true]"),
- url = $a.attr('href');
+ var $grid = $(e.delegateTarget),
+ url = this.href;
$grid.trigger("magic_grid:loading");
$grid.load(url + ' #' + $grid.attr('id') + " > *");
return false;
@@ -79,6 +78,7 @@ $(function () {
$grid.load(url + ' #' + grid_id + ' > *', function () {
// Move the cursor back to where it was,
// less surprising that way.
+ // EXCEPT FOR IE, that is
current = $(input_id).setCursor(pos).val();
});
} else {
@@ -87,7 +87,6 @@ $(function () {
}
}, delay);
e.stopImmediatePropagation();
- //return (!!timer);
});
});
$(".magic_grid[data-listeners]").each( function () {

0 comments on commit 73b7b65

Please sign in to comment.
Something went wrong with that request. Please try again.