Skip to content

Commit 64ef544

Browse files
committed
Fix Demo
1 parent 2fc350a commit 64ef544

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
```js
88
scope.$callbacks.dragStop(dragInfo, _status);
99
```
10+
1011
* _status: Status changed pos of node, Drag succeed!
1112
* dragInfo:
1213
* node: scope.node(), // Data node dragged

src/ng-tree-table.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'$templateCache', function ($templateCache) {
55
$templateCache.put(
66
'template/treeTable/treeTable.html',
7-
"" + "<table ng-class=\"tree_class\">\n" + " <thead>\n" + " <tr>\n" + " <th ng-class=\"expandingProperty.titleClass\" ng-style=\"expandingProperty.titleStyle\">\n" + " {{expandingProperty.displayName || expandingProperty.field || expandingProperty}}\n" + " </th>\n" + " <th ng-repeat=\"col in colDefinitions\" ng-class=\"col.titleClass\" ng-style=\"col.titleStyle\">\n" + " {{col.displayName || col.field}}\n" + " </th>\n" + " </tr>\n" + " </thead>\n" + " <tbody>\n" + " <tr tree-table-node ng-repeat=\"row in tree_rows track by hashedTree(row) \" ng-show=\"row.__visible__\"\n" + " ng-class=\"(row.__selected__ ? ' active':'')\" class=\"ng-animate \">\n" + " <td ng-if=\"!expandingProperty.template\" tree-table-node-handle\n" + " ng-style=\"expandingProperty.cellStyle ? expandingProperty.cellStyle : {'padding-left': $callbacks.calsIndent(row.__level__)}\"\n" + " ng-click=\"user_clicks_branch(row)\" ng-class=\"expandingProperty.cellClass\"\n" + " compile=\"expandingProperty.cellTemplate\">\n" + " <a data-nodrag>\n" + " <i ng-class=\"row.__tree_icon__\" ng-click=\"row.__expanded__ = !row.__expanded__\"\n" + " class=\"tree-icon\"></i>\n" + " </a>\n" + " {{row[expandingProperty.field] || row[expandingProperty]}}\n" + " </td>\n" + " <td ng-if=\"expandingProperty.template\" compile=\"expandingProperty.template\"></td>\n" + " <td ng-repeat=\"col in colDefinitions\" ng-class=\"col.cellClass\" ng-style=\"col.cellStyle\"\n" + " compile=\"col.cellTemplate\">\n" + " {{row[col.field]}}\n" + " </td>\n" + " </tr>\n" + " </tbody>\n" + "</table>"
7+
"" + "<table ng-class=\"tree_class\">\n" + " <thead>\n" + " <tr>\n" + " <th ng-class=\"expandingProperty.titleClass\" ng-style=\"expandingProperty.titleStyle\">\n" + " {{expandingProperty.displayName || expandingProperty.field || expandingProperty}}\n" + " </th>\n" + " <th ng-repeat=\"col in colDefinitions\" ng-class=\"col.titleClass\" ng-style=\"col.titleStyle\">\n" + " {{col.displayName || col.field}}\n" + " </th>\n" + " </tr>\n" + " </thead>\n" + " <tbody>\n" + " <tr tree-table-node=\"row\" ng-repeat=\"row in tree_rows track by hashedTree(row) \" ng-show=\"row.__visible__\"\n" + " ng-class=\"(row.__selected__ ? ' active':'')\">\n" + " <td ng-if=\"!expandingProperty.template\" tree-table-node-handle\n" + " ng-style=\"expandingProperty.cellStyle ? expandingProperty.cellStyle : {'padding-left': $callbacks.calsIndent(row.__level__)}\"\n" + " ng-click=\"user_clicks_branch(row)\" ng-class=\"expandingProperty.cellClass\"\n" + " compile=\"expandingProperty.cellTemplate\">\n" + " <a data-nodrag>\n" + " <i ng-class=\"row.__tree_icon__\" ng-click=\"row.__expanded__ = !row.__expanded__\"\n" + " class=\"tree-icon\"></i>\n" + " </a>\n" + " {{row[expandingProperty.field] || row[expandingProperty]}}\n" + " </td>\n" + " <td ng-if=\"expandingProperty.template\" compile=\"expandingProperty.template\"></td>\n" + " <td ng-repeat=\"col in colDefinitions\" ng-class=\"col.cellClass\" ng-style=\"col.cellStyle\"\n" + " compile=\"col.cellTemplate\">\n" + " {{row[col.field]}}\n" + " </td>\n" + " </tr>\n" + " </tbody>\n" + "</table>"
88
);
99
}]
1010
);
@@ -14,7 +14,6 @@
1414
return {
1515
restrict: 'A',
1616
link: function (scope, element, attrs) {
17-
// Watch for changes to expression.
1817
scope.$watch(
1918
attrs.compile, function (new_val) {
2019
if (new_val != null) {
@@ -140,7 +139,7 @@
140139

141140
info.move = {
142141
parent: _parentMoveTo,
143-
pos: _newIndex
142+
pos: _newIndex
144143
}
145144
return true;
146145
}

0 commit comments

Comments
 (0)