Permalink
Browse files

Removed dependency on button() from pager plug-in.

  • Loading branch information...
1 parent b5e434a commit 29310ab30dd1b7d4f29b158d51c579f24cdd5635 Brad Olenick committed Mar 9, 2011
Showing with 4 additions and 5 deletions.
  1. +0 −1 grid-datamodel2/DataSourceSample.html
  2. +4 −4 grid-datamodel2/jquery.pager.js
@@ -10,7 +10,6 @@
<script src="jquery.tmplPlus.js"></script>
<script src="../ui/jquery.ui.core.js"></script>
<script src="../ui/jquery.ui.widget.js"></script>
- <script src="../ui/jquery.ui.button.js"></script>
<script src="grid.js"></script>
<script src="jquery.datalink2.js"></script>
<script src="jquery.datasource.js"></script>
@@ -17,8 +17,8 @@
var pageNumber;
var pageCount;
- var pageUpButton = $("<input type='button'/>").button({ label: "Page Up" }).click(function () { setPage(pageNumber - 1, true); });
- var pageDownButton = $("<input type='button'/>").button({ label: "Page Down" }).click(function () { setPage(pageNumber + 1, true); });
+ var pageUpButton = $("<input type='button' value='Page Up'/>").click(function () { setPage(pageNumber - 1, true); });
+ var pageDownButton = $("<input type='button' value='Page Down'/>").click(function () { setPage(pageNumber + 1, true); });
$(this).empty().append(pageUpButton).append(pageDownButton);
setPage(0, false); // Prime the data source with paging options. Initial enabling/disabling of paging buttons.
@@ -43,8 +43,8 @@
}
}
- pageUpButton.button("option", "disabled", pageCount === undefined || pageNumber === 0);
- pageDownButton.button("option", "disabled", pageCount === undefined || pageNumber >= pageCount - 1);
+ pageUpButton.attr("disabled", pageCount === undefined || pageNumber === 0 ? "disabled" : "");
+ pageDownButton.attr("disabled", pageCount === undefined || pageNumber >= pageCount - 1 ? "disabled" : "");
};
$(this).data("__pager__", {

0 comments on commit 29310ab

Please sign in to comment.