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:
d7f7e11
)
Fix case and spelling of widget-type names
author
Mike Taylor
<mike@indexdata.com>
Mon, 20 Oct 2014 11:27:36 +0000
(12:27 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Mon, 20 Oct 2014 11:27:36 +0000
(12:27 +0100)
src/mkws-popup.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-record.js
patch
|
blob
|
history
src/mkws-widget-reference.js
patch
|
blob
|
history
src/mkws-widget-termlists.js
patch
|
blob
|
history
diff --git
a/src/mkws-popup.js
b/src/mkws-popup.js
index
7496a07
..
97156c0
100644
(file)
--- a/
src/mkws-popup.js
+++ b/
src/mkws-popup.js
@@
-4,7
+4,7
@@
//"use strict";
// $(document).ready(function () {
//"use strict";
// $(document).ready(function () {
-mkws.registerWidgetType('Popup', function() {
+mkws.registerWidgetType('popup', function() {
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
var $ = mkws.$;
var debug = mkws.log;
debug("init popup window");
diff --git
a/src/mkws-widget-authname.js
b/src/mkws-widget-authname.js
index
b1e0b1f
..
b96dad2
100644
(file)
--- a/
src/mkws-widget-authname.js
+++ b/
src/mkws-widget-authname.js
@@
-1,4
+1,4
@@
-mkws.registerWidgetType('Authname', function() {
+mkws.registerWidgetType('auth-name', function() {
var that = this;
this.team.queue("authenticated").subscribe(function(authName) {
var that = this;
this.team.queue("authenticated").subscribe(function(authName) {
diff --git
a/src/mkws-widget-builder.js
b/src/mkws-widget-builder.js
index
6468e86
..
aae9a81
100644
(file)
--- a/
src/mkws-widget-builder.js
+++ b/
src/mkws-widget-builder.js
@@
-1,4
+1,4
@@
-mkws.registerWidgetType('Builder', function() {
+mkws.registerWidgetType('builder', function() {
var that = this;
var team = this.team;
var that = this;
var team = this.team;
@@
-8,9
+8,9
@@
mkws.registerWidgetType('Builder', function() {
});
this.node.append(button);
button.click(function() {
});
this.node.append(button);
button.click(function() {
- var query = team.widget('Query').value();
- var sort = team.widget('Sort').value();
- var perpage = team.widget('Perpage').value();
+ var query = team.widget('query').value();
+ var sort = team.widget('sort').value();
+ var perpage = team.widget('per-page').value();
var html = ('<div class="mkwsRecords" ' +
'autosearch="' + query + '" ' +
var html = ('<div class="mkwsRecords" ' +
'autosearch="' + query + '" ' +
@@
-21,8
+21,8
@@
mkws.registerWidgetType('Builder', function() {
});
});
});
});
-mkws.registerWidgetType('ConsoleBuilder', function() {
- mkws.promotionFunction('Builder').call(this);
+mkws.registerWidgetType('console-builder', function() {
+ mkws.promotionFunction('builder').call(this);
this.callback = function(s) {
console.log("generated widget: " + s);
}
this.callback = function(s) {
console.log("generated widget: " + s);
}
diff --git
a/src/mkws-widget-categories.js
b/src/mkws-widget-categories.js
index
6982db8
..
90df81e
100644
(file)
--- a/
src/mkws-widget-categories.js
+++ b/
src/mkws-widget-categories.js
@@
-1,4
+1,4
@@
-mkws.registerWidgetType('Categories', function() {
+mkws.registerWidgetType('categories', function() {
var that = this;
if (!mkws.authenticated) {
var that = this;
if (!mkws.authenticated) {
diff --git
a/src/mkws-widget-log.js
b/src/mkws-widget-log.js
index
4ea6cd8
..
b520e35
100644
(file)
--- a/
src/mkws-widget-log.js
+++ b/
src/mkws-widget-log.js
@@
-1,4
+1,4
@@
-mkws.registerWidgetType('Log', function() {
+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) {
diff --git
a/src/mkws-widget-main.js
b/src/mkws-widget-main.js
index
e01675f
..
ef4b3c7
100644
(file)
--- a/
src/mkws-widget-main.js
+++ b/
src/mkws-widget-main.js
@@
-5,7
+5,7
@@
// source files.
// source files.
-mkws.registerWidgetType('Targets', function() {
+mkws.registerWidgetType('targets', function() {
if (!this.config.show_switch) return;
var that = this;
if (!this.config.show_switch) return;
var that = this;
@@
-33,7
+33,7
@@
mkws.registerWidgetType('Targets', function() {
});
});
-mkws.registerWidgetType('Stat', function() {
+mkws.registerWidgetType('stat', function() {
var that = this;
this.team.queue("stat").subscribe(function(data) {
var template = that.team.loadTemplate(that.config.template || "Stat");
var that = this;
this.team.queue("stat").subscribe(function(data) {
var template = that.team.loadTemplate(that.config.template || "Stat");
@@
-42,7
+42,7
@@
mkws.registerWidgetType('Stat', function() {
});
});
-mkws.registerWidgetType('Pager', function() {
+mkws.registerWidgetType('pager', function() {
var that = this;
var M = mkws.M;
var that = this;
var M = mkws.M;
@@
-88,7
+88,7
@@
mkws.registerWidgetType('Pager', function() {
});
});
});
});
-mkws.registerWidgetType('Details', function() {
+mkws.registerWidgetType('details', function() {
var that = this;
var recid = that.node.attr("data-mkws-recid");
if (this.team.gotRecords()) {
var that = this;
var recid = that.node.attr("data-mkws-recid");
if (this.team.gotRecords()) {
@@
-108,7
+108,7
@@
mkws.registerWidgetType('Details', function() {
that.autosearch();
});
that.autosearch();
});
-mkws.registerWidgetType('Records', function() {
+mkws.registerWidgetType('records', function() {
var that = this;
var team = this.team;
var that = this;
var team = this.team;
@@
-138,7
+138,7
@@
mkws.registerWidgetType('Records', function() {
});
});
-mkws.registerWidgetType('Navi', function() {
+mkws.registerWidgetType('navi', function() {
var that = this;
var teamName = this.team.name();
var that = this;
var teamName = this.team.name();
@@
-171,7
+171,7
@@
mkws.registerWidgetType('Navi', function() {
// It seems this and the Perpage widget doen't need to subscribe to
// anything, since they produce events rather than consuming them.
//
// It seems this and the Perpage widget doen't need to subscribe to
// anything, since they produce events rather than consuming them.
//
-mkws.registerWidgetType('Sort', function() {
+mkws.registerWidgetType('sort', function() {
var that = this;
this.node.change(function() {
var that = this;
this.node.change(function() {
@@
-184,7
+184,7
@@
mkws.registerWidgetType('Sort', function() {
});
});
-mkws.registerWidgetType('Perpage', function() {
+mkws.registerWidgetType('per-page', function() {
var that = this;
this.node.change(function() {
var that = this;
this.node.change(function() {
@@
-197,7
+197,7
@@
mkws.registerWidgetType('Perpage', function() {
});
});
-mkws.registerWidgetType('Done', function() {
+mkws.registerWidgetType('done', function() {
var that = this;
this.team.queue("complete").subscribe(function(n) {
var template = that.team.loadTemplate(that.config.template || "Done");
var that = this;
this.team.queue("complete").subscribe(function(n) {
var template = that.team.loadTemplate(that.config.template || "Done");
@@
-206,7
+206,7
@@
mkws.registerWidgetType('Done', function() {
});
});
-mkws.registerWidgetType('Switch', function() {
+mkws.registerWidgetType('switch', function() {
if (!this.config.show_switch) return;
var tname = this.team.name();
var output = {};
if (!this.config.show_switch) return;
var tname = this.team.name();
var output = {};
@@
-218,7
+218,7
@@
mkws.registerWidgetType('Switch', function() {
});
});
-mkws.registerWidgetType('Search', function() {
+mkws.registerWidgetType('search', function() {
var output = {};
output.team = this.team.name();
output.queryWidth = this.config.query_width;
var output = {};
output.team = this.team.name();
output.queryWidth = this.config.query_width;
@@
-227,24
+227,24
@@
mkws.registerWidgetType('Search', function() {
});
});
-mkws.registerWidgetType('SearchForm', function() {
+mkws.registerWidgetType('search-form', function() {
var team = this.team;
this.node.submit(function() {
var team = this.team;
this.node.submit(function() {
- var val = team.widget('Query').value();
+ var val = team.widget('query').value();
team.newSearch(val);
return false;
});
});
team.newSearch(val);
return false;
});
});
-mkws.registerWidgetType('Results', function() {
+mkws.registerWidgetType('results', function() {
var template = this.team.loadTemplate(this.config.template || "Results");
this.node.html(template({team: this.team.name()}));
this.autosearch();
});
var template = this.team.loadTemplate(this.config.template || "Results");
this.node.html(template({team: this.team.name()}));
this.autosearch();
});
-mkws.registerWidgetType('Ranking', function() {
+mkws.registerWidgetType('ranking', function() {
var output = {};
output.perPage = [];
output.sort = [];
var output = {};
output.perPage = [];
output.sort = [];
@@
-277,7
+277,7
@@
mkws.registerWidgetType('Ranking', function() {
});
});
-mkws.registerWidgetType('Lang', function() {
+mkws.registerWidgetType('lang', function() {
// dynamic URL or static page? /path/foo?query=test
/* create locale language menu */
if (!this.config.show_lang) return;
// dynamic URL or static page? /path/foo?query=test
/* create locale language menu */
if (!this.config.show_lang) return;
@@
-339,8
+339,8
@@
mkws.registerWidgetType('Lang', function() {
});
});
-mkws.registerWidgetType('MOTD', function() {
- var container = this.team.widget('MOTDContainer');
+mkws.registerWidgetType('motd', function() {
+ var container = this.team.widget('motd-container');
if (container) {
// Move the MOTD from the provided element down into the container
this.node.appendTo(container.node);
if (container) {
// Move the MOTD from the provided element down into the container
this.node.appendTo(container.node);
@@
-352,7
+352,7
@@
mkws.registerWidgetType('MOTD', function() {
// is copied up into its team, allowing it to affect other widgets in
// the team.
//
// is copied up into its team, allowing it to affect other widgets in
// the team.
//
-mkws.registerWidgetType('Config', function() {
+mkws.registerWidgetType('config', function() {
var c = this.config;
for (var name in c) {
if (c.hasOwnProperty(name)) {
var c = this.config;
for (var name in c) {
if (c.hasOwnProperty(name)) {
@@
-363,7
+363,7
@@
mkws.registerWidgetType('Config', function() {
});
});
-mkws.registerWidgetType('Progress', function() {
+mkws.registerWidgetType('progress', function() {
var that = this;
this.node.hide();
this.team.queue("stat").subscribe(function(data) {
var that = this;
this.node.hide();
this.team.queue("stat").subscribe(function(data) {
@@
-382,9
+382,9
@@
mkws.registerWidgetType('Progress', function() {
// no actual functionality. We register these to prevent ignorable
// warnings when they occur.
// no actual functionality. We register these to prevent ignorable
// warnings when they occur.
-mkws.registerWidgetType('Query', function() {});
-mkws.registerWidgetType('MOTDContainer', function() {});
-mkws.registerWidgetType('Button', function() {});
+mkws.registerWidgetType('query', function() {});
+mkws.registerWidgetType('motd-container', function() {});
+mkws.registerWidgetType('button', function() {});
})(mkws.$); // jQuery wrapper
})(mkws.$); // jQuery wrapper
diff --git
a/src/mkws-widget-record.js
b/src/mkws-widget-record.js
index
6623842
..
6ee1547
100644
(file)
--- a/
src/mkws-widget-record.js
+++ b/
src/mkws-widget-record.js
@@
-1,5
+1,5
@@
// A widget for one record
// A widget for one record
-mkws.registerWidgetType('Record', function() {
+mkws.registerWidgetType('record', function() {
if (!this.config.maxrecs) this.config.maxrecs = 1;
var that = this;
var team = this.team;
if (!this.config.maxrecs) this.config.maxrecs = 1;
var that = this;
var team = this.team;
@@
-11,22
+11,22
@@
mkws.registerWidgetType('Record', function() {
that.autosearch();
});
that.autosearch();
});
-mkws.registerWidgetType('Image', function() {
- mkws.promotionFunction('Records').call(this);
+mkws.registerWidgetType('image', function() {
+ 1mkws.promotionFunction('records').call(this);
if (!this.config.template) this.config.template = 'Image';
});
if (!this.config.template) this.config.template = 'Image';
});
-mkws.registerWidgetType('GoogleImage', function() {
- mkws.promotionFunction('Image').call(this);
+mkws.registerWidgetType('google-image', function() {
+ mkws.promotionFunction('image').call(this);
if (!this.config.target) this.config.target = 'Google_Images';
});
if (!this.config.target) this.config.target = 'Google_Images';
});
-mkws.registerWidgetType('Lolcat', function() {
- mkws.promotionFunction('GoogleImage').call(this);
+mkws.registerWidgetType('lolcat', function() {
+ mkws.promotionFunction('google-image').call(this);
if (!this.config.autosearch) this.config.autosearch = 'kitteh';
});
if (!this.config.autosearch) this.config.autosearch = 'kitteh';
});
-mkws.registerWidgetType('Coverart', function() {
- mkws.promotionFunction('Image').call(this);
+mkws.registerWidgetType('cover-art', function() {
+ mkws.promotionFunction('image').call(this);
if (!this.config.target) this.config.target = 'AmazonBooks';
});
if (!this.config.target) this.config.target = 'AmazonBooks';
});
diff --git
a/src/mkws-widget-reference.js
b/src/mkws-widget-reference.js
index
c8d41be
..
2993a60
100644
(file)
--- a/
src/mkws-widget-reference.js
+++ b/
src/mkws-widget-reference.js
@@
-1,5
+1,5
@@
-mkws.registerWidgetType('Reference', function() {
- mkws.promotionFunction('Record').call(this);
+mkws.registerWidgetType('reference', function() {
+ mkws.promotionFunction('record').call(this);
if (!this.config.target) this.config.target = 'wikimedia_wikipedia_single_result';
if (!this.config.template) this.config.template = 'Reference';
this.config.template_vars.paragraphs = this.config.paragraphs || 0;
if (!this.config.target) this.config.target = 'wikimedia_wikipedia_single_result';
if (!this.config.template) this.config.template = 'Reference';
this.config.template_vars.paragraphs = this.config.paragraphs || 0;
diff --git
a/src/mkws-widget-termlists.js
b/src/mkws-widget-termlists.js
index
4052251
..
2e684f6
100644
(file)
--- a/
src/mkws-widget-termlists.js
+++ b/
src/mkws-widget-termlists.js
@@
-1,4
+1,4
@@
-mkws.registerWidgetType('Termlists', function() {
+mkws.registerWidgetType('termlists', function() {
// Initially hide the termlists; display when we get results
var that = this;
var team = this.team;
// Initially hide the termlists; display when we get results
var that = this;
var team = this.team;
@@
-15,7
+15,7
@@
mkws.registerWidgetType('Termlists', function() {
});
});
-mkws.registerWidgetType('Facet', function() {
+mkws.registerWidgetType('facet', function() {
var facetConfig = {
xtargets: [ "Sources", 16, false ],
subject: [ "Subjects", 10, true ],
var facetConfig = {
xtargets: [ "Sources", 16, false ],
subject: [ "Subjects", 10, true ],