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
app.filter 'startFrom', -> | |
(input, start) -> | |
if input? and start? and typeof start is 'number' | |
start = +start | |
input.slice(start) |
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
app.directive 'ngBlur', -> | |
(scope, elem, attrs) -> | |
elem.on "blur", -> | |
scope.$apply attrs.ngBlur | |
return | |
app.directive 'ngFocus', -> | |
(scope, elem, attrs) -> | |
elem.on "focus", -> | |
scope.$apply attrs.ngFocus |
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
smallDate: (raw) -> | |
date = new Date(raw or "").toDateString() | |
dateExp = /(\w{3})\s(\w{3})\s(\d{1,2})\s(\d{4})/i | |
dateArr = date.match(dateExp) | |
month = dateArr[2] | |
date = parseInt(dateArr[3], 10) | |
year = dateArr[4] | |
pretty = "#{month} #{date}, #{year}" | |
pretty |
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
app.directive 'dialogbox', -> | |
{ | |
transclude : true | |
template : "<div data-ng-transclude></div>" | |
restrict : "A" | |
replace : true | |
scope : false | |
link : (scope, elem, attrs) -> | |
$elem = $(elem).addClass('dialog') | |
dur = 250 |
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
app.directive 'dialogbox', -> | |
{ | |
transclude : true | |
template : "<div class='dialog' data-ng-transclude></div>" | |
restrict : "A" | |
replace : true | |
scope : false | |
link : (scope, elem, attrs) -> | |
$elem = $(elem).addClass('dialog') | |
#dur = if scope.isDesktop then 250 else 0 |
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
# By default requires jQuery.easing by default | |
# change default easing to 'swing' if not using | |
# jQuery.slideFade | |
# Copyright © Brian Frichette, 2012+, All Rights Reserved. | |
# License: MIT http://opensource.org/licenses/mit-license.php | |
# Usage: | |
# @param {String} type A string value of either 'show', 'hide', or 'toggle' (default: 'toggle') |
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
# jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ | |
# Uses the built in easing capabilities added In jQuery 1.1 to offer multiple easing options | |
# TERMS OF USE - jQuery Easing | |
### | |
jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ | |
Copyright (c) 2008 George McGinley Smith and (c) 2001 Robert Penner | |
Open source under the BSD License. (http://www.opensource.org/licenses/bsd-license.php) |
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
### | |
Adapted from jqMobi (appMobi) | |
https://github.com/appMobi/jQ.Mobi | |
MIT License | |
### | |
window.UserAgent = -> | |
self = @ | |
self.ua = navigator.userAgent | |
self.os = {} |
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
# Requires jQuery.slideFade.coffee gist | |
# https://gist.github.com/4425644 | |
app.directive 'slideFadeShow', -> | |
(scope, elem, attrs) -> | |
$elem = $(elem) | |
exp = attrs.slideFadeShow | |
duration = 600 | |
slideElem = (toShow, init = false) -> |
OlderNewer