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 Chart = function(){ | |
| var self = this; | |
| self.setData = function(data){ | |
| self.data = google.visualization.arrayToDataTable(data); | |
| }; | |
| self.bar = function(){ | |
| self.activeChart = new google.visualization.BarChart(self.el); | |
| self.activeChart.draw(self.data, self.options); | |
| }; | |
| self.column = function(){ |
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
| @mixin lighter_link($color, $change:20%){ | |
| color: $color; | |
| &:hover{ | |
| color: lighten($color, $change); | |
| } | |
| } | |
| @mixin darker_link($color, $change:20%){ | |
| color: $color; | |
| &:hover{ | |
| color: darken($color, $change); |
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
| $(document) | |
| .on('ajax:loading', function() {alert("loading!"); console.log(['loading',arguments])}) | |
| .on('ajax:success', function(data, status, xhr) {alert("success!"); console.log(['success',arguments])}) | |
| .on('ajax:failure', function(xhr, status, error) {alert("failure!"); console.log(['failure',arguments])}) | |
| .on('ajax:complete', function() {alert("complete!"); console.log(['complete',arguments])}); |
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
| scope :scope, where("column=value") | |
| scope :scope_with_input, lambda { |value| where("column =?", value)} | |
| scope :cope_with_join_and_input, lambda { |value| joins(:other_table).where("other_table.other_table_column =?", value)} |
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
| ActiveAdmin.register User do | |
| filter :first_name | |
| filter :last_name | |
| filter :company_name | |
| filter :email | |
| form do |f| | |
| f.inputs "Contact" do | |
| f.input :first_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
| has_attached_file :photo, | |
| :styles => { | |
| :tiny => "100x100", # fixed width and height | |
| :thumb => "100>x100", # resize to a fixed width if original height if greather than specified | |
| # dimension and fixed height | |
| :small => "200x200>", # fixed width and resize to a fixed height if original height i greather than | |
| # specified dimension | |
| :medium => "200 "200x200<" # fixed width and resize to a fixed heigth if original height i less | |
| # than specified dimension | |
| } |
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
| //Requires Compass | |
| .cover_slide{ | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(0, 0, 0, 0.5); | |
| z-index: 9999; |
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
| /* Store for localised behaviours | |
| * | |
| * Requires jquery and Mild Fuzz's plugins.js (http://goo.gl/MVcH2) | |
| * @mildfuzz | |
| * | |
| * Usage | |
| * | |
| * Create behaviour within case: | |
| * case "BehaviourString": | |
| * //some function |
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
| /* | |
| JS Extentions by Mild Fuzz | |
| */ | |
| (function(){ | |
| //Adds sum functionality to the Array object | |
| Array.prototype.sum = function(){ |
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
| String.prototype.recursiveReplace = function(a,b){ | |
| var newString = this; | |
| while(newString.match(a) !== null){newString = newString.replace(a,b);} | |
| return newString; | |
| }; |