simple_lightbox 0.1.6 → 0.1.7
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
CHANGED
|
@@ -43,6 +43,24 @@
|
|
|
43
43
|
</provider>
|
|
44
44
|
</entry>
|
|
45
45
|
</file>
|
|
46
|
+
<file leaf-file-name="install_generator.rb" pinned="false" current="false" current-in-tab="false">
|
|
47
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/install_generator.rb">
|
|
48
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
49
|
+
<state line="7" column="75" selection-start="306" selection-end="306" vertical-scroll-proportion="0.0">
|
|
50
|
+
<folding />
|
|
51
|
+
</state>
|
|
52
|
+
</provider>
|
|
53
|
+
</entry>
|
|
54
|
+
</file>
|
|
55
|
+
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
|
56
|
+
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/version.rb">
|
|
57
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
58
|
+
<state line="1" column="19" selection-start="41" selection-end="41" vertical-scroll-proportion="0.022058824">
|
|
59
|
+
<folding />
|
|
60
|
+
</state>
|
|
61
|
+
</provider>
|
|
62
|
+
</entry>
|
|
63
|
+
</file>
|
|
46
64
|
<file leaf-file-name="simple_lightbox_helper.rb" pinned="false" current="false" current-in-tab="false">
|
|
47
65
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox_helper.rb">
|
|
48
66
|
<provider selected="true" editor-type-id="text-editor">
|
|
@@ -70,15 +88,6 @@
|
|
|
70
88
|
</provider>
|
|
71
89
|
</entry>
|
|
72
90
|
</file>
|
|
73
|
-
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
|
74
|
-
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/version.rb">
|
|
75
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
76
|
-
<state line="2" column="3" selection-start="45" selection-end="45" vertical-scroll-proportion="0.042918455">
|
|
77
|
-
<folding />
|
|
78
|
-
</state>
|
|
79
|
-
</provider>
|
|
80
|
-
</entry>
|
|
81
|
-
</file>
|
|
82
91
|
<file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
|
|
83
92
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
|
84
93
|
<provider selected="true" editor-type-id="text-editor">
|
|
@@ -102,8 +111,6 @@
|
|
|
102
111
|
<component name="IdeDocumentHistory">
|
|
103
112
|
<option name="changedFiles">
|
|
104
113
|
<list>
|
|
105
|
-
<option value="$PROJECT_DIR$/spec/simple_lightbox/Gemfile" />
|
|
106
|
-
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
|
107
114
|
<option value="$PROJECT_DIR$/spec/simple_lightbox/config/application.rb" />
|
|
108
115
|
<option value="$PROJECT_DIR$/spec/simple_lightbox/lib/simple_lightbox/railtie.rb" />
|
|
109
116
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/Rakefile" />
|
|
@@ -115,6 +122,10 @@
|
|
|
115
122
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/railtie.rb" />
|
|
116
123
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/simple_lightbox_helper.rb" />
|
|
117
124
|
<option value="$PROJECT_DIR$/lib/simple_lightbox.rb" />
|
|
125
|
+
<option value="$PROJECT_DIR$/lib/generators/templates/initializer.rb" />
|
|
126
|
+
<option value="$PROJECT_DIR$/lib/generators/templates/simple_lightbox.css" />
|
|
127
|
+
<option value="$PROJECT_DIR$/lib/generators/templates/simple_lightbox.js" />
|
|
128
|
+
<option value="$PROJECT_DIR$/lib/generators/install_generator.rb" />
|
|
118
129
|
<option value="$PROJECT_DIR$/lib/simple_lightbox/version.rb" />
|
|
119
130
|
</list>
|
|
120
131
|
</option>
|
|
@@ -197,11 +208,69 @@
|
|
|
197
208
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
198
209
|
</PATH_ELEMENT>
|
|
199
210
|
</PATH>
|
|
211
|
+
<PATH>
|
|
212
|
+
<PATH_ELEMENT>
|
|
213
|
+
<option name="myItemId" value="simple_lightbox" />
|
|
214
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
215
|
+
</PATH_ELEMENT>
|
|
216
|
+
<PATH_ELEMENT>
|
|
217
|
+
<option name="myItemId" value="simple_lightbox" />
|
|
218
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
219
|
+
</PATH_ELEMENT>
|
|
220
|
+
<PATH_ELEMENT>
|
|
221
|
+
<option name="myItemId" value="lib" />
|
|
222
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
223
|
+
</PATH_ELEMENT>
|
|
224
|
+
<PATH_ELEMENT>
|
|
225
|
+
<option name="myItemId" value="generators" />
|
|
226
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
227
|
+
</PATH_ELEMENT>
|
|
228
|
+
</PATH>
|
|
229
|
+
<PATH>
|
|
230
|
+
<PATH_ELEMENT>
|
|
231
|
+
<option name="myItemId" value="simple_lightbox" />
|
|
232
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
233
|
+
</PATH_ELEMENT>
|
|
234
|
+
<PATH_ELEMENT>
|
|
235
|
+
<option name="myItemId" value="simple_lightbox" />
|
|
236
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
237
|
+
</PATH_ELEMENT>
|
|
238
|
+
<PATH_ELEMENT>
|
|
239
|
+
<option name="myItemId" value="lib" />
|
|
240
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
241
|
+
</PATH_ELEMENT>
|
|
242
|
+
<PATH_ELEMENT>
|
|
243
|
+
<option name="myItemId" value="generators" />
|
|
244
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
245
|
+
</PATH_ELEMENT>
|
|
246
|
+
<PATH_ELEMENT>
|
|
247
|
+
<option name="myItemId" value="templates" />
|
|
248
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
249
|
+
</PATH_ELEMENT>
|
|
250
|
+
</PATH>
|
|
200
251
|
</subPane>
|
|
201
252
|
</pane>
|
|
202
253
|
</panes>
|
|
203
254
|
</component>
|
|
204
255
|
<component name="RunManager">
|
|
256
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
|
257
|
+
<module name="" />
|
|
258
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
259
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
|
260
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
261
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
262
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
|
263
|
+
<envs />
|
|
264
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
265
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
|
|
266
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
267
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
268
|
+
</COVERAGE_PATTERN>
|
|
269
|
+
</EXTENSION>
|
|
270
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
|
271
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
|
272
|
+
<method />
|
|
273
|
+
</configuration>
|
|
205
274
|
<list size="0" />
|
|
206
275
|
</component>
|
|
207
276
|
<component name="ShelveChangesManager" show_recycled="false" />
|
|
@@ -228,14 +297,14 @@
|
|
|
228
297
|
<servers />
|
|
229
298
|
</component>
|
|
230
299
|
<component name="ToolWindowManager">
|
|
231
|
-
<frame x="
|
|
300
|
+
<frame x="-3" y="24" width="1446" height="854" extended-state="6" />
|
|
232
301
|
<editor active="true" />
|
|
233
302
|
<layout>
|
|
234
303
|
<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" />
|
|
235
304
|
<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" />
|
|
236
305
|
<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" />
|
|
237
306
|
<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" />
|
|
238
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
|
307
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33333334" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
239
308
|
<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" />
|
|
240
309
|
<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" />
|
|
241
310
|
<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" />
|
|
@@ -288,13 +357,6 @@
|
|
|
288
357
|
</state>
|
|
289
358
|
</provider>
|
|
290
359
|
</entry>
|
|
291
|
-
<entry file="file://$PROJECT_DIR$/simple_lightbox.gemspec">
|
|
292
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
293
|
-
<state line="21" column="0" selection-start="807" selection-end="807" vertical-scroll-proportion="0.0">
|
|
294
|
-
<folding />
|
|
295
|
-
</state>
|
|
296
|
-
</provider>
|
|
297
|
-
</entry>
|
|
298
360
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
|
299
361
|
<provider selected="true" editor-type-id="text-editor">
|
|
300
362
|
<state line="2" column="0" selection-start="51" selection-end="51" vertical-scroll-proportion="0.0">
|
|
@@ -323,6 +385,13 @@
|
|
|
323
385
|
</state>
|
|
324
386
|
</provider>
|
|
325
387
|
</entry>
|
|
388
|
+
<entry file="file://$PROJECT_DIR$/simple_lightbox.gemspec">
|
|
389
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
390
|
+
<state line="21" column="0" selection-start="807" selection-end="807" vertical-scroll-proportion="0.0">
|
|
391
|
+
<folding />
|
|
392
|
+
</state>
|
|
393
|
+
</provider>
|
|
394
|
+
</entry>
|
|
326
395
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox.rb">
|
|
327
396
|
<provider selected="true" editor-type-id="text-editor">
|
|
328
397
|
<state line="19" column="0" selection-start="443" selection-end="443" vertical-scroll-proportion="0.0">
|
|
@@ -330,9 +399,30 @@
|
|
|
330
399
|
</state>
|
|
331
400
|
</provider>
|
|
332
401
|
</entry>
|
|
402
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/templates/simple_lightbox.js">
|
|
403
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
404
|
+
<state line="2" column="35" selection-start="106" selection-end="106" vertical-scroll-proportion="0.04411765">
|
|
405
|
+
<folding />
|
|
406
|
+
</state>
|
|
407
|
+
</provider>
|
|
408
|
+
</entry>
|
|
409
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/templates/simple_lightbox.css">
|
|
410
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
411
|
+
<state line="7" column="0" selection-start="165" selection-end="165" vertical-scroll-proportion="0.15441176">
|
|
412
|
+
<folding />
|
|
413
|
+
</state>
|
|
414
|
+
</provider>
|
|
415
|
+
</entry>
|
|
416
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/install_generator.rb">
|
|
417
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
418
|
+
<state line="7" column="75" selection-start="306" selection-end="306" vertical-scroll-proportion="0.0">
|
|
419
|
+
<folding />
|
|
420
|
+
</state>
|
|
421
|
+
</provider>
|
|
422
|
+
</entry>
|
|
333
423
|
<entry file="file://$PROJECT_DIR$/lib/simple_lightbox/version.rb">
|
|
334
424
|
<provider selected="true" editor-type-id="text-editor">
|
|
335
|
-
<state line="
|
|
425
|
+
<state line="1" column="19" selection-start="41" selection-end="41" vertical-scroll-proportion="0.022058824">
|
|
336
426
|
<folding />
|
|
337
427
|
</state>
|
|
338
428
|
</provider>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module SimpleLightbox
|
|
2
|
+
|
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
|
5
|
+
|
|
6
|
+
def copy_files
|
|
7
|
+
template "simple_lightbox.css", "pubic/stylesheets/simple_lightbox.css"
|
|
8
|
+
template "simple_lightbox.js", "public/javascripts/simple_lightbox.js"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.lightbox-submit{
|
|
2
|
+
position: absolute;
|
|
3
|
+
bottom: 20px;
|
|
4
|
+
right: 25px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/*.ui-widget-header .ui-icon {background-image: url(/images/big_delete_box.png); }*/
|
|
8
|
+
|
|
9
|
+
.ui-dialog{
|
|
10
|
+
-moz-box-shadow: 3px 3px 4px #000;
|
|
11
|
+
box-shadow: 3px 3px 4px #000;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#close-lightbox-error{
|
|
15
|
+
position: absolute;
|
|
16
|
+
bottom: 15px;
|
|
17
|
+
right: 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#lightbox-error-message{
|
|
21
|
+
color: #000000;
|
|
22
|
+
margin:5px
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#lightbox-error-icon{
|
|
26
|
+
margin:3px;
|
|
27
|
+
float:left
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#close-lightbox-error a{
|
|
31
|
+
color: #000000
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#close-lightbox-error a:visited{
|
|
35
|
+
color: #000000
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#lightbox-error{
|
|
39
|
+
background-color: #ffffcc;
|
|
40
|
+
border: 1px solid #cd9a02;
|
|
41
|
+
position: absolute;
|
|
42
|
+
height: 100px;
|
|
43
|
+
z-index:1002;
|
|
44
|
+
margin:3px;
|
|
45
|
+
-moz-box-shadow: 3px 3px 4px #000;
|
|
46
|
+
display:none
|
|
47
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
window.LightboxContainer = $.Class.create({
|
|
2
|
+
initialize: function(){
|
|
3
|
+
this.currentLightbox = null;
|
|
4
|
+
this.lightboxes = new Array();
|
|
5
|
+
},
|
|
6
|
+
add: function(lightbox){
|
|
7
|
+
this.lightboxes.push(lightbox);
|
|
8
|
+
this.currentLightbox = this.lightboxes.length - 1;
|
|
9
|
+
},
|
|
10
|
+
remove: function(box){
|
|
11
|
+
this.hideError();
|
|
12
|
+
box.remove();
|
|
13
|
+
this.lightboxes.pop();
|
|
14
|
+
this.currentLightbox -= 1;
|
|
15
|
+
},
|
|
16
|
+
pop: function(){
|
|
17
|
+
this.remove(this.current().box);
|
|
18
|
+
},
|
|
19
|
+
showError: function(){
|
|
20
|
+
this.current().showError();
|
|
21
|
+
},
|
|
22
|
+
hideError: function(){
|
|
23
|
+
this.current().hideError();
|
|
24
|
+
},
|
|
25
|
+
current: function(){
|
|
26
|
+
return(this.lightboxes[this.currentLightbox]);
|
|
27
|
+
},
|
|
28
|
+
setError: function(message){
|
|
29
|
+
$('#lightbox-error-message').html(message);
|
|
30
|
+
this.showError();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
window.Lightbox = $.Class.create({
|
|
35
|
+
initialize: function(contents, title, options){
|
|
36
|
+
this.title = title;
|
|
37
|
+
this.options = options;
|
|
38
|
+
this.box = $(document.createElement('div'));
|
|
39
|
+
this.box.html(contents);
|
|
40
|
+
this.error = $('#lightbox-error');
|
|
41
|
+
this.display();
|
|
42
|
+
},
|
|
43
|
+
display: function(){
|
|
44
|
+
this.box.dialog({
|
|
45
|
+
modal: true,
|
|
46
|
+
title: this.title,
|
|
47
|
+
height: this.options.height || 300,
|
|
48
|
+
width: this.options.width || 400,
|
|
49
|
+
resizable: false,
|
|
50
|
+
draggable: false,
|
|
51
|
+
stack: true,
|
|
52
|
+
position:['center', 100],
|
|
53
|
+
close: function(){
|
|
54
|
+
window.lightboxContainer.remove($(this));
|
|
55
|
+
},
|
|
56
|
+
closeOnEscape: true
|
|
57
|
+
});
|
|
58
|
+
this.alignLightboxError();
|
|
59
|
+
},
|
|
60
|
+
show: function(){
|
|
61
|
+
this.box.show();
|
|
62
|
+
},
|
|
63
|
+
hide: function(){
|
|
64
|
+
this.box.hide();
|
|
65
|
+
},
|
|
66
|
+
close: function(){
|
|
67
|
+
this.container.remove();
|
|
68
|
+
this.box.dialog("close");
|
|
69
|
+
this.closeError();
|
|
70
|
+
},
|
|
71
|
+
alignLightboxError: function(){
|
|
72
|
+
var left = this.box.parent().offset().left;
|
|
73
|
+
var top = this.box.parent().offset().top + this.box.parent().height() + 7;
|
|
74
|
+
this.error.css({
|
|
75
|
+
"left" : left,
|
|
76
|
+
"top" : top,
|
|
77
|
+
"width" : this.box.parent().width()
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
showError: function(){
|
|
81
|
+
if(!this.error.is(":visible"))
|
|
82
|
+
this.error.slideToggle();
|
|
83
|
+
},
|
|
84
|
+
hideError: function(){
|
|
85
|
+
if(this.error.is(":visible"))
|
|
86
|
+
this.error.slideToggle();
|
|
87
|
+
},
|
|
88
|
+
closeError: function(){
|
|
89
|
+
this.error.hide();
|
|
90
|
+
}
|
|
91
|
+
});
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: simple_lightbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.7
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Edward Taupier
|
|
@@ -27,6 +27,9 @@ files:
|
|
|
27
27
|
- .idea/workspace.xml
|
|
28
28
|
- Gemfile
|
|
29
29
|
- Rakefile
|
|
30
|
+
- lib/generators/install_generator.rb
|
|
31
|
+
- lib/generators/templates/simple_lightbox.css
|
|
32
|
+
- lib/generators/templates/simple_lightbox.js
|
|
30
33
|
- lib/simple_lightbox.rb
|
|
31
34
|
- lib/simple_lightbox/railtie.rb
|
|
32
35
|
- lib/simple_lightbox/simple_lightbox_helper.rb
|