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
.iframe-container { | |
-webkit-margin-start: -20px; | |
-webkit-transition: margin 100ms, opacity 100ms; | |
bottom: 0; | |
left: 0; | |
opacity: 0; | |
position: absolute; | |
right: 0; | |
top: 0; | |
z-index: 1; |
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
cr.define('uber', function() { | |
... | |
function invokeMethodOnWindow(targetWindow, method, opt_params, opt_url) { | |
var data = {method: method, params: opt_params}; | |
targetWindow.postMessage(data, opt_url ? opt_url : '*'); | |
} | |
return { | |
... | |
invokeMethodOnWindow: invokeMethodOnWindow |
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
Object.prototype.class = function () { | |
return "8th Grade"; | |
} |
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
/** | |
* Get search results for a selected depth. Our history system is optimized | |
* for queries that don't cross month boundaries, but an entire month's | |
* worth of data is huge. When we're in browse mode (searchText is empty) | |
* we request the data a day at a time. When we're searching, a month is | |
* used. | |
* | |
* TODO: Fix this for when the user's clock goes across month boundaries. | |
* @param {number} opt_day How many days back to do the search. | |
*/ |
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
.radio.specialist_radio | |
- check_for_errors(@user.errors['fittings.specialist']) do | |
= fitting.radio_button :specialist_id, specialist.id | |
= image_tag specialist.avatar.url, :class => 'avatar' | |
= fitting.label "specialist_id_#{specialist.id}", specialist.full_name |
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 Specialists::UsersHelper | |
def check_for_errors(field_error, &block) | |
if field_error.blank? | |
block.call | |
else | |
haml_tag :div, :class => 'field_with_errors' do | |
block.call | |
end | |
end | |
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
class Fitting < ActiveRecord::Base | |
validates_presence_of :user, :timestamp, :specialist | |
validates_presence_of :left_ear, :if => Proc.new { right_ear.blank? } | |
validates_presence_of :right_ear, :if => Proc.new { left_ear.blank? } | |
belongs_to :user | |
belongs_to :left_ear, :class_name => 'Product', :foreign_key => 'left_ear_id' | |
belongs_to :right_ear, :class_name => 'Product', :foreign_key => 'right_ear_id' | |
belongs_to :specialist | |
has_many :programs, :order => 'slot ASC' |
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
task :seed do | |
content = '' | |
File.open('extension/history.html', 'r') do |file| | |
file.each do |line| | |
content += line | |
end | |
end | |
fixtures = ''; | |
Dir["spec/javascripts/fixtures/*.html"].each do |file_name| |
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.spin = function() { | |
var opts = {lines: 12, length: 5, width: 3, radius: 10, color: '#333', speed: 1, trail: 52, shadow: false}; | |
this.each(function() { | |
var spinner = $(this).data('spinner'); | |
if (spinner) spinner.stop(); | |
if (opts !== false) { | |
$(this).data('spinner', new Spinner(opts).spin(this)); | |
} | |
}); | |
return this; |
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
FilterView = Backbone.View.extend({ | |
initialize: function() { | |
$(this.el).html('').hide(); | |
}, | |
render: function(results) { | |
var self = this; | |
$('#filterViewTemplate').tmpl(this.model.toJSON()).appendTo($(this.el)); | |
$(this.el).fadeIn("fast", function() { | |
Visit.search(self.model.options(), function(results) { |