Use standard modelMixin instead of fields.wildcard
Call it fields.generic in exports - it has the same meaning for merlin code (any field that Merlin provides), less code the better. Change-Id: Id2eb8fbfa477c014f6e6eebdd9fb0e4298bb029c
This commit is contained in:
parent
950164bbc1
commit
c25b7d8507
@ -84,7 +84,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
'value': {
|
'value': {
|
||||||
'@class': fields.wildcard,
|
'@class': fields.generic,
|
||||||
'@factory': varlistValueFactory
|
'@factory': varlistValueFactory
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
merlinFieldModels.$inject = ['merlin.utils'];
|
merlinFieldModels.$inject = ['merlin.utils'];
|
||||||
|
|
||||||
function merlinFieldModels(utils) {
|
function merlinFieldModels(utils) {
|
||||||
var wildcardMixin = Barricade.Blueprint.create(function() {
|
|
||||||
return this;
|
|
||||||
});
|
|
||||||
|
|
||||||
var viewChoicesMixin = Barricade.Blueprint.create(function() {
|
var viewChoicesMixin = Barricade.Blueprint.create(function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var dropDownLimit = this._dropDownLimit || 5;
|
var dropDownLimit = this._dropDownLimit || 5;
|
||||||
@ -127,7 +123,6 @@
|
|||||||
}
|
}
|
||||||
return title;
|
return title;
|
||||||
};
|
};
|
||||||
wildcardMixin.call(this);
|
|
||||||
if ( this.getEnumValues ) {
|
if ( this.getEnumValues ) {
|
||||||
viewChoicesMixin.call(this);
|
viewChoicesMixin.call(this);
|
||||||
}
|
}
|
||||||
@ -290,7 +285,7 @@
|
|||||||
linkedcollection: linkedCollectionModel,
|
linkedcollection: linkedCollectionModel,
|
||||||
dictionary: dictionaryModel,
|
dictionary: dictionaryModel,
|
||||||
frozendict: frozendictModel,
|
frozendict: frozendictModel,
|
||||||
wildcard: wildcardMixin // use for most general type-checks
|
generic: modelMixin // use for most general type-checks
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user