var state = {
label: this.config.label
},
- f = params.fragment;
+ f = params.fragment,
+ description;
if(
toSwitch = toSwitch.getParent(createParams.from);
}
+ description = 'Switch to ' + createParams.to.name;
return _.extend(state, {
allowed: !!toSwitch,
toggled: alreadyInTarget,
- description: 'Switch to ' + createParams.to.name,
+ description: description,
execute: alreadyInTarget ? function() {} : function() {
f.document.transaction(function() {
if(createParams.to.tagName) {
if(!_.isUndefined(createParams.to.klass)) {
toSwitch.setClass(createParams.to.klass);
}
+ }, {
+ metadata: {
+ description: description
+ }
});
}
});