muck-engine 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/admin/muck/base_controller.rb +7 -0
- data/app/helpers/muck_admin_helper.rb +6 -0
- data/app/helpers/muck_engine_helper.rb +12 -27
- data/app/views/layouts/admin/_footer.html.erb +1 -4
- data/app/views/layouts/admin/_head.html.erb +5 -3
- data/app/views/layouts/admin/_header.html.erb +4 -0
- data/app/views/layouts/admin/_header_nav_item.html.erb +1 -3
- data/app/views/layouts/global/_head.html.erb +7 -3
- data/lib/muck_engine.rb +14 -13
- data/lib/muck_engine/flash_errors.rb +32 -0
- data/lib/test/muck_factories.rb +8 -0
- data/locales/en.yml +1 -0
- data/muck-engine.gemspec +7 -64
- data/public/javascripts/muck.js +39 -13
- data/public/stylesheets/admin.css +19 -3
- data/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css +160 -0
- data/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css +160 -0
- data/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css +160 -0
- data/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css +160 -0
- data/test/rails_root/public/javascripts/muck.js +43 -3
- data/test/rails_root/public/stylesheets/admin.css +32 -8
- metadata +7 -64
- data/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_glass_50_99c2ff_1x400.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_888888_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css +0 -404
- data/public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css +0 -404
- data/public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css +0 -404
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css +0 -404
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -29,4 +29,11 @@ class Admin::Muck::BaseController < ApplicationController
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
# Output a page update that will display messages in the flash
|
33
|
+
def output_admin_messages(fields = nil, title = '', options = { :class => 'notify-box' }, flash_only = false)
|
34
|
+
render :update do |page|
|
35
|
+
page.replace_html 'admin-messages', output_errors(title, options, fields, flash_only)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
32
39
|
end
|
@@ -2,6 +2,13 @@ require 'md5'
|
|
2
2
|
|
3
3
|
module MuckEngineHelper
|
4
4
|
|
5
|
+
# Outputs the appropriate http protocol based on
|
6
|
+
# the request type. if https is desired then
|
7
|
+
# pass true to override default behavior
|
8
|
+
def http_protocol(use_ssl = request.ssl?)
|
9
|
+
(use_ssl ? "https://" : "http://")
|
10
|
+
end
|
11
|
+
|
5
12
|
# Outputs a small bit of javascript that will enable message
|
6
13
|
# output to jgrowl or to the given message dom id
|
7
14
|
#
|
@@ -36,33 +43,6 @@ module MuckEngineHelper
|
|
36
43
|
remote_form_for(record_or_name_or_array, *args, &proc)
|
37
44
|
end
|
38
45
|
|
39
|
-
def output_flash(options = {})
|
40
|
-
output_errors('', options, nil, true)
|
41
|
-
end
|
42
|
-
|
43
|
-
def output_errors(title, options = {}, fields = nil, flash_only = false)
|
44
|
-
fields = [fields] unless fields.is_a?(Array)
|
45
|
-
flash_html = render(:partial => 'shared/flash_messages')
|
46
|
-
flash.clear
|
47
|
-
css_class = "class=\"#{options[:class]}\"" unless options[:class].nil?
|
48
|
-
field_errors = render(:partial => 'shared/field_error', :collection => fields)
|
49
|
-
|
50
|
-
if flash_only || (!flash_html.empty? && field_errors.empty?)
|
51
|
-
# Only flash. Don't render errors for any fields
|
52
|
-
render(:partial => 'shared/flash_error_box', :locals => {:flash_html => flash_html, :css_class => css_class})
|
53
|
-
elsif !field_errors.empty?
|
54
|
-
# Field errors and/or flash
|
55
|
-
render(:partial => 'shared/error_box', :locals => {:title => title,
|
56
|
-
:flash_html => flash_html,
|
57
|
-
:field_errors => field_errors,
|
58
|
-
:css_class => css_class,
|
59
|
-
:extra_html => options[:extra_html]})
|
60
|
-
else
|
61
|
-
#nothing
|
62
|
-
''
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
46
|
# generates javascript that will hide a link or button
|
67
47
|
# when click and then show a different dom object
|
68
48
|
def show_hide_on_click(id_to_show, id_to_hide)
|
@@ -274,4 +254,9 @@ module MuckEngineHelper
|
|
274
254
|
term = term.gsub('.', '%2E')
|
275
255
|
end
|
276
256
|
|
257
|
+
def format_date(date)
|
258
|
+
return '' if date.nil?
|
259
|
+
date.to_date.to_s(:long)
|
260
|
+
end
|
261
|
+
|
277
262
|
end
|
@@ -2,12 +2,14 @@
|
|
2
2
|
<meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
|
3
3
|
<%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
|
4
4
|
<!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
|
5
|
-
<%= stylesheet_link_tag %W{ reset styles blueprint/liquid_screen.
|
5
|
+
<%= stylesheet_link_tag %W{ reset styles blueprint/liquid_screen jquery/jquery.autocomplete jquery/jquery.fancybox admin }, :cache => true %>
|
6
|
+
<%= google_load_jquery_ui_css(http_protocol) %>
|
6
7
|
<%= stylesheet_link_tag MuckEngine.muck_admin_css -%>
|
7
|
-
<%= google_load_jquery %>
|
8
|
-
<%= google_load_jquery_ui %>
|
8
|
+
<%= google_load_jquery(http_protocol) %>
|
9
|
+
<%= google_load_jquery_ui(http_protocol) %>
|
9
10
|
<%= javascript_include_tag %w{
|
10
11
|
jquery/jrails.js
|
12
|
+
jquery/jquery.form.js
|
11
13
|
jquery/jquery.jgrowl.js
|
12
14
|
jquery/jquery.tips.js
|
13
15
|
jquery/jquery.fancybox.js
|
@@ -1,3 +1,7 @@
|
|
1
|
+
<div id="admin-messages" class="span-24">
|
2
|
+
<%= yield :messages -%>
|
3
|
+
<%= output_flash(:class => 'notify-box') %>
|
4
|
+
</div>
|
1
5
|
<div id="admin-account" class="navigation span-24">
|
2
6
|
<ul>
|
3
7
|
<li><%=translate('muck.engine.admin_welcome', :user => current_user.display_name) %></li>
|
@@ -1,5 +1,3 @@
|
|
1
1
|
<li id="<%=header_nav_item.name.parameterize%>">
|
2
|
-
<a
|
3
|
-
<%= header_nav_item.name %>
|
4
|
-
</a>
|
2
|
+
<a <%= header_nav_item_image(header_nav_item) -%> href="<%=header_nav_item.path %>"><%= header_nav_item.name %></a>
|
5
3
|
</li>
|
@@ -7,13 +7,17 @@
|
|
7
7
|
<meta name="MSSmartTagsPreventParsing" content="true" />
|
8
8
|
<%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
|
9
9
|
<!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
|
10
|
-
<%=
|
11
|
-
<%=
|
12
|
-
<%=
|
10
|
+
<%= google_load_jquery_ui_css(http_protocol) %>
|
11
|
+
<%= stylesheet_link_tag %W{ reset styles blueprint/screen.css default }, :cache => true %>
|
12
|
+
<%= google_load_jquery(http_protocol) %>
|
13
|
+
<%= google_load_jquery_ui(http_protocol) %>
|
13
14
|
<%= javascript_include_tag %w{
|
14
15
|
jquery/jrails.js
|
16
|
+
jquery/jquery.form.js
|
15
17
|
jquery/jquery.jgrowl.js
|
16
18
|
jquery/jquery.tips.js
|
19
|
+
jquery/jquery.easing.js
|
20
|
+
jquery/jquery.fancybox.js
|
17
21
|
muck.js
|
18
22
|
application.js }, :cache => 'all_js_cached' %>
|
19
23
|
<%= javascript_tag %[const AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? %>
|
data/lib/muck_engine.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
require 'muck_engine/flash_errors'
|
1
2
|
|
2
3
|
ActionController::Base.send :include, ActionController::MuckApplication
|
4
|
+
ActionController::Base.send :include, MuckEngine::FlashErrors
|
3
5
|
ActiveRecord::Base.send :include, ActiveRecord::MuckModel
|
4
6
|
ActionMailer::Base.send :include, ActionMailer::MuckMailer
|
5
7
|
ActionController::Base.send :helper, MuckEngineHelper
|
6
8
|
ActionController::Base.send :helper, MuckAdminHelper
|
9
|
+
ActionController::Base.send :helper, MuckEngine::FlashErrors
|
7
10
|
|
8
11
|
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
|
9
12
|
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'rails_i18n', '*.{rb,yml}') ]
|
@@ -21,7 +24,7 @@ end
|
|
21
24
|
class MuckEngine
|
22
25
|
|
23
26
|
def self.muck_admin_nav_items
|
24
|
-
@@muck_admin_nav_items
|
27
|
+
@@muck_admin_nav_items ||= []
|
25
28
|
end
|
26
29
|
|
27
30
|
# Add an item to the main admin navigation menu
|
@@ -30,38 +33,36 @@ class MuckEngine
|
|
30
33
|
# path: Url to link to
|
31
34
|
# image: Image for the link
|
32
35
|
def self.add_muck_admin_nav_item(name, path, image = '')
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
:image => image)
|
36
|
+
muck_admin_nav_items << OpenStruct.new(:name => name,
|
37
|
+
:path => path,
|
38
|
+
:image => image)
|
37
39
|
end
|
38
40
|
|
39
41
|
|
40
42
|
def self.muck_dashboard_items
|
41
|
-
@@muck_dashboard_items
|
43
|
+
@@muck_dashboard_items ||= []
|
42
44
|
end
|
43
45
|
|
44
46
|
# Add an item to the admin dashboard
|
45
47
|
# path: Path to the partial
|
46
48
|
# locals: Hash of values to pass as locals to the partial
|
47
49
|
def self.add_muck_dashboard_item(path, locals = {})
|
48
|
-
|
49
|
-
|
50
|
-
:locals => locals)
|
50
|
+
muck_dashboard_items << OpenStruct.new(:path => path,
|
51
|
+
:locals => locals)
|
51
52
|
end
|
52
53
|
|
53
54
|
|
54
55
|
def self.muck_admin_css
|
55
|
-
@@muck_admin_css
|
56
|
+
@@muck_admin_css ||= []
|
56
57
|
end
|
57
58
|
|
58
59
|
# Add css for the admin UI
|
59
60
|
def self.add_muck_admin_css(css_file)
|
60
|
-
|
61
|
-
@@muck_admin_css << css_file
|
61
|
+
muck_admin_css << css_file
|
62
62
|
end
|
63
63
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# Add a link to admin home
|
67
|
-
MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_home'), '/admin', '/images/admin/home.gif')
|
67
|
+
#MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_home'), '/admin', '/images/admin/home.gif')
|
68
|
+
MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_home'), '/admin')
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class MuckEngine
|
2
|
+
module FlashErrors
|
3
|
+
|
4
|
+
def output_flash(options = {})
|
5
|
+
output_errors('', options, nil, true)
|
6
|
+
end
|
7
|
+
|
8
|
+
def output_errors(title, options = {}, fields = nil, flash_only = false)
|
9
|
+
fields = [fields] unless fields.is_a?(Array)
|
10
|
+
flash_html = render(:partial => 'shared/flash_messages')
|
11
|
+
flash.clear
|
12
|
+
css_class = "class=\"#{options[:class]}\"" unless options[:class].nil?
|
13
|
+
field_errors = render(:partial => 'shared/field_error', :collection => fields)
|
14
|
+
|
15
|
+
if flash_only || (!flash_html.empty? && field_errors.empty?)
|
16
|
+
# Only flash. Don't render errors for any fields
|
17
|
+
render(:partial => 'shared/flash_error_box', :locals => {:flash_html => flash_html, :css_class => css_class})
|
18
|
+
elsif !field_errors.empty?
|
19
|
+
# Field errors and/or flash
|
20
|
+
render(:partial => 'shared/error_box', :locals => {:title => title,
|
21
|
+
:flash_html => flash_html,
|
22
|
+
:field_errors => field_errors,
|
23
|
+
:css_class => css_class,
|
24
|
+
:extra_html => options[:extra_html]})
|
25
|
+
else
|
26
|
+
#nothing
|
27
|
+
''
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
data/lib/test/muck_factories.rb
CHANGED
@@ -81,6 +81,14 @@ Factory.define :role do |f|
|
|
81
81
|
f.rolename 'administrator'
|
82
82
|
end
|
83
83
|
|
84
|
+
Factory.define :access_code do |f|
|
85
|
+
f.code { Factory.next(:name) }
|
86
|
+
f.uses 0
|
87
|
+
f.unlimited false
|
88
|
+
f.expires_at { DateTime.now + 2.weeks }
|
89
|
+
f.use_limit 1
|
90
|
+
end
|
91
|
+
|
84
92
|
Factory.define :activity do |f|
|
85
93
|
f.item {|a| a.association(:user)}
|
86
94
|
f.template ''
|
data/locales/en.yml
CHANGED
data/muck-engine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-engine}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
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{2010-01-
|
12
|
+
s.date = %q{2010-01-30}
|
13
13
|
s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
|
14
14
|
s.email = %q{justin@tatemae.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -70,6 +70,7 @@ Gem::Specification.new do |s|
|
|
70
70
|
"lib/action_mailer/muck_mailer.rb",
|
71
71
|
"lib/active_record/muck_model.rb",
|
72
72
|
"lib/muck_engine.rb",
|
73
|
+
"lib/muck_engine/flash_errors.rb",
|
73
74
|
"lib/muck_engine/initialize_routes.rb",
|
74
75
|
"lib/muck_engine/populate.rb",
|
75
76
|
"lib/muck_engine/tasks.rb",
|
@@ -577,70 +578,12 @@ Gem::Specification.new do |s|
|
|
577
578
|
"public/stylesheets/blueprint/src/print.css",
|
578
579
|
"public/stylesheets/blueprint/src/reset.css",
|
579
580
|
"public/stylesheets/blueprint/src/typography.css",
|
580
|
-
"public/stylesheets/jquery/cupertino/
|
581
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png",
|
582
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png",
|
583
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_glass_50_99c2ff_1x400.png",
|
584
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png",
|
585
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png",
|
586
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_glass_95_fef1ec_1x400.png",
|
587
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png",
|
588
|
-
"public/stylesheets/jquery/cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png",
|
589
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_222222_256x240.png",
|
590
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_2694e8_256x240.png",
|
591
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_2e83ff_256x240.png",
|
592
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_72a7cf_256x240.png",
|
593
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_888888_256x240.png",
|
594
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png",
|
595
|
-
"public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png",
|
596
|
-
"public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css",
|
581
|
+
"public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css",
|
597
582
|
"public/stylesheets/jquery/jquery.autocomplete.css",
|
598
583
|
"public/stylesheets/jquery/jquery.fancybox.css",
|
599
|
-
"public/stylesheets/jquery/redmond/
|
600
|
-
"public/stylesheets/jquery/
|
601
|
-
"public/stylesheets/jquery/
|
602
|
-
"public/stylesheets/jquery/redmond/images/ui-bg_glass_85_dfeffc_1x400.png",
|
603
|
-
"public/stylesheets/jquery/redmond/images/ui-bg_glass_95_fef1ec_1x400.png",
|
604
|
-
"public/stylesheets/jquery/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png",
|
605
|
-
"public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png",
|
606
|
-
"public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png",
|
607
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_217bc0_256x240.png",
|
608
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_2e83ff_256x240.png",
|
609
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_469bdd_256x240.png",
|
610
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_6da8d5_256x240.png",
|
611
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_cd0a0a_256x240.png",
|
612
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png",
|
613
|
-
"public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png",
|
614
|
-
"public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css",
|
615
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png",
|
616
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png",
|
617
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png",
|
618
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_glass_65_ffffff_1x400.png",
|
619
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_dadada_1x400.png",
|
620
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png",
|
621
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png",
|
622
|
-
"public/stylesheets/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
|
623
|
-
"public/stylesheets/jquery/smoothness/images/ui-icons_222222_256x240.png",
|
624
|
-
"public/stylesheets/jquery/smoothness/images/ui-icons_2e83ff_256x240.png",
|
625
|
-
"public/stylesheets/jquery/smoothness/images/ui-icons_454545_256x240.png",
|
626
|
-
"public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png",
|
627
|
-
"public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png",
|
628
|
-
"public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css",
|
629
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png",
|
630
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png",
|
631
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png",
|
632
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png",
|
633
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png",
|
634
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png",
|
635
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png",
|
636
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png",
|
637
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png",
|
638
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png",
|
639
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png",
|
640
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png",
|
641
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png",
|
642
|
-
"public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png",
|
643
|
-
"public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css",
|
584
|
+
"public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css",
|
585
|
+
"public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css",
|
586
|
+
"public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css",
|
644
587
|
"public/stylesheets/reset.css",
|
645
588
|
"public/stylesheets/styles.css",
|
646
589
|
"rails/init.rb",
|
data/public/javascripts/muck.js
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
//jQuery.noConflict();
|
2
2
|
jQuery(document).ajaxSend(function(event, request, settings) {
|
3
|
-
request
|
4
|
-
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
5
|
-
|
3
|
+
add_headers(request);
|
6
4
|
if (settings.type.toUpperCase() == 'GET' || typeof(AUTH_TOKEN) == "undefined") return; // for details see: http://www.justinball.com/2009/07/08/jquery-ajax-get-in-firefox-post-in-internet-explorer/
|
7
5
|
// settings.data is a serialized string like "foo=bar&baz=boink" (or null)
|
8
6
|
settings.data = settings.data || "";
|
@@ -92,21 +90,49 @@ function setup_country(force_load){
|
|
92
90
|
}
|
93
91
|
}
|
94
92
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
}
|
100
|
-
|
101
|
-
jQuery.jGrowl.warn = function(msg){
|
102
|
-
jQuery.jGrowl(msg);
|
93
|
+
function apply_ajax_forms() {
|
94
|
+
jQuery('form.ajax').ajaxForm({
|
95
|
+
dataType: 'script',
|
96
|
+
beforeSend: add_headers
|
97
|
+
});
|
98
|
+
jQuery('form.ajax').append('<input type="hidden" name="format" value="js" />');
|
103
99
|
}
|
104
100
|
|
105
|
-
|
106
|
-
|
101
|
+
function add_headers(xhr){
|
102
|
+
xhr.setRequestHeader("Accept", "text/javascript");
|
103
|
+
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
107
104
|
}
|
108
105
|
|
109
106
|
jQuery(document).ready(function() {
|
107
|
+
|
108
|
+
jQuery('a.ajax-delete').live('click', function() {
|
109
|
+
jQuery.post(this.href, { _method: 'delete', format: 'js' }, null, "script");
|
110
|
+
return false;
|
111
|
+
});
|
112
|
+
|
113
|
+
jQuery('a.ajax-update').live('click', function() {
|
114
|
+
jQuery.post(this.href, { _method: 'put', format: 'js' }, null, "script");
|
115
|
+
return false;
|
116
|
+
});
|
117
|
+
|
118
|
+
jQuery(".submit-form").click(function() {
|
119
|
+
jQuery(this).parent('form').submit();
|
120
|
+
});
|
121
|
+
|
122
|
+
apply_ajax_forms();
|
123
|
+
|
124
|
+
jQuery('a.fancy-pop').fancybox({'hideOnContentClick':false, 'overlayShow':true, 'frameWidth':600, 'frameHeight':500 });
|
125
|
+
|
126
|
+
jQuery('a.dialog-pop').live('click', function() {
|
127
|
+
var d = jQuery('<div class="dialog"></div>').appendTo("body");
|
128
|
+
d.dialog({ modal: true, autoOpen: false, width: 'auto', title: jQuery(this).attr('title') });
|
129
|
+
d.load(jQuery(this).attr('href'), '', function(){
|
130
|
+
d.dialog("open");
|
131
|
+
apply_ajax_forms();
|
132
|
+
});
|
133
|
+
return false;
|
134
|
+
});
|
135
|
+
|
110
136
|
jQuery("#global-login").focus(function() {
|
111
137
|
jQuery("#global-login").val("");
|
112
138
|
});
|