Giter VIP home page Giter VIP logo

watable's Introduction

watable's People

Contributors

andraus avatar wootapa 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watable's Issues

Number Sorting is not happening

if a number is 0.50, 102.00, 118.50, 18, 198.80, 20, 30, ..... either the sorting will be as it or it will be in reverse order, the actual sorting should be 0.50, 18, 20, 30, 102.00, 118.50, 198.80

Even if i set to decimal:2 and type: number, there is no impact.

how to delete a row

I try add button to cell for delete a row in table. When click to button, it call priv.deleteClicked with unique of row, and i find row then delete. it's not work. Can you help me.

  priv.deleteClicked = function(e){
        if(typeof priv.options.rowActionDelete == "function"){
            var row = _data.meta.rowsLookup[e.data.unique].row;
            delete _data.row[e.data.unique];
            priv.options.rowActionDelete(e.data.unique);

        }
    };

Still maintained?

Hello Andreas,

first of all: Thank you very much. This is a great table-plugin!
But is this project still maintained? I do not see any process, actually.

Would be nice to know. If you dont, maybe it is possible to take over further development?

Tanks and Greetings!

bootstrap.css

Which class are needed from that css?
Including the whole file is impossible; is it possible to know which class are you using?

Regards

Documentation is missing

Also if the project is interesting, a little bit of documentation is likely to help who want to use it.
If the documentation is present somewhere, can be a good idea to link it

Page numbers shown even when we have data for just 1 page

Watable Version: 1.07, Browser - Firefox 25.0

With all required dependencies.

Code:

function getData(){var e={sNo:{index:1,type:"number",friendly:"<i class='icon-user'></i>",format:"<a href='#' class='userId' target='_blank'>{0}</a>",unique:true,sortOrder:"asc",tooltip:"This column has an initial filter"},agentName:{index:2,type:"string",friendly:"Agent Name"},lastUpdated:{index:3,type:"string",friendly:"Last Updated"},unixEpoch:{index:4,type:"number",friendly:"Unix Time",tooltip:"Used for sorting"}};var t=[];var n=1;while(n<=3){var r={sNo:n,agentName:"India Vs WI",lastUpdated:"3 seconds ago",unixEpoch:43098398};t.push(r);n++}var i={cols:e,rows:t,otherStuff:{thatIMight:1,needLater:true}};return i}$(document).ready(function(){var e=$("#div1").WATable({types:{string:{},number:{decimals:1},bool:{},date:{utc:true,datePicker:true}},actions:{filter:true,columnPicker:true,custom:[$('<a href="#" class="refresh"><i class="icon-refresh"></i> Refresh</a>'),$('<a href="#" class="export_all"><i class="icon-share"></i> Export all rows</a>'),$('<a href="#" class="export_checked"><i class="icon-share"></i> Export checked rows</a>'),$('<a href="#" class="export_filtered"><i class="icon-share"></i> Export filtered rows</a>')]},tableCreated:function(e){console.log("table created");console.log(e)},rowClicked:function(e){console.log("row clicked");console.log(e);if($(this).hasClass("userId")){e.event.preventDefault();alert("You clicked userId: "+e.row.userId)}},columnClicked:function(e){console.log("column clicked");console.log(e)},pageChanged:function(e){console.log("page changed");console.log(e)},pageSizeChanged:function(e){console.log("pagesize changed");console.log(e)}}).data("WATable");var t=getData();e.setData(t);var n=e.getData(false);var r=e.getData(true);var i=e.getData(false,true);$("body").on("click",".refresh",function(t){t.preventDefault();var n=getData();e.setData(n,true)});$("body").on("click",".export_checked, .export_filtered, .export_all",function(t){t.preventDefault();var n=$(t.target);var r;if(n.hasClass("export_all"))r=e.getData(false);else if(n.hasClass("export_checked"))r=e.getData(true);else if(n.hasClass("export_filtered"))r=e.getData(false,true);console.log(r.rows.length+" rows returned");console.log(r);alert(r.rows.length+" rows returned.\nSee console for details.")})})

See screenshot below:

screen shot 2013-11-10 at 7 56 09 pm

Fixed Header

I'm looking into alternatives to DataTables, and came across Watable. The one thing that prevents me from being able to switch at the moment is the fixed header feature of DataTables. In DataTables you can set sScrollX and sScrollY parameters to change the size of a table, and if it is larger than the specified values, there is scrolling as well as a fixed header.

Is this something that you have planned to add, if not, would it be possible to have this added?

License?

Hey @wootapa,

do you mind adding a LICENSE file? I would love to use your watable :)

Lazy loading data

Is it possible to load data in a lazy way? Having a virtual row length of i.e. 10.000 and loading sets of e.g. 5 * pageSize rows.
If not so that would be a nice feature.
Sorting over the whole set could be done on the data server, filtering may be only local.

Property typo in docs

In the appspot documentation, in the "Column Options" help, there's a typo:

placeHolder is misspelled with a lower-case H. Using the property with that spelling causes it to be ignored, of course.

(I would have done this as a pull request but the appspot pages don't appear to have a repo here.)

watable incompatible with jquery-ui

I know this Issue was reported earlier, but I have not been able to solve this.

Attempting to use watable when importing jquery-ui as a script causes the table to become unresponsive after a column sort.
Example: http://jsfiddle.net/3DRAa/

Note that after clicking "score" once, it sorts the column. clicking "score" a second time has no effect, and now the filtering no longer works; if i had more pages, you would see that the pagination no longer works either.

Console shows the following:
Uncaught Error: cannot call methods on tooltip prior to initialization; attempted to call method 'hide'
[email protected]:250
(anonymous function)@jquery-ui.js:502
[email protected]:374
[email protected]:139
$.widget.bridge.$.fn.(anonymous function)@jquery-ui.js:494
[email protected]:229
[email protected]:1321
[email protected]:4430
[email protected]:4116

Below you may find the versions I'm using:

  • jquery : 2.1.3
  • jquery-ui: 1.11.4
  • jquery.form-validator: 2.2.43

Removing jquery-ui from the imports on the above jsfiddle will fix the behaviour.
Could this be a clash between bootstrap-datepicker and jquery-ui's datepicker?
Is there a way to disable date-picker?

Multilanguage support

This would be an awesome improvement. Similar to many other plugins that use i18n standards to extend the language used.

watable incompatible with jquery-ui

Attempting to use watable when importing jquery-ui as a script causes the table to become unresponsive after a single column sort.

Example: http://jsfiddle.net/3DRAa/

Note that after clicking "score" once, it sorts the column. clicking "score" a second time has no effect, and now the filtering no longer works; if i had more pages, you would see that the pagination no longer works either.

Javascript errors in firefox js log:
[22:50:00.879] Error: cannot call methods on tooltip prior to initialization; attempted to call method 'hide' @ http://code.jquery.com/jquery-1.10.1.js:516
[22:50:00.881] Empty string passed to getElementById(). @ http://code.jquery.com/jquery-1.10.1.js:174

Removing jquery-ui from the imports on the above jsfiddle will fix the behaviour.
Could this be a clash between bootstrap-datepicker and jquery-ui's datepicker?

Bower package misleading

There is a Bower package 'watable' pointing to some other repository which is not being maintained. Plus the other repository looks like a copy of this one. Suggest getting the bower name or releasing it in Bower with a slightly different name.

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.