simple_lightbox 0.1.4 → 0.1.5
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/.idea/workspace.xml +15 -15
- data/lib/simple_lightbox/railtie.rb +1 -1
- data/lib/simple_lightbox/simple_lightbox_helper.rb +0 -13
- data/lib/simple_lightbox/version.rb +1 -1
- data/lib/simple_lightbox.rb +23 -1
- metadata +1 -1
data/.idea/workspace.xml
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<file leaf-file-name="simple_lightbox.rb" pinned="false" current="false" current-in-tab="false">
|
|
38
38
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox.rb">
|
|
39
39
|
<provider selected="true" editor-type-id="text-editor">
|
|
40
|
-
<state line="
|
|
40
|
+
<state line="20" column="3" selection-start="447" selection-end="447" vertical-scroll-proportion="0.0">
|
|
41
41
|
<folding />
|
|
42
42
|
</state>
|
|
43
43
|
</provider>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<file leaf-file-name="simple_lightbox_helper.rb" pinned="false" current="false" current-in-tab="false">
|
|
47
47
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox_helper.rb">
|
|
48
48
|
<provider selected="true" editor-type-id="text-editor">
|
|
49
|
-
<state line="
|
|
49
|
+
<state line="2" column="29" selection-start="52" selection-end="52" vertical-scroll-proportion="0.0">
|
|
50
50
|
<folding />
|
|
51
51
|
</state>
|
|
52
52
|
</provider>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<file leaf-file-name="railtie.rb" pinned="false" current="false" current-in-tab="false">
|
|
56
56
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/railtie.rb">
|
|
57
57
|
<provider selected="true" editor-type-id="text-editor">
|
|
58
|
-
<state line="
|
|
58
|
+
<state line="5" column="0" selection-start="106" selection-end="106" vertical-scroll-proportion="0.0">
|
|
59
59
|
<folding />
|
|
60
60
|
</state>
|
|
61
61
|
</provider>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
|
74
74
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/version.rb">
|
|
75
75
|
<provider selected="true" editor-type-id="text-editor">
|
|
76
|
-
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.
|
|
76
|
+
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.022123894">
|
|
77
77
|
<folding />
|
|
78
78
|
</state>
|
|
79
79
|
</provider>
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
<option value="$PROJECT_DIR$/.gitignore" />
|
|
122
122
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox.rb" />
|
|
123
123
|
<option value="$PROJECT_DIR$/simple_lightbox.gemspec" />
|
|
124
|
+
<option value="$PROJECT_DIR$/lib/simple_lightbox/railtie.rb" />
|
|
124
125
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox_helper.rb" />
|
|
125
126
|
<option value="$PROJECT_DIR$/lib/simple_lightbox.rb" />
|
|
126
|
-
<option value="$PROJECT_DIR$/lib/simple_lightbox/railtie.rb" />
|
|
127
127
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/version.rb" />
|
|
128
128
|
</list>
|
|
129
129
|
</option>
|
|
@@ -237,14 +237,14 @@
|
|
|
237
237
|
<servers />
|
|
238
238
|
</component>
|
|
239
239
|
<component name="ToolWindowManager">
|
|
240
|
-
<frame x="0" y="24" width="
|
|
240
|
+
<frame x="0" y="24" width="1440" height="852" extended-state="0" />
|
|
241
241
|
<editor active="true" />
|
|
242
242
|
<layout>
|
|
243
243
|
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
|
244
244
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
245
245
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
|
246
246
|
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
|
247
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
|
247
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33475178" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
248
248
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
249
249
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
250
250
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
|
@@ -311,37 +311,37 @@
|
|
|
311
311
|
</state>
|
|
312
312
|
</provider>
|
|
313
313
|
</entry>
|
|
314
|
-
<entry file="file://$PROJECT_DIR$/
|
|
314
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
315
315
|
<provider selected="true" editor-type-id="text-editor">
|
|
316
|
-
<state line="1" column="0" selection-start="
|
|
316
|
+
<state line="1" column="0" selection-start="29" selection-end="29" vertical-scroll-proportion="0.0">
|
|
317
317
|
<folding />
|
|
318
318
|
</state>
|
|
319
319
|
</provider>
|
|
320
320
|
</entry>
|
|
321
|
-
<entry file="file://$PROJECT_DIR$/
|
|
321
|
+
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/railtie.rb">
|
|
322
322
|
<provider selected="true" editor-type-id="text-editor">
|
|
323
|
-
<state line="
|
|
323
|
+
<state line="5" column="0" selection-start="106" selection-end="106" vertical-scroll-proportion="0.0">
|
|
324
324
|
<folding />
|
|
325
325
|
</state>
|
|
326
326
|
</provider>
|
|
327
327
|
</entry>
|
|
328
328
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox_helper.rb">
|
|
329
329
|
<provider selected="true" editor-type-id="text-editor">
|
|
330
|
-
<state line="
|
|
330
|
+
<state line="2" column="29" selection-start="52" selection-end="52" vertical-scroll-proportion="0.0">
|
|
331
331
|
<folding />
|
|
332
332
|
</state>
|
|
333
333
|
</provider>
|
|
334
334
|
</entry>
|
|
335
|
-
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox
|
|
335
|
+
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox.rb">
|
|
336
336
|
<provider selected="true" editor-type-id="text-editor">
|
|
337
|
-
<state line="
|
|
337
|
+
<state line="20" column="3" selection-start="447" selection-end="447" vertical-scroll-proportion="0.0">
|
|
338
338
|
<folding />
|
|
339
339
|
</state>
|
|
340
340
|
</provider>
|
|
341
341
|
</entry>
|
|
342
342
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/version.rb">
|
|
343
343
|
<provider selected="true" editor-type-id="text-editor">
|
|
344
|
-
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.
|
|
344
|
+
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.022123894">
|
|
345
345
|
<folding />
|
|
346
346
|
</state>
|
|
347
347
|
</provider>
|
|
@@ -2,19 +2,6 @@ module SimpleLightbox
|
|
|
2
2
|
|
|
3
3
|
module SimpleLightboxHelper
|
|
4
4
|
|
|
5
|
-
def display_lightbox(partial, title, opts={})
|
|
6
|
-
contents = render :partial=>partial
|
|
7
|
-
page << "lightboxContainer.add(new Lightbox(#{contents.to_json}, #{title.to_json}, #{opts.to_json}))"
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def close_lightbox
|
|
11
|
-
page << "lightboxContainer.pop()"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def lightbox_error_container
|
|
15
|
-
"<div class=\"lightbox-error\"></div>".html_safe
|
|
16
|
-
end
|
|
17
|
-
|
|
18
5
|
|
|
19
6
|
end
|
|
20
7
|
|
data/lib/simple_lightbox.rb
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
module SimpleLightbox
|
|
3
|
+
|
|
4
|
+
module SimpleLightboxHelper
|
|
5
|
+
|
|
6
|
+
def display_lightbox(partial, title, opts={})
|
|
7
|
+
contents = render :partial=>partial
|
|
8
|
+
page << "lightboxContainer.add(new Lightbox(#{contents.to_json}, #{title.to_json}, #{opts.to_json}))"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def close_lightbox
|
|
12
|
+
page << "lightboxContainer.pop()"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def lightbox_error_container
|
|
16
|
+
"<div class=\"lightbox-error\"></div>".html_safe
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
ActionView::Base.send :include, SimpleLightbox::SimpleLightboxHelper
|