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
Do not pass that.config.query into the facet template.
[mkws-moved-to-github.git]
/
src
/
mkws-widget.js
diff --git
a/src/mkws-widget.js
b/src/mkws-widget.js
index
d254019
..
0ea1e0f
100644
(file)
--- a/
src/mkws-widget.js
+++ b/
src/mkws-widget.js
@@
-71,9
+71,13
@@
mkws.makeWidget = function($, team, type, node) {
function expandValue(val) {
if (val.match(/^!param!/)) {
var param = val.replace(/^!param!/, '');
function expandValue(val) {
if (val.match(/^!param!/)) {
var param = val.replace(/^!param!/, '');
+ var optional = param.match(/^\?/);
+ if (optional) {
+ param = param.replace(/^\?/, '');
+ }
val = mkws.getParameterByName(param);
that.info("obtained val '" + val + "' from param '" + param + "'");
val = mkws.getParameterByName(param);
that.info("obtained val '" + val + "' from param '" + param + "'");
- if (!val) {
+ if (!val && !optional) {
alert("This page has a MasterKey widget that needs a val specified by the '" + param + "' parameter");
}
} else if (val.match(/^!path!/)) {
alert("This page has a MasterKey widget that needs a val specified by the '" + param + "' parameter");
}
} else if (val.match(/^!path!/)) {