restbox 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +16 -5
- data/VERSION.yml +1 -1
- data/generators/restbox/restbox_generator.rb +2 -2
- data/lib/restbox_view_helper.rb +4 -1
- data/restbox.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -2,12 +2,19 @@
|
|
2
2
|
|
3
3
|
== Install
|
4
4
|
|
5
|
-
To install as a Rails plugin
|
6
|
-
|
5
|
+
To install as a Rails plugin:
|
6
|
+
|
7
7
|
script/plugin install http://github.com/richardiux/restbox.git
|
8
|
+
|
9
|
+
To install as a gem:
|
10
|
+
|
11
|
+
gem install restbox
|
12
|
+
|
13
|
+
|
14
|
+
Copy javascript, CSS, and images files to public
|
15
|
+
|
16
|
+
script/generate restbox
|
8
17
|
|
9
|
-
=== Prerequisites
|
10
|
-
JQuery 1.3.2
|
11
18
|
|
12
19
|
== Setup
|
13
20
|
|
@@ -58,13 +65,17 @@ To put content in the restbox
|
|
58
65
|
To manually display loading restbox
|
59
66
|
$.restbox({})
|
60
67
|
|
68
|
+
|
69
|
+
== Prerequisites
|
70
|
+
JQuery 1.3.2
|
71
|
+
|
61
72
|
== Upgrading
|
62
73
|
|
63
74
|
=== Reinstall the plugin
|
64
75
|
script/plugin install http://github.com/richardiux/restbox.git -f
|
65
76
|
|
66
77
|
=== Regenerate JS and CSS
|
67
|
-
|
78
|
+
script/generate restbox
|
68
79
|
|
69
80
|
== Bug Reports
|
70
81
|
|
data/VERSION.yml
CHANGED
@@ -13,8 +13,8 @@ class RestboxGenerator < Rails::Generator::Base
|
|
13
13
|
m.template 'javascripts/restbox.js', File.join('public', 'javascripts', 'restbox.js')
|
14
14
|
|
15
15
|
m.directory File.join('public', 'images')
|
16
|
-
m.template 'images/loader.gif', File.join('public', 'images', 'loader.gif')
|
17
|
-
m.template 'images/restbox_close.png', File.join('public', 'images', 'restbox_close.png')
|
16
|
+
m.template 'images/loader.gif', File.join('public', 'images', 'restbox', 'loader.gif')
|
17
|
+
m.template 'images/restbox_close.png', File.join('public', 'images', 'restbox' , 'restbox_close.png')
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/lib/restbox_view_helper.rb
CHANGED
@@ -11,7 +11,10 @@ module ActionView
|
|
11
11
|
module InstanceMethods
|
12
12
|
def restbox(options = {})
|
13
13
|
content = escape_javascript(options[:content].to_s || '')
|
14
|
-
|
14
|
+
container_class = escape_javascript(options[:container_class].to_s || '')
|
15
|
+
params = "content: \"#{content}\""
|
16
|
+
params += ", container_class: \"#{container_class}\"" unless container_class.empty?
|
17
|
+
"jQuery.restbox({#{params}});"
|
15
18
|
end
|
16
19
|
end
|
17
20
|
end
|
data/restbox.gemspec
CHANGED