Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/projects/WorkboardCardTemplate.js
| /** | /** | ||||
| * @provides javelin-workboard-card-template | * @provides javelin-workboard-card-template | ||||
| * @requires javelin-install | * @requires javelin-install | ||||
| * @javelin | * @javelin | ||||
| */ | */ | ||||
| JX.install('WorkboardCardTemplate', { | JX.install('WorkboardCardTemplate', { | ||||
| construct: function(phid) { | construct: function(phid) { | ||||
| this._phid = phid; | this._phid = phid; | ||||
| this._vectors = {}; | this._vectors = {}; | ||||
| this._headerKeys = {}; | |||||
| this.setObjectProperties({}); | this.setObjectProperties({}); | ||||
| }, | }, | ||||
| properties: { | properties: { | ||||
| objectProperties: null | objectProperties: null | ||||
| }, | }, | ||||
| members: { | members: { | ||||
| _phid: null, | _phid: null, | ||||
| _html: null, | |||||
| _vectors: null, | _vectors: null, | ||||
| _headerKeys: null, | |||||
| getPHID: function() { | getPHID: function() { | ||||
| return this._phid; | return this._phid; | ||||
| }, | }, | ||||
| setNodeHTMLTemplate: function(html) { | setNodeHTMLTemplate: function(html) { | ||||
| this._html = html; | this._html = html; | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| setSortVector: function(order, vector) { | setSortVector: function(order, vector) { | ||||
| this._vectors[order] = vector; | this._vectors[order] = vector; | ||||
| return this; | return this; | ||||
| }, | }, | ||||
| getSortVector: function(order) { | getSortVector: function(order) { | ||||
| return this._vectors[order]; | return this._vectors[order]; | ||||
| }, | }, | ||||
| setHeaderKey: function(order, key) { | |||||
| this._headerKeys[order] = key; | |||||
| return this; | |||||
| }, | |||||
| getHeaderKey: function(order) { | |||||
| return this._headerKeys[order]; | |||||
| }, | |||||
| newNode: function() { | newNode: function() { | ||||
| return JX.$H(this._html).getFragment().firstChild; | return JX.$H(this._html).getFragment().firstChild; | ||||
| }, | |||||
| setObjectProperty: function(key, value) { | |||||
| this.getObjectProperties()[key] = value; | |||||
| return this; | |||||
| } | } | ||||
| } | } | ||||
| }); | }); | ||||