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:
d31de88
)
Add mkws.aliasWidgetType() function.
author
Mike Taylor
<mike@indexdata.com>
Mon, 12 Jan 2015 16:46:49 +0000
(16:46 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Mon, 12 Jan 2015 16:46:49 +0000
(16:46 +0000)
Will be used for making "reference" work like "wikipedia".
src/mkws-core.js
patch
|
blob
|
history
diff --git
a/src/mkws-core.js
b/src/mkws-core.js
index
528ed94
..
327519a
100644
(file)
--- a/
src/mkws-core.js
+++ b/
src/mkws-core.js
@@
-159,6
+159,12
@@
mkws.registerWidgetType = function(name, fn) {
mkws.info("registered widget-type '" + name + "'");
};
+mkws.aliasWidgetType = function(newName, oldName) {
+ mkws.widgetType2function[newName] = mkws.widgetType2function[oldName];
+ mkws.info("aliased widget-type '" + newName + "' to '" + oldName + "'");
+
+};
+
mkws.promotionFunction = function(name) {
return mkws.widgetType2function[name];
};