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(function($) { | |
// create a convenient toggleLoading function | |
var fooToggleSpinner = function() { $("#divSpinner").toggle() }; | |
$("#runSpinner") | |
.bind("ajax:loading", fooToggleSpinner) | |
.bind("ajax:complete", fooToggleSpinner) |
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(function($) { | |
$("#runSpinner").bind("ajax:loading", function() { $("#divSpinner").show() }); | |
$("#runSpinner").bind("ajax:complete", function() { $("#divSpinner").hide() }); |
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
respond_to :html, :json | |
def update | |
@cart = Cart.find(params[:id]) | |
@cart.update_attributes(params[:cart]) | |
respond_with @cart | |
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
Capybara::Driver::Webkit::WebkitInvalidResponseError: Javascript failed to execute |
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 confirm_current_user_account | |
case @customer_account.customer_type | |
when 'User' then | |
if @customer_account.customer == current_user | |
@customer = @customer_account | |
else | |
redirect_to bank_root_path, alert: "Error." | |
end | |
when 'Company' | |
unless current_user.companies.find(@customer_account.customer).nil? |
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 edit(): | |
icon_name = request.vars.item_0 if request.vars else None | |
icon_name = urllib.unquote(icon_name) | |
model = Icon() | |
if icon_name: | |
icon_object = bw.objectQuery("icon", icon_name) | |
model.populate(icon_object) | |
icon_form = SQLFORM.factory(*model.fields()) |
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
<script type = "text/javascript" > | |
var x; | |
function autoscroll(){ | |
self.scrollBy(0,x) | |
} | |
function playautoscroll(){ | |
x = 1; | |
setInterval(function() { autoscroll(); },10.01); |
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 ConversationsController < ApplicationController | |
before_filter :authenticate_user! | |
respond_to :html, :json, :js | |
def index | |
page = params[:page] | |
id = params[:conversation_id] | |
@conversations = current_user.visible_conversations page | |
@visibilities = current_user.visibilities page |
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
@company.company_type = case params[:plantype] | |
when 'executive' then '2' | |
when 'business' then '3' | |
else | |
'1' | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>IApp</title> | |
<%= stylesheet_link_tag "application" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
OlderNewer