widget_list 1.2.8 → 1.2.9
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/lib/widget_list/version.rb +1 -1
- data/lib/widget_list.rb +11 -6
- metadata +1 -1
data/lib/widget_list/version.rb
CHANGED
data/lib/widget_list.rb
CHANGED
@@ -329,7 +329,12 @@ module WidgetList
|
|
329
329
|
end
|
330
330
|
|
331
331
|
def escape_code(code)
|
332
|
-
|
332
|
+
if $_REQUEST.key?('iframe')
|
333
|
+
#It is so weird, during output return, you need an extra slash to populate the code properly, but during rendering this is needed
|
334
|
+
code.gsub(/'/,"\\\\'")
|
335
|
+
else
|
336
|
+
code.gsub(/'/,"\\\\\\\\'")
|
337
|
+
end
|
333
338
|
end
|
334
339
|
|
335
340
|
def translate_config_to_code()
|
@@ -481,7 +486,7 @@ module WidgetList
|
|
481
486
|
if using_grouping
|
482
487
|
conditional = ' if groupByFilter == \'none\''
|
483
488
|
if group_by.key?(field) || group_by.key?(field.gsub(/_linked/,''))
|
484
|
-
conditional = " if groupByFilter == 'none' || groupByFilter == 'group_#{group_by[field.gsub(/_linked/,'')].gsub(/ /,'_').downcase}'"
|
489
|
+
conditional = " if groupByFilter == 'none' || groupByFilter == 'group_#{escape_code group_by[field.gsub(/_linked/,'')].gsub(/ /,'_').downcase}'"
|
485
490
|
end
|
486
491
|
end
|
487
492
|
visible_field_code += "
|
@@ -516,15 +521,15 @@ module WidgetList
|
|
516
521
|
desc = ''
|
517
522
|
filter = ''
|
518
523
|
unless field.empty?
|
519
|
-
desc = " (Grouped By #{field.camelize})"
|
524
|
+
desc = " (Grouped By #{escape_code field.camelize})"
|
520
525
|
filter = "group_#{description.gsub(/ /,'_').downcase}"
|
521
526
|
else
|
522
527
|
filter = 'none'
|
523
528
|
end
|
524
529
|
case_statements2 += <<-EOD
|
525
530
|
|
526
|
-
when '#{description}'
|
527
|
-
list_parms['groupBy'] = '#{field}'
|
531
|
+
when '#{escape_code description}'
|
532
|
+
list_parms['groupBy'] = '#{escape_code field}'
|
528
533
|
groupByFilter = '#{escape_code filter}'
|
529
534
|
groupByDesc = '#{escape_code desc}'
|
530
535
|
EOD
|
@@ -573,7 +578,7 @@ module WidgetList
|
|
573
578
|
|
574
579
|
buttons.each { |field|
|
575
580
|
button_code += "
|
576
|
-
mini_buttons['button_#{field[0].downcase}'] = {'page' => '#{escape_code field[1]['url']}',
|
581
|
+
mini_buttons['button_#{escape_code field[0].downcase}'] = {'page' => '#{escape_code field[1]['url']}',
|
577
582
|
'text' => '#{escape_code field[0]}',
|
578
583
|
'function' => 'Redirect',
|
579
584
|
'innerClass' => '#{escape_code field[1]['class']}',
|