-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated manager app to Ember CLI 0.2.
- Loading branch information
1 parent
542bc7a
commit a0a7a3c
Showing
20 changed files
with
150 additions
and
145 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
import Em from 'ember'; | ||
|
||
export default Em.Controller.extend({ | ||
year: function() { | ||
year: Em.computed(function() { | ||
return new Date().getFullYear(); | ||
}.property(), | ||
}), | ||
|
||
actions: { | ||
toggleAccountMenu: function() { | ||
var controller = this; | ||
|
||
toggleAccountMenu() { | ||
if (this.get('showAccountMenu')) { | ||
return; | ||
} | ||
|
||
this.set('showAccountMenu', true); | ||
|
||
Em.run.next(function() { | ||
Em.$(document).one('click', function() { | ||
controller.set('showAccountMenu', false); | ||
Em.run.next(() => { | ||
Em.$(document).one('click', () => { | ||
this.set('showAccountMenu', false); | ||
return true; | ||
}); | ||
}); | ||
} | ||
}, | ||
|
||
currentRouteClass: function() { | ||
var path = this.get('currentPath'); | ||
return path.dasherize().replace(/\./g, '-'); | ||
}.property('currentPath'), | ||
currentRouteClass: Em.computed(function() { | ||
return this.get('currentPath').dasherize().replace(/\./g, '-'); | ||
}).property('currentPath') | ||
}); |
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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
import Em from 'ember'; | ||
|
||
export default Em.ObjectController.extend({ | ||
export default Em.Controller.extend({ | ||
disabled: false, | ||
currentTemplate: 'signup/form', | ||
|
||
reset: function() { | ||
reset() { | ||
this.setProperties({ | ||
name: null, | ||
email: null, | ||
name: null, | ||
email: null, | ||
password: null | ||
}); | ||
}, | ||
|
||
actions: { | ||
createAccount: function(model) { | ||
var controller = this; | ||
|
||
createAccount(model) { | ||
this.send('loading'); | ||
|
||
model.save().then( | ||
function() { | ||
controller.send('loaded'); | ||
controller.set('currentTemplate', 'signup/done'); | ||
}, | ||
|
||
function() { | ||
controller.send('loaded'); | ||
} | ||
); | ||
model.save().then(() => { | ||
this.send('loaded'); | ||
this.set('currentTemplate', 'signup/done'); | ||
}).catch(() => { | ||
this.send('loaded'); | ||
}); | ||
} | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<h1>Activity</h1> | ||
|
||
<h2>Total requests this month: {{totalCycleRequests}}</h2> | ||
<h2>Total requests this month: {{model.totalCycleRequests}}</h2> | ||
|
||
{{line-area-chart | ||
height=240 | ||
data=cycleRequests}} | ||
data=model.cycleRequests}} |
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 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 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
public/manager/assets/manager-7de8e4fa3f997a503d4cc4c8ac786c37.js
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
public/manager/assets/manager-870aa2ae56d0e923000bb8591e292f60.js
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
public/manager/assets/vendor-982512408faa3112b39469ff46126f87.js
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
public/manager/assets/vendor-9c0369f3f4db079b809e8e53d5b7d2b5.js
Large diffs are not rendered by default.
Oops, something went wrong.
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