X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=355d8d765f92c5d89fc57fb69205b3ca18793d47;hb=refs%2Fheads%2Furlstate;hp=f1b13e02879078b4f6d346a238c520b367ebe944;hpb=a6921ecbf975ae32008c7b18f437d3f3b4773d6e;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index f1b13e0..355d8d7 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -73,19 +73,19 @@ mkws.registerWidgetType('pager', function() { if (firstClkbl > 1) output.morePrev = true; if (lastClkbl < pages) output.moreNext = true; - if (currentPage > 1) output.prevClick = "mkws.pagerPrev(\'" + teamName + "\');"; + if (currentPage > 1) output.prevHref = '#' + that.team.urlFragment({ page: currentPage-1 }); output.pages = []; for(var i = firstClkbl; i <= lastClkbl; i++) { var o = {}; o.number = i; if (i !== currentPage) { - o.click = "mkws.showPage(\'" + teamName + "\', " + i + ");"; + o.href = '#' + that.team.urlFragment({ page: i }); } output.pages.push(o); } - if (pages - currentPage > 0) output.nextClick = "mkws.pagerNext(\'" + teamName + "\')"; + if (pages - currentPage > 0) output.nextHref = '#' + that.team.urlFragment({ page: currentPage+1 }); var template = that.team.loadTemplate(that.config.template || "pager"); that.node.html(template(output)); @@ -121,6 +121,7 @@ mkws.registerWidgetType('records', function() { var m_dataToRedraw = null; function refreshRecordData() { + that.node.stop(); that.node.css('opacity', 1); if (m_dataToRedraw) { @@ -231,10 +232,7 @@ mkws.registerWidgetType('sort', function() { var that = this; this.node.change(function() { - that.team.set_sortOrder(that.node.val()); - if (that.team.submitted()) { - that.team.reShow(); - } + window.location.href = '#' + that.team.urlFragment({ sort: that.node.val() }); return false; }); }); @@ -244,10 +242,7 @@ mkws.registerWidgetType('per-page', function() { var that = this; this.node.change(function() { - that.team.set_perpage(that.node.val()); - if (that.team.submitted()) { - that.team.reShow(); - } + window.location.href = '#' + that.team.urlFragment({ size: that.node.val() }); return false; }); });