config: mkws.objectInheritingFrom(team.config)
};
- that.log = team.log;
that.trace = team.trace;
that.debug = team.debug;
that.info = team.info;
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 + "'");
- 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!/)) {
if (fn) {
fn.call(that);
this.info("made " + type + " widget(node=" + node + ")");
- } else if (type.match(/-Container-(narrow|wide)$/)) {
+ } else if (type.match(/-[Cc]ontainer-(narrow|wide)$/)) {
// Not really a widget: no need to log its lack of promotion
} else {
this.info("made UNPROMOTED widget(type=" + type + ", node=" + node + ")");