muck-friends 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/muck/friends_controller.rb +2 -2
- data/muck-friends.gemspec +36 -6
- data/test/rails_root/Rakefile +8 -0
- data/test/rails_root/config/database.yml +14 -15
- data/test/rails_root/config/environment.rb +3 -1
- data/test/rails_root/config/initializers/geokit_config.rb +63 -0
- data/test/rails_root/db/migrate/{20090602041838_create_users.rb → 20090327231918_create_users.rb} +11 -10
- data/test/rails_root/db/migrate/20090402234137_create_languages.rb +1 -1
- data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
- data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
- data/test/rails_root/db/migrate/20091124203137_add_location_to_profiles.rb +15 -0
- data/test/rails_root/db/migrate/20091124205819_add_fields_to_profiles.rb +21 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +13 -6
- data/test/rails_root/public/javascripts/jquery/jquery.tips.js +7 -6
- data/test/rails_root/public/javascripts/muck.js +50 -3
- data/test/rails_root/public/javascripts/muck_activities.js +4 -5
- data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +19 -25
- data/test/rails_root/public/stylesheets/styles.css +2 -0
- data/test/rails_root/test/functional/friends_controller_test.rb +1 -1
- data/test/rails_root/vendor/plugins/geokit-rails/init.rb +2 -0
- data/test/rails_root/vendor/plugins/geokit-rails/install.rb +14 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails.rb +26 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb +456 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/abstract.rb +31 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/mysql.rb +22 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/postgresql.rb +22 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/sqlserver.rb +43 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb +22 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/geocoder_control.rb +16 -0
- data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb +46 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb +474 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/boot.rb +25 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb +77 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/company.rb +3 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/custom_location.rb +12 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/location.rb +4 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_address.rb +4 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_family.rb +3 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_house.rb +3 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_organization.rb +4 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_person.rb +4 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/models/store.rb +3 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/schema.rb +60 -0
- data/test/rails_root/vendor/plugins/geokit-rails/test/test_helper.rb +23 -0
- metadata +33 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.17
|
@@ -45,9 +45,9 @@ class Muck::FriendsController < ApplicationController
|
|
45
45
|
end
|
46
46
|
|
47
47
|
if success
|
48
|
-
if params[:block]
|
48
|
+
if params[:block]
|
49
49
|
message = t('muck.friends.blocked', :user => @target.display_name)
|
50
|
-
elsif params[:
|
50
|
+
elsif params[:unblock]
|
51
51
|
message = t('muck.friends.unblocked', :user => @target.display_name)
|
52
52
|
end
|
53
53
|
else
|
data/muck-friends.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-friends}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.17"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball", "Joel Duffin"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-09}
|
13
13
|
s.description = %q{Friend engine for the muck system.}
|
14
14
|
s.email = %q{justin@tatemae.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -134,7 +134,6 @@ Gem::Specification.new do |s|
|
|
134
134
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
135
135
|
"test/rails_root/db/migrate/20090426041103_create_states.rb",
|
136
136
|
"test/rails_root/db/migrate/20090512013727_create_profiles.rb",
|
137
|
-
"test/rails_root/db/migrate/20090602041838_create_users.rb",
|
138
137
|
"test/rails_root/db/migrate/20090608073052_create_friends.rb",
|
139
138
|
"test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
|
140
139
|
"test/rails_root/features/step_definitions/webrat_steps.rb",
|
@@ -350,20 +349,25 @@ Gem::Specification.new do |s|
|
|
350
349
|
"test/rails_root/config/environments/development.rb",
|
351
350
|
"test/rails_root/config/environments/production.rb",
|
352
351
|
"test/rails_root/config/environments/test.rb",
|
352
|
+
"test/rails_root/config/initializers/geokit_config.rb",
|
353
353
|
"test/rails_root/config/initializers/inflections.rb",
|
354
354
|
"test/rails_root/config/initializers/mime_types.rb",
|
355
355
|
"test/rails_root/config/initializers/requires.rb",
|
356
356
|
"test/rails_root/config/initializers/session_store.rb",
|
357
357
|
"test/rails_root/config/routes.rb",
|
358
358
|
"test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
359
|
+
"test/rails_root/db/migrate/20090327231918_create_users.rb",
|
359
360
|
"test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
|
360
361
|
"test/rails_root/db/migrate/20090402234137_create_languages.rb",
|
361
362
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
362
363
|
"test/rails_root/db/migrate/20090426041103_create_states.rb",
|
363
364
|
"test/rails_root/db/migrate/20090512013727_create_profiles.rb",
|
364
|
-
"test/rails_root/db/migrate/20090602041838_create_users.rb",
|
365
365
|
"test/rails_root/db/migrate/20090608073052_create_friends.rb",
|
366
366
|
"test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
|
367
|
+
"test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
|
368
|
+
"test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
|
369
|
+
"test/rails_root/db/migrate/20091124203137_add_location_to_profiles.rb",
|
370
|
+
"test/rails_root/db/migrate/20091124205819_add_fields_to_profiles.rb",
|
367
371
|
"test/rails_root/features/step_definitions/webrat_steps.rb",
|
368
372
|
"test/rails_root/features/support/env.rb",
|
369
373
|
"test/rails_root/features/support/paths.rb",
|
@@ -375,6 +379,31 @@ Gem::Specification.new do |s|
|
|
375
379
|
"test/rails_root/test/unit/friend_mailer_test.rb",
|
376
380
|
"test/rails_root/test/unit/friend_test.rb",
|
377
381
|
"test/rails_root/test/unit/user_test.rb",
|
382
|
+
"test/rails_root/vendor/plugins/geokit-rails/init.rb",
|
383
|
+
"test/rails_root/vendor/plugins/geokit-rails/install.rb",
|
384
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb",
|
385
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/abstract.rb",
|
386
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/mysql.rb",
|
387
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/postgresql.rb",
|
388
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/sqlserver.rb",
|
389
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb",
|
390
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/geocoder_control.rb",
|
391
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb",
|
392
|
+
"test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails.rb",
|
393
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb",
|
394
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/boot.rb",
|
395
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb",
|
396
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/company.rb",
|
397
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/custom_location.rb",
|
398
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/location.rb",
|
399
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/mock_address.rb",
|
400
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/mock_family.rb",
|
401
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/mock_house.rb",
|
402
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/mock_organization.rb",
|
403
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/mock_person.rb",
|
404
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/models/store.rb",
|
405
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/schema.rb",
|
406
|
+
"test/rails_root/vendor/plugins/geokit-rails/test/test_helper.rb",
|
378
407
|
"test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb",
|
379
408
|
"test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb"
|
380
409
|
]
|
@@ -398,3 +427,4 @@ Gem::Specification.new do |s|
|
|
398
427
|
s.add_dependency(%q<muck-profiles>, [">= 0"])
|
399
428
|
end
|
400
429
|
end
|
430
|
+
|
data/test/rails_root/Rakefile
CHANGED
@@ -29,3 +29,11 @@ require 'muck_users/tasks'
|
|
29
29
|
require 'muck_activities/tasks'
|
30
30
|
require 'muck_friends/tasks'
|
31
31
|
require 'muck_profiles/tasks'
|
32
|
+
|
33
|
+
namespace :muck do
|
34
|
+
|
35
|
+
def muck_gems
|
36
|
+
['muck-engine', 'muck-users', 'muck-profiles', 'muck-activities', 'muck-friends']
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -1,17 +1,16 @@
|
|
1
1
|
development:
|
2
|
-
adapter:
|
3
|
-
database:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
2
|
+
adapter: mysql
|
3
|
+
database: muck_friends_development
|
4
|
+
username: root
|
5
|
+
password:
|
6
|
+
host: localhost
|
7
|
+
encoding: utf8
|
8
|
+
test:
|
9
|
+
adapter: mysql
|
10
|
+
database: muck_friends_test
|
11
|
+
username: root
|
12
|
+
password:
|
13
|
+
host: localhost
|
14
|
+
encoding: utf8
|
16
15
|
cucumber:
|
17
|
-
<<: *TEST
|
16
|
+
<<: *TEST
|
@@ -17,8 +17,10 @@ Rails::Initializer.run do |config|
|
|
17
17
|
config.time_zone = 'UTC'
|
18
18
|
config.gem "will_paginate"
|
19
19
|
config.gem "authlogic"
|
20
|
+
config.gem "geokit"
|
21
|
+
config.gem "sanitize"
|
20
22
|
config.gem "bcrypt-ruby", :lib => "bcrypt"
|
21
|
-
config.gem '
|
23
|
+
config.gem 'paperclip'
|
22
24
|
config.gem 'muck-engine', :lib => 'muck_engine'
|
23
25
|
config.gem 'muck-users', :lib => 'muck_users'
|
24
26
|
config.gem 'muck-profiles', :lib => 'muck_profiles'
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'geokit'
|
2
|
+
|
3
|
+
if defined? Geokit
|
4
|
+
|
5
|
+
# These defaults are used in Geokit::Mappable.distance_to and in acts_as_mappable
|
6
|
+
Geokit::default_units = :miles
|
7
|
+
Geokit::default_formula = :sphere
|
8
|
+
|
9
|
+
# This is the timeout value in seconds to be used for calls to the geocoder web
|
10
|
+
# services. For no timeout at all, comment out the setting. The timeout unit
|
11
|
+
# is in seconds.
|
12
|
+
Geokit::Geocoders::request_timeout = 3
|
13
|
+
|
14
|
+
# These settings are used if web service calls must be routed through a proxy.
|
15
|
+
# These setting can be nil if not needed, otherwise, addr and port must be
|
16
|
+
# filled in at a minimum. If the proxy requires authentication, the username
|
17
|
+
# and password can be provided as well.
|
18
|
+
Geokit::Geocoders::proxy_addr = nil
|
19
|
+
Geokit::Geocoders::proxy_port = nil
|
20
|
+
Geokit::Geocoders::proxy_user = nil
|
21
|
+
Geokit::Geocoders::proxy_pass = nil
|
22
|
+
|
23
|
+
# This is your yahoo application key for the Yahoo Geocoder.
|
24
|
+
# See http://developer.yahoo.com/faq/index.html#appid
|
25
|
+
# and http://developer.yahoo.com/maps/rest/V1/geocode.html
|
26
|
+
Geokit::Geocoders::yahoo = 'REPLACE_WITH_YOUR_YAHOO_KEY'
|
27
|
+
|
28
|
+
# This is your Google Maps geocoder key.
|
29
|
+
# See http://www.google.com/apis/maps/signup.html
|
30
|
+
# and http://www.google.com/apis/maps/documentation/#Geocoding_Examples
|
31
|
+
Geokit::Geocoders::google = 'REPLACE_WITH_YOUR_GOOGLE_KEY'
|
32
|
+
|
33
|
+
# This is your username and password for geocoder.us.
|
34
|
+
# To use the free service, the value can be set to nil or false. For
|
35
|
+
# usage tied to an account, the value should be set to username:password.
|
36
|
+
# See http://geocoder.us
|
37
|
+
# and http://geocoder.us/user/signup
|
38
|
+
Geokit::Geocoders::geocoder_us = false
|
39
|
+
|
40
|
+
# This is your authorization key for geocoder.ca.
|
41
|
+
# To use the free service, the value can be set to nil or false. For
|
42
|
+
# usage tied to an account, set the value to the key obtained from
|
43
|
+
# Geocoder.ca.
|
44
|
+
# See http://geocoder.ca
|
45
|
+
# and http://geocoder.ca/?register=1
|
46
|
+
Geokit::Geocoders::geocoder_ca = false
|
47
|
+
|
48
|
+
# Uncomment to use a username with the Geonames geocoder
|
49
|
+
#Geokit::Geocoders::geonames="REPLACE_WITH_YOUR_GEONAMES_USERNAME"
|
50
|
+
|
51
|
+
# This is the order in which the geocoders are called in a failover scenario
|
52
|
+
# If you only want to use a single geocoder, put a single symbol in the array.
|
53
|
+
# Valid symbols are :google, :yahoo, :us, and :ca.
|
54
|
+
# Be aware that there are Terms of Use restrictions on how you can use the
|
55
|
+
# various geocoders. Make sure you read up on relevant Terms of Use for each
|
56
|
+
# geocoder you are going to use.
|
57
|
+
Geokit::Geocoders::provider_order = [:google,:us]
|
58
|
+
|
59
|
+
# The IP provider order. Valid symbols are :ip,:geo_plugin.
|
60
|
+
# As before, make sure you read up on relevant Terms of Use for each
|
61
|
+
# Geokit::Geocoders::ip_provider_order = [:geo_plugin,:ip]
|
62
|
+
|
63
|
+
end
|
data/test/rails_root/db/migrate/{20090602041838_create_users.rb → 20090327231918_create_users.rb}
RENAMED
@@ -1,5 +1,4 @@
|
|
1
1
|
class CreateUsers < ActiveRecord::Migration
|
2
|
-
|
3
2
|
def self.up
|
4
3
|
create_table :users, :force => true do |t|
|
5
4
|
t.string :login
|
@@ -8,29 +7,31 @@ class CreateUsers < ActiveRecord::Migration
|
|
8
7
|
t.string :last_name
|
9
8
|
t.string :crypted_password
|
10
9
|
t.string :password_salt
|
11
|
-
t.string :persistence_token
|
12
|
-
t.string :single_access_token
|
13
|
-
t.string :perishable_token
|
10
|
+
t.string :persistence_token, :null => false
|
11
|
+
t.string :single_access_token, :null => false
|
12
|
+
t.string :perishable_token, :null => false
|
14
13
|
t.integer :login_count, :null => false, :default => 0
|
15
14
|
t.integer :failed_login_count, :null => false, :default => 0
|
16
15
|
t.datetime :last_request_at
|
17
|
-
t.datetime :last_login_at
|
18
16
|
t.datetime :current_login_at
|
17
|
+
t.datetime :last_login_at
|
19
18
|
t.string :current_login_ip
|
20
19
|
t.string :last_login_ip
|
21
|
-
t.boolean :terms_of_service,
|
22
|
-
t.string :time_zone,
|
20
|
+
t.boolean :terms_of_service, :default => false, :null => false
|
21
|
+
t.string :time_zone, :default => "UTC"
|
23
22
|
t.datetime :disabled_at
|
23
|
+
t.datetime :created_at
|
24
24
|
t.datetime :activated_at
|
25
|
-
t.
|
25
|
+
t.datetime :updated_at
|
26
|
+
t.string :identity_url
|
27
|
+
t.string :url_key
|
26
28
|
end
|
27
29
|
|
28
30
|
add_index :users, :login
|
29
31
|
add_index :users, :email
|
30
32
|
add_index :users, :persistence_token
|
31
|
-
add_index :users, :perishable_token
|
32
|
-
add_index :users, :single_access_token
|
33
33
|
add_index :users, :last_request_at
|
34
|
+
|
34
35
|
end
|
35
36
|
|
36
37
|
def self.down
|
@@ -5,7 +5,7 @@ class CreateLanguages < ActiveRecord::Migration
|
|
5
5
|
t.string :english_name
|
6
6
|
t.string :locale
|
7
7
|
t.boolean :supported, :default => true
|
8
|
-
t.
|
8
|
+
t.boolean :is_default, :default => false
|
9
9
|
end
|
10
10
|
add_index :languages, :name
|
11
11
|
add_index :languages, :locale
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddAttachableToActivities < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :activities, :attachable_id, :integer
|
4
|
+
add_column :activities, :attachable_type, :string
|
5
|
+
add_index :activities, ["attachable_id", "attachable_type"]
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :activities, :attachable_id
|
10
|
+
remove_column :activities, :attachable_type
|
11
|
+
remove_index :activities, ["attachable_id", "attachable_type"]
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddLocationToProfiles < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :profiles, :location, :string
|
4
|
+
add_column :profiles, :lat, :decimal, :precision => 15, :scale => 10
|
5
|
+
add_column :profiles, :lng, :decimal, :precision => 15, :scale => 10
|
6
|
+
add_index :profiles, [:lat, :lng]
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
remove_index :profiles, [:lat, :lng]
|
11
|
+
remove_column :profiles, :location
|
12
|
+
remove_column :profiles, :lat
|
13
|
+
remove_column :profiles, :lng
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class AddFieldsToProfiles < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :profiles, :about, :text
|
4
|
+
add_column :profiles, :first_name, :string
|
5
|
+
add_column :profiles, :last_name, :string
|
6
|
+
add_column :profiles, :city, :string
|
7
|
+
add_column :profiles, :state_id, :integer
|
8
|
+
add_column :profiles, :country_id, :integer
|
9
|
+
add_column :profiles, :language_id, :integer
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
remove_column :profiles, :about
|
14
|
+
remove_column :profiles, :first_name
|
15
|
+
remove_column :profiles, :last_name
|
16
|
+
remove_column :profiles, :city
|
17
|
+
remove_column :profiles, :state_id
|
18
|
+
remove_column :profiles, :country_id
|
19
|
+
remove_column :profiles, :language_id
|
20
|
+
end
|
21
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,9 +1,16 @@
|
|
1
1
|
/*
|
2
|
-
* FancyBox -
|
3
|
-
*
|
4
|
-
*
|
2
|
+
* FancyBox - jQuery Plugin
|
3
|
+
* simple and fancy lightbox alternative
|
4
|
+
*
|
5
5
|
* Copyright (c) 2009 Janis Skarnelis
|
6
|
-
*
|
6
|
+
* Examples and documentation at: http://fancybox.net
|
7
|
+
*
|
8
|
+
* Version: 1.2.6 (16/11/2009)
|
7
9
|
* Requires: jQuery v1.3+
|
8
|
-
|
9
|
-
|
10
|
+
*
|
11
|
+
* Dual licensed under the MIT and GPL licenses:
|
12
|
+
* http://www.opensource.org/licenses/mit-license.php
|
13
|
+
* http://www.gnu.org/licenses/gpl.html
|
14
|
+
*/
|
15
|
+
|
16
|
+
;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(p($){$.q.1Q=p(){J O.2n(p(){n b=$(O).u(\'2o\');8(b.1d(/^3i\\(["\']?(.*\\.2p)["\']?\\)$/i)){b=3j.$1;$(O).u({\'2o\':\'3k\',\'1e\':"3l:3m.3n.3o(3p=D, 3q="+($(O).u(\'3r\')==\'2q-3s\'?\'3t\':\'3u\')+", 13=\'"+b+"\')"}).2n(p(){n a=$(O).u(\'1u\');8(a!=\'2r\'&&a!=\'2s\')$(O).u(\'1u\',\'2s\')})}})};n l,4,1f=F,X=1v 1w,1x,1y=1,1z=/\\.(3v|3w|2p|3x|3y)(.*)?$/i;n m=1A,18=$.14.1g&&$.14.2t.1R(0,1)==6&&!19.3z,1S=18||($.14.1g&&$.14.2t.1R(0,1)==7);$.q.r=p(o){n j=$.2u({},$.q.r.2v,o);n k=O;p 2w(){l=O;4=$.2u({},j);2x();J F};p 2x(){8(1f)J;8($.1T(4.1U)){4.1U()}4.v=[];4.t=0;8(j.v.Y>0){4.v=j.v}C{n a={};8(!l.1B||l.1B==\'\'){n a={K:l.K,G:l.G};8($(l).1C("1l:1D").Y){a.S=$(l).1C("1l:1D")}C{a.S=$(l)}8(a.G==\'\'||1V a.G==\'1m\'){a.G=a.S.2y(\'1W\')}4.v.2z(a)}C{n b=$(k).1e("a[1B="+l.1B+"]");n a={};3A(n i=0;i<b.Y;i++){a={K:b[i].K,G:b[i].G};8($(b[i]).1C("1l:1D").Y){a.S=$(b[i]).1C("1l:1D")}C{a.S=$(b[i])}8(a.G==\'\'||1V a.G==\'1m\'){a.G=a.S.2y(\'1W\')}4.v.2z(a)}}}3B(4.v[4.t].K!=l.K){4.t++}8(4.1E){8(18){$(\'1X, 1Y, 1Z\').u(\'21\',\'3C\');$("#T").u(\'A\',$(U).A())}$("#T").u({\'3D-3E\':4.2A,\'22\':4.2B}).Z()}$(19).11("23.L 24.L",$.q.r.2C);1h()};p 1h(){$("#1n, #1o, #1i, #H").1a();n b=4.v[4.t].K;8(b.1d("1j")||l.3F.2D("1j")>=0){$.q.r.1F();1p(\'<1j s="2E" 3G="2F.q.r.2G()" 3H="3I\'+P.1b(P.3J()*3K)+\'" 2H="0" 3L="0" 13="\'+b+\'"></1j>\',4.1G,4.1H)}C 8(b.1d(/#/)){n c=19.3M.K.3N(\'#\')[0];c=b.3O(c,\'\');c=c.1R(c.2D(\'#\'));1p(\'<9 s="3P">\'+$(c).2I()+\'</9>\',4.1G,4.1H)}C 8(b.1d(1z)){X=1v 1w;X.13=b;8(X.3Q){25()}C{$.q.r.1F();$(X).Q().11(\'3R\',p(){$("#M").1a();25()})}}C{$.q.r.1F();$.3S(b,p(a){$("#M").1a();1p(\'<9 s="3T">\'+a+\'</9>\',4.1G,4.1H)})}};p 25(){n a=X.E;n b=X.A;n c=(4.N*2)+40;n d=(4.N*2)+26;n w=$.q.r.1q();8(4.2J&&(a>(w[0]-c)||b>(w[1]-d))){n e=P.28(P.28(w[0]-c,a)/a,P.28(w[1]-d,b)/b);a=P.1b(e*a);b=P.1b(e*b)}1p(\'<1l 1W="" s="3U" 13="\'+X.13+\'" />\',a,b)};p 2K(){8((4.v.Y-1)>4.t){n a=4.v[4.t+1].K||F;8(a&&a.1d(1z)){1I=1v 1w();1I.13=a}}8(4.t>0){n a=4.v[4.t-1].K||F;8(a&&a.1d(1z)){1I=1v 1w();1I.13=a}}};p 1p(a,b,c){1f=D;n d=4.N;8(1S||m){$("#y")[0].15.2L("A");$("#y")[0].15.2L("E")}8(d>0){b+=d*2;c+=d*2;$("#y").u({\'z\':d+\'R\',\'2M\':d+\'R\',\'2N\':d+\'R\',\'B\':d+\'R\',\'E\':\'2O\',\'A\':\'2O\'});8(1S||m){$("#y")[0].15.2P(\'A\',\'(O.2Q.3V - \'+d*2+\')\');$("#y")[0].15.2P(\'E\',\'(O.2Q.3W - \'+d*2+\')\')}}C{$("#y").u({\'z\':0,\'2M\':0,\'2N\':0,\'B\':0,\'E\':\'2R%\',\'A\':\'2R%\'})}8($("#x").16(":V")&&b==$("#x").E()&&c==$("#x").A()){$("#y").1J(\'29\',p(){$("#y").1r().1K($(a)).2a("1L",p(){1s()})});J}n w=$.q.r.1q();n e=(c+26)>w[1]?w[3]:(w[3]+P.1b((w[1]-c-26)*0.5));n f=(b+40)>w[0]?w[2]:(w[2]+P.1b((w[0]-b-40)*0.5));n g={\'B\':f,\'z\':e,\'E\':b+\'R\',\'A\':c+\'R\'};8($("#x").16(":V")){$("#y").1J("1L",p(){$("#y").1r();$("#x").2b(g,4.2S,4.2T,p(){$("#y").1K($(a)).2a("1L",p(){1s()})})})}C{8(4.2c>0&&4.v[4.t].S!==1m){$("#y").1r().1K($(a));n h=4.v[4.t].S;n i=$.q.r.2d(h);$("#x").u({\'B\':(i.B-20-4.N)+\'R\',\'z\':(i.z-20-4.N)+\'R\',\'E\':$(h).E()+(4.N*2),\'A\':$(h).A()+(4.N*2)});8(4.2e){g.22=\'Z\'}$("#x").2b(g,4.2c,4.2U,p(){1s()})}C{$("#y").1a().1r().1K($(a)).Z();$("#x").u(g).2a("1L",p(){1s()})}}};p 2V(){8(4.t!==0){$("#1o, #2W").Q().11("17",p(e){e.2X();4.t--;1h();J F});$("#1o").Z()}8(4.t!=(4.v.Y-1)){$("#1n, #2Y").Q().11("17",p(e){e.2X();4.t++;1h();J F});$("#1n").Z()}};p 1s(){8($.14.1g){$("#y")[0].15.1M(\'1e\');$("#x")[0].15.1M(\'1e\')}2V();2K();$(U).11("1N.L",p(e){8(e.2f==27&&4.2Z){$.q.r.1c()}C 8(e.2f==37&&4.t!==0){$(U).Q("1N.L");4.t--;1h()}C 8(e.2f==39&&4.t!=(4.v.Y-1)){$(U).Q("1N.L");4.t++;1h()}});8(4.30){$("#y").17($.q.r.1c)}8(4.1E&&4.31){$("#T").11("17",$.q.r.1c)}8(4.33){$("#1i").11("17",$.q.r.1c).Z()}8(1V 4.v[4.t].G!==\'1m\'&&4.v[4.t].G.Y>0){n a=$("#x").1u();$(\'#H 9\').3X(4.v[4.t].G).2I();$(\'#H\').u({\'z\':a.z+$("#x").34()-32,\'B\':a.B+(($("#x").35()*0.5)-($(\'#H\').E()*0.5))}).Z()}8(4.1E&&18){$(\'1X, 1Y, 1Z\',$(\'#y\')).u(\'21\',\'V\')}8($.1T(4.2g)){4.2g(4.v[4.t])}8($.14.1g){$("#x")[0].15.1M(\'1e\');$("#y")[0].15.1M(\'1e\')}1f=F};J O.Q(\'17.L\').11(\'17.L\',2w)};$.q.r.2C=p(){n w=$.q.r.1q();8(4.2h&&$("#x").16(\':V\')){n a=$("#x").35();n b=$("#x").34();n c={\'z\':(b>w[1]?w[3]:w[3]+P.1b((w[1]-b)*0.5)),\'B\':(a>w[0]?w[2]:w[2]+P.1b((w[0]-a)*0.5))};$("#x").u(c);$(\'#H\').u({\'z\':c.z+b-32,\'B\':c.B+((a*0.5)-($(\'#H\').E()*0.5))})}8(18&&$("#T").16(\':V\')){$("#T").u({\'A\':$(U).A()})}8($("#M").16(\':V\')){$("#M").u({\'B\':((w[0]-40)*0.5+w[2]),\'z\':((w[1]-40)*0.5+w[3])})}};$.q.r.1t=p(a,b){J 3Y($.3Z(a.41?a[0]:a,b,D))||0};$.q.r.2d=p(a){n b=a.42();b.z+=$.q.r.1t(a,\'43\');b.z+=$.q.r.1t(a,\'44\');b.B+=$.q.r.1t(a,\'45\');b.B+=$.q.r.1t(a,\'46\');J b};$.q.r.2G=p(){$("#M").1a();$("#2E").Z()};$.q.r.1q=p(){J[$(19).E(),$(19).A(),$(U).47(),$(U).48()]};$.q.r.36=p(){8(!$("#M").16(\':V\')){38(1x);J}$("#M > 9").u(\'z\',(1y*-40)+\'R\');1y=(1y+1)%12};$.q.r.1F=p(){38(1x);n w=$.q.r.1q();$("#M").u({\'B\':((w[0]-40)*0.5+w[2]),\'z\':((w[1]-40)*0.5+w[3])}).Z();$("#M").11(\'17\',$.q.r.1c);1x=49($.q.r.36,4a)};$.q.r.1c=p(){1f=D;$(X).Q();$(U).Q("1N.L");$(19).Q("23.L 24.L");$("#T, #y, #1i").Q();$("#1i, #M, #1o, #1n, #H").1a();1O=p(){8($("#T").16(\':V\')){$("#T").1J("29")}$("#y").1r();8(4.2h){$(19).Q("23.L 24.L")}8(18){$(\'1X, 1Y, 1Z\').u(\'21\',\'V\')}8($.1T(4.2i)){4.2i()}1f=F};8($("#x").16(":V")!==F){8(4.2j>0&&4.v[4.t].S!==1m){n a=4.v[4.t].S;n b=$.q.r.2d(a);n c={\'B\':(b.B-20-4.N)+\'R\',\'z\':(b.z-20-4.N)+\'R\',\'E\':$(a).E()+(4.N*2),\'A\':$(a).A()+(4.N*2)};8(4.2e){c.22=\'1a\'}$("#x").3a(F,D).2b(c,4.2j,4.3b,1O)}C{$("#x").3a(F,D).1J(\'29\',1O)}}C{1O()}J F};$.q.r.3c=p(){n a=\'\';a+=\'<9 s="T"></9>\';a+=\'<9 s="M"><9></9></9>\';a+=\'<9 s="x">\';a+=\'<9 s="3d">\';a+=\'<9 s="1i"></9>\';a+=\'<9 s="W"><9 I="W" s="4b"></9><9 I="W" s="4c"></9><9 I="W" s="4d"></9><9 I="W" s="4e"></9><9 I="W" s="4f"></9><9 I="W" s="4g"></9><9 I="W" s="4h"></9><9 I="W" s="4i"></9></9>\';a+=\'<a K="2k:;" s="1o"><1P I="2l" s="2W"></1P></a><a K="2k:;" s="1n"><1P I="2l" s="2Y"></1P></a>\';a+=\'<9 s="y"></9>\';a+=\'</9>\';a+=\'</9>\';a+=\'<9 s="H"></9>\';$(a).3e("4j");$(\'<3f 4k="0" 4l="0" 4m="0"><3g><1k I="H" s="4n"></1k><1k I="H" s="4o"><9></9></1k><1k I="H" s="4p"></1k></3g></3f>\').3e(\'#H\');8($.14.1g){$(".W").1Q()}8(18){$("9#T").u("1u","2r");$("#M 9, #1i, .H, .2l").1Q();$("#3d").4q(\'<1j s="3h" 13="2k:F;" 4r="2q" 2H="0"></1j>\');n b=$(\'#3h\')[0].4s.U;b.4t();b.1c()}};$.q.r.2v={N:10,2J:D,2e:D,2c:0,2j:0,2S:4u,2U:\'2m\',3b:\'2m\',2T:\'2m\',1G:4v,1H:4w,1E:D,2B:0.3,2A:\'#4x\',2Z:D,33:D,31:D,30:D,2h:D,v:[],1U:1A,2g:1A,2i:1A};$(U).4y(p(){m=$.14.1g&&!$.4z;8($("#x").Y<1){$.q.r.3c()}})})(2F);',62,284,'||||opts||||if|div||||||||||||||var||function|fn|fancybox|id|itemCurrent|css|itemArray||fancy_outer|fancy_content|top|height|left|else|true|width|false|title|fancy_title|class|return|href|fb|fancy_loading|padding|this|Math|unbind|px|orig|fancy_overlay|document|visible|fancy_bg|imagePreloader|length|show||bind||src|browser|style|is|click|IE6|window|hide|round|close|match|filter|busy|msie|_change_item|fancy_close|iframe|td|img|undefined|fancy_right|fancy_left|_set_content|getViewport|empty|_finish|getNumeric|position|new|Image|loadingTimer|loadingFrame|imageRegExp|null|rel|children|first|overlayShow|showLoading|frameWidth|frameHeight|objNext|fadeOut|append|normal|removeAttribute|keydown|__cleanup|span|fixPNG|substr|oldIE|isFunction|callbackOnStart|typeof|alt|embed|object|select||visibility|opacity|resize|scroll|_proceed_image|60||min|fast|fadeIn|animate|zoomSpeedIn|getPosition|zoomOpacity|keyCode|callbackOnShow|centerOnScroll|callbackOnClose|zoomSpeedOut|javascript|fancy_ico|swing|each|backgroundImage|png|no|absolute|relative|version|extend|defaults|_initialize|_start|attr|push|overlayColor|overlayOpacity|scrollBox|indexOf|fancy_frame|jQuery|showIframe|frameborder|html|imageScale|_preload_neighbor_images|removeExpression|right|bottom|auto|setExpression|parentNode|100|zoomSpeedChange|easingChange|easingIn|_set_navigation|fancy_left_ico|stopPropagation|fancy_right_ico|enableEscapeButton|hideOnContentClick|hideOnOverlayClick||showCloseButton|outerHeight|outerWidth|animateLoading||clearInterval||stop|easingOut|build|fancy_inner|appendTo|table|tr|fancy_bigIframe|url|RegExp|none|progid|DXImageTransform|Microsoft|AlphaImageLoader|enabled|sizingMethod|backgroundRepeat|repeat|crop|scale|jpg|gif|bmp|jpeg|XMLHttpRequest|for|while|hidden|background|color|className|onload|name|fancy_iframe|random|1000|hspace|location|split|replace|fancy_div|complete|load|get|fancy_ajax|fancy_img|clientHeight|clientWidth|text|parseInt|curCSS||jquery|offset|paddingTop|borderTopWidth|paddingLeft|borderLeftWidth|scrollLeft|scrollTop|setInterval|66|fancy_bg_n|fancy_bg_ne|fancy_bg_e|fancy_bg_se|fancy_bg_s|fancy_bg_sw|fancy_bg_w|fancy_bg_nw|body|cellspacing|cellpadding|border|fancy_title_left|fancy_title_main|fancy_title_right|prepend|scrolling|contentWindow|open|300|560|340|666|ready|boxModel'.split('|'),0,{}));
|
@@ -1,16 +1,17 @@
|
|
1
1
|
jQuery(document).ready(function() {
|
2
2
|
jQuery(".tip-field").focus(function() {
|
3
3
|
jQuery(".active").removeClass("active");
|
4
|
-
var tip_key = jQuery('#' + this.id).siblings('
|
4
|
+
var tip_key = jQuery('#' + this.id).siblings('.tip-key');
|
5
5
|
var control_id = this.id;
|
6
6
|
var help_id = this.id;
|
7
|
+
var field = jQuery('#' + this.id);
|
7
8
|
if (tip_key.length > 0){
|
8
9
|
control_id = tip_key.html();
|
9
|
-
help_id =
|
10
|
-
}
|
11
|
-
var tip_text =
|
12
|
-
var tip_title =
|
13
|
-
var tip_position =
|
10
|
+
help_id = field.siblings('.tip-id').html();
|
11
|
+
}
|
12
|
+
var tip_text = field.siblings('.tip-text').html();
|
13
|
+
var tip_title = field.siblings('.tip-title').html();
|
14
|
+
var tip_position = field.siblings('.tip-position').html();
|
14
15
|
if (!tip_position) { tip_position = 'right'; }
|
15
16
|
show_tip(control_id, tip_title, tip_text, tip_position);
|
16
17
|
jQuery("#" + help_id + "-container").addClass("active");
|
@@ -51,6 +51,47 @@ function show_hide_obj (ary_objs_to_show, ary_objs_to_hide)
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
|
54
|
+
function setup_country(force_load){
|
55
|
+
|
56
|
+
var country_id = jQuery("#countries").val();
|
57
|
+
var state_id = jQuery("#states").val();
|
58
|
+
|
59
|
+
if (country_id == undefined){
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
|
63
|
+
if (country_id == '-1'){
|
64
|
+
jQuery("#states").val('-1');
|
65
|
+
jQuery("#counties").val('-1');
|
66
|
+
}
|
67
|
+
|
68
|
+
if (country_id == '-1' || country_id == ''){
|
69
|
+
jQuery("#states-container").hide();
|
70
|
+
jQuery("#counties-container").hide();
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
|
74
|
+
if(force_load || state_id == '' || state_id == null || state_id == -1) {
|
75
|
+
jQuery.getJSON("/helper/load_states_for_country/" + country_id + ".js", function(data){
|
76
|
+
var options = '';
|
77
|
+
jQuery("#counties-container").hide();
|
78
|
+
jQuery('#states-container label').html(data.label);
|
79
|
+
states = data.states;
|
80
|
+
if(states.length > 0){
|
81
|
+
for (var i = 0; i < states.length; i++) {
|
82
|
+
var state_id = states[i].state.id;
|
83
|
+
if(state_id == undefined) { state_id = ''; }
|
84
|
+
options += '<option value="' + state_id + '">' + states[i].state.name + '</option>';
|
85
|
+
}
|
86
|
+
jQuery("#states-container").show();
|
87
|
+
jQuery("select#states").html(options);
|
88
|
+
} else {
|
89
|
+
jQuery("#states-container").hide();
|
90
|
+
}
|
91
|
+
});
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
54
95
|
jQuery.jGrowl.defaults.position = 'center';
|
55
96
|
|
56
97
|
jQuery.jGrowl.info = function(msg){
|
@@ -69,12 +110,18 @@ jQuery(document).ready(function() {
|
|
69
110
|
jQuery("#global-login").focus(function() {
|
70
111
|
jQuery("#global-login").val("");
|
71
112
|
});
|
72
|
-
|
73
113
|
jQuery("#global-password").focus(function() {
|
74
114
|
jQuery("#global-password").val("");
|
75
115
|
});
|
76
|
-
|
77
116
|
jQuery("#quick-login-submit").click(function() {
|
78
117
|
jQuery("#quick-login").submit();
|
79
|
-
});
|
118
|
+
});
|
119
|
+
|
120
|
+
jQuery("#countries-container select").change(function() {
|
121
|
+
setup_country(true);
|
122
|
+
});
|
123
|
+
if(jQuery("#states").val() == '' || jQuery("#states").val() == null) {
|
124
|
+
jQuery("#states-container").hide();
|
125
|
+
}
|
126
|
+
setup_country(false);
|
80
127
|
});
|