effective_datatables 2.12.1 → 2.12.2
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.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5eed7737db95090d9972bd497d03167274bbcc33
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: fc60bd7d87417e5ced94f4d6dbd49256acb49a97
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8877d69b948273ec1bea41665817a76f12652bacd442fbaa64dfcc4066462d198d96d949aa6b420ede4f52c749c3ddd63230522c6813fa297806d854fe4cd40d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 33b000a3a093f9cf0f6c08379b924538b34fed19e3cac1aee3b9de9a79cfe54ea6af05ef1fad3b6f7dcf177f435e7ba896eb9f73a7745db715584d113973b0aa
         
     | 
| 
         @@ -1,13 +1,18 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            initializeCharts = ->
         
     | 
| 
       2 
2 
     | 
    
         
             
              $charts = $('.effective-datatables-chart:not(.initialized)')
         
     | 
| 
       3 
     | 
    
         
            -
              return  
     | 
| 
      
 3 
     | 
    
         
            +
              return if $charts.length == 0
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
              if typeof(google)  
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
              if typeof(google) == 'undefined' || typeof(google.charts) == 'undefined'
         
     | 
| 
      
 6 
     | 
    
         
            +
                $.getScript 'https://www.gstatic.com/charts/loader.js', -> loadCharts()
         
     | 
| 
      
 7 
     | 
    
         
            +
              else
         
     | 
| 
      
 8 
     | 
    
         
            +
                loadCharts()
         
     | 
| 
       8 
9 
     | 
    
         | 
| 
       9 
10 
     | 
    
         
             
              $charts.addClass('initialized')
         
     | 
| 
       10 
11 
     | 
    
         | 
| 
      
 12 
     | 
    
         
            +
            loadCharts = ->
         
     | 
| 
      
 13 
     | 
    
         
            +
              google.charts.load('current', { packages: ['corechart'] })
         
     | 
| 
      
 14 
     | 
    
         
            +
              google.charts.setOnLoadCallback(renderCharts)
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       11 
16 
     | 
    
         
             
            renderCharts = ->
         
     | 
| 
       12 
17 
     | 
    
         
             
              return if (typeof(google) == 'undefined' || typeof(google.visualization) == 'undefined')
         
     | 
| 
       13 
18 
     | 
    
         | 
| 
         @@ -57,11 +57,6 @@ module EffectiveDatatablesHelper 
     | 
|
| 
       57 
57 
     | 
    
         
             
                return unless datatable.charts[name].present?
         
     | 
| 
       58 
58 
     | 
    
         
             
                datatable.view ||= self
         
     | 
| 
       59 
59 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
                unless @effective_datatables_chart_javascript_rendered
         
     | 
| 
       61 
     | 
    
         
            -
                  concat javascript_include_tag('https://www.gstatic.com/charts/loader.js', data: { 'turbolinks-track' => :reload, 'turbolinks-eval' => false })
         
     | 
| 
       62 
     | 
    
         
            -
                  @effective_datatables_chart_javascript_rendered = true
         
     | 
| 
       63 
     | 
    
         
            -
                end
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
60 
     | 
    
         
             
                options = datatable.charts[name]
         
     | 
| 
       66 
61 
     | 
    
         
             
                chart = datatable.to_json[:charts][name]
         
     | 
| 
       67 
62 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: effective_datatables
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.12. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.12.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Code and Effect
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-04-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     |