Guest User

Untitled

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. addSetting: function() {
  2. var setting;
  3. var uuid = Math.uuid();
  4.  
  5. var profile = Dialog.basalProfileController.get('guid');
  6. // Set the entry time
  7. var startTime = SC.DateTime.create({year:2000,
  8. month:1,
  9. day:1,
  10. hour:0,
  11. minute:1,
  12. timezone:0});
  13.  
  14. setting = Dialog.nested.createRecord(DialogCore.BasalSetting, { guid: uuid,
  15. value: 0.0,
  16. profile: profile });
  17.  
  18. setting.set('startTime', startTime);
  19.  
  20. // Add the new value to the toMany property
  21. var settingsList = Dialog.basalProfileController.get('settings');
  22. settingsList.addInverseRecord(setting);
  23.  
  24. },
Add Comment
Please, Sign In to add comment