Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
[Widgets] Short-circuit prerequisites feature because it's not working
Browse files Browse the repository at this point in the history
This apparently wasn't well thought out. On important a file, it disables
the dependent property if the prerequisite is not satisfied. But it doesn't
change dynamically if the controlling property is changed. So it's better
just to not have the feature at all, for now.
  • Loading branch information
grgustaf committed Sep 9, 2014
1 parent 583f799 commit 2c33992
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,12 @@ var BWidgetRegistry = {
defaultValue: "default",
htmlAttribute: "data-rel",
prerequisite: function (admNode) {
return admNode.getProperty("target") !== "previous page";
// NOTE: Prerequisites are broken, becuase they need to be
// refreshed dynamically when the controlling property
// changes, but there seems to be no such logic, so
// disabling for now. GRG 2014/09/08
//return admNode.getProperty("target") !== "previous page";
return true;
}
},
transition: {
Expand Down Expand Up @@ -1347,7 +1352,12 @@ var BWidgetRegistry = {
type: "string",
defaultValue: "Choose option",
prerequisite: function (admNode) {
return admNode.getProperty("multiple") === true;
// NOTE: Prerequisites are broken, becuase they need to be
// refreshed dynamically when the controlling property
// changes, but there seems to be no such logic, so
// disabling for now. GRG 2014/09/08
//return admNode.getProperty("multiple") === true;
return true;
}
},
mini: BCommonProperties.mini,
Expand Down

0 comments on commit 2c33992

Please sign in to comment.