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
| /** | |
| Ember Data: Dependent Relationships (Ember Data v1.13.x) | |
| This package extends Ember Data to support creating relationships | |
| where a model's dirty state depends not only on its own attributes | |
| but on the dirty state of models in dependent relationships as well. | |
| ```javascript | |
| App.Thing = DS.Model.extend({ | |
| name : DS.attr('string'), |
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
| /** | |
| Ember Data: Dependent Relationships | |
| This package extends Ember Data to support creating relationships | |
| where a model's dirty state depends not only on its own attributes | |
| but on the dirty state of models in dependent relationships as well. | |
| ```javascript | |
| App.Thing = DS.Model.extend({ | |
| name : DS.attr('string'), |
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
| // MODEL SETUPS | |
| class Record extends Eloquent{ | |
| protected $fillable = array( | |
| "record_form", | |
| "systemVersion", | |
| "creator" | |
| ); | |
| public function recordFieldValues(){ | |
| return $this->hasMany('RecordFieldValue', 'record_id', 'id'); |
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
| var adapter = DS.RESTAdapter.extend({ | |
| host: window.apiHost, | |
| ajax: function(url, method, hash){ | |
| hash = hash || {}; | |
| hash.crossDomain = true; | |
| return this._super(url, method, hash); | |
| }, | |
| findQuery: function(store, type, id) { | |
| var allOfType = store.all(type); |
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
| export default Ember.View.extend({ | |
| didInsertElement: function(){ | |
| var self = this; | |
| setTimeout(function(){ | |
| self.get('controller.model').fixBindingsHack(); | |
| }, 100); | |
| } | |
| }); |
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
| setupExistingParams: function(){ | |
| Ember.defineProperty(this, 'record_phase', Ember.computed('record_workflow_segment_step_params.[]', function(key, value){ | |
| if( this.get('step_type').toString() !== "1" ){ | |
| return undefined; | |
| } | |
| var param = this.get('record_workflow_segment_step_params').findBy('name', 'record_phase'); | |
| if( !Ember.isNone( value ) ) | |
| { |
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
| var filterTemplates = require('broccoli-template'); | |
| var uglifyJavaScript = require('broccoli-uglify-js'); | |
| var compileES6 = require('broccoli-es6-concatenator'); | |
| // var compileLess = require('broccoli-less'); | |
| var compileSass = require('broccoli-sass'); | |
| var pickFiles = require('broccoli-static-compiler'); | |
| var mergeTrees = require('broccoli-merge-trees'); | |
| var findBowerTrees = require('broccoli-bower'); | |
| var env = require('broccoli-env').getEnv(); |
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
| export default DS.Model.extend({ | |
| modelIsDirty: DS.attr('boolean', {default: false}), | |
| relationshipWatchList: [], | |
| relationshipWatcherSetup: function(){ | |
| this.get('relationshipWatchList').forEach(function(item,index,enumerable){ | |
| this.addObserver(item, this, "changeObserver"); | |
| }, this); | |
| }.on('init'), | |
| changeObserver: function(){ |
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
| Env = Ember.Application.create({ | |
| LOG_TRANSITIONS:true, | |
| LOG_BINDING: true, | |
| ready:function(){ | |
| console.log( Env.browsers ); | |
| }, | |
| supportedVideoFormats: ["mp4","ogg"], | |
| contentLocation: "content/", |
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
| Ember.Handlebars.registerBoundHelper('videoJS', function(lo, options){ | |
| console.log(lo); | |
| }); | |
| <script type="text/x-handlebars" data-template-name="lo"> | |
| {{videoJS lo}} | |
| </script> |
NewerOlder