tabulatr2 0.8.8 → 0.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/assets/javascripts/tabulatr/application.js +14 -12
- data/app/views/tabulatr/_tabulatr_batch_actions_menu.html.slim +1 -1
- data/app/views/tabulatr/_tabulatr_filter_dialog.html.slim +5 -5
- data/app/views/tabulatr/_tabulatr_fuzzy_search_field.html.slim +1 -1
- data/app/views/tabulatr/_tabulatr_table.html.slim +4 -2
- data/lib/tabulatr/version.rb +1 -1
- metadata +2 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e5ce50ecf99d801c82194b66ada63d0f89cb3d23
         | 
| 4 | 
            +
              data.tar.gz: df7ffad4b2cd63c92c6d18279b8b1f1ecd9dfd28
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8ae9fba512fd7395ebc96e3bf0e03b0c909e0985f96165d7aa81b88d1aac71a50dc871c2f6702b3953774a56ff23d61165d49c1418061ace5dc1a421a5aaba63
         | 
| 7 | 
            +
              data.tar.gz: 158c404a8e6bd33faf8728f641f278972cb2d72d7c3fc2bb11bfd03ea74929cf39325b085fb27f5d3415ca65b07b5acb4047bb5c9b9f74ad3bafbb438a35ea3b
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -264,18 +264,6 @@ $(document).on('ready page:load', function(){ | |
| 264 264 | 
             
                Tabulatr.updateTable({}, tableId);
         | 
| 265 265 | 
             
              });
         | 
| 266 266 |  | 
| 267 | 
            -
              var cbfn = function(event, isInView, visiblePartX, visiblePartY) {
         | 
| 268 | 
            -
                if (isInView) {
         | 
| 269 | 
            -
                  // element is now visible in the viewport
         | 
| 270 | 
            -
                  if (visiblePartY == 'top') {
         | 
| 271 | 
            -
                    // top part of element is visible
         | 
| 272 | 
            -
                  } else if (visiblePartY == 'bottom') {
         | 
| 273 | 
            -
                    // bottom part of element is visible
         | 
| 274 | 
            -
                  } else {
         | 
| 275 | 
            -
                    Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table'));
         | 
| 276 | 
            -
                  }
         | 
| 277 | 
            -
                }
         | 
| 278 | 
            -
              };
         | 
| 279 267 |  | 
| 280 268 | 
             
              $('.tabulatr_table').each(function(ix, el){
         | 
| 281 269 | 
             
                if($('.pagination[data-table="'+ $(el).attr('id') +'"]').length == 0){
         | 
| @@ -454,3 +442,17 @@ $(document).on('change', 'select[data-tabulatr-date-filter]', function() { | |
| 454 442 | 
             
                select.parents('.controls').find(".from_to").hide().val('');
         | 
| 455 443 | 
             
              }
         | 
| 456 444 | 
             
            });
         | 
| 445 | 
            +
             | 
| 446 | 
            +
             | 
| 447 | 
            +
            var cbfn = function(event, isInView, visiblePartX, visiblePartY) {
         | 
| 448 | 
            +
              if (isInView) {
         | 
| 449 | 
            +
                // element is now visible in the viewport
         | 
| 450 | 
            +
                if (visiblePartY == 'top') {
         | 
| 451 | 
            +
                  // top part of element is visible
         | 
| 452 | 
            +
                } else if (visiblePartY == 'bottom') {
         | 
| 453 | 
            +
                  // bottom part of element is visible
         | 
| 454 | 
            +
                } else {
         | 
| 455 | 
            +
                  Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table'));
         | 
| 456 | 
            +
                }
         | 
| 457 | 
            +
              }
         | 
| 458 | 
            +
            };
         | 
| @@ -20,7 +20,7 @@ | |
| 20 20 | 
             
            /  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         | 
| 21 21 |  | 
| 22 22 | 
             
            - if table_options[:batch_actions]
         | 
| 23 | 
            -
              - iname = "#{ | 
| 23 | 
            +
              - iname = "#{formatted_name}_batch"
         | 
| 24 24 | 
             
              .dropdown
         | 
| 25 25 | 
             
                a.btn.btn-default data-toggle="dropdown" href="#"
         | 
| 26 26 | 
             
                  i.icon-cog.glyphicon.glyphicon-cog.fa.fa-cog'
         | 
| @@ -21,12 +21,12 @@ | |
| 21 21 |  | 
| 22 22 |  | 
| 23 23 | 
             
            form.form.form-horizontal.tabulatr_filter_form data-table=table_id  data-remote="true" role='form'
         | 
| 24 | 
            -
              input name="#{ | 
| 24 | 
            +
              input name="#{formatted_name}_sort" type="hidden" value=table_options[:order_by]
         | 
| 25 25 | 
             
              - if table_options[:filter] && columns.filtered_columns.present?
         | 
| 26 26 | 
             
                - columns.filtered_columns.each do |column|
         | 
| 27 27 | 
             
                  - name = column.full_name
         | 
| 28 28 | 
             
                  .control-group.form-group data-filter-column-name=name
         | 
| 29 | 
            -
                    - iname = "#{ | 
| 29 | 
            +
                    - iname = "#{formatted_name}_filter[#{name}]"
         | 
| 30 30 | 
             
                    - filter_name = "tabulatr_form_#{name}"
         | 
| 31 31 |  | 
| 32 32 | 
             
                    label.control-label.col-md-3 for=filter_name
         | 
| @@ -54,7 +54,7 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id  data-remote= | |
| 54 54 | 
             
                          input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}"
         | 
| 55 55 | 
             
                      - elsif column.filter == :date
         | 
| 56 56 | 
             
                        .col-md-3
         | 
| 57 | 
            -
                          select.form-control name="#{iname}[date][simple]" data-tabulatr-date-filter="#{ | 
| 57 | 
            +
                          select.form-control name="#{iname}[date][simple]" data-tabulatr-date-filter="#{formatted_name}_#{name}_filter"
         | 
| 58 58 | 
             
                            option= I18n.t("tabulatr.date_filter.none")
         | 
| 59 59 | 
             
                            option value="today"= I18n.t("tabulatr.date_filter.today")
         | 
| 60 60 | 
             
                            option value="yesterday"= I18n.t("tabulatr.date_filter.yesterday")
         | 
| @@ -65,12 +65,12 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id  data-remote= | |
| 65 65 | 
             
                            option value="from_to"= I18n.t("tabulatr.date_filter.from_to")
         | 
| 66 66 | 
             
                        .col-md-1
         | 
| 67 67 | 
             
                        .col-md-3
         | 
| 68 | 
            -
                          input.tabulatr_filter.form-control.date-picker.hidden.from_to type="text" id="#{ | 
| 68 | 
            +
                          input.tabulatr_filter.form-control.date-picker.hidden.from_to type="text" id="#{formatted_name}_#{name}_filter_from" name="#{iname}[date][from]"
         | 
| 69 69 | 
             
                        .col-md-1.text-center
         | 
| 70 70 | 
             
                          .span.from_to.hidden
         | 
| 71 71 | 
             
                            |—
         | 
| 72 72 | 
             
                        .col-md-3
         | 
| 73 | 
            -
                          input.tabulatr_filter.form-control.date-picker.from_to.hidden type="text" id="#{ | 
| 73 | 
            +
                          input.tabulatr_filter.form-control.date-picker.from_to.hidden type="text" id="#{formatted_name}_#{name}_filter_to" name="#{iname}[date][to]"
         | 
| 74 74 | 
             
                      - else
         | 
| 75 75 | 
             
                        .col-md-11
         | 
| 76 76 | 
             
                          input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}[like]"
         | 
| @@ -21,4 +21,4 @@ | |
| 21 21 |  | 
| 22 22 | 
             
            form#product_fuzzy_search.form-inline.tabulatr-fuzzy-search.pull-right data-table=table_id role="form"
         | 
| 23 23 | 
             
              .form-group
         | 
| 24 | 
            -
                input.form-control.search id="#{ | 
| 24 | 
            +
                input.form-control.search id="#{formatted_name}_fuzzy_search_query" placeholder="Search" type="search"
         | 
| @@ -19,9 +19,11 @@ | |
| 19 19 | 
             
            /  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         | 
| 20 20 | 
             
            /  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         | 
| 21 21 |  | 
| 22 | 
            -
            -  | 
| 22 | 
            +
            - formatted_name = "#{klass.to_s.gsub(/::/, '--').downcase}"
         | 
| 23 | 
            +
            - table_id = "#{formatted_name}_table"
         | 
| 23 24 | 
             
            - opts = { columns: columns, table_options: table_options, \
         | 
| 24 | 
            -
                klass: klass, classname: classname, table_id: table_id | 
| 25 | 
            +
                klass: klass, classname: classname, table_id: table_id,
         | 
| 26 | 
            +
                formatted_name: formatted_name }
         | 
| 25 27 |  | 
| 26 28 | 
             
            .tabulatr-table-controls-wrapper data-table-id=table_id
         | 
| 27 29 | 
             
              .tabulatr-filter-menu-wrapper data-table-id=table_id
         | 
    
        data/lib/tabulatr/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tabulatr2
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.8. | 
| 4 | 
            +
              version: 0.8.9
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Peter Horn
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2013- | 
| 13 | 
            +
            date: 2013-12-02 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: rails
         | 
| @@ -267,4 +267,3 @@ test_files: | |
| 267 267 | 
             
            - spec/features/tabulatrs_spec.rb
         | 
| 268 268 | 
             
            - spec/lib/tabulatr/data/data_spec.rb
         | 
| 269 269 | 
             
            - spec/spec_helper.rb
         | 
| 270 | 
            -
            has_rdoc: 
         |