diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 2bb22dd..18ee874 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -35,7 +35,6 @@ module.exports = (grunt) -> 'vendor/ractive-adaptor/adaptor.js' 'vendor/firebase/firebase.js' 'vendor/firebase-simple-login/firebase-simple-login.js' - 'vendor/grapnel/src/grapnel.js' 'vendor/superagent/superagent.js' 'vendor/localforage/dist/localforage.js' 'vendor/async/lib/async.js' @@ -43,6 +42,7 @@ module.exports = (grunt) -> 'vendor/d3/d3.js' 'vendor/d3-tip/index.js' 'vendor/marked/lib/marked.js' + 'vendor/director/build/director.js' # Our app. 'public/js/app.js' ] diff --git a/bower.json b/bower.json index 06c3ed3..3e5ce5b 100644 --- a/bower.json +++ b/bower.json @@ -8,7 +8,6 @@ "ractive-adaptor": "radekstepan/ractive-adaptor-ractive", "firebase": "~1.0.21", "firebase-simple-login": "~1.6.3", - "grapnel": "~0.4.2", "github": "~0.9.0", "localforage": "~0.9.2", "superagent": "~0.19.0", @@ -16,6 +15,7 @@ "moment": "~2.8.3", "d3": "~3.4.11", "d3-tip": "~0.6.5", - "marked": "~0.3.2" + "marked": "~0.3.2", + "director": "~1.2.2" } } diff --git a/public/css/app.bundle.css b/public/css/app.bundle.css index 3d931f4..47f58af 100644 --- a/public/css/app.bundle.css +++ b/public/css/app.bundle.css @@ -410,7 +410,7 @@ table { @font-face{font-family:'Fontello';src:url("../fonts/fontello.eot?74672344");src:url("../fonts/fontello.eot?74672344#iefix") format('embedded-opentype'),url("../fonts/fontello.woff?74672344") format('woff'),url("../fonts/fontello.ttf?74672344") format('truetype'),url("../fonts/fontello.svg?74672344#fontello") format('svg');font-weight:normal;font-style:normal} .icon{vertical-align:middle;font-family:"Fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;} -.icon.spin6,.icon.spin4,.icon.spinner1{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} +.icon[class^='spin'],.icon[class*=' spin']{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} @-moz-keyframes spin{0%{-moz-transform:rotate(0)} 100%{-moz-transform:rotate(360deg)} }@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)} @@ -495,6 +495,7 @@ ul li{display:inline-block} #content #projects .sort{float:right;line-height:30px} #content #projects table{width:100%;} #content #projects table tr td{background:#fcfcfc;padding:20px 30px;border-bottom:1px solid #eaecf2;} +#content #projects table tr td .project{color:inherit} #content #projects table tr td .milestone .icon{font-size:10px;margin:0} #content #projects table tr td .progress{width:200px;} #content #projects table tr td .progress .percent,#content #projects table tr td .progress .due{color:#9399ad;font-size:13px} diff --git a/public/css/app.css b/public/css/app.css index 2f03935..e1f2fea 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -3,7 +3,7 @@ @font-face{font-family:'Fontello';src:url("../fonts/fontello.eot?74672344");src:url("../fonts/fontello.eot?74672344#iefix") format('embedded-opentype'),url("../fonts/fontello.woff?74672344") format('woff'),url("../fonts/fontello.ttf?74672344") format('truetype'),url("../fonts/fontello.svg?74672344#fontello") format('svg');font-weight:normal;font-style:normal} .icon{vertical-align:middle;font-family:"Fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;} -.icon.spin6,.icon.spin4,.icon.spinner1{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} +.icon[class^='spin'],.icon[class*=' spin']{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} @-moz-keyframes spin{0%{-moz-transform:rotate(0)} 100%{-moz-transform:rotate(360deg)} }@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)} @@ -88,6 +88,7 @@ ul li{display:inline-block} #content #projects .sort{float:right;line-height:30px} #content #projects table{width:100%;} #content #projects table tr td{background:#fcfcfc;padding:20px 30px;border-bottom:1px solid #eaecf2;} +#content #projects table tr td .project{color:inherit} #content #projects table tr td .milestone .icon{font-size:10px;margin:0} #content #projects table tr td .progress{width:200px;} #content #projects table tr td .progress .percent,#content #projects table tr td .progress .due{color:#9399ad;font-size:13px} diff --git a/public/js/app.bundle.js b/public/js/app.bundle.js index d3112dc..f382941 100644 --- a/public/js/app.bundle.js +++ b/public/js/app.bundle.js @@ -21241,242 +21241,6 @@ var h=new fb.simplelogin.client(a,d,e,f);return{setApiHost:function(a){fb.simple fb.simplelogin.util.validation.validateCallback("FirebaseSimpleLogin.createUser",3,e,!0);return h.createUser(a,d,e)},changePassword:function(a,d,e,f){fb.simplelogin.util.validation.validateArgCount("FirebaseSimpleLogin.changePassword",3,4,arguments.length);fb.simplelogin.util.validation.validateCallback("FirebaseSimpleLogin.changePassword",4,f,!0);return h.changePassword(a,d,e,f)},removeUser:function(a,d,e){fb.simplelogin.util.validation.validateArgCount("FirebaseSimpleLogin.removeUser",2,3,arguments.length); fb.simplelogin.util.validation.validateCallback("FirebaseSimpleLogin.removeUser",3,e,!0);return h.removeUser(a,d,e)},sendPasswordResetEmail:function(a,d){fb.simplelogin.util.validation.validateArgCount("FirebaseSimpleLogin.sendPasswordResetEmail",1,2,arguments.length);fb.simplelogin.util.validation.validateCallback("FirebaseSimpleLogin.sendPasswordResetEmail",2,d,!0);return h.sendPasswordResetEmail(a,d)}}};goog.exportSymbol("FirebaseSimpleLogin",FirebaseSimpleLogin);FirebaseSimpleLogin.onOpen=function(a){fb.simplelogin.client.onOpen(a)}; goog.exportProperty(FirebaseSimpleLogin,"onOpen",FirebaseSimpleLogin.onOpen);FirebaseSimpleLogin.VERSION=fb.simplelogin.client.VERSION();})(); -;/**** - * Grapnel.js - * https://github.com/EngineeringMode/Grapnel.js - * - * @author Greg Sabia Tucker - * @link http://artificer.io - * @version 0.4.2 - * - * Released under MIT License. See LICENSE.txt or http://opensource.org/licenses/MIT -*/ - -(function(root){ - - function Grapnel(){ - "use strict"; - - var self = this; // Scope reference - this.events = {}; // Event Listeners - this.params = []; // Named parameters - this.state = null; // Event state - this.version = '0.4.2'; // Version - // Anchor - this.anchor = { - defaultHash : window.location.hash, - get : function(){ - return (window.location.hash) ? window.location.hash.split('#')[1] : ''; - }, - set : function(anchor){ - window.location.hash = (!anchor) ? '' : anchor; - return self; - }, - clear : function(){ - return this.set(false); - }, - reset : function(){ - return this.set(this.defaultHash); - } - } - /** - * ForEach workaround - * - * @param {Array} to iterate - * @param {Function} callback - */ - this._forEach = function(a, callback){ - if(typeof Array.prototype.forEach === 'function') return Array.prototype.forEach.call(a, callback); - // Replicate forEach() - return function(c, next){ - for(var i=0, n = this.length; i 7)) { + // At least for now HTML5 history is available for 'modern' browsers only + if (this.history === true) { + // There is an old bug in Chrome that causes onpopstate to fire even + // upon initial page load. Since the handler is run manually in init(), + // this would cause Chrome to run it twise. Currently the only + // workaround seems to be to set the handler after the initial page load + // http://code.google.com/p/chromium/issues/detail?id=63040 + setTimeout(function() { + window.onpopstate = onchange; + }, 500); + } + else { + window.onhashchange = onchange; + } + this.mode = 'modern'; + } + else { + // + // IE support, based on a concept by Erik Arvidson ... + // + var frame = document.createElement('iframe'); + frame.id = 'state-frame'; + frame.style.display = 'none'; + document.body.appendChild(frame); + this.writeFrame(''); + + if ('onpropertychange' in document && 'attachEvent' in document) { + document.attachEvent('onpropertychange', function () { + if (event.propertyName === 'location') { + self.check(); + } + }); + } + + window.setInterval(function () { self.check(); }, 50); + + this.onHashChanged = onchange; + this.mode = 'legacy'; + } + + Router.listeners.push(fn); + + return this.mode; + }, + + destroy: function (fn) { + if (!Router || !Router.listeners) { + return; + } + + var listeners = Router.listeners; + + for (var i = listeners.length - 1; i >= 0; i--) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + } + } + }, + + setHash: function (s) { + // Mozilla always adds an entry to the history + if (this.mode === 'legacy') { + this.writeFrame(s); + } + + if (this.history === true) { + window.history.pushState({}, document.title, s); + // Fire an onpopstate event manually since pushing does not obviously + // trigger the pop event. + this.fire(); + } else { + dloc.hash = (s[0] === '/') ? s : '/' + s; + } + return this; + }, + + writeFrame: function (s) { + // IE support... + var f = document.getElementById('state-frame'); + var d = f.contentDocument || f.contentWindow.document; + d.open(); + d.write("