Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addSetting: function() {
- var setting;
- var uuid = Math.uuid();
- var profile = Dialog.basalProfileController.get('guid');
- // Set the entry time
- var startTime = SC.DateTime.create({year:2000,
- month:1,
- day:1,
- hour:0,
- minute:1,
- timezone:0});
- setting = Dialog.nested.createRecord(DialogCore.BasalSetting, { guid: uuid,
- value: 0.0,
- profile: profile });
- setting.set('startTime', startTime);
- // Add the new value to the toMany property
- var settingsList = Dialog.basalProfileController.get('settings');
- settingsList.addInverseRecord(setting);
- },
Add Comment
Please, Sign In to add comment