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
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var pickFiles = require('broccoli-static-compiler'); | |
var app = new EmberApp(); | |
// Use `app.import` to add additional libraries to the generated | |
// output files. | |
// |
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
import Ember from 'ember'; | |
export default Ember.ObjectController.extend({ | |
actions: { | |
save: function() { | |
var _this = this; | |
var record = this.store.createRecord('character', this.get('model')); | |
record.save(); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
customerSessionId: 23, // todo Should be unique for each user session | |
possible: function(location) { | |
$.get('http://dev.api.ean.com/ean-services/rs/hotel/v3/list', { | |
apiKey: 'mc7re8wzh2vnnw67uz4je6qq', | |
cid: 55505, | |
_type: 'json', |
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
import ApplicationAdapter from './application'; | |
export default ApplicationAdapter.extend({ | |
findAll: function(store, type, sinceToken) { | |
return new Promise(function(resolve, reject) { | |
$.post('http://localhost/wsibd/tasks.php', { | |
file: '/home/lsimons/workspace/wsibd/test_files/test.mpp', | |
resourceName: 'LCS' | |
}, function(result) { |
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
import Ember from 'ember'; | |
var gDrive = Ember.Object.extend({ | |
clientId: '937974467154-23re9rr70mnlkmuddvpp325abth5u51k.apps.googleusercontent.com', | |
scopes: ['https://www.googleapis.com/auth/drive', 'email'], | |
authed: false, | |
ready: false, | |
init: function() { | |
window.handleClientLoad = this.handleClientLoad.bind(this); |
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
var DropboxOnlineAdapter = DS.Adapter.extend({ | |
find: function(store, type, id, snapshot) { | |
var dropbox = this.container.lookup('service:dropbox'); | |
var path = this.filename(type, id); | |
return dropbox.files(path).then((result) => { | |
var data = { | |
id: id, | |
text: result |
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
import DS from 'ember-data'; | |
export default DS.Model.extend({ | |
name: DS.attr('string'), | |
start: DS.attr('date'), | |
finish: DS.attr('date'), | |
places: DS.hasMany('places'), | |
events: DS.hasMany('event') | |
}); |
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
A user creates Spaces (rooms), Items (things), and Profiles (people). | |
Reservations are used to schedule times when these three models are in use and cannot be used elsewhere. | |
Since the modeling of a thing that can only be in use in one place/activity is common to Spaces, Items, and Profiles, this common functionality makes up the polymorphic model Resource. | |
Reservation | |
belongs_to :manager, :class_name => "Profile" | |
has_many :reservation_lines, :before_add => :set_nest, :dependent => :destroy | |
has_many :profiles, :through => :reservation_lines, :source => :reservable, :source_type => 'Profile' | |
has_many :spaces, :through => :reservation_lines, :source => :reservable, :source_type => 'Space' |