pratyushmittal / angular-dragtable Goto Github PK
View Code? Open in Web Editor NEWThis is the pure AngularJS version of Dan Vanderkam's DragTable.
Home Page: http://fully-faltoo.com/angular-dragtable/
This is the pure AngularJS version of Dan Vanderkam's DragTable.
Home Page: http://fully-faltoo.com/angular-dragtable/
The original dragtable you reference contains the below header in the Javascript. This project has no license header. It is unclear whether your code is a direct modification of the other code, or whether it is an independent implementation.
/**
http://code.google.com/p/dragtable/
When there is pagination then this plugin is not working.
To produce the bug:
I can't seem to get draggable columns if the columns are generated by an ng-repeat. It works fine otherwise. Can you tell me if I'm doing something wrong here? Also, is it possible to do drag handles?
<table class="table table-bordered" draggable>
<thead>
<tr>
<th ng-repeat="column in record.columns">{{column.name}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="i in $times(record.rows)">
<td ng-repeat="column in record.columns" ng-tap="translateOpen(column.rows, i)">{{column.rows[i]}}</td>
</tr>
</tbody>
</table>
best thing would be to bind a scope variable to the directive
e.g. with a sub directive for first columns (e.g. headers [th]):
<script>
function Controller($scope) {
$scope.tableColumnOrder = {
idColumn: 1,
nameColumn: 2
};
}
</script>
<table draggable="tableColumnOrder">
<tr>
<th dragable-column="idColumn">Id</th>
<th dragable-column="nameColumn">name</th>
</tr>
</table>
the result would be:
<table draggable="tableColumnOrder">
<tr>
<th dragable-column="nameColumn">name</th>
<th dragable-column="idColumn">Id</th>
</tr>
</table>
and on drag end (or on change...whatever) you would change the scope variable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.