Giter Site home page Giter Site logo

bootstrap-data-table's People

Contributors

addfs avatar adis-io avatar andyj avatar dolfly avatar jeffdupont avatar zeptian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-data-table's Issues

min file out of sync

the compressed file and uncompressed file are not the same. The uncompressed file was changed to support BS3, the compressed works w/ BS2.

Bootstrap 3.1.1Patch

Index: httpdocs/js/bootstrap-datatable.js

--- httpdocs/js/bootstrap-datatable.js (revision 7680)
+++ httpdocs/js/bootstrap-datatable.js (working copy)
@@ -44,7 +44,9 @@
this.$default = this.$element.children().length ?
this.$element.children() :
$("

")

  •    .addClass("alert alert-error")
    

    +// ------------- Start bootstrap3.1.1 Patch ---------------

  •    .addClass("alert alert-danger")
    

    +// ------------- End bootstrap3.1.1 Patch ---------------
    .html("No Results Found");

    this.$element.addClass("clearfix");
    @@ -186,10 +197,13 @@
    })
    .append(
    $("

    ")

  •            .addClass("progress progress-striped active")
    

    +// ------------- Start bootstrap3.1.1 Patch ---------------

  •            .addClass("progress progress-striped")
             .append(
               $("<div></div>")
    
  •                .addClass("bar")
    
  •                .addClass("progress-bar progress-bar-info")
    
  •                .attr('style', "width: 40%")
    

    +// ------------- End bootstrap3.1.1 Patch -----------------
    )
    )
    .appendTo(document.body)

Can't get it to work

I can't get anything to appear... even the example.html file you included won't show any data. Am I missing something?

How to apply options.filter values

I cannot see how to use the filter form and apply the values to the options.filter object.

Can this be done with about a page-reload and if so how?

Bootstrap 3 and pagination

The bootstrap-data-table moved to BS3 quite nicely except for Pagination.

At the moment its set on the

but it needs to on on the
    element.

Sorting bug, after desc there is null

When I click to sort - it's sends to server:

currentPage:1
perPage:5
sort[0][]:column_0
sort[0][]:asc

After next click:

currentPage:1
perPage:5
sort[0][]:column_0
sort[0][]:desc

And next click:

currentPage:1
perPage:5
sort[0][]:column_0
sort[0][]:

Strange filter icon

cliqondataset

On the attached screen grab, I have an errant black filter icon to the right of the dt-toolbar-container that has been there since loading the JS initially. I wonder if you could point me at the location in the JS source code where it is invoked so I can get control of it and move it inside a Btn which I think it should be.


You make a point in your source code at line 34 about Local Storage. May I suggest that you use the facilities of Store.Js. I have added that to my version of your JS so that I can quickly and easily solve some local issues such as multi-lingual prompts and other variables.

extending bootstrap-data-table.

Hi Mr. jeffdupont,

can you please provide the code snippet to extend the data-table plugin, as i need to add subgrid functionality.

i tried with below code but its not working:

;(function() {
$.datatable.extend({});
})(Jquery)

though i managed it with the below code from your example.html :

$("#table-container_1").datatable({
perPage: 5
, url: 'example-data.php'
, sort: '1'
, filter: '1'
// , url: 'example-data.json'
, showPagination: true
, showFilter: true
, filterModal: $("#table-container_1-filter")
, columns: [
{
title: ""

      , field: "id"
      , callback: function ( data, cell ) {
          return data[cell.field];
        }

    }
  , {
        title: "Column 1"
      , sortable: true
      , field: "column_0"
      , callback: function ( data, cell ) {
          return data[cell.field];
        }
      , filter: true
    }
  , {
        title: "Column 2"
      , sortable: true
      , field: "column_1"
    }
  , {
        title: "Column 3"
      , sortable: false
      , field: "column_2"
      , filter: true
      , css: {
            textAlign: 'right'
        }
    }
  , {
        title: "Column 4"
      , sortable: false
      , field: "column_3"
      , css: {
            textAlign: 'right'
        }
      , hidden: true
    }
]
, rowCallback : function (row, rowdata) {

    $(row).on("click", function() {
        if($('#tr_subgrid_' + rowdata.id).length == 0) {


            $('<tr/>', {
                "id" : 'tr_subgrid_' + rowdata.id,
                "html" : $('<td/>', {
                    "id" : 'td_subgrid_' + rowdata.id,
                    'colspan': $(this).children().length,
                    "html" : $('<div/>', {
                        "id" : 'div_subgrid_' + rowdata.id
                    })
                })
            }).insertAfter($(this));

            $('#div_subgrid_' + rowdata.id).datatable({
                showPagination : false,
                //url: 'example-data-subgrid.php?id=' + rowdata.id,
                title : '',
                url: 'example-data-subgrid.php',
                post: {
                    checkparam1 : $("#checkparam1").val(),
                },
                 sort: '1',
                filter: '1',
                columns : [
                    {
                        title: "Column 1"
                      , sortable: true
                      , field: "column_0"
                      , callback: function ( data, cell ) {
                          return data[cell.field];
                        }
                      , filter: true
                    }
                  , {
                        title: "Column 2"
                      , sortable: true
                      , field: "column_1"
                    }
                  , {
                        title: "Column 3"
                      , sortable: false
                      , field: "column_2"
                      , filter: true
                      , css: {
                            textAlign: 'right'
                        }
                    }
                  , {
                        title: "Column 4"
                      , sortable: false
                      , field: "column_3"
                      , css: {
                            textAlign: 'right'
                        }
                      , hidden: true
                    }
                ]

            });
        } else if($('#tr_subgrid_' + rowdata.id + ":visible").length > 0) {
            $('#tr_subgrid_' + rowdata.id).hide();
        } else {
            $('#tr_subgrid_' + rowdata.id).show();
        }

    });
    //console.log(rowdata);
    //console.log(row);

    return row;
}

});

Dynamically update the table

Hi everybody,

Frist of all compliments for your work and sorry for my english.

I want dynamically update the column values. I tried to check your example but i don't understand how i can figure out of my problem.

Can you help me?

Thanks
Filippo

Reload Data

I have a filter modal and I would like to reload data with my filters.
Are there any reload event for this?

Filter input disappears

In RunFilter call, variable o.filter does not write anything in memory. So filters do not work.

allowExport

hi guy,

i love your bootstrap extend, but when u think you will release the 'allowExport' function?

Regards,

Dennis

Sort Option

RE: the optional: sort: [[]] in the constructor on a first time vanilla install, i'm getting TypeError: o.sort is undefined, line 308 of bootstrap-datatable.js. What do you suspect to be the cause?

Clickable rows

Hi,

Is there a way to make a row clickable or include a button in a row that can be assigned to an arbitrary action when clicked. I need to pass an ID back to the backend API when the row or button is clicked to invoke an action based on the row.

Regards,

Carl

Question about rerender table in onClick event

i've add some new tool on the toolbar and it call the modal on the view page where the plugin is call. how can i rerender this table after i have ajax call? i've been doin this one

function _initDeleteModal() {
var o = this.options
, $e = this.$element
, $toggle = $("")
, that = this

// render the display modal button
$toggle
  .addClass("btn")
  .data("toggle", "modal")
  .attr("href", "#")
  .attr("title", "Delete a row.")
  .html("<i class=\"icon-trash\"></i>")
  .click(function() {
    var numItems = $('.info').length;
    if(numItems > 0){
        if($(o.deleteModal).hasClass("modal"))
          $(o.deleteModal)
            .modal();
        else if($(o.deleteModal).is(":visible"))
          $(o.deleteModal)
            .hide();
        else
          $(o.deleteModal)
            .show();
    }
    $('#btn-delete')
                    .click(function(evt) {
        that.loading( true );
                    that.render();  // how can i get this function run only once    
                    that.loading(false);
            }) 
    return false;
  })

this.buttons.unshift($toggle);

}

it only work good on the first call of onclick function.. but in the second times i call onClick i got the table rendered the toolbar twice and the pagination bar twice and more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.