widget_list 1.0.6 → 1.0.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/.gitignore CHANGED
@@ -15,3 +15,13 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+
19
+ .idea/widget_list.iml
20
+
21
+ .idea/widget_list.iml
22
+
23
+ .idea/workspace.xml
24
+
25
+ .DS_Store
26
+
27
+ lib/widget_list (Autosaved).txt
data/.idea/workspace.xml CHANGED
@@ -2,18 +2,16 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="0bede1c9-1aed-4d82-8d14-4184b67697c4" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
5
6
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.rakeTasks" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/vendor/assets/images/gobblecons/README.rtf" afterPath="$PROJECT_DIR$/vendor/assets/images/gobblecons/README.rtf" />
7
7
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
8
8
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
9
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/extensions/action_controller_base.rb" afterPath="$PROJECT_DIR$/lib/extensions/action_controller_base.rb" />
10
9
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list.rb" afterPath="$PROJECT_DIR$/lib/widget_list.rb" />
11
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/engine.rb" afterPath="$PROJECT_DIR$/lib/widget_list/engine.rb" />
12
10
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/railtie.rb" afterPath="$PROJECT_DIR$/lib/widget_list/railtie.rb" />
13
11
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/sequel.rb" afterPath="$PROJECT_DIR$/lib/widget_list/sequel.rb" />
14
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/utils.rb" afterPath="$PROJECT_DIR$/lib/widget_list/utils.rb" />
15
12
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/version.rb" afterPath="$PROJECT_DIR$/lib/widget_list/version.rb" />
16
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/widget_list/widgets.rb" afterPath="$PROJECT_DIR$/lib/widget_list/widgets.rb" />
13
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/publish_gem.sh" afterPath="$PROJECT_DIR$/publish_gem.sh" />
14
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/vendor/assets/images/gobblecons/README.rtf" afterPath="$PROJECT_DIR$/vendor/assets/images/gobblecons/README.rtf" />
17
15
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js" afterPath="$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js" />
18
16
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css" afterPath="$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css" />
19
17
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/vendor/assets/stylesheets/widgets.css" afterPath="$PROJECT_DIR$/vendor/assets/stylesheets/widgets.css" />
@@ -48,23 +46,23 @@
48
46
  <file leaf-file-name="widget_list.css" pinned="false" current="false" current-in-tab="false">
49
47
  <entry file="file://$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css">
50
48
  <provider selected="true" editor-type-id="text-editor">
51
- <state line="746" column="40" selection-start="17766" selection-end="17766" vertical-scroll-proportion="0.0">
49
+ <state line="17" column="25" selection-start="220" selection-end="220" vertical-scroll-proportion="0.0">
52
50
  <folding />
53
51
  </state>
54
52
  </provider>
55
53
  </entry>
56
54
  </file>
57
- <file leaf-file-name="railtie.rb" pinned="false" current="false" current-in-tab="false">
58
- <entry file="file://$PROJECT_DIR$/lib/widget_list/railtie.rb">
55
+ <file leaf-file-name="engine.rb" pinned="false" current="false" current-in-tab="false">
56
+ <entry file="file://$PROJECT_DIR$/lib/widget_list/engine.rb">
59
57
  <provider selected="true" editor-type-id="text-editor">
60
- <state line="17" column="46" selection-start="867" selection-end="867" vertical-scroll-proportion="0.0">
58
+ <state line="8" column="74" selection-start="209" selection-end="209" vertical-scroll-proportion="0.0">
61
59
  <folding />
62
60
  </state>
63
61
  </provider>
64
62
  </entry>
65
63
  </file>
66
- <file leaf-file-name="md5.rb" pinned="false" current="false" current-in-tab="false">
67
- <entry file="file://$PROJECT_DIR$/lib/widget_list/md5.rb">
64
+ <file leaf-file-name="widget_list.js" pinned="false" current="false" current-in-tab="false">
65
+ <entry file="file://$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js">
68
66
  <provider selected="true" editor-type-id="text-editor">
69
67
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
70
68
  <folding />
@@ -72,40 +70,40 @@
72
70
  </provider>
73
71
  </entry>
74
72
  </file>
75
- <file leaf-file-name="hash.rb" pinned="false" current="false" current-in-tab="false">
76
- <entry file="file://$PROJECT_DIR$/lib/widget_list/hash.rb">
73
+ <file leaf-file-name="widget_list.rb" pinned="false" current="true" current-in-tab="true">
74
+ <entry file="file://$PROJECT_DIR$/lib/widget_list.rb">
77
75
  <provider selected="true" editor-type-id="text-editor">
78
- <state line="13" column="54" selection-start="338" selection-end="338" vertical-scroll-proportion="0.0">
76
+ <state line="513" column="208" selection-start="20683" selection-end="20683" vertical-scroll-proportion="0.72">
79
77
  <folding />
80
78
  </state>
81
79
  </provider>
82
80
  </entry>
83
81
  </file>
84
- <file leaf-file-name="engine.rb" pinned="false" current="false" current-in-tab="false">
85
- <entry file="file://$PROJECT_DIR$/lib/widget_list/engine.rb">
82
+ <file leaf-file-name="widget_list.gemspec" pinned="false" current="false" current-in-tab="false">
83
+ <entry file="file://$PROJECT_DIR$/widget_list.gemspec">
86
84
  <provider selected="true" editor-type-id="text-editor">
87
- <state line="8" column="74" selection-start="209" selection-end="209" vertical-scroll-proportion="0.0">
85
+ <state line="12" column="39" selection-start="696" selection-end="696" vertical-scroll-proportion="0.0">
88
86
  <folding />
89
87
  </state>
90
88
  </provider>
91
89
  </entry>
92
90
  </file>
93
- <file leaf-file-name="widget_list.js" pinned="false" current="false" current-in-tab="false">
94
- <entry file="file://$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js">
91
+ <file leaf-file-name="railtie.rb" pinned="false" current="false" current-in-tab="false">
92
+ <entry file="file://$PROJECT_DIR$/lib/widget_list/railtie.rb">
95
93
  <provider selected="true" editor-type-id="text-editor">
96
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
97
- <folding>
98
- <marker date="1357512344000" expanded="false" signature="2988:3014" placeholder="..." />
99
- </folding>
94
+ <state line="32" column="0" selection-start="1326" selection-end="1326" vertical-scroll-proportion="0.0">
95
+ <folding />
100
96
  </state>
101
97
  </provider>
102
98
  </entry>
103
99
  </file>
104
- <file leaf-file-name="widget_list.rb" pinned="false" current="true" current-in-tab="true">
105
- <entry file="file://$PROJECT_DIR$/lib/widget_list.rb">
100
+ <file leaf-file-name="sequel.rb" pinned="false" current="false" current-in-tab="false">
101
+ <entry file="file://$PROJECT_DIR$/lib/widget_list/sequel.rb">
106
102
  <provider selected="true" editor-type-id="text-editor">
107
- <state line="364" column="20" selection-start="14843" selection-end="14843" vertical-scroll-proportion="0.78">
108
- <folding />
103
+ <state line="88" column="32" selection-start="1965" selection-end="1965" vertical-scroll-proportion="0.0">
104
+ <folding>
105
+ <marker date="1360188109000" expanded="true" signature="13:700" placeholder=" ... end" />
106
+ </folding>
109
107
  </state>
110
108
  </provider>
111
109
  </entry>
@@ -142,29 +140,28 @@
142
140
  <option name="changedFiles">
143
141
  <list>
144
142
  <option value="$PROJECT_DIR$/lib/widget_list/md5.rb" />
145
- <option value="$PROJECT_DIR$/widget_list.gemspec" />
146
143
  <option value="$PROJECT_DIR$/lib/widget_list/tpl.rb" />
147
144
  <option value="$PROJECT_DIR$/lib/extensions/action_controller_base.rb" />
148
145
  <option value="$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js" />
149
146
  <option value="$PROJECT_DIR$/lib/widget_list/widgets.rb" />
150
147
  <option value="$PROJECT_DIR$/lib/widget_list/utils.rb" />
151
148
  <option value="$PROJECT_DIR$/lib/widget_list/string.rb" />
152
- <option value="$PROJECT_DIR$/lib/widget_list/railtie.rb" />
153
- <option value="$PROJECT_DIR$/lib/widget_list/sequel.rb" />
154
149
  <option value="$PROJECT_DIR$/lib/widget_list/version.rb" />
155
150
  <option value="$PROJECT_DIR$/README.md" />
156
151
  <option value="$PROJECT_DIR$/lib/widget_list/engine.rb" />
157
- <option value="$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css" />
158
152
  <option value="$PROJECT_DIR$/vendor/assets/stylesheets/widgets.css" />
153
+ <option value="$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css" />
154
+ <option value="$PROJECT_DIR$/lib/widget_list/sequel.rb" />
155
+ <option value="$PROJECT_DIR$/lib/widget_list/railtie.rb" />
156
+ <option value="$PROJECT_DIR$/widget_list.gemspec" />
159
157
  <option value="$PROJECT_DIR$/lib/widget_list.rb" />
160
158
  </list>
161
159
  </option>
162
160
  </component>
163
161
  <component name="ProjectFrameBounds">
164
- <option name="x" value="-5" />
165
162
  <option name="y" value="25" />
166
- <option name="width" value="1672" />
167
- <option name="height" value="916" />
163
+ <option name="width" value="1680" />
164
+ <option name="height" value="897" />
168
165
  </component>
169
166
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
170
167
  <OptionsSetting value="true" id="Add" />
@@ -223,8 +220,54 @@
223
220
  <option name="myItemId" value="vendor" />
224
221
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
225
222
  </PATH_ELEMENT>
223
+ </PATH>
224
+ <PATH>
225
+ <PATH_ELEMENT>
226
+ <option name="myItemId" value="widget_list" />
227
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
228
+ </PATH_ELEMENT>
229
+ <PATH_ELEMENT>
230
+ <option name="myItemId" value="widget_list" />
231
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
232
+ </PATH_ELEMENT>
233
+ <PATH_ELEMENT>
234
+ <option name="myItemId" value="lib" />
235
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
236
+ </PATH_ELEMENT>
237
+ </PATH>
238
+ <PATH>
239
+ <PATH_ELEMENT>
240
+ <option name="myItemId" value="widget_list" />
241
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
242
+ </PATH_ELEMENT>
243
+ <PATH_ELEMENT>
244
+ <option name="myItemId" value="widget_list" />
245
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
246
+ </PATH_ELEMENT>
226
247
  <PATH_ELEMENT>
227
- <option name="myItemId" value="assets" />
248
+ <option name="myItemId" value="lib" />
249
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
250
+ </PATH_ELEMENT>
251
+ <PATH_ELEMENT>
252
+ <option name="myItemId" value="widget_list" />
253
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
254
+ </PATH_ELEMENT>
255
+ </PATH>
256
+ <PATH>
257
+ <PATH_ELEMENT>
258
+ <option name="myItemId" value="widget_list" />
259
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
260
+ </PATH_ELEMENT>
261
+ <PATH_ELEMENT>
262
+ <option name="myItemId" value="widget_list" />
263
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
264
+ </PATH_ELEMENT>
265
+ <PATH_ELEMENT>
266
+ <option name="myItemId" value="lib" />
267
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
268
+ </PATH_ELEMENT>
269
+ <PATH_ELEMENT>
270
+ <option name="myItemId" value="extensions" />
228
271
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
229
272
  </PATH_ELEMENT>
230
273
  </PATH>
@@ -348,14 +391,15 @@
348
391
  <servers />
349
392
  </component>
350
393
  <component name="ToolWindowManager">
351
- <frame x="-5" y="25" width="1672" height="916" extended-state="6" />
394
+ <frame x="0" y="25" width="1680" height="897" extended-state="0" />
352
395
  <editor active="true" />
353
396
  <layout>
354
397
  <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="7" side_tool="false" content_ui="tabs" />
355
398
  <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" />
399
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3277202" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
356
400
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
357
401
  <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" />
358
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20668317" sideWeight="0.6720297" order="0" side_tool="false" content_ui="combo" />
402
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.21182266" sideWeight="0.6722798" order="0" side_tool="false" content_ui="combo" />
359
403
  <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.56913185" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
360
404
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
361
405
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
@@ -364,7 +408,6 @@
364
408
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
365
409
  <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
366
410
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
367
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3279703" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
368
411
  <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
369
412
  <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
370
413
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -420,7 +463,14 @@
420
463
  <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
421
464
  </component>
422
465
  <component name="XDebuggerManager">
423
- <breakpoint-manager />
466
+ <breakpoint-manager>
467
+ <breakpoints>
468
+ <line-breakpoint enabled="true" type="ruby-line">
469
+ <url>file://$PROJECT_DIR$/lib/widget_list.rb</url>
470
+ <line>2292</line>
471
+ </line-breakpoint>
472
+ </breakpoints>
473
+ </breakpoint-manager>
424
474
  </component>
425
475
  <component name="editorHistoryManager">
426
476
  <entry file="file://$PROJECT_DIR$/lib/widget_list/widgets.rb">
@@ -433,21 +483,11 @@
433
483
  <state line="88" column="3" selection-start="1904" selection-end="1904" vertical-scroll-proportion="0.0" />
434
484
  </provider>
435
485
  </entry>
436
- <entry file="file://$PROJECT_DIR$/lib/widget_list/sequel.rb">
437
- <provider selected="true" editor-type-id="text-editor">
438
- <state line="127" column="29" selection-start="3617" selection-end="3617" vertical-scroll-proportion="0.0" />
439
- </provider>
440
- </entry>
441
486
  <entry file="file://$PROJECT_DIR$/lib/widget_list/version.rb">
442
487
  <provider selected="true" editor-type-id="text-editor">
443
488
  <state line="3" column="51" selection-start="42" selection-end="42" vertical-scroll-proportion="0.0" />
444
489
  </provider>
445
490
  </entry>
446
- <entry file="file://$PROJECT_DIR$/widget_list.gemspec">
447
- <provider selected="true" editor-type-id="text-editor">
448
- <state line="13" column="49" selection-start="763" selection-end="763" vertical-scroll-proportion="0.4183267" />
449
- </provider>
450
- </entry>
451
491
  <entry file="file://$PROJECT_DIR$/README.md">
452
492
  <provider selected="true" editor-type-id="text-editor">
453
493
  <state line="290" column="41" selection-start="11319" selection-end="11319" vertical-scroll-proportion="0.058252428" />
@@ -467,13 +507,6 @@
467
507
  </state>
468
508
  </provider>
469
509
  </entry>
470
- <entry file="file://$PROJECT_DIR$/lib/widget_list/railtie.rb">
471
- <provider selected="true" editor-type-id="text-editor">
472
- <state line="17" column="46" selection-start="867" selection-end="867" vertical-scroll-proportion="0.0">
473
- <folding />
474
- </state>
475
- </provider>
476
- </entry>
477
510
  <entry file="file://$PROJECT_DIR$/lib/widget_list/md5.rb">
478
511
  <provider selected="true" editor-type-id="text-editor">
479
512
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
@@ -498,29 +531,50 @@
498
531
  <entry file="file://$PROJECT_DIR$/vendor/assets/javascripts/widget_list.js">
499
532
  <provider selected="true" editor-type-id="text-editor">
500
533
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
534
+ <folding />
535
+ </state>
536
+ </provider>
537
+ </entry>
538
+ <entry file="file://$PROJECT_DIR$/vendor/assets/stylesheets/widgets.css">
539
+ <provider selected="true" editor-type-id="text-editor">
540
+ <state line="64" column="47" selection-start="1068" selection-end="1068" vertical-scroll-proportion="0.0">
541
+ <folding />
542
+ </state>
543
+ </provider>
544
+ </entry>
545
+ <entry file="file://$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css">
546
+ <provider selected="true" editor-type-id="text-editor">
547
+ <state line="17" column="25" selection-start="220" selection-end="220" vertical-scroll-proportion="0.0">
548
+ <folding />
549
+ </state>
550
+ </provider>
551
+ </entry>
552
+ <entry file="file://$PROJECT_DIR$/lib/widget_list/sequel.rb">
553
+ <provider selected="true" editor-type-id="text-editor">
554
+ <state line="88" column="32" selection-start="1965" selection-end="1965" vertical-scroll-proportion="0.0">
501
555
  <folding>
502
- <marker date="1357512344000" expanded="false" signature="2988:3014" placeholder="..." />
556
+ <marker date="1360188109000" expanded="true" signature="13:700" placeholder=" ... end" />
503
557
  </folding>
504
558
  </state>
505
559
  </provider>
506
560
  </entry>
507
- <entry file="file://$PROJECT_DIR$/vendor/assets/stylesheets/widget_list.css">
561
+ <entry file="file://$PROJECT_DIR$/lib/widget_list/railtie.rb">
508
562
  <provider selected="true" editor-type-id="text-editor">
509
- <state line="746" column="40" selection-start="17766" selection-end="17766" vertical-scroll-proportion="0.0">
563
+ <state line="32" column="0" selection-start="1326" selection-end="1326" vertical-scroll-proportion="0.0">
510
564
  <folding />
511
565
  </state>
512
566
  </provider>
513
567
  </entry>
514
- <entry file="file://$PROJECT_DIR$/vendor/assets/stylesheets/widgets.css">
568
+ <entry file="file://$PROJECT_DIR$/widget_list.gemspec">
515
569
  <provider selected="true" editor-type-id="text-editor">
516
- <state line="64" column="47" selection-start="1068" selection-end="1068" vertical-scroll-proportion="0.0">
570
+ <state line="12" column="39" selection-start="696" selection-end="696" vertical-scroll-proportion="0.0">
517
571
  <folding />
518
572
  </state>
519
573
  </provider>
520
574
  </entry>
521
575
  <entry file="file://$PROJECT_DIR$/lib/widget_list.rb">
522
576
  <provider selected="true" editor-type-id="text-editor">
523
- <state line="364" column="20" selection-start="14843" selection-end="14843" vertical-scroll-proportion="0.78">
577
+ <state line="513" column="208" selection-start="20683" selection-end="20683" vertical-scroll-proportion="0.72">
524
578
  <folding />
525
579
  </state>
526
580
  </provider>
data/README.md CHANGED
@@ -54,6 +54,158 @@ You can either follow the below instructions or take a look at the changes here
54
54
 
55
55
  I recommend if you use widget_list in production that you use config.consider_all_requests_local = true as errors will be handled but the base lists will still draw.
56
56
 
57
+
58
+ ## Feature Configurations
59
+
60
+ widget_list features and configurations primarily work by a single large hash passed to the constructor with the features you need for the given request which changes how the list is displayed or filtered.
61
+
62
+ `name` - The unique name/id's of all the pieces that make up your widget list `default=([*('A'..'Z'),*('0'..'9')]-%w(0 1 I O)).sample(16).join`
63
+
64
+ `database` - You can pass which DB connection you would like to use for each list. Only two values/db connections are supported ('primary' or 'secondary') `default='primary'`
65
+
66
+ `title` - This adds an H1 title and horizontal rule on top of your list `default=''`
67
+
68
+ `listDescription` - This adds a grey header box. It is useful for describing the main query `default=''`
69
+
70
+ `pageId` - Base path for requests (typically you never need to change this) `default=$_SERVER['PATH_INFO']`
71
+
72
+ `view` - A sub-select query to your database (ALWAYS ALIASED) `default=''`
73
+
74
+ `data` - A "sequel" formatted resultset like would be returned from _select() method. Instead of running a SQL query, you can pass an array to populate the list `default={}`
75
+
76
+ `collClass` - Your custom <td> class for all <td>'s `default=''`
77
+
78
+ `align` - <td> align attribute for all <td>'s `default=''`
79
+
80
+ `fields` - The visible fields shown in the current list. KEY=column name VALUE= displayed column header `default={}`
81
+
82
+ `fieldsHidden` - The non-visible fields in the current list. Typically used when you wish to search on this column, but the main column is a drilldown or some HTML value that isnt easily searchable. VALUE=column name `default=[]`
83
+
84
+ `bindVars` - bindVars that are passed to _select() sequel extension I wrote. Which will replace "?" in your query with the associated bindVar `default=[]`
85
+
86
+ `bindVarsLegacy` - A Hash whose KEYS ARE CAPITALIZED and whose value is the replacement string. Inside the "view" you would use :MY_KEY as the template to be replaced `default={}`
87
+
88
+ `links` - Turn text based record value into a link. KEY=column name VALUE=hash of link Config. Links should most likely pass ['tags']['field_name'] = 'get_var_name' (would yeild get_var_name=1234 for that field value 1234). You can pass ['tags']['onclick'] if you dont want to call ButtonLinkPost which will redirect to the URL built. If you pass ['onclick']['tags'], each field passed will be passed as a parameter for the function you designate `default={}`
89
+
90
+ `buttons` - Buttons to generate for each row. KEY=column name VALUE=Hash of widget_button attributes `default={}`
91
+
92
+ `inputs` - widget_check is the only one supported so far. (See examples) `default={}`
93
+
94
+ `filter` - << "xxx = 123" would be the syntax to add a new filter array. (See examples) `default=[]`
95
+
96
+ `groupBy` - The column name or CSV of names to group by. (See examples) `default=[]`
97
+
98
+ `rowStart` - Which page the list should start at `default=0`
99
+
100
+ `rowLimit` - How many rows per page? `default=10`
101
+
102
+ `orderBy` - Default order by "column_name DIRECTION" `default=''`
103
+
104
+ `allowHTML` - Strip HTML from view or not `default=true`
105
+
106
+ `strlength` - Strip HTML from view or not `default=true`
107
+
108
+ `searchClear` - Clear the list's search session `default=false`
109
+
110
+ `searchClearAll` - Clear all search session for all lists `default=false`
111
+
112
+ `showPagination` - Show pagination HTML `default=true`
113
+
114
+ `searchSession` - Remember and restore the last search performed `default=true`
115
+
116
+ `carryOverRequests` - will allow you to post custom things from request to all sort/paging URLS for each ajax. Takes an array of GETVARS which will be passed to each request `default=['switch_grouping']`
117
+
118
+ `customFooter` - Add buttons or HTML at bottom area of list inside the grey box `default=''`
119
+
120
+ `customHeader` - Add buttons or HTML at top area of list above all headers (such as TABS to delineate Summary/Details) `default=''`
121
+
122
+ `ajaxFunctionAll` - Custom javascript called asychronously during each click of each event someone interacts with on the list `default=''`
123
+
124
+ `ajaxFunction` - Mostly an internal setting `default='ListJumpMin'`
125
+
126
+ `showSearch` - Show top search bar `default=true`
127
+
128
+ `searchOnkeyup` - Search on key up event `default=''`
129
+
130
+ `searchOnclick` - Search on click event `default=''`
131
+
132
+ `searchIdCol` - By default `id` column is here because typically if you call your PK's id and are auto-increment and numeric. This can also take in an array of numeric fields so that users can search CSV's of numbers and get back matches `default='id'`
133
+
134
+ `searchTitle` - Set a title for the search input `default= 'Search by Id or a list of Ids and more'`
135
+
136
+ `searchFieldsIn` - White list of fields to include in a alpha-numeric based like '%%' search `default={}`
137
+
138
+ `searchFieldsOut` - Black list of fields to exclude in a alpha-numeric based search `default={'id'=>true}`
139
+
140
+ `showExport` - Allow users to export current list view as CSV `default=true`
141
+
142
+ `exportButtonTitle` - Title of button `default='Export CSV'`
143
+
144
+ `groupByItems` - Custom drop down's created by passing an array of modes. Best suited to group by the data `default=[]`
145
+
146
+ `groupBySelected` - Initially selected grouping - defaults to first in list if not. Please pass the string value of the "groupByItem" `default=false`
147
+
148
+ `groupByLabel` - Label describing select box `default='Group By'`
149
+
150
+ `groupByClick` - Function to call as a custom function for each click on an item `default=''`
151
+
152
+ `groupByClickDefault` - Default group by handler inside widget_list.js `default="ListChangeGrouping('<!--NAME-->', this);"`
153
+
154
+ `listSearchForm` - Allows you to pass a custom form for the ARROW drop down for advanced searching `default=''`
155
+
156
+ `columnStyle` - Column styles. KEY=column name VALUE= the inline style applied `default={}`
157
+
158
+ `columnClass` - Column class. KEY=column name VALUE= the class name `default={}`
159
+
160
+ `columnPopupTitle` - Column title as you hover over. KEY=column name VALUE=Popup text `default={}`
161
+
162
+ `columnWidth` - Column widths. KEY=column name VALUE= '100px' `default={}`
163
+
164
+ `columnNoSort` - Dont allow sorting on these columns (By default all visible columns have a sort link built). KEY=column name VALUE=column name `default={}`
165
+
166
+ `borderedColumns` - Add a right border to each column. `default=false`
167
+
168
+ `borderColumnStyle` - Style of row if you use this above feature. `default='1px solid #CCCCCC'`
169
+
170
+ `rowClass` - Class added to all rows `default=''`
171
+
172
+ `rowColorByStatus` - {'rowColorByStatus' =>
173
+ {'active'=>
174
+ {'No' => '#EBEBEB' }
175
+ }
176
+ }
177
+ Color a row based on the value of the column.
178
+ `default={}`
179
+
180
+ `rowStylesByStatus` - {'rowStylesByStatus' =>
181
+ {'active'=>
182
+ {'No' => 'font-style:italic;color:red;' }
183
+ }
184
+ }
185
+ Style a row based on the value of the column.
186
+ `default={}`
187
+
188
+ `rowOffsets` - Color for each row and offset `default=['FFFFFF','FFFFFF']`
189
+
190
+ `noDataMessage` - Message to show when no data is found `default='Currently no data.'`
191
+
192
+ `useSort` - Allow sorting on list `default=true`
193
+
194
+ `headerClass` - Class of each individual header column `default={}`
195
+
196
+ `fieldFunction` - A way to wrap or inject columns or SQL formatting in place of your columns `default={}`
197
+
198
+ `template` - Pass in a custom template for outer shell `default=''`
199
+
200
+ `templateFilter` - Instead of widget list building your search box. Pass your own HTML `default=''`
201
+
202
+ `storeSessionChecks` - See http://stackoverflow.com/questions/1928204/marshal-data-too-short for configuring larger session storage which checkboxes would eat up if you had this set to true `default=false`
203
+
204
+ `columnHooks` - Todo `default={}`
205
+
206
+ `rowHooks` - Todo `default={}`
207
+
208
+
57
209
  ### #1 - Add widget_list CSS and JS to your application css and js
58
210
 
59
211
  Change application.css to:
@@ -97,22 +249,22 @@ I recommend if you use widget_list in production that you use config.consider_al
97
249
  # Load Sample "items" Data. Comment out in your first time executing a widgetlist to create the items table
98
250
  #
99
251
  begin
100
- WidgetList::List.get_database.create_table :items do
101
- primary_key :id
102
- String :name
103
- Float :price
104
- Fixnum :sku
105
- String :active
106
- Date :date_added
107
- end
108
- items = WidgetList::List.get_database[:items]
109
- 100.times {
110
- items.insert(:name => 'ab\'c_quoted_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-01', :sku => rand(9999), :active => 'Yes')
111
- items.insert(:name => '12"3_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-02', :sku => rand(9999), :active => 'Yes')
112
- items.insert(:name => 'asdf_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-03', :sku => rand(9999), :active => 'Yes')
113
- items.insert(:name => 'qwerty_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-04', :sku => rand(9999), :active => 'No')
114
- items.insert(:name => 'meow_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-05', :sku => rand(9999), :active => 'No')
115
- }
252
+ WidgetList::List.get_database.create_table :items do
253
+ primary_key :id
254
+ String :name
255
+ Float :price
256
+ Fixnum :sku
257
+ String :active
258
+ Date :date_added
259
+ end
260
+ items = WidgetList::List.get_database[:items]
261
+ 100.times {
262
+ items.insert(:name => 'ab\'c_quoted_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-01', :sku => rand(9999), :active => 'Yes')
263
+ items.insert(:name => '12"3_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-02', :sku => rand(9999), :active => 'Yes')
264
+ items.insert(:name => 'asdf_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-03', :sku => rand(9999), :active => 'Yes')
265
+ items.insert(:name => 'qwerty_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-04', :sku => rand(9999), :active => 'No')
266
+ items.insert(:name => 'meow_' + rand(35).to_s, :price => rand * 100, :date_added => '2008-02-05', :sku => rand(9999), :active => 'No')
267
+ }
116
268
  rescue Exception => e
117
269
  #
118
270
  # Table already exists
@@ -168,8 +320,7 @@ I recommend if you use widget_list in production that you use config.consider_al
168
320
  list_parms['listDescription'] += 'Showing All Ruby Items' + groupByDesc
169
321
  end
170
322
 
171
-
172
-
323
+ # put <%= @output %> inside your view for initial load nothing to do here other than any custom concatenation of multiple lists
173
324
  #
174
325
  # Setup your first widget_list
175
326
  #
@@ -177,21 +328,30 @@ I recommend if you use widget_list in production that you use config.consider_al
177
328
  button_column_name = 'actions'
178
329
 
179
330
  #
180
- # action_buttons will add buttons to the bottom of the list.
331
+ # customFooter will add buttons to the bottom of the list.
181
332
  #
182
333
 
183
- action_buttons = WidgetList::Widgets::widget_button('Add New Item', {'page' => '/add/'} ) + WidgetList::Widgets::widget_button('Do something else', {'page' => '/else/'} )
334
+ list_parms['customFooter'] = WidgetList::Widgets::widget_button('Add New Item', {'page' => '/add/'} ) + WidgetList::Widgets::widget_button('Do something else', {'page' => '/else/'} )
184
335
 
185
336
  #
186
337
  # Give some SQL to feed widget_list and set a noDataMessage
187
338
  #
188
339
  list_parms['searchIdCol'] = ['id','sku']
340
+
341
+ #
342
+ # Because sku_linked column is being used and the raw SKU is hidden, we need to make this available for searching via fields_hidden
343
+ #
344
+ list_parms['fieldsHidden'] = ['sku']
345
+
346
+ drill_downs = []
347
+ drill_downs << WidgetList::List::build_drill_down_link(list_parms['name'],'filter_by_name','a.name','a.name','name_linked')
348
+ drill_downs << WidgetList::List::build_drill_down_link(list_parms['name'],'filter_by_sku','a.sku','a.sku','sku_linked')
349
+
189
350
  list_parms['view'] = '(
190
351
  SELECT
191
352
  ' + countSQL + '
353
+ ' + drill_downs.join(' , ') + ',
192
354
  \'\' AS checkbox,
193
- ' + WidgetList::List::build_drill_down_link(list_parms['name'],'filter_by_name','a.name','a.name','name_linked') + '
194
- ' + WidgetList::List::build_drill_down_link(list_parms['name'],'filter_by_sku','a.sku','a.sku','sku_linked') + '
195
355
  a.id AS id,
196
356
  a.active AS active,
197
357
  a.name AS name,
@@ -202,6 +362,22 @@ I recommend if you use widget_list in production that you use config.consider_al
202
362
  items a
203
363
  ' + groupBySQL + '
204
364
  ) a'
365
+
366
+ #
367
+ # Map out the visible fields
368
+ #
369
+ list_parms['fields'] = {}
370
+ list_parms['fields']['checkbox'] = 'checkbox_header'
371
+ list_parms['fields']['cnt'] = 'Total Items In Group' if groupByFilter != 'none'
372
+ list_parms['fields']['id'] = 'Item Id' if groupByFilter == 'none'
373
+ list_parms['fields']['name_linked'] = 'Name' if groupByFilter == 'none' or groupByFilter == 'item'
374
+ list_parms['fields']['price'] = 'Price of Item' if groupByFilter == 'none'
375
+ list_parms['fields']['sku_linked'] = 'Sku #' if groupByFilter == 'none' or groupByFilter == 'sku'
376
+ list_parms['fields']['date_added'] = 'Date Added' if groupByFilter == 'none'
377
+ list_parms['fields']['active'] = 'Active Item' if groupByFilter == 'none'
378
+ list_parms['fields'][button_column_name] = button_column_name.capitalize if groupByFilter == 'none'
379
+
380
+
205
381
  list_parms['noDataMessage'] = 'No Ruby Items Found'
206
382
  list_parms['title'] = 'Ruby Items!!!'
207
383
 
@@ -228,6 +404,12 @@ I recommend if you use widget_list in production that you use config.consider_al
228
404
 
229
405
  list_parms['groupByItems'] = ['All Records', 'Item Name', 'Sku Number']
230
406
 
407
+
408
+ #
409
+ # Setup a custom field for checkboxes stored into the session and reloaded when refresh occurs
410
+ #
411
+ list_parms = WidgetList::List.checkbox_helper(list_parms,'id')
412
+
231
413
  #
232
414
  # Generate a template for the DOWN ARROW for CUSTOM FILTER
233
415
  #
@@ -243,7 +425,7 @@ I recommend if you use widget_list in production that you use config.consider_al
243
425
  button_search = {}
244
426
  button_search['onclick'] = "alert('This would search, but is not coded. That is for you to do')"
245
427
 
246
- list_parms['list_search_form'] = WidgetList::Utils::fill( {
428
+ list_parms['listSearchForm'] = WidgetList::Utils::fill( {
247
429
  '<!--BUTTON_SEARCH-->' => WidgetList::Widgets::widget_button('Search', button_search),
248
430
  '<!--COMMENTS-->' => WidgetList::Widgets::widget_input(input),
249
431
  '<!--BUTTON_CLOSE-->' => "HideAdvancedSearch(this)" } ,
@@ -258,45 +440,44 @@ I recommend if you use widget_list in production that you use config.consider_al
258
440
  </ul>
259
441
  <br/>
260
442
  <div style="text-align:right;width:100%;height:30px;" class="advanced-search-container-buttons"><!--BUTTON_RESET--><!--BUTTON_SEARCH--></div>
261
- </div>')
443
+ </div>'
444
+ # or to keep HTML out of controller render_to_string(:partial => 'partials/form_xxx')
445
+ )
262
446
 
263
447
  #
264
448
  # Control widths of special fields
265
449
  #
266
450
 
267
451
  list_parms['columnWidth'] = {
268
- 'date_added'=>'200px',
269
- 'sku_linked'=>'20px',
270
- }
452
+ 'date_added'=>'200px',
453
+ 'sku_linked'=>'20px',
454
+ }
271
455
 
272
456
  #
273
457
  # If certain statuses of records are shown, visualize
274
458
  #
275
459
 
276
460
  list_parms.deep_merge!({'rowStylesByStatus' =>
277
- {'active'=>
278
- {'Yes' => '' }
279
- }
461
+ {'active'=>
462
+ {'Yes' => '' }
463
+ }
280
464
  })
281
465
  list_parms.deep_merge!({'rowStylesByStatus' =>
282
- {'active'=>
283
- {'No' => 'font-style:italic;color:red;' }
284
- }
466
+ {'active'=>
467
+ {'No' => 'font-style:italic;color:red;' }
468
+ }
285
469
  })
286
470
 
287
- #
288
- # Map out the visible fields
289
- #
290
- list_parms['fields'] = {}
291
- list_parms['fields']['checkbox'] = 'checkbox_header'
292
- list_parms['fields']['cnt'] = 'Total Items In Group' if groupByFilter != 'none'
293
- list_parms['fields']['id'] = 'Item Id' if groupByFilter == 'none'
294
- list_parms['fields']['name_linked'] = 'Name' if groupByFilter == 'none' or groupByFilter == 'item'
295
- list_parms['fields']['price'] = 'Price of Item' if groupByFilter == 'none'
296
- list_parms['fields']['sku_linked'] = 'Sku #' if groupByFilter == 'none' or groupByFilter == 'sku'
297
- list_parms['fields']['date_added'] = 'Date Added' if groupByFilter == 'none'
298
- list_parms['fields']['active'] = 'Active Item' if groupByFilter == 'none'
299
- list_parms['fields'][button_column_name] = button_column_name.capitalize if groupByFilter == 'none'
471
+ list_parms.deep_merge!({'rowColorByStatus' =>
472
+ {'active'=>
473
+ {'Yes' => '' }
474
+ }
475
+ })
476
+ list_parms.deep_merge!({'rowColorByStatus' =>
477
+ {'active'=>
478
+ {'No' => '#EBEBEB' }
479
+ }
480
+ })
300
481
 
301
482
 
302
483
  list_parms['columnPopupTitle'] = {}
@@ -308,79 +489,40 @@ I recommend if you use widget_list in production that you use config.consider_al
308
489
  list_parms['columnPopupTitle']['sku_linked'] = 'Sku # (Click to drill down)'
309
490
  list_parms['columnPopupTitle']['date_added'] = 'The date the item was added to the database'
310
491
  list_parms['columnPopupTitle']['active'] = 'Is the item active?'
311
- #
312
- # Setup a custom field for checkboxes stored into the session and reloaded when refresh occurs
313
- #
314
492
 
315
- list_parms.deep_merge!({'inputs' =>
316
- {'checkbox'=>
317
- {'type' => 'checkbox'
318
- }
319
- }
320
- })
493
+ output_type, output = WidgetList::List.build_list(list_parms)
321
494
 
322
- list_parms.deep_merge!({'inputs' =>
323
- {'checkbox'=>
324
- {'items' =>
325
- {
326
- 'name' => 'visible_checks[]',
327
- 'value' => 'id', #the value should be a column name mapping
328
- 'class_handle' => 'info_tables',
329
- }
330
- }
331
- }
332
- })
495
+ case output_type
496
+ when 'html'
497
+ # put <%= @output %> inside your view for initial load nothing to do here other than any custom concatenation of multiple lists
498
+ @output = output
499
+ when 'json'
500
+ return render :inline => output
501
+ when 'export'
502
+ send_data(output, :filename => list_parms['name'] + '.csv')
503
+ return
504
+ end
333
505
 
334
- list_parms.deep_merge!({'inputs' =>
335
- {'checkbox_header'=>
336
- {'type' => 'checkbox'
337
- }
338
- }
339
- })
506
+ rescue Exception => e
340
507
 
341
- list_parms.deep_merge!({'inputs' =>
342
- {'checkbox_header'=>
343
- {'items' =>
344
- {
345
- 'check_all' => true,
346
- 'id' => 'info_tables_check_all',
347
- 'class_handle' => 'info_tables',
348
- }
349
- }
350
- }
351
- })
352
- list = WidgetList::List.new(list_parms)
508
+ Rails.logger.info e.to_s + "\n\n" + $!.backtrace.join("\n\n")
353
509
 
354
- #
355
- # If AJAX, send back JSON
356
- #
357
- if $_REQUEST.key?('BUTTON_VALUE') && $_REQUEST['LIST_NAME'] == list_parms['name']
510
+ #really this block is just to catch initial ruby errors in setting up your list_parms
511
+ #I suggest taking out this rescue when going to production
512
+ output_type, output = WidgetList::List.build_list(list_parms)
358
513
 
359
- if $_REQUEST.key?('export_widget_list')
360
- send_data(list.render(), :filename => list_parms['name'] + '.csv')
514
+ case output_type
515
+ when 'html'
516
+ @output = output
517
+ when 'json'
518
+ return render :inline => output
519
+ when 'export'
520
+ send_data(output, :filename => list_parms['name'] + '.csv')
361
521
  return
362
- end
363
-
364
- ret = {}
365
- ret['list'] = WidgetList::Utils::fill({ '<!--CUSTOM_CONTENT-->' => action_buttons } , list.render() )
366
- ret['list_id'] = list_parms['name']
367
- ret['callback'] = 'ListSearchAheadResponse'
368
- return render :inline => WidgetList::Utils::json_encode(ret)
369
- else
370
- #
371
- # Else assign to variable for view
372
- #
373
- @output = WidgetList::Utils::fill({ '<!--CUSTOM_CONTENT-->' => action_buttons } , list.render() )
374
522
  end
375
523
 
376
- rescue Exception => e
377
-
378
- list = WidgetList::List.new(list_parms)
379
- @output = WidgetList::Utils::fill({ '<!--CUSTOM_CONTENT-->' => action_buttons } , list.render() )
380
-
381
524
  end
382
525
 
383
-
384
526
  ## Contributing
385
527
 
386
528
  1. Fork it