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 views.search_filters.DateFilter extends views.AbstractRenderedComponent | |
constructor: -> | |
@createStateMachine() | |
@configure() | |
.. | |
configure: -> | |
@configureFromToItems() | |
@element.find('.group-change').on 'click', (event) => @showMonthSelector() | |
@element.find('.month-selector span').on 'click', (event) => @selectMonth($(event.currentTarget)) |
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
initial: 'firstLevel' | |
events: [ | |
{name: 'fillFrom', from: 'firstLevel', to: 'fromFilled'}, | |
{name: 'fillFrom', from: 'toFilled', to: 'fromToFilled'}, | |
{name: 'fillTo', from: 'fromFilled', to: 'fromToFilled'}, | |
{name: 'cleanFrom', from: 'fromFilled', to: 'firstLevel'}, | |
{name: 'cleanFrom', from: 'fromToFilled', to: 'toFilled'}, | |
{name: 'cleanTo', from: 'toFilled', to: 'firstLevel'} | |
{name: 'cleanTo', from: 'fromToFilled', to: 'fromFilled'} | |
] |
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
#installing rails | |
rails new app_name --skip-active-record | |
#generators | |
rails g rspec:install | |
rails g mongoid:config | |
rails g jasmine:install | |
rake db:create | |
#cleanup |
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
# no bueno | |
class DateWidget | |
constructor: -> | |
@firstLevel = true | |
@fromDate = null | |
@toDate = null | |
fillFromDate: -> | |
if @firstLevel |
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
if @isIE(9) | |
element.animate rotate: '10deg', translate: ['10px', '-15px'] | |
element.animate rotate: '0deg', translate: ['-30px', '80px'], scale: 1 | |
else | |
element.addClass('hidden') | |
element.addClass 'showed' | |
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
#spec/support/prefork/request_helpers.rb | |
module RequestHelpers | |
def sign_in | |
controllers_to_mock.each do |controller| | |
controller.any_instance.stub(:current_user).and_return(user) | |
controller.any_instance.stub(:signed_in?).and_return(true) | |
end | |
ensure_signed_in | |
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
#spec/support/prefork/request_helpers.rb | |
module RequestHelpers | |
def sign_in_as(user, password = "password") | |
OmniAuth.config.add_mock(:facebook, {"uid" => user.facebook_uid}) | |
visit root_path | |
click_link "Sign in" | |
ensure_signed_in | |
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
package lib.reports; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.Map; | |
import net.sf.jasperreports.engine.JasperFillManager; | |
import net.sf.jasperreports.engine.JasperPrint; | |
import net.sf.jasperreports.engine.export.JExcelApiExporter; |
NewerOlder