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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
| <meta charset="utf-8"> |
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
| require "rake-pipeline-web-filters" | |
| require "json" | |
| require "less" | |
| class HandlebarsFilter < Rake::Pipeline::Filter | |
| def initialize(&block) | |
| block ||= proc { |input| input.sub(/\.handlebars$/, '.js') } | |
| super(&block) | |
| end |
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
| input "less" do | |
| match "views/*.less" depends "import/*.less" do | |
| filter CustomLessFilter | |
| concat "project.css" | |
| end | |
| end |
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
| input "assets/vendor" do | |
| match "*.js" do | |
| filter Rake::Pipeline::OrderingConcatFilter, | |
| ["minispade.js", "qrcode.js", "jquery.js", "jquery.transit.js"], "app.js" | |
| end | |
| end | |
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
| input "app" do | |
| match "app/lib/**/*.js" do | |
| minispade :rewrite_requires => true, :string=> false, :module_id_generator => proc { |input| | |
| id = input.path.dup | |
| id.sub!('/lib/', '/') | |
| id.sub!(/\.js$/, '') | |
| id.sub!(/\/main$/, '') | |
| #id.sub!('/tests', '/~tests') |
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
| require 'execjs' | |
| class HandlebarsFilter < Filter | |
| class << self | |
| def contents | |
| @@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n") | |
| end | |
| def context | |
| @@context ||= ExecJS.compile(contents) |
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
| findAll: function(store, type) { | |
| var root = this.rootForType(type); | |
| this.ajax(root, "GET", { | |
| success: function(json) { | |
| store.loadMany(type, json["objects"]); | |
| store.typeMapFor(type).modelArrays.forEach( function(item) { | |
| item.set('isLoaded', true); | |
| }); | |
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
| // I need to identify if the app is in a callback environment or fixtures | |
| // ending with the following code which seems not to be the correct way to do that | |
| insertCode: function(stateManager, code ) { | |
| var invitations = Yn.store.find(Yn.Invitation, {code: code}); | |
| var self = this; | |
| invitations.addObserver('isLoaded', function() { | |
| self._callback(stateManager, invitations); | |
| }); |
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
| Yn.BoundView = Em.View.extend({ | |
| item: null, | |
| render: function(buffer) { | |
| buffer.push( this.get('item') ); | |
| }, | |
| _itemDidChange: Ember.observer(function() { |