Skip to content

Commit

Permalink
Merge pull request #63 from thienhung1989/develop
Browse files Browse the repository at this point in the history
- New version v3.0.9
  • Loading branch information
thienhung1989 authored Apr 12, 2018
2 parents 43356ab + f12926f commit ac1a5cf
Show file tree
Hide file tree
Showing 37 changed files with 832 additions and 912 deletions.
20 changes: 10 additions & 10 deletions demo/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ app = angular.module('TreeDnDTest', deps)
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/table', {
templateUrl: 'routers/filter/filter-frame.html',
templateUrl: 'libs/routers/filter-frame.html',
controller: 'FilterController'
})
.when('/list', {
templateUrl: 'routers/list/list-frame.html',
templateUrl: 'libs/routers/list-frame.html',
controller: 'ListController'
})
.when('/multi', {
templateUrl: 'routers/multi/multi-frame.html',
templateUrl: 'libs/routers/multi-frame.html',
controller: 'MultiController'
})
.when('/event', {
templateUrl: 'routers/basic/basic-frame.html',
templateUrl: 'libs/routers/basic-frame.html',
controller: 'BasicController'
})
.when('/custom', {
templateUrl: 'routers/custom/custom-frame.html',
templateUrl: 'libs/routers/custom-frame.html',
controller: 'CustomController'
})
.otherwise({redirectTo: '/table'});
Expand Down Expand Up @@ -141,7 +141,7 @@ app = angular.module('TreeDnDTest', deps)
return [
{
'DemographicId': 1,
'ParentId': null,
'ParentId': undefined,
'Name': 'United States of America',
'Description': 'United States of America',
'Area': 9826675,
Expand Down Expand Up @@ -253,15 +253,15 @@ app = angular.module('TreeDnDTest', deps)
'TimeZone': 0
}, {
'DemographicId': 201,
'ParentId': null,
'ParentId': undefined,
'Name': 'India',
'Description': 'Hydrabad tech city',
'Area': 9826675,
'Population': 318212000,
'TimeZone': 'IST'
}, {
'DemographicId': 301,
'ParentId': null,
'ParentId': undefined,
'Name': 'Bangladesh',
'Description': 'Country of love',
'Area': 9826675,
Expand Down Expand Up @@ -309,7 +309,7 @@ app = angular.module('TreeDnDTest', deps)
var keyO = Object.keys(cloned),
lenO = keyO.length;
if (keyParent) {
cloned[keyParent] = parent && parent[keyId] || null;
cloned[keyParent] = parent && parent[keyId] || undefined;
}

cloned[keyId] = _opt.amount;
Expand All @@ -326,7 +326,7 @@ app = angular.module('TreeDnDTest', deps)

while (opt.amount < number) {
opt.amount++;
patern = fnGenerate(null, angular.copy(sample), opt);
patern = fnGenerate(undefined, angular.copy(sample), opt);
data.push(forDept(patern, fnGenerate, opt, 1));
}

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions demo/routers/basic/basic.js → demo/examples/basic/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
// DataDemo.getDatas() can see in 'Custom Option' -> Tab 'Data Demo'
$scope.tree_data = DataDemo.getBigData({
'DemographicId': 1,
'ParentId': null,
'ParentId': undefined,
'Name': 'United States of America',
'Description': 'United States of America',
'Area': 9826675,
'Population': 318212000,
'TimeZone': 'UTC -5 to -10'
}, 500, 7, null, 'DemographicId', 'ParentId');
}, 500, 7, undefined, 'DemographicId', 'ParentId');
// $scope.tree_data = $TreeDnDConvert.line2tree(DataDemo.getDatas(), 'DemographicId', 'ParentId');

// init for UI example
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
parent = $scope.tree_Opt.get_parent(node);
key = node.def;
if (key && angular.isDefined(node.value) && !node.init &&
(parent === null || !!parent.value === true)) {
(typeof parent !== 'object' || !!parent.value === true)) {
$scope.data[key] = node.value;
_temp += [
tab,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
[
{
'DemographicId': -1,
'ParentId': null,
'ParentId': undefined,
'Name': 'United States of America',
'Description': 'United States of America',
'Area': 9826675,
Expand Down
16 changes: 8 additions & 8 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<script src="libs/directive/view-source.js"></script>
<!-- End load directives -->

<!-- Begin load routers -->
<script src="routers/filter/filter.js"></script>
<script src="routers/custom/custom.js"></script>
<script src="routers/basic/basic.js"></script>
<script src="routers/list/list.js"></script>
<script src="routers/multi/multi.js"></script>
<script src="routers/basic/basic-toolbar.js"></script>
<!-- End load routers -->
<!-- Begin load examples -->
<script src="examples/filter/filter.js"></script>
<script src="examples/custom/custom.js"></script>
<script src="examples/basic/basic.js"></script>
<script src="examples/list/list.js"></script>
<script src="examples/multi/multi.js"></script>
<script src="examples/basic/basic-toolbar.js"></script>
<!-- End load examples -->
</head>
<body ng-app="TreeDnDTest">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
Expand Down
2 changes: 1 addition & 1 deletion demo/libs/directive/view-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ app.directive('viewSource', function ($http, $timeout) {
};

angular.forEach(scope.models.types, function (type) {
$http.get('routers/' + scope.demoName + '/' + scope.demoName + '.' + type.extension)
$http.get('examples/' + scope.demoName + '/' + scope.demoName + '.' + type.extension)
.then(function (httpResponse) {
type.source = httpResponse.data;
$timeout(Prism.highlightAll, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h4 class="panel-title" style="color:#fa39c3">
<div class="col-xs-9">
<div class="row">
<panel title="Only Tree-Control (Not drag & drop)">
<div ng-include="'routers/basic/basic.html'"></div>
<div ng-include="'examples/basic/basic.html'"></div>
</panel>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
></tree-dnd>
</uib-tab>
<uib-tab heading="Run Demo">
<div ng-include="'routers/custom/custom.html'"></div>
<div ng-include="'examples/custom/custom.html'"></div>
</uib-tab>
<uib-tab heading="Example Data">
<show-code source="dataDemo | json" type="javascript"></show-code>
Expand Down
1 change: 1 addition & 0 deletions demo/libs/routers/filter-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div ng-include="'examples/filter/filter.html'"></div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<uib-tabset>
<uib-tab heading="Demo">
<div static-include="routers/list/list.html"></div>
<div static-include="examples/list/list.html"></div>
</uib-tab>
<uib-tab heading="Source">
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<uib-tabset>
<uib-tab index="0" heading="Demo">
<div static-include="routers/multi/multi.html"></div>
<div static-include="examples/multi/multi.html"></div>
</uib-tab>
<uib-tab index="1" heading="Source">
<div class="row">
Expand Down
1 change: 0 additions & 1 deletion demo/routers/filter/filter-frame.html

This file was deleted.

Loading

0 comments on commit ac1a5cf

Please sign in to comment.