projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d4f613
)
jqnode member renamed just node, now that the old DOMElement node is gone
author
Mike Taylor
<mike@indexdata.com>
Thu, 15 May 2014 16:19:56 +0000
(17:19 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 15 May 2014 16:19:56 +0000
(17:19 +0100)
src/mkws-core.js
patch
|
blob
|
history
src/mkws-team.js
patch
|
blob
|
history
src/mkws-widget-authname.js
patch
|
blob
|
history
src/mkws-widget-builder.js
patch
|
blob
|
history
src/mkws-widget-categories.js
patch
|
blob
|
history
src/mkws-widget-log.js
patch
|
blob
|
history
src/mkws-widget-main.js
patch
|
blob
|
history
src/mkws-widget-termlists.js
patch
|
blob
|
history
src/mkws-widget.js
patch
|
blob
|
history
diff --git
a/src/mkws-core.js
b/src/mkws-core.js
index
75c196e
..
6341087
100644
(file)
--- a/
src/mkws-core.js
+++ b/
src/mkws-core.js
@@
-364,11
+364,11
@@
mkws.pagerNext = function(tname) {
var w1 = team.widget(t + "-Container-" + from);
var w2 = team.widget(t + "-Container-" + to);
if (w1) {
var w1 = team.widget(t + "-Container-" + from);
var w2 = team.widget(t + "-Container-" + to);
if (w1) {
- w1.jqnode.hide();
+ w1.node.hide();
}
if (w2) {
}
if (w2) {
- w2.jqnode.show();
- w.jqnode.appendTo(w2.jqnode);
+ w2.node.show();
+ w.node.appendTo(w2.node);
}
});
team.queue("resize-" + to).publish();
}
});
team.queue("resize-" + to).publish();
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
8d851a3
..
8523ec7
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-360,7
+360,7
@@
function team($, teamName) {
function widgetNode(type) {
var w = that.widget(type);
function widgetNode(type) {
var w = that.widget(type);
- return w ? w.jqnode : undefined;
+ return w ? w.node : undefined;
}
function renderDetails(data, marker) {
}
function renderDetails(data, marker) {
diff --git
a/src/mkws-widget-authname.js
b/src/mkws-widget-authname.js
index
abca07e
..
b1e0b1f
100644
(file)
--- a/
src/mkws-widget-authname.js
+++ b/
src/mkws-widget-authname.js
@@
-2,6
+2,6
@@
mkws.registerWidgetType('Authname', function() {
var that = this;
this.team.queue("authenticated").subscribe(function(authName) {
var that = this;
this.team.queue("authenticated").subscribe(function(authName) {
- that.jqnode.html(authName);
+ that.node.html(authName);
});
});
});
});
diff --git
a/src/mkws-widget-builder.js
b/src/mkws-widget-builder.js
index
1d5ea8d
..
60ee37b
100644
(file)
--- a/
src/mkws-widget-builder.js
+++ b/
src/mkws-widget-builder.js
@@
-6,7
+6,7
@@
mkws.registerWidgetType('Builder', function() {
type: 'button',
text: this.config.text || "Build!"
});
type: 'button',
text: this.config.text || "Build!"
});
- this.jqnode.append(this.button);
+ this.node.append(this.button);
this.button.click(function() {
var query = team.widget('Query').value();
var sort = team.widget('Sort').value();
this.button.click(function() {
var query = team.widget('Query').value();
var sort = team.widget('Sort').value();
diff --git
a/src/mkws-widget-categories.js
b/src/mkws-widget-categories.js
index
bec99f5
..
a11e522
100644
(file)
--- a/
src/mkws-widget-categories.js
+++ b/
src/mkws-widget-categories.js
@@
-29,7
+29,7
@@
mkws.registerWidgetType('Categories', function() {
text.push("<option value='", id, "'>", name, "</option>");
});
text.push("</select>");
text.push("<option value='", id, "'>", name, "</option>");
});
text.push("</select>");
- that.jqnode.html(text.join(''));
+ that.node.html(text.join(''));
});
});
});
});
});
});
diff --git
a/src/mkws-widget-log.js
b/src/mkws-widget-log.js
index
6f3947f
..
4ea6cd8
100644
(file)
--- a/
src/mkws-widget-log.js
+++ b/
src/mkws-widget-log.js
@@
-2,6
+2,6
@@
mkws.registerWidgetType('Log', function() {
var that = this;
this.team.queue("log").subscribe(function(teamName, timestamp, message) {
var that = this;
this.team.queue("log").subscribe(function(teamName, timestamp, message) {
- that.jqnode.append(teamName + ": " + timestamp + message + "<br/>");
+ that.node.append(teamName + ": " + timestamp + message + "<br/>");
});
});
});
});
diff --git
a/src/mkws-widget-main.js
b/src/mkws-widget-main.js
index
8cfad61
..
161f61f
100644
(file)
--- a/
src/mkws-widget-main.js
+++ b/
src/mkws-widget-main.js
@@
-8,8
+8,8
@@
mkws.registerWidgetType('Targets', function() {
var that = this;
var M = mkws.M;
var that = this;
var M = mkws.M;
- this.jqnode.html('No information available yet.');
- this.jqnode.css("display", "none");
+ this.node.html('No information available yet.');
+ this.node.css("display", "none");
this.team.queue("targets").subscribe(function(data) {
var table ='<table><thead><tr>' +
this.team.queue("targets").subscribe(function(data) {
var table ='<table><thead><tr>' +
@@
-29,7
+29,7
@@
mkws.registerWidgetType('Targets', function() {
}
table += '</tbody></table>';
}
table += '</tbody></table>';
- that.jqnode.html(table);
+ that.node.html(table);
});
});
});
});
@@
-39,7
+39,7
@@
mkws.registerWidgetType('Stat', function() {
var M = mkws.M;
this.team.queue("stat").subscribe(function(data) {
var M = mkws.M;
this.team.queue("stat").subscribe(function(data) {
- that.jqnode.html(' -- ' +
+ that.node.html(' -- ' +
'<span class="mkwsClientCount">' + M('Active clients') + ': ' + data.activeclients + '/' + data.clients + '</span>' +
' -- ' +
M('Retrieved records') + ': ' + data.records + '/' + data.hits);
'<span class="mkwsClientCount">' + M('Active clients') + ': ' + data.activeclients + '/' + data.clients + '</span>' +
' -- ' +
M('Retrieved records') + ': ' + data.records + '/' + data.hits);
@@
-52,7
+52,7
@@
mkws.registerWidgetType('Pager', function() {
var M = mkws.M;
this.team.queue("pager").subscribe(function(data) {
var M = mkws.M;
this.team.queue("pager").subscribe(function(data) {
- that.jqnode.html(drawPager(data))
+ that.node.html(drawPager(data))
function drawPager(data) {
var teamName = that.team.name();
function drawPager(data) {
var teamName = that.team.name();
@@
-130,7
+130,7
@@
mkws.registerWidgetType('Records', function() {
html.push(team.renderDetails(team.currentRecordData()));
}
}
html.push(team.renderDetails(team.currentRecordData()));
}
}
- that.jqnode.html(html.join(''));
+ that.node.html(html.join(''));
function renderSummary(hit) {
var template = team.loadTemplate(that.config.template || "Summary");
function renderSummary(hit) {
var template = team.loadTemplate(that.config.template || "Summary");
@@
-166,7
+166,7
@@
mkws.registerWidgetType('Navi', function() {
');return false;">' + value + '</a>';
});
');return false;">' + value + '</a>';
});
- that.jqnode.html(text);
+ that.node.html(text);
});
});
});
});
@@
-177,8
+177,8
@@
mkws.registerWidgetType('Navi', function() {
mkws.registerWidgetType('Sort', function() {
var that = this;
mkws.registerWidgetType('Sort', function() {
var that = this;
- this.jqnode.change(function() {
- that.team.set_sortOrder(that.jqnode.val());
+ this.node.change(function() {
+ that.team.set_sortOrder(that.node.val());
if (that.team.submitted()) {
that.team.reShow();
}
if (that.team.submitted()) {
that.team.reShow();
}
@@
-190,8
+190,8
@@
mkws.registerWidgetType('Sort', function() {
mkws.registerWidgetType('Perpage', function() {
var that = this;
mkws.registerWidgetType('Perpage', function() {
var that = this;
- this.jqnode.change(function() {
- that.team.set_perpage(that.jqnode.val());
+ this.node.change(function() {
+ that.team.set_perpage(that.node.val());
if (that.team.submitted()) {
that.team.reShow();
}
if (that.team.submitted()) {
that.team.reShow();
}
@@
-204,7
+204,7
@@
mkws.registerWidgetType('Done', function() {
var that = this;
this.team.queue("complete").subscribe(function(n) {
var that = this;
this.team.queue("complete").subscribe(function(n) {
- that.jqnode.html("Search complete: found " + n + " records");
+ that.node.html("Search complete: found " + n + " records");
});
});
});
});
@@
-212,7
+212,7
@@
mkws.registerWidgetType('Done', function() {
mkws.registerWidgetType('Switch', function() {
if (!this.config.show_switch) return;
var tname = this.team.name();
mkws.registerWidgetType('Switch', function() {
if (!this.config.show_switch) return;
var tname = this.team.name();
- this.jqnode.html('\
+ this.node.html('\
<a href="#" onclick="mkws.switchView(\'' + tname + '\', \'records\')">Records</a><span> \
| \
</span><a href="#" onclick="mkws.switchView(\'' + tname + '\', \'targets\')">Targets</a>');
<a href="#" onclick="mkws.switchView(\'' + tname + '\', \'records\')">Records</a><span> \
| \
</span><a href="#" onclick="mkws.switchView(\'' + tname + '\', \'targets\')">Targets</a>');
@@
-224,7
+224,7
@@
mkws.registerWidgetType('Search', function() {
var tname = this.team.name();
var M = mkws.M;
var tname = this.team.name();
var M = mkws.M;
- this.jqnode.html('\
+ this.node.html('\
<form name="mkwsSearchForm" class="mkwsSearchForm mkwsTeam_' + tname + '" action="" >\
<input class="mkwsQuery mkwsTeam_' + tname + '" type="text" size="' + this.config.query_width + '" />\
<input class="mkwsButton mkwsTeam_' + tname + '" type="submit" value="' + M('Search') + '" />\
<form name="mkwsSearchForm" class="mkwsSearchForm mkwsTeam_' + tname + '" action="" >\
<input class="mkwsQuery mkwsTeam_' + tname + '" type="text" size="' + this.config.query_width + '" />\
<input class="mkwsButton mkwsTeam_' + tname + '" type="submit" value="' + M('Search') + '" />\
@@
-234,7
+234,7
@@
mkws.registerWidgetType('Search', function() {
mkws.registerWidgetType('SearchForm', function() {
var team = this.team;
mkws.registerWidgetType('SearchForm', function() {
var team = this.team;
- this.jqnode.submit(function() {
+ this.node.submit(function() {
var val = team.widget('Query').value();
team.newSearch(val);
return false;
var val = team.widget('Query').value();
team.newSearch(val);
return false;
@@
-245,7
+245,7
@@
mkws.registerWidgetType('SearchForm', function() {
mkws.registerWidgetType('Results', function() {
var tname = this.team.name();
mkws.registerWidgetType('Results', function() {
var tname = this.team.name();
- this.jqnode.html('\
+ this.node.html('\
<table width="100%" border="0" cellpadding="6" cellspacing="0">\
<tr>\
<td class="mkwsTermlists-Container-wide mkwsTeam_' + tname + '" width="250" valign="top">\
<table width="100%" border="0" cellpadding="6" cellspacing="0">\
<tr>\
<td class="mkwsTermlists-Container-wide mkwsTeam_' + tname + '" width="250" valign="top">\
@@
-283,7
+283,7
@@
mkws.registerWidgetType('Ranking', function() {
}
s += '</form>';
}
s += '</form>';
- this.jqnode.html(s);
+ this.node.html(s);
function mkwsHtmlSort() {
function mkwsHtmlSort() {
@@
-371,7
+371,7
@@
mkws.registerWidgetType('Lang', function() {
}
}
}
}
- this.jqnode.html(data);
+ this.node.html(data);
widget.hideWhenNarrow(this);
widget.hideWhenNarrow(this);
@@
-400,7
+400,7
@@
mkws.registerWidgetType('MOTD', function() {
var container = this.team.widget('MOTDContainer');
if (container) {
// Move the MOTD from the provided element down into the container
var container = this.team.widget('MOTDContainer');
if (container) {
// Move the MOTD from the provided element down into the container
- this.jqnode.appendTo(container.jqnode);
+ this.node.appendTo(container.node);
}
});
}
});
diff --git
a/src/mkws-widget-termlists.js
b/src/mkws-widget-termlists.js
index
776ef5b
..
addfd94
100644
(file)
--- a/
src/mkws-widget-termlists.js
+++ b/
src/mkws-widget-termlists.js
@@
-3,10
+3,10
@@
mkws.registerWidgetType('Termlists', function() {
// Initially hide the termlists; display when we get results
mkws.$(document).ready(function() {
// Initially hide the termlists; display when we get results
mkws.$(document).ready(function() {
- that.jqnode.hide();
+ that.node.hide();
});
this.team.queue("termlists").subscribe(function(data) {
});
this.team.queue("termlists").subscribe(function(data) {
- that.jqnode.show();
+ that.node.show();
});
var acc = [];
});
var acc = [];
@@
-15,7
+15,7
@@
mkws.registerWidgetType('Termlists', function() {
for (var i = 0; i < facets.length; i++) {
acc.push('<div class="mkwsFacet mkwsTeam_', this.team.name(), '" data-mkws-facet="', facets[i], '">', '</div>');
}
for (var i = 0; i < facets.length; i++) {
acc.push('<div class="mkwsFacet mkwsTeam_', this.team.name(), '" data-mkws-facet="', facets[i], '">', '</div>');
}
- this.jqnode.html(acc.join(''));
+ this.node.html(acc.join(''));
widget.autosearch(this);
});
widget.autosearch(this);
});
@@
-63,6
+63,6
@@
mkws.registerWidgetType('Facet', function() {
acc.push('</div>');
}
acc.push('</div>');
}
- that.jqnode.html(acc.join(''));
+ that.node.html(acc.join(''));
});
});
});
});
diff --git
a/src/mkws-widget.js
b/src/mkws-widget.js
index
b506e62
..
a0a5795
100644
(file)
--- a/
src/mkws-widget.js
+++ b/
src/mkws-widget.js
@@
-9,7
+9,7
@@
function widget($, team, type, node) {
var that = {
team: team,
type: type,
var that = {
team: team,
type: type,
- jqnode: $(node),
+ node: $(node),
config: mkws.objectInheritingFrom(team.config())
};
config: mkws.objectInheritingFrom(team.config())
};
@@
-121,10
+121,10
@@
widget.autosearch = function(widget) {
// Utility function for all widgets that want to hide in narrow windows
widget.hideWhenNarrow = function(widget) {
widget.team.queue("resize-narrow").subscribe(function(n) {
// Utility function for all widgets that want to hide in narrow windows
widget.hideWhenNarrow = function(widget) {
widget.team.queue("resize-narrow").subscribe(function(n) {
- widget.jqnode.hide();
+ widget.node.hide();
});
widget.team.queue("resize-wide").subscribe(function(n) {
});
widget.team.queue("resize-wide").subscribe(function(n) {
- widget.jqnode.show();
+ widget.node.show();
});
};
});
};