FilteredAssignmentsCollection = MyAssignmentsCollection.extend({ parse: function (response, options) { var assignments = MyAssignmentsCollection.prototype.parse.call(this, response, options); return assignments.filter(...); } });
FilteredAssignmentsView = MyAssignmentsView.extends({ constructor: function FilteredAssignmentsView(options) { options.collection = options.context.getCollection(FilteredAssignmentsCollectionFactory); MyAssignmentsView.call(this, options); } });
FilteredAssignmentsTableView = MyAssignmentsTableView.extends({ constructor: function FilteredAssignmentsTableView(options) { options.collection = options.context.getCollection(FilteredAssignmentsCollectionFactory); MyAssignmentsTableView.call(this, options); } });
FilteredAssignmentsPerspectiveContextPlugin = PerspectiveContextPlugin.extend({ constructor: function FilteredAssignmentsPerspectiveContextPlugin(options) { PerspectiveContextPlugin.call(this, options); this.applicationScope = this.context .getModel('applicationScope') .on('change', this._openFilteredAssignments, this); }, _openFilteredAssignments: function () { if (this.applicationScope.id !== 'filtered-assignments') { this.applicationScope.set('id', 'filtered-assignments'); this.context.loadPerspective('json!myext/plugins/filtered.assignments.context.plugin/impl/filtered.assignments.json'); } } });
{ "type": "left-center-right", "options": { "center": { "type": "myext/widgets/filtered.assignments.table" } } }
var FilteredAssignmentsPerspectiveRouter = PerspectiveRouter.extend({ routes: { 'filtered-assignments': '_openFilteredAssignments' }, constructor: function FilteredAssignmentsPerspectiveRouter(options) { PerspectiveRouter.call(this, options); this.applicationScope = this.context.getModel('applicationScope'); this.listenTo(this.applicationScope, 'change', this._updateUrl); }, _openFilteredAssignments: function () { this.applicationScope.set('id', 'filtered-assignments'); }, _updateUrl: function () { if (this.applicationScope.id === 'filtered-assignments') { document.title = 'Filtered Assignments'; this.navigate('filtered-assignments'); } } });
"csui/models/widget/widget.collection": { "widgets": { "myext": [ "myext/widgets/filtered.assignments", "myext/widgets/filtered.assignments.table" ] } }, "csui/utils/contexts/perspective/perspective.context": { "extensions": { "myext": ["myext/plugins/filtered.assignments.context.plugin/filtered.assignments.context.plugin"] } }, "csui/pages/start/perspective.routing": { "extensions": { "myext": ["myext/routers/filtered.assignments.router/filtered.assignments.router"] } }, ....
Has there been any delivered options or updates on this topic? We would like to configure My Assignments to show assigned to user, not a group. Is this possible?