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
class WireframesController < ActionController::Base | |
public_pages = [:sign_in, :confirm_registration, :homepage, :register, :business_admin_layout] | |
survey_pages = [:survey_1, :survey_2, :survey_3] | |
before_filter :admin_layout, :except => public_pages + survey_pages | |
before_filter :public_layout, :only => public_pages, :except => :business_admin_layout | |
before_filter :survey_layout, :only => survey_pages | |
def admin_layout | |
render :layout => "nuguava_admin" | |
end |
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
$("a[data-method='delete']").live("click.delete", function() { | |
var $e = $(this); | |
if ($e.attr("data-confirm")) { | |
if (!confirm($e.attr("data-confirm"))) { | |
return false; | |
} | |
} | |
var $form = $("<form />"); | |
$("<input />").attr({ | |
type: "hidden", |
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
var isIphone = (function() { | |
return navigator.userAgent.match(/iPhone|iPod/i) != null; | |
})(); | |
var isIpad = (function() { | |
return navigator.userAgent.match(/iPad/i) != null; | |
})(); |
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
var l = true, | |
n = null, | |
o = false, | |
p = [ | |
["book of healing", 5], | |
["book of vision", 5], | |
["book of cure", 5], | |
["book of genocide", 5] | |
], | |
q = [ |
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
A B C D E F G | |
1 + + + | |
2 + + + | |
3 + + + + + + + | |
4 + + + + + + | |
5 + + + + + + + | |
6 + + + | |
7 + + + | |
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
def dummy_image(dimensions, bg_color="cccccc", fg_color="333333") | |
"http://dummyimage.com/#{dimensions}/#{bg_color}/#{fg_color}" | |
end |
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
[branch "master"] | |
remote = origin | |
merge = refs/heads/master |
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
if (!("placeholder" in document.createElement("input"))) { | |
$("input[placeholder]").each(function() { | |
var $e = $(this), | |
placeholder = $e.attr("placeholder"); | |
$e.val(placeholder); | |
$e.bind("focus blur", function(e) { | |
if (e.type === "focus" && $e.val() === placeholder) { $e.val(""); } | |
else { if (!$e.val()) { $e.val(placeholder); } } | |
}); | |
}).closest("form").submit(function() { |
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
$.fn.toggleAttr = function(attr) { | |
return this.each(function() { | |
var $e = $(this); | |
$e.attr(attr, !!!$e.attr(attr)); | |
}); | |
}; |
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
$(function() { | |
var app = { | |
tasks: { | |
selector: "section > ul > li" | |
} | |
} | |
app.tasks.heading = { | |
selector: app.tasks.selector + " h2", | |
click: function() { | |
$(this).closest("li").find(".details").toggle(); |
OlderNewer