ability to create custom note types
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"collection": "collections/note",
|
||||
"recordViews":{
|
||||
"edit":"Note.Record.Edit",
|
||||
"editQuick":"Note.Record.Edit"
|
||||
}
|
||||
"collection": "collections/note",
|
||||
"recordViews":{
|
||||
"edit":"Note.Record.Edit",
|
||||
"editQuick":"Note.Record.Edit"
|
||||
},
|
||||
"itemViews": {
|
||||
"Post": "Stream.Notes.Post"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,12 +25,17 @@ Espo.define('Views.Stream.List', 'Views.Record.ListExpanded', function (Dep) {
|
||||
|
||||
type: 'listStream',
|
||||
|
||||
setup: function () {
|
||||
this.itemViews = this.getMetadata().get('clientDefs.Note.itemViews') || {};
|
||||
Dep.prototype.setup.call(this);
|
||||
},
|
||||
|
||||
buildRow: function (i, model, callback) {
|
||||
var key = 'row-' + model.id;
|
||||
this.rows.push(key);
|
||||
|
||||
var type = model.get('type');
|
||||
var viewName = 'Stream.Notes.' + type;
|
||||
var viewName = this.itemViews[type] || 'Stream.Notes.' + type;
|
||||
|
||||
this.createView(key, viewName, {
|
||||
model: model,
|
||||
|
||||
Reference in New Issue
Block a user