[New Edit Mode] Fixed logic in EditActionPolicy to use positive logic
This commit is contained in:
@@ -65,13 +65,13 @@ define(
|
|||||||
|
|
||||||
// A view is editable unless explicitly flagged as not
|
// A view is editable unless explicitly flagged as not
|
||||||
(views || []).forEach(function (view) {
|
(views || []).forEach(function (view) {
|
||||||
if (view.editable===true && !(applicableView(view.key) && !editableType(type.getKey()))){
|
if (view.editable === true || (applicableView(view.key) && editableType(type.getKey()))){
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the domain object is currently being edited. If
|
* Checks whether the domain object is currently being edited. If
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"glyph": "L",
|
"glyph": "L",
|
||||||
"type": "layout",
|
"type": "layout",
|
||||||
"templateUrl": "templates/layout.html",
|
"templateUrl": "templates/layout.html",
|
||||||
|
"editable": true,
|
||||||
"uses": []
|
"uses": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
"type": "timeline",
|
"type": "timeline",
|
||||||
"description": "A timeline view of Timelines and Activities.",
|
"description": "A timeline view of Timelines and Activities.",
|
||||||
"templateUrl": "templates/timeline.html",
|
"templateUrl": "templates/timeline.html",
|
||||||
|
"editable": true,
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
"sections": [
|
"sections": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user