This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This works: | |
module("MessageTracer.WhitelistEntry"); | |
test("test description", function() { | |
var expected, result; | |
expected = "test"; | |
result = "test"; | |
return equals(result, expected, "test should equal test"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> e = MT.store.find(MT.WhitelistEntry, 1) | |
Object | |
> e.get('reportTemplate').get('id') | |
1 | |
> t = MT.store.find(MT.ReportTemplate, 1) | |
Object | |
> t.get('whitelistEntries').length() | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SC.ready(function() { | |
var records; | |
MT.mainPane = SC.TemplatePane.append({ | |
layerId: 'my_app', | |
templateName: 'my_app' | |
}); | |
records = MT.MyRecord.originals(); | |
MT.myRecords.set('content', records); | |
return MT.myRecords.selectObject(records.objectAt(0)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateRecord: function(store, storeKey) { | |
var data, id, recordType, request; | |
recordType = store.recordTypeFor(storeKey); | |
id = store.idFor(storeKey); | |
data = this.formatData(store.readDataHash(storeKey), recordType); | |
console.log("storeKey = " + storeKey); | |
console.log("store.readDataHash(" + storeKey + ") = "); | |
console.log(store.readDataHash(storeKey)); | |
request = SC.Request.putUrl("" + recordType.RESOURCE_PATH + "/" + id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MT.ReportTemplateContainerView = SC.ContainerView.extend({ | |
contentView: SC.TemplateView.extend({ | |
itemBinding: 'MT.reportTemplates.selectedItem', | |
templateName: 'report_template_show' | |
}), | |
editView: SC.TemplateView.extend({ | |
itemBinding: 'MT.reportTemplates.selectedItem', | |
templateName: 'report_template_edit' | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contentView: SC.SourceListView.design({ | |
contentBinding: 'Authoring.reportTemplatesArrayController.content', | |
selectionBinding: 'Authoring.reportTemplatesArrayController.selection', | |
exampleView: SC.View.design({ | |
classNames: 'sc-list-item-view'.w(), | |
childViews: 'nameLabel'.w(), | |
nameLabel: SC.LabelView.design({ | |
layout: { left: 10, width: 100, height: 18 }, | |
valueBinding: '.parentView*content.name' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Authoring.groupedNominationsController = SC.TreeController.create({ | |
content: null, | |
selection: null, | |
treeItemIsGrouped: YES, | |
setNominations: function(nominations) { | |
var group, osVersion, osVersions, root; | |
root = SC.Object.create({ | |
treeItemChildren: [] | |
treeItemIsExpanded: YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
stateSelect: SC.SelectFieldView.design({ | |
layout: { | |
left: 120, | |
height: 18, | |
centerY: 0 | |
}, | |
objectsBinding: '.parentView*content.record.internalStateOptions', | |
nameKey: 'label', | |
valueKey: 'value', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc_require('models/base_model'); | |
Authoring.Nomination = Authoring.BaseWithTimestamps.extend({ | |
// ... | |
reportTemplate: SC.Record.toOne('Authoring.ReportTemplate', { | |
isMaster: NO, | |
key: "report_template_id", | |
inverse: "nominations" | |
}), | |
// ... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Authoring.ReportTemplate = SC.Record.extend({ | |
// Attributes defined ... | |
nominations: SC.Record.toMany('Authoring.Nomination', { | |
isMaster: YES, | |
inverse: 'reportTemplate' | |
}), | |
clone: function() { | |
var attributes, clone; | |
attributes = {}; |
OlderNewer