rich_table_component 0.0.6 → 0.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.
@@ -2,7 +2,7 @@ $('.modal, .modal-backdrop').remove();
2
2
  $('.cke_skin_kama').remove();
3
3
 
4
4
  <% params[:remote] = true if params[:remote].nil? %>
5
- <% params[:next_remote] = true if params[:next_remote].nil? %>
5
+ <% params[:next_remote] = params[:remote] if params[:next_remote].nil? %>
6
6
 
7
7
  <% params[:form_partial] ||= "form" %>
8
8
  <% params[:form_title] ||= params[:modal_title].presence || "#{t('editing')} #{t(controller_name.singularize)}" %>
@@ -1,7 +1,7 @@
1
1
  $('.modal, .modal-backdrop').remove();
2
2
 
3
3
  <% params[:remote] = true if params[:remote].nil? %>
4
- <% params[:next_remote] = true if params[:next_remote].nil? %>
4
+ <% params[:next_remote] = params[:remote] if params[:next_remote].nil? %>
5
5
 
6
6
  var $modal = $('<%= j(render "new") %>');
7
7
  $modal.modal();
@@ -59,7 +59,10 @@
59
59
  - else
60
60
  - attribute_value = ea.to_s
61
61
  - splitter = attribute_value.split('.')
62
- - attribute_label = t((splitter.last(2) - ['to_s']).join('_'))
62
+ - attribute_label = (splitter.last(2) - ['to_s']).join('_')
63
+ - if attribute_label.split('_to_s').one?
64
+ - attribute_label = attribute_label.split('_to_s').first
65
+ - attribute_label = t(attribute_label)
63
66
 
64
67
  .controls
65
68
  %label.checkbox
@@ -1,3 +1,3 @@
1
1
  module RichTableComponent
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -140,7 +140,7 @@ module RichTableComponent
140
140
  relation = relation.page(params[:page].to_i).per_page(params[:per_page].to_i)
141
141
  end
142
142
 
143
- relation = relation.group("#{_relation_table_name}.id")
143
+ relation = relation.uniq
144
144
  relation
145
145
  end
146
146
 
@@ -522,14 +522,14 @@ module RichTableComponent
522
522
  end
523
523
  end
524
524
 
525
- def format_remote(format, act = action_name, obj = instance_variable_get("@#{controller_name}"))
525
+ def format_remote(format, act = action_name, obj = instance_variable_get("@#{controller_name}"), html_redirect = nil)
526
526
  case act
527
527
  when :create
528
528
  flash[:notice] = "#{obj.class.name.tableize} was successfully created."
529
- format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
529
+ format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
530
530
  when :update
531
531
  flash[:notice] = "#{obj.class.name.tableize} was successfully updated."
532
- format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
532
+ format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
533
533
  else
534
534
  format.html { render action: act }
535
535
  end
@@ -623,6 +623,12 @@ var initExportButton = function(){
623
623
  $el.find('input').each(function(){
624
624
  $(this).clone().appendTo($the_form.find('.hide'));
625
625
  });
626
+
627
+ $el.find('select').each(function(i){
628
+ var select = this;
629
+ $(this).clone().appendTo($the_form.find('.hide'));
630
+ $the_form.find('.hide').find('select').eq(i).val($(select).val());
631
+ });
626
632
  }
627
633
  else{
628
634
  $elmt.find('.rtc_search #search').clone().appendTo($the_form.find('.hide'));
@@ -24,41 +24,29 @@ $wrapper_bgcolor: white
24
24
  $region_bgcolor: white
25
25
 
26
26
  $first_color: #444
27
- $second_color: #FF9900
28
- $third_color: #06f
27
+ $second_color: #08c
28
+ $third_color: #005580
29
29
  $fourth_color: #555
30
30
  $fifth_color: #555
31
31
 
32
- $thin_color: lighten($first_color, 30)
33
32
 
34
33
  $dark_color: black
35
34
  $bright_color: white
36
35
 
36
+ $small_radius: 5px
37
+ $medium_radius: 10px
38
+ $large_radius: 20px
37
39
 
38
40
 
39
-
40
-
41
-
42
-
43
- $red: #FF122C
44
- $blue: #2783d0
45
-
46
41
  $theme_color: #222222
47
- $sub_theme_color: adjust-hue(lighten($theme_color, 7%), -13deg)
48
- $theme_border_box_shadow_color: transparentize($dark_color, 0.85)
49
-
50
42
 
51
- $body_color: lighten($dark_color, 20%)
52
43
  $font_size: 13px
53
44
  $button_font_size: 12px
54
-
55
- $hyperlink_color: $blue
56
- $focus_color: #0080FF
57
45
 
58
- $main_menu_color: mix($theme_color, $bright_color, 20%)
59
- $menu_background_color: darken($bright_color, 3%)
60
46
 
61
- $web_width: 960px
47
+ $main_font_size: 13px
48
+ $main_font_family: Helvetica, Arial, sans-serif
49
+ $quote_font_family: times, serif
62
50
 
63
51
 
64
52
 
@@ -66,11 +54,4 @@ $web_width: 960px
66
54
 
67
55
 
68
56
 
69
- $main_text_color: $first_color
70
- $main_font_size: 13px
71
- $main_font_family: Helvetica, Arial, sans-serif
72
- $quote_font_family: times, serif
73
57
 
74
- $small_radius: 5px
75
- $medium_radius: $small_radius * 2
76
- $large_radius: $medium_radius * 2
@@ -0,0 +1,12 @@
1
+ $thin_color: lighten($first_color, 30)
2
+
3
+ $sub_theme_color: adjust-hue(lighten($theme_color, 7%), -13deg)
4
+ $theme_border_box_shadow_color: transparentize($dark_color, 0.85)
5
+
6
+
7
+ $body_color: lighten($dark_color, 20%)
8
+
9
+
10
+ $main_menu_color: mix($theme_color, $bright_color, 20%)
11
+ $menu_background_color: darken($bright_color, 3%)
12
+
@@ -46,7 +46,7 @@ img
46
46
  body
47
47
  background: $body_bgcolor
48
48
  font: $main_font_size $main_font_family
49
- color: $main_text_color
49
+ color: $first_color
50
50
 
51
51
  #wrapper
52
52
  background: $body_bgcolor url($images_dir + "unm_pinisi.png") no-repeat center bottom
@@ -225,7 +225,7 @@ body
225
225
  .continue_reading_part
226
226
  font-size: $main_font_size * 0.9
227
227
  font-style: italic
228
- color: lighten($main_text_color, 50)
228
+ color: lighten($first_color, 50)
229
229
  &:hover
230
230
  color: $third_color
231
231
 
@@ -274,7 +274,7 @@ body
274
274
  .part_label
275
275
  margin-right: 5px
276
276
  .part_value
277
- color: $main_text_color
277
+ color: $first_color
278
278
  background-color: mix($thin_color, white, 25)
279
279
  padding: 1px 5px
280
280
  +border-radius(8px)
@@ -310,7 +310,7 @@ body
310
310
  .button_part
311
311
  margin-left: 5px
312
312
  .part_value
313
- color: $main_text_color
313
+ color: $first_color
314
314
  background-color: none
315
315
  padding: 0
316
316
  +border-radius(none)
@@ -31,8 +31,6 @@ body { padding-top: 60px; }
31
31
  // @linkColor: #ff0000;
32
32
 
33
33
 
34
- @linkColor: #ff9900;
35
- @btnPrimaryBackground: #08c;
36
34
  @baseFontSize: 12px;
37
35
  @baseLineHeight: 15px;
38
36
 
@@ -17,6 +17,8 @@ table, caption, tbody, tfoot, thead, tr, th, td
17
17
 
18
18
  @import "partial/grid"
19
19
  @import "partial/base_variables"
20
+ @import "rich_table_component/custom_variables"
21
+ @import "partial/base_variables_derivation"
20
22
  @import "partial/base_functions"
21
23
  @import "partial/position"
22
24
  //@import "partial/button"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_table_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-31 00:00:00.000000000 Z
12
+ date: 2013-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails
@@ -431,6 +431,7 @@ files:
431
431
  - vendor/assets/stylesheets/fontfaces/museo700-regular-webfont.woff
432
432
  - vendor/assets/stylesheets/partial/_base_functions.sass
433
433
  - vendor/assets/stylesheets/partial/_base_variables.sass
434
+ - vendor/assets/stylesheets/partial/_base_variables_derivation.sass
434
435
  - vendor/assets/stylesheets/partial/_form.sass
435
436
  - vendor/assets/stylesheets/partial/_grid.css
436
437
  - vendor/assets/stylesheets/partial/_notification.sass
@@ -441,6 +442,7 @@ files:
441
442
  - vendor/assets/stylesheets/partial/_user_component.sass
442
443
  - vendor/assets/stylesheets/rich_table_component.css
443
444
  - vendor/assets/stylesheets/rich_table_component/_custom.sass
445
+ - vendor/assets/stylesheets/rich_table_component/_custom_variables.sass
444
446
  - vendor/assets/stylesheets/rtc_bootstrap_and_overrides.css.less
445
447
  - vendor/assets/stylesheets/rtc_config.sass
446
448
  - vendor/assets/stylesheets/rtc_jquery.fileupload-ui.css