rich_table_component 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -157,9 +157,9 @@ module ComponentHelper
157
157
  end
158
158
 
159
159
  def time_period(sdate, edate)
160
- strsdate = sdate.present? ? (mdate sdate) : "-"
161
- stredate = edate.present? ? (mdate edate) : "-"
162
- "#{strsdate} #{t('to')} #{stredate}"
160
+ strsdate = sdate.present? ? (mdate sdate) : "..."
161
+ stredate = edate.present? ? (mdate edate) : "..."
162
+ "#{strsdate} - #{stredate}"
163
163
  end
164
164
 
165
165
  # Needed for constructing dot format in recapitulation matrix
@@ -1,3 +1,5 @@
1
+ - request.GET.each do |k, v|
2
+ = hidden_field_tag k, v
1
3
 
2
4
  - advanced_search_attributes.compact.each do |att|
3
5
 
@@ -62,6 +62,8 @@
62
62
  - attribute_label = (splitter.last(2) - ['to_s']).join('_')
63
63
  - if attribute_label.split('_to_s').one?
64
64
  - attribute_label = attribute_label.split('_to_s').first
65
+ - if attribute_label.split('_to_s_code').one?
66
+ - attribute_label = attribute_label.split('_to_s_code').first
65
67
  - attribute_label = t(attribute_label)
66
68
 
67
69
  .controls
@@ -20,6 +20,8 @@ require 'will_paginate/view_helpers/link_renderer'
20
20
  require 'will_paginate/view_helpers/action_view'
21
21
  require 'pagination_list_link_renderer'
22
22
 
23
+ require 'rich_table_component/core_extensions/string'
24
+
23
25
  module RichTableComponent
24
26
  def self.ipsum
25
27
  "Lorem ipsum dolor sit amet, consectetur adipisicing vicerus luctum ...."
@@ -599,16 +601,18 @@ module RichTableComponent
599
601
  ActionController::Base.send :helper, TranslationsHelper
600
602
  ActionController::Base.send :helper, MenusHelper
601
603
  ActionController::Base.send :helper, DocumentsHelper
604
+
605
+ ActionController::Base.send :include, RichTableComponent::Controller
606
+
607
+
602
608
  end
603
609
  end
604
-
605
610
  end
606
611
 
607
612
 
608
613
 
609
-
610
614
  end
611
615
 
612
616
 
613
- ::ActionController::Base.send :include, RichTableComponent::Controller
617
+
614
618
 
@@ -0,0 +1,36 @@
1
+ module RichTableComponent
2
+ module CoreExtensions
3
+ module String
4
+ def to_bool
5
+ return true if [:true, 'true', '1', 'yes', 'on', 't'].include? self
6
+ return false if [:false, 'false', '0', 'no', 'off', 'f'].include? self
7
+ return nil
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ class String
14
+ include RichTableComponent::CoreExtensions::String
15
+ end
16
+
17
+
18
+ module Enumerable
19
+ def clean
20
+ dup.clean!
21
+ end
22
+
23
+ def clean!
24
+ reject! do |item|
25
+ obj = is_a?(Hash) ? self[item] : item
26
+
27
+ if obj.respond_to?(:reject!)
28
+ obj.clean!
29
+ obj.blank?
30
+ else
31
+ obj.blank? && !obj.is_a?(FalseClass)
32
+ end
33
+ end
34
+ self
35
+ end
36
+ end
@@ -1,3 +1,3 @@
1
1
  module RichTableComponent
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -417,8 +417,15 @@ var renderMultipleTokensById = function(token, url, min_chars){
417
417
  console.log('called renderMultipleTokensById(): ' + token_id);
418
418
  $(this).tokenInput(url, {
419
419
  propertyToSearch: "name",
420
- resultsFormatter: function(item){ var code = item.code == undefined ? '' : item.code; var avatar = item.avatar_resource_tiny == undefined ? '' : "<img src='" + item.avatar_resource_tiny + "' title='" + item.name + " " + code + "' height='25px' width='25px' />"; return "<li>" + avatar + "<div style='display: inline-block; padding-left: 10px;'><div class='name'>" + item.name + " " + code + "</div></div></li>" },
421
- tokenFormatter: function(item) { var code = item.code == undefined ? '' : item.code; return "<li><p>" + item.name + " " + code + "</p></li>" },
420
+ resultsFormatter: function(item){
421
+ var code = item.code == undefined ? '' : item.code;
422
+ var avatar = item.avatar_resource_tiny == undefined ? '' : "<img src='" + item.avatar_resource_tiny + "' title='" + item.name + " " + code + "' height='25px' width='25px' />";
423
+ return "<li>" + avatar + "<div style='display: inline-block; padding-left: 10px;'><div class='name'>" + code + " - " + item.name + "</div></div></li>";
424
+ },
425
+ tokenFormatter: function(item) {
426
+ var code = item.code == undefined ? '' : item.code;
427
+ return "<li><p>" + code + " - " + item.name + "</p></li>";
428
+ },
422
429
  theme: 'bootstrap',
423
430
  minChars: (min_chars == undefined ? 2 : min_chars),
424
431
  preventDuplicates: true,
@@ -433,8 +440,15 @@ var renderSingleTokensById = function(token, url, min_chars){
433
440
  console.log('called renderSingleTokensById(): ' + token_id);
434
441
  $(this).tokenInput(url, {
435
442
  propertyToSearch: "name",
436
- resultsFormatter: function(item){ var code = item.code == undefined ? '' : item.code; var avatar = item.avatar_resource_tiny == undefined ? '' : "<img src='" + item.avatar_resource_tiny + "' title='" + item.name + " " + code + "' height='25px' width='25px' />"; return "<li>" + avatar + "<div style='display: inline-block; padding-left: 10px;'><div class='name'>" + item.name + " " + code + "</div></div></li>" },
437
- tokenFormatter: function(item) { var code = item.code == undefined ? '' : item.code; return "<li><p>" + item.name + " " + code + "</p></li>" },
443
+ resultsFormatter: function(item){
444
+ var code = item.code == undefined ? '' : item.code;
445
+ var avatar = item.avatar_resource_tiny == undefined ? '' : "<img src='" + item.avatar_resource_tiny + "' title='" + item.name + " " + code + "' height='25px' width='25px' />";
446
+ return "<li>" + avatar + "<div style='display: inline-block; padding-left: 10px;'><div class='name'>" + code + " - " + item.name + "</div></div></li>";
447
+ },
448
+ tokenFormatter: function(item) {
449
+ var code = item.code == undefined ? '' : item.code;
450
+ return "<li><p>" + code + " - " + item.name + "</p></li>";
451
+ },
438
452
  theme: 'bootstrap',
439
453
  tokenLimit: 1,
440
454
  minChars: (min_chars == undefined ? 2 : min_chars),
@@ -699,6 +713,9 @@ var initActiveTab = function(){
699
713
  var initRecapitulation = function(){
700
714
  //
701
715
  $('.recapitulation_form').live('ajax:beforeSend', function(event, xhr, settings){
716
+ $(this).parent('.well').find('.recapitulation_result').remove();
717
+ var $recapitulation_result = $('<div>Mengkalkulasi rekapitulasi...</div>').addClass('recapitulation_result');
718
+ $(this).parent('.well').append($recapitulation_result);
702
719
  if(settings.url.indexOf('&export_pdf=') > 0){
703
720
  settings.url += (settings.url.indexOf('?') >= 0 ? '&' : '?');
704
721
  location.href = settings.url + '&format=pdf';
@@ -10,7 +10,7 @@ $separator_border_left: $table_border_color
10
10
  $separator_border_right: transparentize(white, 0.1)
11
11
 
12
12
 
13
- .rich_table_component
13
+ .rich_table_component, .static_table_component
14
14
 
15
15
  .rtc_actions
16
16
  margin-bottom: 5px
@@ -42,7 +42,6 @@ $separator_border_right: transparentize(white, 0.1)
42
42
  vertical-align: top
43
43
  padding: 4px 10px
44
44
  overflow: hidden
45
- +box-shadow(0 -1px 0 0 $table_border_color inset)
46
45
  +border-radius(4px 4px 0 0)
47
46
 
48
47
  .rtc_title
@@ -108,6 +107,7 @@ $separator_border_right: transparentize(white, 0.1)
108
107
 
109
108
  // RTC CONTENT ====================================================================================
110
109
  .rtc_content
110
+ border-top: solid 1px transparentize(black, 0.95)
111
111
  .rtc_grid_header
112
112
  clear: both
113
113
  overflow: hidden
@@ -225,7 +225,7 @@ $separator_border_right: transparentize(white, 0.1)
225
225
  font-weight: bold
226
226
  float: left
227
227
  a
228
- color: $dark_color
228
+ color: $second_color
229
229
  .lvr_entry_additional_content
230
230
  .part_label
231
231
  margin-right: 5px
@@ -14,8 +14,6 @@ h1
14
14
  color: $dark_color
15
15
  padding-top: $main_font_size * 1.8
16
16
  padding-bottom: $main_font_size * 0.8
17
- a
18
- color: $dark_color
19
17
 
20
18
  h2
21
19
  font: #{$main_font_size * 1.8} $main_font_family
@@ -672,3 +670,25 @@ a[rel=popover]
672
670
  &:hover
673
671
  padding: 4px 20px 5px
674
672
 
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+ .uneditable-input, .uneditable-textarea
684
+ > .part
685
+ font-size: $main_font_size
686
+
687
+ .part_label
688
+ margin-right: 5px
689
+ font-weight: bold
690
+ &:after
691
+ content: ':'
692
+ .part_value
693
+ > i
694
+ color: darken($thin_color, 30%)
@@ -82,6 +82,11 @@ body { padding-top: 60px; }
82
82
  padding: 2px 6px;
83
83
  }
84
84
 
85
+ .dropdown-menu{
86
+ max-height: 280px;
87
+ overflow-y: auto;
88
+ }
89
+
85
90
  .dropdown-menu a{
86
91
  font-size: 11px;
87
92
  padding: 1px 15px;
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.7
4
+ version: 0.0.8
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: 2013-01-03 00:00:00.000000000 Z
12
+ date: 2013-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails
@@ -297,6 +297,7 @@ files:
297
297
  - app/views/rich_table_component/rtc/_table.html.haml
298
298
  - lib/pagination_list_link_renderer.rb
299
299
  - lib/rich_table_component.rb
300
+ - lib/rich_table_component/core_extensions/string.rb
300
301
  - lib/rich_table_component/version.rb
301
302
  - rich_table_component.gemspec
302
303
  - vendor/assets/images/icons/file_extension/file_extension_.png