mirror of
https://we.phorge.it/source/phorge.git
synced 2024-10-24 01:28:52 +02:00
7d849afd16
Summary: Depends on D20266. Boards currently have several `whateverMap<cardPHID => stuff>` properties, but we can just move these all down into a `CardTemplate`, similar to the recently introduced `HeaderTemplate`. The `CardTemplate` holds all the global information for a card, and then `Card` is specific for a particular copy in a column. Today, each `CardTemplate` has one `Card`, but a `CardTemplate` may have more than one card in the future (when we add subproject columns). Test Plan: Viewed workboards in different sort orders and dragged stuff around, grepped for all affected symbols. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20267
47 lines
792 B
JavaScript
47 lines
792 B
JavaScript
/**
|
|
* @provides javelin-workboard-card-template
|
|
* @requires javelin-install
|
|
* @javelin
|
|
*/
|
|
|
|
JX.install('WorkboardCardTemplate', {
|
|
|
|
construct: function(phid) {
|
|
this._phid = phid;
|
|
this._vectors = {};
|
|
|
|
this.setObjectProperties({});
|
|
},
|
|
|
|
properties: {
|
|
objectProperties: null
|
|
},
|
|
|
|
members: {
|
|
_phid: null,
|
|
_vectors: null,
|
|
|
|
getPHID: function() {
|
|
return this._phid;
|
|
},
|
|
|
|
setNodeHTMLTemplate: function(html) {
|
|
this._html = html;
|
|
return this;
|
|
},
|
|
|
|
setSortVector: function(order, vector) {
|
|
this._vectors[order] = vector;
|
|
return this;
|
|
},
|
|
|
|
getSortVector: function(order) {
|
|
return this._vectors[order];
|
|
},
|
|
|
|
newNode: function() {
|
|
return JX.$H(this._html).getFragment().firstChild;
|
|
}
|
|
}
|
|
|
|
});
|