grapple 0.1.4 → 0.1.5
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 +4 -4
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/app/assets/images/grapple/arrow-down.png +0 -0
- data/app/assets/images/grapple/arrow-up.png +0 -0
- data/app/assets/images/grapple/loading-bar.gif +0 -0
- data/app/assets/images/grapple/minus.png +0 -0
- data/app/assets/images/grapple/plus.png +0 -0
- data/app/assets/javascripts/grapple-history.js +0 -0
- data/app/assets/javascripts/grapple-jquery.js +0 -0
- data/app/assets/javascripts/grapple.js +0 -0
- data/app/assets/stylesheets/grapple.css +0 -0
- data/config/locales/en.yml +0 -0
- data/lib/grapple/ajax_data_grid_builder.rb +0 -0
- data/lib/grapple/base_table_builder.rb +0 -0
- data/lib/grapple/components/actions.rb +0 -0
- data/lib/grapple/components/base_component.rb +0 -0
- data/lib/grapple/components/column_headings.rb +0 -0
- data/lib/grapple/components/html_body.rb +0 -0
- data/lib/grapple/components/html_caption.rb +0 -0
- data/lib/grapple/components/html_colgroup.rb +0 -0
- data/lib/grapple/components/html_component.rb +0 -0
- data/lib/grapple/components/html_footer.rb +0 -0
- data/lib/grapple/components/html_header.rb +0 -0
- data/lib/grapple/components/html_row.rb +0 -0
- data/lib/grapple/components/search_form.rb +0 -0
- data/lib/grapple/components/search_query_field.rb +0 -0
- data/lib/grapple/components/search_submit.rb +0 -0
- data/lib/grapple/components/toolbar.rb +0 -0
- data/lib/grapple/components/will_paginate_infobar.rb +7 -2
- data/lib/grapple/components/will_paginate_pagination.rb +3 -1
- data/lib/grapple/components.rb +0 -0
- data/lib/grapple/data_grid_builder.rb +0 -0
- data/lib/grapple/engine.rb +0 -0
- data/lib/grapple/helpers/table_helper.rb +0 -0
- data/lib/grapple/helpers.rb +0 -0
- data/lib/grapple/html_table_builder.rb +0 -0
- data/lib/grapple.rb +0 -0
- data/spec/builders/ajax_data_grid_builder_spec.rb +0 -0
- data/spec/builders/base_table_builder_spec.rb +0 -0
- data/spec/builders/data_grid_builder_spec.rb +0 -0
- data/spec/builders/html_table_builder_spec.rb +0 -0
- data/spec/components/actions_spec.rb +0 -0
- data/spec/components/column_headings_spec.rb +0 -0
- data/spec/components/html_body_spec.rb +0 -0
- data/spec/components/html_colgroup_spec.rb +0 -0
- data/spec/components/html_footer_spec.rb +0 -0
- data/spec/components/search_form_spec.rb +0 -0
- data/spec/components/toolbar_spec.rb +0 -0
- data/spec/components/will_paginate_spec.rb +0 -0
- data/spec/fixtures/schema.rb +0 -0
- data/spec/fixtures/users.yml +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/test_environment.rb +0 -0
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 47162c597f0bad054f5881e85537d93603249766
         | 
| 4 | 
            +
              data.tar.gz: ccee8da26671061053dff4ced8358ee8d0e1c775
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3c92cf4049588ad5696c555aba2e50ce8831a41bb2be164e99070dddee86fce7629f9238f4ba7a4b2d113ee7bf9d0986526317927ffe68e8786b39ca7d820d36
         | 
| 7 | 
            +
              data.tar.gz: 370273eda4c3bbe3eb782143b652aac1f30d1838e244b9dcf20f1b0064807ca56e7a4efd8cd03f92f47543717a6e8627a07246120dbcf0cb256180f8054b3382
         | 
    
        data/LICENSE
    CHANGED
    
    | 
            File without changes
         | 
    
        data/README.md
    CHANGED
    
    | 
            File without changes
         | 
    
        data/Rakefile
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
    
        data/config/locales/en.yml
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| @@ -2,14 +2,19 @@ module Grapple | |
| 2 2 | 
             
            	module Components
         | 
| 3 3 | 
             
            		class WillPaginateInfobar < HtmlComponent
         | 
| 4 4 |  | 
| 5 | 
            -
            			setting :message, "Displaying % | 
| 5 | 
            +
            			setting :message, "Displaying %s - %s of %s results"
         | 
| 6 6 | 
             
            			setting :no_results_message, "0 results"
         | 
| 7 7 |  | 
| 8 8 | 
             
            			def render
         | 
| 9 9 | 
             
            				if records.total_entries > 0
         | 
| 10 10 | 
             
            					start_range = records.offset + 1
         | 
| 11 11 | 
             
            					end_range = [records.offset + records.per_page, records.total_entries].min
         | 
| 12 | 
            -
             | 
| 12 | 
            +
             | 
| 13 | 
            +
            					start_range = ActiveSupport::NumberHelper.number_to_delimited(start_range)
         | 
| 14 | 
            +
            					end_range = ActiveSupport::NumberHelper.number_to_delimited(end_range)
         | 
| 15 | 
            +
            					total = ActiveSupport::NumberHelper.number_to_delimited(records.total_entries)
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            					html = sprintf(message, start_range, end_range, total)
         | 
| 13 18 | 
             
            				else
         | 
| 14 19 | 
             
            					html = no_results_message
         | 
| 15 20 | 
             
            				end
         | 
| @@ -15,17 +15,19 @@ module Grapple | |
| 15 15 | 
             
            			setting :renderer, nil
         | 
| 16 16 |  | 
| 17 17 | 
             
            			def render(paginate_parameters = {})
         | 
| 18 | 
            +
            				td_class = ""
         | 
| 18 19 | 
             
            				if records.instance_of?(Array)
         | 
| 19 20 | 
             
            					html = ' '
         | 
| 20 21 | 
             
            				elsif !params[:query].blank? and records.empty?
         | 
| 21 22 | 
             
            					html = h(t(no_results_message))
         | 
| 23 | 
            +
            					td_class = "class='text-left'"
         | 
| 22 24 | 
             
            				else
         | 
| 23 25 | 
             
            					paginate_parameters[:param_name] = url_parameter(:page) if builder.namespace
         | 
| 24 26 | 
             
            					options = { renderer: renderer }.select { |_, value| !value.nil? }.merge(paginate_parameters)
         | 
| 25 27 | 
             
            					html = template.will_paginate(records, options) || ' '
         | 
| 26 28 | 
             
            				end
         | 
| 27 29 |  | 
| 28 | 
            -
            				builder.row "<td colspan=\"#{num_columns}\">#{html}</td>"
         | 
| 30 | 
            +
            				builder.row "<td colspan=\"#{num_columns}\" #{td_class}>#{html}</td>"
         | 
| 29 31 | 
             
            			end
         | 
| 30 32 |  | 
| 31 33 | 
             
            		end
         | 
    
        data/lib/grapple/components.rb
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
    
        data/lib/grapple/engine.rb
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
    
        data/lib/grapple/helpers.rb
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
    
        data/lib/grapple.rb
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
    
        data/spec/fixtures/schema.rb
    CHANGED
    
    | 
            File without changes
         | 
    
        data/spec/fixtures/users.yml
    CHANGED
    
    | 
            File without changes
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | 
            File without changes
         | 
| 
            File without changes
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: grapple
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Edward Potocko
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2016- | 
| 13 | 
            +
            date: 2016-09-09 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: actionpack
         | 
| @@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 205 205 | 
             
                  version: '0'
         | 
| 206 206 | 
             
            requirements: []
         | 
| 207 207 | 
             
            rubyforge_project: 
         | 
| 208 | 
            -
            rubygems_version: 2. | 
| 208 | 
            +
            rubygems_version: 2.4.8
         | 
| 209 209 | 
             
            signing_key: 
         | 
| 210 210 | 
             
            specification_version: 4
         | 
| 211 211 | 
             
            summary: Customizable data grid for Rails
         |