muck-engine 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -3
- data/VERSION +1 -1
- data/app/helpers/muck_custom_form_builder.rb +17 -3
- data/app/models/country.rb +2 -2
- data/app/models/language.rb +13 -1
- data/app/models/state.rb +1 -1
- data/lib/action_controller/muck_application.rb +9 -0
- data/lib/muck_engine/tasks.rb +1 -1
- data/locales/en.yml +8 -1
- data/muck-engine.gemspec +20 -2
- data/public/images/fancybox/fancy_closebox.png +0 -0
- data/public/images/fancybox/fancy_left.png +0 -0
- data/public/images/fancybox/fancy_progress.png +0 -0
- data/public/images/fancybox/fancy_right.png +0 -0
- data/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/public/images/fancybox/fancy_title_left.png +0 -0
- data/public/images/fancybox/fancy_title_main.png +0 -0
- data/public/images/fancybox/fancy_title_right.png +0 -0
- data/public/javascripts/jquery/jquery.easing.js +1 -0
- data/public/javascripts/jquery/jquery.fancybox.js +9 -0
- data/public/javascripts/muck.js +7 -4
- data/public/stylesheets/jquery/jquery.fancybox.css +44 -0
- data/public/stylesheets/styles.css +5 -1
- metadata +20 -2
data/README.rdoc
CHANGED
@@ -73,8 +73,11 @@ http://www.ajaxbestiary.com/Labs/SilkSprite/
|
|
73
73
|
The muck engine uses jRails and thus jQuery for javascript:
|
74
74
|
http://ennerchi.com/projects/jrails
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
=== Other Javascript libraries.
|
77
|
+
Muck engine installs the following javascript libraries:
|
78
|
+
jGrowl - http://www.stanlemon.net/projects/jgrowl.html
|
79
|
+
fancybox - http://fancy.klade.lv/home
|
80
|
+
easing - http://gsgd.co.uk/sandbox/jquery/easing/
|
81
|
+
fancyzoom - http://orderedlist.com/articles/fancyzoom-meet-jquery
|
79
82
|
|
80
83
|
Copyright (c) 2009 Justin Ball, released under the MIT license
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.18
|
@@ -108,16 +108,30 @@ class MuckCustomFormBuilder < ActionView::Helpers::FormBuilder
|
|
108
108
|
country_id_field_name = options.delete(:country_id) || 'country_id'
|
109
109
|
country_id = get_instance_object_value(country_id_field_name)
|
110
110
|
@states = country_id.nil? ? [] : (additional_state ? [additional_state] : []) + State.find(:all, :conditions => ["country_id = ?", country_id], :order => "name asc")
|
111
|
-
self.menu_select(method, '
|
111
|
+
self.menu_select(method, I18n.t('muck.engine.choose_state'), @states, options.merge(:prompt => I18n.t('muck.engine.select_state_prompt'), :wrapper_id => 'states-container'), html_options.merge(:id => 'states'))
|
112
112
|
end
|
113
113
|
|
114
114
|
# creates a select control with countries. Default id is 'countries'. If 'retain' is passed for the class value the value of this
|
115
|
-
# control will be written into a cookie with the key '
|
115
|
+
# control will be written into a cookie with the key 'countries'.
|
116
116
|
def country_select(method, options = {}, html_options = {}, additional_country = nil)
|
117
117
|
@countries ||= (additional_country ? [additional_country] : []) + Country.find(:all, :order => 'sort, name asc')
|
118
|
-
self.menu_select(method, '
|
118
|
+
self.menu_select(method, I18n.t('muck.engine.choose_country'), @countries, options.merge(:prompt => I18n.t('muck.engine.select_country_prompt'), :wrapper_id => 'countries-container'), html_options.merge(:id => 'countries'))
|
119
119
|
end
|
120
120
|
|
121
|
+
# creates a select control with languages. Default id is 'languages'. If 'retain' is passed for the class value the value of this
|
122
|
+
# control will be written into a cookie with the key 'languages'.
|
123
|
+
def language_select(method, options = {}, html_options = {}, additional_language = nil)
|
124
|
+
@languages ||= (additional_country ? [additional_language] : []) + Language.find(:all, :order => 'name asc')
|
125
|
+
self.menu_select(method, I18n.t('muck.engine.choose_language'), @languages, options.merge(:prompt => I18n.t('muck.engine.select_language_prompt'), :wrapper_id => 'languages-container'), html_options.merge(:id => 'languages'))
|
126
|
+
end
|
127
|
+
|
128
|
+
# creates a select control with languages specific to muck raker. Default id is 'muck_raker_languages'. If 'retain' is passed for the class value the value of this
|
129
|
+
# control will be written into a cookie with the key 'languages'.
|
130
|
+
def muck_raker_language_select(method, options = {}, html_options = {}, additional_language = nil)
|
131
|
+
@languages ||= (additional_language ? [additional_language] : []) + Language.find(:all, :order => 'name asc', :conditions => 'languages.muck_raker_supported = true')
|
132
|
+
self.menu_select(method, I18n.t('muck.engine.choose_language'), @languages, options.merge(:prompt => I18n.t('muck.engine.select_language_prompt'), :wrapper_id => 'muck_raker_languages-container'), html_options.merge(:id => 'muck_raker_languages'))
|
133
|
+
end
|
134
|
+
|
121
135
|
def get_instance_object_value(field_name)
|
122
136
|
obj = object || @template.instance_variable_get("@#{@object_name}")
|
123
137
|
obj.send(field_name) rescue nil
|
data/app/models/country.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
#
|
3
3
|
# Table name: countries
|
4
4
|
#
|
5
|
-
# id :integer
|
5
|
+
# id :integer not null, primary key
|
6
6
|
# name :string(128) default(""), not null
|
7
7
|
# abbreviation :string(3) default(""), not null
|
8
|
-
# sort :integer
|
8
|
+
# sort :integer default(1000), not null
|
9
9
|
#
|
10
10
|
|
11
11
|
class Country < ActiveRecord::Base
|
data/app/models/language.rb
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
+
# == Schema Information
|
2
|
+
#
|
3
|
+
# Table name: languages
|
4
|
+
#
|
5
|
+
# id :integer not null, primary key
|
6
|
+
# name :string(255)
|
7
|
+
# english_name :string(255)
|
8
|
+
# locale :string(255)
|
9
|
+
# supported :boolean default(TRUE)
|
10
|
+
# is_default :integer default(0)
|
11
|
+
#
|
12
|
+
|
1
13
|
class Language < ActiveRecord::Base
|
2
14
|
|
3
15
|
def self.locale_id
|
4
|
-
languages = Language.find(:all, :select => 'id, locale', :conditions => 'muck_raker_supported = true')
|
16
|
+
languages = Language.find(:all, :select => 'id, locale', :conditions => 'languages.muck_raker_supported = true')
|
5
17
|
@@locale_ids ||= Hash[*languages.collect {|v|[v.locale.to_sym, v.id]}.flatten]
|
6
18
|
@@locale_ids[I18n.locale]
|
7
19
|
end
|
data/app/models/state.rb
CHANGED
@@ -99,6 +99,15 @@ module ActionController
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
+
# render methods
|
103
|
+
def render_as_html
|
104
|
+
last_template_format = @template.template_format
|
105
|
+
@template.template_format = :html
|
106
|
+
result = yield
|
107
|
+
@template.template_format = last_template_format
|
108
|
+
result
|
109
|
+
end
|
110
|
+
|
102
111
|
end
|
103
112
|
|
104
113
|
def self.included(receiver)
|
data/lib/muck_engine/tasks.rb
CHANGED
data/locales/en.yml
CHANGED
@@ -15,4 +15,11 @@ en:
|
|
15
15
|
help: Help
|
16
16
|
settings_saved: Settings have been saved.
|
17
17
|
delete: Delete
|
18
|
-
update: Update
|
18
|
+
update: Update
|
19
|
+
engine:
|
20
|
+
choose_country: "Choose Country"
|
21
|
+
select_country_prompt: "Please select a country"
|
22
|
+
choose_state: "Choose State"
|
23
|
+
select_state_prompt: "Please select a state"
|
24
|
+
choose_language: "Choose Language"
|
25
|
+
select_language_prompt: "Please select a language"
|
data/muck-engine.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{muck-engine}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.18"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Justin Ball"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-20}
|
10
10
|
s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
|
11
11
|
s.email = %q{justinball@gmail.com}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -180,6 +180,21 @@ Gem::Specification.new do |s|
|
|
180
180
|
"public/images/arrow_left.gif",
|
181
181
|
"public/images/arrow_right.gif",
|
182
182
|
"public/images/arrow_up.gif",
|
183
|
+
"public/images/fancybox/fancy_closebox.png",
|
184
|
+
"public/images/fancybox/fancy_left.png",
|
185
|
+
"public/images/fancybox/fancy_progress.png",
|
186
|
+
"public/images/fancybox/fancy_right.png",
|
187
|
+
"public/images/fancybox/fancy_shadow_e.png",
|
188
|
+
"public/images/fancybox/fancy_shadow_n.png",
|
189
|
+
"public/images/fancybox/fancy_shadow_ne.png",
|
190
|
+
"public/images/fancybox/fancy_shadow_nw.png",
|
191
|
+
"public/images/fancybox/fancy_shadow_s.png",
|
192
|
+
"public/images/fancybox/fancy_shadow_se.png",
|
193
|
+
"public/images/fancybox/fancy_shadow_sw.png",
|
194
|
+
"public/images/fancybox/fancy_shadow_w.png",
|
195
|
+
"public/images/fancybox/fancy_title_left.png",
|
196
|
+
"public/images/fancybox/fancy_title_main.png",
|
197
|
+
"public/images/fancybox/fancy_title_right.png",
|
183
198
|
"public/images/icons/accept.png",
|
184
199
|
"public/images/icons/add.png",
|
185
200
|
"public/images/icons/delete.png",
|
@@ -190,6 +205,8 @@ Gem::Specification.new do |s|
|
|
190
205
|
"public/javascripts/fancyzoom.min.js",
|
191
206
|
"public/javascripts/fancyzoom.min.js",
|
192
207
|
"public/javascripts/jquery/jquery-ui.js",
|
208
|
+
"public/javascripts/jquery/jquery.easing.js",
|
209
|
+
"public/javascripts/jquery/jquery.fancybox.js",
|
193
210
|
"public/javascripts/jquery/jquery.form.js",
|
194
211
|
"public/javascripts/jquery/jquery.jgrowl.js",
|
195
212
|
"public/javascripts/jquery/jquery.js",
|
@@ -247,6 +264,7 @@ Gem::Specification.new do |s|
|
|
247
264
|
"public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png",
|
248
265
|
"public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png",
|
249
266
|
"public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css",
|
267
|
+
"public/stylesheets/jquery/jquery.fancybox.css",
|
250
268
|
"public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png",
|
251
269
|
"public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png",
|
252
270
|
"public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png",
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
* FancyBox - simple and fancy jQuery plugin
|
3
|
+
* Examples and documentation at: http://fancy.klade.lv/
|
4
|
+
* Version: 1.2.1 (13/03/2009)
|
5
|
+
* Copyright (c) 2009 Janis Skarnelis
|
6
|
+
* Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
|
7
|
+
* Requires: jQuery v1.3+
|
8
|
+
*/
|
9
|
+
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}(';(7($){$.b.2Q=7(){u B.2t(7(){9 1J=$(B).n(\'2Z\');5(1J.1c(/^3w\\(["\']?(.*\\.2p)["\']?\\)$/i)){1J=3t.$1;$(B).n({\'2Z\':\'45\',\'2o\':"3W:3R.4m.4d(3h=F, 3T="+($(B).n(\'41\')==\'2J-3Z\'?\'4c\':\'3N\')+", Q=\'"+1J+"\')"}).2t(7(){9 1b=$(B).n(\'1b\');5(1b!=\'2e\'&&1b!=\'2n\')$(B).n(\'1b\',\'2n\')})}})};9 A,4,16=D,s=1t 1o,1w,1v=1,1y=/\\.(3A|3Y|2p|3c|3d)(.*)?$/i;9 P=($.2q.3K&&2f($.2q.3z.2k(0,1))<8);$.b.c=7(Y){Y=$.3x({},$.b.c.2R,Y);9 2s=B;7 2h(){A=B;4=Y;2r();u D};7 2r(){5(16)u;5($.1O(4.2c)){4.2c()}4.j=[];4.h=0;5(Y.j.N>0){4.j=Y.j}t{9 O={};5(!A.1H||A.1H==\'\'){9 O={d:A.d,X:A.X};5($(A).1G("1m:1D").N){O.1a=$(A).1G("1m:1D")}4.j.2j(O)}t{9 Z=$(2s).2o("a[1H="+A.1H+"]");9 O={};3C(9 i=0;i<Z.N;i++){O={d:Z[i].d,X:Z[i].X};5($(Z[i]).1G("1m:1D").N){O.1a=$(Z[i]).1G("1m:1D")}4.j.2j(O)}3F(4.j[4.h].d!=A.d){4.h++}}}5(4.23){5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'3s\')}$("#1i").n(\'25\',4.2U).J()}1d()};7 1d(){$("#1f, #1e, #V, #G").S();9 d=4.j[4.h].d;5(d.1c(/#/)){9 U=11.3r.d.3f(\'#\')[0];U=d.3g(U,\'\');U=U.2k(U.2l(\'#\'));1k(\'<6 l="3e">\'+$(U).o()+\'</6>\',4.1I,4.1x)}t 5(d.1c(1y)){s=1t 1o;s.Q=d;5(s.3a){1K()}t{$.b.c.34();$(s).x().14(\'3b\',7(){$(".I").S();1K()})}}t 5(d.1c("17")||A.3j.2l("17")>=0){1k(\'<17 l="35" 3q="$.b.c.38()" 3o="3n\'+C.T(C.3l()*3m)+\'" 2K="0" 3E="0" Q="\'+d+\'"></17>\',4.1I,4.1x)}t{$.4p(d,7(2m){1k(\'<6 l="3L">\'+2m+\'</6>\',4.1I,4.1x)})}};7 1K(){5(4.30){9 w=$.b.c.1n();9 r=C.1M(C.1M(w[0]-36,s.g)/s.g,C.1M(w[1]-4b,s.f)/s.f);9 g=C.T(r*s.g);9 f=C.T(r*s.f)}t{9 g=s.g;9 f=s.f}1k(\'<1m 48="" l="49" Q="\'+s.Q+\'" />\',g,f)};7 2F(){5((4.j.N-1)>4.h){9 d=4.j[4.h+1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}5(4.h>0){9 d=4.j[4.h-1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}};7 1k(1j,g,f){16=F;9 L=4.2Y;5(P){$("#q")[0].1E.2u("f");$("#q")[0].1E.2u("g")}5(L>0){g+=L*2;f+=L*2;$("#q").n({\'v\':L+\'z\',\'2E\':L+\'z\',\'2i\':L+\'z\',\'y\':L+\'z\',\'g\':\'2B\',\'f\':\'2B\'});5(P){$("#q")[0].1E.2C(\'f\',\'(B.2D.4j - 20)\');$("#q")[0].1E.2C(\'g\',\'(B.2D.3S - 20)\')}}t{$("#q").n({\'v\':0,\'2E\':0,\'2i\':0,\'y\':0,\'g\':\'2z%\',\'f\':\'2z%\'})}5($("#k").1u(":19")&&g==$("#k").g()&&f==$("#k").f()){$("#q").1Z("2N",7(){$("#q").1C().1F($(1j)).21("1s",7(){1g()})});u}9 w=$.b.c.1n();9 2v=(g+36)>w[0]?w[2]:(w[2]+C.T((w[0]-g-36)/2));9 2w=(f+1z)>w[1]?w[3]:(w[3]+C.T((w[1]-f-1z)/2));9 K={\'y\':2v,\'v\':2w,\'g\':g+\'z\',\'f\':f+\'z\'};5($("#k").1u(":19")){$("#q").1Z("1s",7(){$("#q").1C();$("#k").24(K,4.2X,4.2T,7(){$("#q").1F($(1j)).21("1s",7(){1g()})})})}t{5(4.1W>0&&4.j[4.h].1a!==1L){$("#q").1C().1F($(1j));9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);$("#k").n({\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()});5(4.1X){K.25=\'J\'}$("#k").24(K,4.1W,4.2W,7(){1g()})}t{$("#q").S().1C().1F($(1j)).J();$("#k").n(K).21("1s",7(){1g()})}}};7 2y(){5(4.h!=0){$("#1e, #2O").x().14("R",7(e){e.2x();4.h--;1d();u D});$("#1e").J()}5(4.h!=(4.j.N-1)){$("#1f, #2M").x().14("R",7(e){e.2x();4.h++;1d();u D});$("#1f").J()}};7 1g(){2y();2F();$(W).1B(7(e){5(e.29==27){$.b.c.1l();$(W).x("1B")}t 5(e.29==37&&4.h!=0){4.h--;1d();$(W).x("1B")}t 5(e.29==39&&4.h!=(4.j.N-1)){4.h++;1d();$(W).x("1B")}});5(4.1r){$(11).14("1N 1T",$.b.c.2g)}t{$("6#k").n("1b","2e")}5(4.2b){$("#22").R($.b.c.1l)}$("#1i, #V").14("R",$.b.c.1l);$("#V").J();5(4.j[4.h].X!==1L&&4.j[4.h].X.N>0){$(\'#G 6\').o(4.j[4.h].X);$(\'#G\').J()}5(4.23&&P){$(\'1U, 1Q, 1P\',$(\'#q\')).n(\'1S\',\'19\')}5($.1O(4.2a)){4.2a()}16=D};u B.x(\'R\').R(2h)};$.b.c.2g=7(){9 m=$.b.c.1n();$("#k").n(\'y\',(($("#k").g()+36)>m[0]?m[2]:m[2]+C.T((m[0]-$("#k").g()-36)/2)));$("#k").n(\'v\',(($("#k").f()+1z)>m[1]?m[3]:m[3]+C.T((m[1]-$("#k").f()-1z)/2)))};$.b.c.1h=7(H,2A){u 2f($.3I(H.3u?H[0]:H,2A,F))||0};$.b.c.1R=7(H){9 m=H.4g();m.v+=$.b.c.1h(H,\'3k\');m.v+=$.b.c.1h(H,\'3J\');m.y+=$.b.c.1h(H,\'3H\');m.y+=$.b.c.1h(H,\'3D\');u m};$.b.c.38=7(){$(".I").S();$("#35").J()};$.b.c.1n=7(){u[$(11).g(),$(11).f(),$(W).3i(),$(W).3p()]};$.b.c.2G=7(){5(!$("#I").1u(\':19\')){33(1w);u}$("#I > 6").n(\'v\',(1v*-40)+\'z\');1v=(1v+1)%12};$.b.c.34=7(){33(1w);9 m=$.b.c.1n();$("#I").n({\'y\':((m[0]-40)/2+m[2]),\'v\':((m[1]-40)/2+m[3])}).J();$("#I").14(\'R\',$.b.c.1l);1w=3Q($.b.c.2G,3X)};$.b.c.1l=7(){16=F;$(s).x();$("#1i, #V").x();5(4.2b){$("#22").x()}$("#V, .I, #1e, #1f, #G").S();5(4.1r){$(11).x("1N 1T")}1q=7(){$("#1i, #k").S();5(4.1r){$(11).x("1N 1T")}5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'19\')}5($.1O(4.1V)){4.1V()}16=D};5($("#k").1u(":19")!==D){5(4.26>0&&4.j[4.h].1a!==1L){9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);9 K={\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()};5(4.1X){K.25=\'S\'}$("#k").31(D,F).24(K,4.26,4.2S,1q)}t{$("#k").31(D,F).1Z("2N",1q)}}t{1q()}u D};$.b.c.2V=7(){9 o=\'\';o+=\'<6 l="1i"></6>\';o+=\'<6 l="22">\';o+=\'<6 p="I" l="I"><6></6></6>\';o+=\'<6 l="k">\';o+=\'<6 l="2I">\';o+=\'<6 l="V"></6>\';o+=\'<6 l="E"><6 p="E 44"></6><6 p="E 43"></6><6 p="E 42"></6><6 p="E 3V"></6><6 p="E 3U"></6><6 p="E 3O"></6><6 p="E 3M"></6><6 p="E 3P"></6></6>\';o+=\'<a d="2P:;" l="1e"><1p p="1Y" l="2O"></1p></a><a d="2P:;" l="1f"><1p p="1Y" l="2M"></1p></a>\';o+=\'<6 l="q"></6>\';o+=\'<6 l="G"></6>\';o+=\'</6>\';o+=\'</6>\';o+=\'</6>\';$(o).2H("46");$(\'<32 4i="0" 4h="0" 4k="0"><2L><13 p="G" l="4l"></13><13 p="G" l="4o"><6></6></13><13 p="G" l="4n"></13></2L></32>\').2H(\'#G\');5(P){$("#2I").47(\'<17 p="4a" 4e="2J" 2K="0"></17>\');$("#V, .E, .G, .1Y").2Q()}};$.b.c.2R={2Y:10,30:F,1X:D,1W:0,26:0,2X:3G,2W:\'28\',2S:\'28\',2T:\'28\',1I:3B,1x:3v,23:F,2U:0.3,2b:F,1r:F,j:[],2c:2d,2a:2d,1V:2d};$(W).3y(7(){$.b.c.2V()})})(4f);',62,274,'||||opts|if|div|function||var||fn|fancybox|href||height|width|itemCurrent||itemArray|fancy_outer|id|pos|css|html|class|fancy_content||imagePreloader|else|return|top||unbind|left|px|elem|this|Math|false|fancy_bg|true|fancy_title|el|fancy_loading|show|itemOpts|pad|orig_item|length|item|isIE|src|click|hide|round|target|fancy_close|document|title|settings|subGroup||window||td|bind|orig_pos|busy|iframe||visible|orig|position|match|_change_item|fancy_left|fancy_right|_finish|getNumeric|fancy_overlay|value|_set_content|close|img|getViewport|Image|span|__cleanup|centerOnScroll|normal|new|is|loadingFrame|loadingTimer|frameHeight|imageRegExp|50|objNext|keydown|empty|first|style|append|children|rel|frameWidth|image|_proceed_image|undefined|min|resize|isFunction|select|object|getPosition|visibility|scroll|embed|callbackOnClose|zoomSpeedIn|zoomOpacity|fancy_ico|fadeOut||fadeIn|fancy_wrap|overlayShow|animate|opacity|zoomSpeedOut||swing|keyCode|callbackOnShow|hideOnContentClick|callbackOnStart|null|absolute|parseInt|scrollBox|_initialize|bottom|push|substr|indexOf|data|relative|filter|png|browser|_start|matchedGroup|each|removeExpression|itemLeft|itemTop|stopPropagation|_set_navigation|100|prop|auto|setExpression|parentNode|right|_preload_neighbor_images|animateLoading|appendTo|fancy_inner|no|frameborder|tr|fancy_right_ico|fast|fancy_left_ico|javascript|fixPNG|defaults|easingOut|easingChange|overlayOpacity|build|easingIn|zoomSpeedChange|padding|backgroundImage|imageScale|stop|table|clearInterval|showLoading|fancy_frame|||showIframe||complete|load|bmp|jpeg|fancy_div|split|replace|enabled|scrollLeft|className|paddingTop|random|1000|fancy_iframe|name|scrollTop|onload|location|hidden|RegExp|jquery|355|url|extend|ready|version|jpg|425|for|borderLeftWidth|hspace|while|300|paddingLeft|curCSS|borderTopWidth|msie|fancy_ajax|fancy_bg_w|scale|fancy_bg_sw|fancy_bg_nw|setInterval|DXImageTransform|clientWidth|sizingMethod|fancy_bg_s|fancy_bg_se|progid|66|gif|repeat||backgroundRepeat|fancy_bg_e|fancy_bg_ne|fancy_bg_n|none|body|prepend|alt|fancy_img|fancy_bigIframe|60|crop|AlphaImageLoader|scrolling|jQuery|offset|cellpadding|cellspacing|clientHeight|border|fancy_title_left|Microsoft|fancy_title_right|fancy_title_main|get'.split('|'),0,{}))
|
data/public/javascripts/muck.js
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
//jQuery.noConflict();
|
2
|
-
|
3
2
|
jQuery(document).ajaxSend(function(event, request, settings) {
|
4
|
-
|
5
|
-
|
3
|
+
request.setRequestHeader("Accept", "text/javascript");
|
4
|
+
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
5
|
+
|
6
|
+
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
|
+
// settings.data is a serialized string like "foo=bar&baz=boink" (or null)
|
6
8
|
settings.data = settings.data || "";
|
7
|
-
|
9
|
+
if (typeof(AUTH_TOKEN) != "undefined")
|
10
|
+
settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
|
8
11
|
});
|
9
12
|
|
10
13
|
function setup_submit_delete(){
|
@@ -0,0 +1,44 @@
|
|
1
|
+
html,body{height:100%;}
|
2
|
+
div#fancy_overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#666;display:none;z-index:30;}
|
3
|
+
* html div#fancy_overlay{position:absolute;height:expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight :document.body.offsetHeight + 'px');}
|
4
|
+
div#fancy_wrap{text-align:left;}
|
5
|
+
div#fancy_loading{position:absolute;height:40px;width:40px;cursor:pointer;display:none;overflow:hidden;background:transparent;z-index:100;}
|
6
|
+
div#fancy_loading div{position:absolute;top:0;left:0;width:40px;height:480px;background:transparent url('/images/fancybox/fancy_progress.png') no-repeat;}
|
7
|
+
div#fancy_loading_overlay{position:absolute;background-color:#FFF;z-index:30;}
|
8
|
+
div#fancy_loading_icon{position:absolute;background:url('/images/fancybox/fancy_loading.gif') no-repeat;z-index:35;width:16px;height:16px;}
|
9
|
+
div#fancy_outer{position:absolute;top:0;left:0;z-index:90;padding:18px 18px 33px 18px;margin:0;overflow:hidden;background:transparent;display:none;}
|
10
|
+
div#fancy_inner{position:relative;width:100%;height:100%;border:1px solid #BBB;background:#FFF;}
|
11
|
+
div#fancy_content{margin:0;z-index:100;position:absolute;}
|
12
|
+
div#fancy_div{background:#000;color:#FFF;height:100%;width:100%;z-index:100;}
|
13
|
+
img#fancy_img{position:absolute;top:0;left:0;border:0;padding:0;margin:0;z-index:100;width:100%;height:100%;}
|
14
|
+
div#fancy_close{position:absolute;top:-12px;right:-15px;height:30px;width:30px;background:url('/images/fancybox/fancy_closebox.png') top left no-repeat;cursor:pointer;z-index:181;display:none;}
|
15
|
+
#fancy_frame{position:relative;width:100%;height:100%;display:none;}
|
16
|
+
#fancy_ajax{width:100%;height:100%;overflow:auto;}
|
17
|
+
a#fancy_left,a#fancy_right{position:absolute;bottom:0px;height:100%;width:35%;cursor:pointer;z-index:111;display:none;background-image:url(data:image/gif;base64,AAAA);outline:none;}
|
18
|
+
a#fancy_left{left:0px;}
|
19
|
+
a#fancy_right{right:0px;}
|
20
|
+
span.fancy_ico{position:absolute;top:50%;margin-top:-15px;width:30px;height:30px;z-index:112;cursor:pointer;display:block;}
|
21
|
+
span#fancy_left_ico{left:-9999px;background:transparent url('/images/fancybox/fancy_left.png') no-repeat;}
|
22
|
+
span#fancy_right_ico{right:-9999px;background:transparent url('/images/fancybox/fancy_right.png') no-repeat;}
|
23
|
+
a#fancy_left:hover{visibility:visible;}
|
24
|
+
a#fancy_right:hover{visibility:visible;}
|
25
|
+
a#fancy_left:hover span{left:20px;}
|
26
|
+
a#fancy_right:hover span{right:20px;}
|
27
|
+
.fancy_bigIframe{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;}
|
28
|
+
div#fancy_bg{position:absolute;top:0;left:0;width:100%;height:100%;z-index:70;border:0;padding:0;margin:0;}
|
29
|
+
div.fancy_bg{position:absolute;display:block;z-index:70;border:0;padding:0;margin:0;}
|
30
|
+
div.fancy_bg_n{top:-18px;width:100%;height:18px;background:transparent url('/images/fancybox/fancy_shadow_n.png') repeat-x;}
|
31
|
+
div.fancy_bg_ne{top:-18px;right:-13px;width:13px;height:18px;background:transparent url('/images/fancybox/fancy_shadow_ne.png') no-repeat;}
|
32
|
+
div.fancy_bg_e{right:-13px;height:100%;width:13px;background:transparent url('/images/fancybox/fancy_shadow_e.png') repeat-y;}
|
33
|
+
div.fancy_bg_se{bottom:-18px;right:-13px;width:13px;height:18px;background:transparent url('/images/fancybox/fancy_shadow_se.png') no-repeat;}
|
34
|
+
div.fancy_bg_s{bottom:-18px;width:100%;height:18px;background:transparent url('/images/fancybox/fancy_shadow_s.png') repeat-x;}
|
35
|
+
div.fancy_bg_sw{bottom:-18px;left:-13px;width:13px;height:18px;background:transparent url('/images/fancybox/fancy_shadow_sw.png') no-repeat;}
|
36
|
+
div.fancy_bg_w{left:-13px;height:100%;width:13px;background:transparent url('/images/fancybox/fancy_shadow_w.png') repeat-y;}
|
37
|
+
div.fancy_bg_nw{top:-18px;left:-13px;width:13px;height:18px;background:transparent url('/images/fancybox/fancy_shadow_nw.png') no-repeat;}
|
38
|
+
div#fancy_title{position:absolute;bottom:-33px;left:0;width:100%;z-index:100;display:none;}
|
39
|
+
div#fancy_title div{color:#FFF;font:bold 12px Arial;padding-bottom:3px;}
|
40
|
+
div#fancy_title table{margin:0 auto;}
|
41
|
+
div#fancy_title table td{padding:0;vertical-align:middle;}
|
42
|
+
td#fancy_title_left{height:32px;width:15px;background:transparent url(fancy_title_left.png) repeat-x;}
|
43
|
+
td#fancy_title_main{height:32px;background:transparent url(fancy_title_main.png) repeat-x;}
|
44
|
+
td#fancy_title_right{height:32px;width:15px;background:transparent url(fancy_title_right.png) repeat-x;}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
/* general */
|
2
|
+
.center{text-align:center;}
|
3
|
+
|
1
4
|
/* forms */
|
2
5
|
input{margin:0 10px 5px 0;padding:4px;font-size:1.3em;}
|
3
6
|
input[type="text"],input[type="password"]{border:1px solid #8f8685;}
|
@@ -12,7 +15,8 @@ fieldset{border:none;margin:0;padding:0;}
|
|
12
15
|
form fieldset{margin:0 0 2px;padding:0px;}
|
13
16
|
form fieldset input[type="text"],form fieldset input[type="password"]{width:500px;}
|
14
17
|
.common-form{width:500px;margin:40px auto;}
|
15
|
-
.common-form h1{font-size:1.8em;}
|
18
|
+
.wide-form h1, .common-form h1{font-size:1.8em;}
|
19
|
+
.wide-form{width:700px;margin:40px auto;}
|
16
20
|
.form-item{float:left;}
|
17
21
|
.common-content{width:500px;margin:40px auto;font-size:1.2em;color:#555;}
|
18
22
|
.button-link {background-color:transparent;border-top-width: 0px;border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-20 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -120,6 +120,21 @@ files:
|
|
120
120
|
- public/images/arrow_left.gif
|
121
121
|
- public/images/arrow_right.gif
|
122
122
|
- public/images/arrow_up.gif
|
123
|
+
- public/images/fancybox/fancy_closebox.png
|
124
|
+
- public/images/fancybox/fancy_left.png
|
125
|
+
- public/images/fancybox/fancy_progress.png
|
126
|
+
- public/images/fancybox/fancy_right.png
|
127
|
+
- public/images/fancybox/fancy_shadow_e.png
|
128
|
+
- public/images/fancybox/fancy_shadow_n.png
|
129
|
+
- public/images/fancybox/fancy_shadow_ne.png
|
130
|
+
- public/images/fancybox/fancy_shadow_nw.png
|
131
|
+
- public/images/fancybox/fancy_shadow_s.png
|
132
|
+
- public/images/fancybox/fancy_shadow_se.png
|
133
|
+
- public/images/fancybox/fancy_shadow_sw.png
|
134
|
+
- public/images/fancybox/fancy_shadow_w.png
|
135
|
+
- public/images/fancybox/fancy_title_left.png
|
136
|
+
- public/images/fancybox/fancy_title_main.png
|
137
|
+
- public/images/fancybox/fancy_title_right.png
|
123
138
|
- public/images/icons/accept.png
|
124
139
|
- public/images/icons/add.png
|
125
140
|
- public/images/icons/delete.png
|
@@ -129,6 +144,8 @@ files:
|
|
129
144
|
- public/images/sprites.png
|
130
145
|
- public/javascripts/fancyzoom.min.js
|
131
146
|
- public/javascripts/jquery/jquery-ui.js
|
147
|
+
- public/javascripts/jquery/jquery.easing.js
|
148
|
+
- public/javascripts/jquery/jquery.fancybox.js
|
132
149
|
- public/javascripts/jquery/jquery.form.js
|
133
150
|
- public/javascripts/jquery/jquery.jgrowl.js
|
134
151
|
- public/javascripts/jquery/jquery.js
|
@@ -185,6 +202,7 @@ files:
|
|
185
202
|
- public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png
|
186
203
|
- public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png
|
187
204
|
- public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css
|
205
|
+
- public/stylesheets/jquery/jquery.fancybox.css
|
188
206
|
- public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
|
189
207
|
- public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png
|
190
208
|
- public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
|