X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widgets.js;h=3901f6752b4cccdd0cdb8e1a1014b35a5b37bd3f;hb=1c0689d2f83bf0e1bcec6783a27536d8fe0203f9;hp=b5d137332312304dc8b2cd6a59357dc74bb66e12;hpb=7c7522c8959eda9e0484bd61c6c32b921fd6c6e0;p=mkws-moved-to-github.git
diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js
index b5d1373..3901f67 100644
--- a/src/mkws-widgets.js
+++ b/src/mkws-widgets.js
@@ -10,7 +10,7 @@ function widget($, team, type, node) {
team: team,
type: type,
node: node,
- config: Object.create(team.config())
+ config: mkws.objectInheritingFrom(team.config())
};
function log(s) {
@@ -181,24 +181,24 @@ mkws.registerWidgetType('Pager', function() {
? firstClkbl + 2*onsides
: pages;
- var prev = '<< ' + M('Prev') + ' | ';
+ var prev = '<< ' + M('Prev') + ' | ';
if (currentPage > 1)
prev = ''
- +'<< ' + M('Prev') + ' | ';
+ +'<< ' + M('Prev') + ' | ';
var middle = '';
for(var i = firstClkbl; i <= lastClkbl; i++) {
var numLabel = i;
if(i == currentPage)
- numLabel = '' + i + '';
+ numLabel = '' + i + '';
middle += ' '
+ numLabel + ' ';
}
- var next = ' | ' + M('Next') + ' >>';
+ var next = ' | ' + M('Next') + ' >>';
if (pages - currentPage > 0)
- next = ' | '
+ next = ' | '
+ M('Next') + ' >>';
var predots = '';
@@ -288,7 +288,6 @@ mkws.registerWidgetType('Sort', function() {
$(this.node).change(function() {
that.team.set_sortOrder($(that.node).val());
if (that.team.submitted()) {
- that.team.resetPage();
that.team.reShow();
}
return false;
@@ -302,9 +301,17 @@ mkws.registerWidgetType('Perpage', function() {
$(this.node).change(function() {
that.team.set_perpage($(that.node).val());
if (that.team.submitted()) {
- that.team.resetPage();
that.team.reShow();
}
return false;
});
});
+
+
+mkws.registerWidgetType('Done', function() {
+ var that = this;
+
+ this.team.queue("complete").subscribe(function(n) {
+ $(that.node).html("Search complete: found " + n + " records");
+ });
+});