Skip to content

Instantly share code, notes, and snippets.

$scope.$watch 'invites', ()->
selected = _.map $scope.invites, (ele, index)->
parseInt(index) if ele is true
$scope.invitesPrepared = _.compact selected # remove undefined's
$scope.inviteLength = $scope.invitesPrepared.length
, true
module.directive 'selectallgroup', ->
restrict: 'A'
link: (scope, ele, attrs)->
$(ele).on 'change', ->
$(@).parents('h3').next('ul').find('input[type=checkbox]').each ()->
unless $(@).is(':disabled')
selectAllChecked = $(ele).prop('checked')
if selectAllChecked
$(@).prop('checked', false)
document.addEventListener('resume', function() {
if(window.ea_timeoutId) {
clearTimeout(window.ea_timeoutId);
}
window.ea_timeoutId = setTimeout(function() {
launchURL = steroids.app.getLaunchURL();
matches = launchURL.toString().match(/\/\/(\w+)\?\w+=(\w+)/);
action = matches[1];
id = matches[2];
# Credits to @danyhunter for initial idea and implementation
# https://github.com/danyhunter
( () ->
if typeof angular is 'undefined'
return
module = angular.module 'SteroidsKeyboardFix', []
module.directive 'input', () ->
class Product < ActiveRecord::Base
belongs_to :category
has_many :trackings
has_many :site_product_prices, -> { order(:id => :asc) }
has_many :user_price_alerts
after_create :extract_color_from_name, :update_brand_and_model_number_if_blank, :remove_false_values, :run_delayed_jobs
validates_presence_of :name
<?php
/**
* @file
* leaflet powered custom maps for townelake homes.
* by Jake Craige @ Poetic Systems
*/
/**
* How To Import Lots
* TL:DR Delete all current lots(feed/json), import feed lots, import json lots
sortAndGroup = (objects)->
sorted = _.sortBy objects, (object)->
object.date
.reverse()
grouped = _.groupBy sorted, (object)->
object.date
_.inject grouped, (results, val, ind)->
results.push { date: { value: ind, activities: val} }
eventPlanningApp.controller 'ActivityParkingCtrl', ($scope, Message, Activities, NativeNavigation) ->
$scope.activity = Activities.current()
$scope.update = ()->
Activities.update $scope.activity
Message.broadcast 'updateActivity'
NativeNavigation.back()
$scope.open = (page) ->
NativeNavigation.goTo('views/eventPlanning/'+page+'.html')
( () ->
#Protects views where angular is not loaded from errors
if typeof angular == 'undefined'
return
'use strict'
module = angular.module('PrivateNoteModel', ['OrmModel'])
module.factory 'PrivateNotes', (Orm) ->
<script type="text/javascript">
document.addEventListener("deviceready", deviceReady);
function deviceReady() {
jQuery('.scroll-wrapper').css('min-height', $(window).height() - 55 + 'px');
}
</script>