This file contains hidden or 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
| pure(...args) { | |
| const f = args.pop(); | |
| return Ember.computed(...args, function() { | |
| const values = args.map(arg => { | |
| if (arg.match(/@each/)) { | |
| const segments = arg.split('.@each.'); | |
| return this.get(segments[0]).map(v => v.get(segments[1])); | |
| } else if (arg.match(/\[\]/)) { | |
| const segments = arg.split('.[]'); | |
| return this.get(segments[0]); |
This file contains hidden or 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
| App.StorageService = Ember.Object.extend({ | |
| persistence: window.localStorage, | |
| namespace: 'ember-storage-service', | |
| init: function() { | |
| var callback = this._handleStorageEvent.bind(this); | |
| $(window).on('storage', callback); | |
| }, | |
This file contains hidden or 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
| # View | |
| RoscredAdmin.UploadFileView = Ember.TextField.extend | |
| classNames: ['form-control'] | |
| attributeBindings: ['name'] | |
| type: 'file' | |
| file: null | |
| change: (event)-> | |
| fd = new FormData() | |
| fd.append('pdf', event.target.files[0]) | |
| @set('file', fd) |