Sanely Edit an HTML Doc in a Browser with Ember.StateManager`
Presentation app code in referenced in the talk https://github.com/pixelhandler/ember-slide-deck
| (function($){ | |
| var // Promise methods | |
| promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), | |
| // Static reference to slice | |
| sliceDeferred = [].slice; | |
| if (typeof $ !== 'function') { | |
| return false; | |
| } else { |
| <!docType html> | |
| <html> | |
| <head> | |
| <title>Deferred / Promise</title> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| <script type="text/javascript" src="jquery-1.6.4-promises.js">// get script at https://gist.github.com/1273133</script> | |
| </head> | |
| <body> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>QUnit Test Suite</title> | |
| <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" media="screen"> | |
| <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
| <script type="text/javascript" src="http://code.jquery.com/qunit/qunit-git.js"></script> | |
| </head> | |
| <body> |
| var application_root = __dirname, | |
| express = require("express"), | |
| path = require("path"), | |
| mongoose = require('mongoose'); | |
| var app = express.createServer(); | |
| // database | |
| mongoose.connect('mongodb://localhost/ecomm_database'); |
| // bootstrap | |
| PX.app = new PX.App(); | |
| Backbone.history.start(); |
| describe("Async Jasmine test", function () { | |
| beforeEach(function () { | |
| this.Model = Backbone.Model; | |
| this.server = sinon.fakeServer.create(); | |
| this.server.respondWith( | |
| 'GET', | |
| '/api/model/12345', | |
| [ | |
| 200, |
| #!/bin/sh | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... | |
| # 1. Copy the file into your repo at `.git/hooks/pre-push` | |
| # 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
Sanely Edit an HTML Doc in a Browser with Ember.StateManager`
Presentation app code in referenced in the talk https://github.com/pixelhandler/ember-slide-deck
| // $('img.photo',this).imagesLoaded(myFunction) | |
| // execute a callback when all images have loaded. | |
| // needed because .load() doesn't work on cached images | |
| // mit license. paul irish. 2010. | |
| // webkit fix from Oren Solomianik. thx! | |
| // callback function is passed the last image to load | |
| // as an argument, and the collection as `this` | |
.faux-select-selected needs javascript functionality which updates the content binding to the value that is selected using the invisble select box (on change).(clone the emberjs/starter-kit to get started, see the components branch on this clone of starter kit...https://github.com/Ember-SC/starter-kit/commits/components)