projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More use of widgetNode.
[mkws-moved-to-github.git]
/
src
/
mkws-widgets.js
diff --git
a/src/mkws-widgets.js
b/src/mkws-widgets.js
index
b5d1373
..
3901f67
100644
(file)
--- 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,
team: team,
type: type,
node: node,
- config: Object.create(team.config())
+ config: mkws.objectInheritingFrom(team.config())
};
function log(s) {
};
function log(s) {
@@
-181,24
+181,24
@@
mkws.registerWidgetType('Pager', function() {
? firstClkbl + 2*onsides
: pages;
? firstClkbl + 2*onsides
: pages;
- var prev = '<span class="mkwsPrev"><< ' + M('Prev') + '</span><b> | </b>';
+ var prev = '<span class="mkwsPrev"><< ' + M('Prev') + '</span> | ';
if (currentPage > 1)
prev = '<a href="#" class="mkwsPrev" onclick="mkws.pagerPrev(\'' + teamName + '\');">'
if (currentPage > 1)
prev = '<a href="#" class="mkwsPrev" onclick="mkws.pagerPrev(\'' + teamName + '\');">'
- +'<< ' + M('Prev') + '</a><b> | </b>';
+ +'<< ' + M('Prev') + '</a> | ';
var middle = '';
for(var i = firstClkbl; i <= lastClkbl; i++) {
var numLabel = i;
if(i == currentPage)
var middle = '';
for(var i = firstClkbl; i <= lastClkbl; i++) {
var numLabel = i;
if(i == currentPage)
- numLabel = '<b>' + i + '</b>';
+ numLabel = '<span class="mkwsSelected">' + i + '</span>';
middle += '<a href="#" onclick="mkws.showPage(\'' + teamName + '\', ' + i + ')"> '
+ numLabel + ' </a>';
}
middle += '<a href="#" onclick="mkws.showPage(\'' + teamName + '\', ' + i + ')"> '
+ numLabel + ' </a>';
}
- var next = '<b> | </b><span class="mkwsNext">' + M('Next') + ' >></span>';
+ var next = ' | <span class="mkwsNext">' + M('Next') + ' >></span>';
if (pages - currentPage > 0)
if (pages - currentPage > 0)
- next = '<b> | </b><a href="#" class="mkwsNext" onclick="mkws.pagerNext(\'' + teamName + '\')">'
+ next = ' | <a href="#" class="mkwsNext" onclick="mkws.pagerNext(\'' + teamName + '\')">'
+ M('Next') + ' >></a>';
var predots = '';
+ M('Next') + ' >></a>';
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()) {
$(this.node).change(function() {
that.team.set_sortOrder($(that.node).val());
if (that.team.submitted()) {
- that.team.resetPage();
that.team.reShow();
}
return false;
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()) {
$(this.node).change(function() {
that.team.set_perpage($(that.node).val());
if (that.team.submitted()) {
- that.team.resetPage();
that.team.reShow();
}
return false;
});
});
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");
+ });
+});