Skip to content

Commit ac1a5cf

Browse files
Merge pull request #63 from thienhung1989/develop
- New version v3.0.9
2 parents 43356ab + f12926f commit ac1a5cf

37 files changed

+832
-912
lines changed

demo/app.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ app = angular.module('TreeDnDTest', deps)
99
.config(['$routeProvider', function ($routeProvider) {
1010
$routeProvider
1111
.when('/table', {
12-
templateUrl: 'routers/filter/filter-frame.html',
12+
templateUrl: 'libs/routers/filter-frame.html',
1313
controller: 'FilterController'
1414
})
1515
.when('/list', {
16-
templateUrl: 'routers/list/list-frame.html',
16+
templateUrl: 'libs/routers/list-frame.html',
1717
controller: 'ListController'
1818
})
1919
.when('/multi', {
20-
templateUrl: 'routers/multi/multi-frame.html',
20+
templateUrl: 'libs/routers/multi-frame.html',
2121
controller: 'MultiController'
2222
})
2323
.when('/event', {
24-
templateUrl: 'routers/basic/basic-frame.html',
24+
templateUrl: 'libs/routers/basic-frame.html',
2525
controller: 'BasicController'
2626
})
2727
.when('/custom', {
28-
templateUrl: 'routers/custom/custom-frame.html',
28+
templateUrl: 'libs/routers/custom-frame.html',
2929
controller: 'CustomController'
3030
})
3131
.otherwise({redirectTo: '/table'});
@@ -141,7 +141,7 @@ app = angular.module('TreeDnDTest', deps)
141141
return [
142142
{
143143
'DemographicId': 1,
144-
'ParentId': null,
144+
'ParentId': undefined,
145145
'Name': 'United States of America',
146146
'Description': 'United States of America',
147147
'Area': 9826675,
@@ -253,15 +253,15 @@ app = angular.module('TreeDnDTest', deps)
253253
'TimeZone': 0
254254
}, {
255255
'DemographicId': 201,
256-
'ParentId': null,
256+
'ParentId': undefined,
257257
'Name': 'India',
258258
'Description': 'Hydrabad tech city',
259259
'Area': 9826675,
260260
'Population': 318212000,
261261
'TimeZone': 'IST'
262262
}, {
263263
'DemographicId': 301,
264-
'ParentId': null,
264+
'ParentId': undefined,
265265
'Name': 'Bangladesh',
266266
'Description': 'Country of love',
267267
'Area': 9826675,
@@ -309,7 +309,7 @@ app = angular.module('TreeDnDTest', deps)
309309
var keyO = Object.keys(cloned),
310310
lenO = keyO.length;
311311
if (keyParent) {
312-
cloned[keyParent] = parent && parent[keyId] || null;
312+
cloned[keyParent] = parent && parent[keyId] || undefined;
313313
}
314314

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

327327
while (opt.amount < number) {
328328
opt.amount++;
329-
patern = fnGenerate(null, angular.copy(sample), opt);
329+
patern = fnGenerate(undefined, angular.copy(sample), opt);
330330
data.push(forDept(patern, fnGenerate, opt, 1));
331331
}
332332

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
// DataDemo.getDatas() can see in 'Custom Option' -> Tab 'Data Demo'
4242
$scope.tree_data = DataDemo.getBigData({
4343
'DemographicId': 1,
44-
'ParentId': null,
44+
'ParentId': undefined,
4545
'Name': 'United States of America',
4646
'Description': 'United States of America',
4747
'Area': 9826675,
4848
'Population': 318212000,
4949
'TimeZone': 'UTC -5 to -10'
50-
}, 500, 7, null, 'DemographicId', 'ParentId');
50+
}, 500, 7, undefined, 'DemographicId', 'ParentId');
5151
// $scope.tree_data = $TreeDnDConvert.line2tree(DataDemo.getDatas(), 'DemographicId', 'ParentId');
5252

5353
// init for UI example
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
parent = $scope.tree_Opt.get_parent(node);
304304
key = node.def;
305305
if (key && angular.isDefined(node.value) && !node.init &&
306-
(parent === null || !!parent.value === true)) {
306+
(typeof parent !== 'object' || !!parent.value === true)) {
307307
$scope.data[key] = node.value;
308308
_temp += [
309309
tab,

0 commit comments

Comments
 (0)