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
//var method, url, data, dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType); | |
var method, url, data, dataType = element.data('type') || element.find(':submit:first').data('type') || ($.ajaxSettings && $.ajaxSettings.dataType); |
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> | |
<!-- todo: optimize preloading & caching in the app --> | |
<title>Brickbook iOS</title> | |
<script src="http://jsconsole.com/remote.js?E4FD2C56-98CF-notgivingyoumyactualkey-34EB-69B8779345D0"></script> | |
<link href="http://192.168.47.105:3000/assets/application.css" media="screen" rel="stylesheet" type="text/css"/> | |
<script src="http://192.168.47.105:3000/assets/application.js" type="text/javascript"></script> | |
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=no"> |
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
# This is a manifest file that'll be compiled into including all the files listed below. | |
# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically | |
# be included in the compiled file accessible from http:#example.com/assets/application.js | |
# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
# the compiled file. | |
# | |
#= require jquery | |
#= require jquery.extensions | |
#= require jquery_ujs | |
#= require jquery.mobile-1.0 |
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
$.fn.sparkle = (arg_options) -> | |
options = { | |
width: 3 | |
gap: 3 | |
comets: 2 | |
} | |
$.extend(options, arg_options) if arg_options | |
span = options.width + options.gap |
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
/*! | |
* jQuery Mobile v1.0rc2 | |
* http://jquerymobile.com/ | |
* | |
* Copyright 2010, jQuery Project | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
*/ | |
/*! | |
* jQuery Mobile Framework |
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
# someday: move to json response module? | |
def json_response(options) | |
logger.warn "JSON response: #{options}" | |
render json: options | |
end | |
def json_callback(method, args = []) | |
json_response({status: :window_callback, method: method, args: args}) | |
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
module Neo4j | |
module TypeConverters | |
class SerializeConverter | |
# serializes to sting | |
class << self | |
def convert?(type) | |
type == :serialize | |
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
module Neo4j | |
module Rails | |
class Model | |
class << self | |
# This allows anything to be thrown at a relationship and understood. | |
# usage: | |
# | |
# has_one(:location).to(Location) | |
# accepts_hash_for :location |
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
# the current setup, for conveience, removes all capital letters from class names, which is not the best. | |
# this could be fixed, but carefully. | |
# remove the default ensure element, we handle this in Base | |
Backbone.View.prototype._ensureElement = () -> | |
class ZenBucket.Views.Base extends Backbone.View | |
initialize: (render) -> | |
# set up sensible defaults |
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
Spine.Stack.include | |
active_controller: ()-> | |
@manager.active_controller | |
window.app = new App | |
app.manager.bind 'change', (controller)-> | |
console.log 'stack change', this, arguments | |
@active_controller = controller |
OlderNewer