zeanium-node
Advanced tools
Comparing version 0.6.28 to 0.6.29
{ | ||
"name": "zeanium-node", | ||
"version": "0.6.28", | ||
"version": "0.6.29", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ /** | ||
addNode: function (table, model){ | ||
var _pid = model.pid || 0; | ||
var _pid = model.zn_tree_pid || 0; | ||
return zn.createTransactionBlock() | ||
@@ -23,4 +23,4 @@ .query(zn.sql.select({ | ||
where: { | ||
delFlag: 0, | ||
pid: _pid | ||
zn_deleted: 0, | ||
zn_tree_pid: _pid | ||
} | ||
@@ -27,0 +27,0 @@ })) |
@@ -7,3 +7,18 @@ /** | ||
return zn.Collection({ | ||
cn: 'common.collection.Tree', | ||
methods: { | ||
orderTreeNode: function (id, order){ | ||
var _defer = zn.async.defer(); | ||
this.beginTransaction() | ||
.block(zn.block.tree.orderNode(this._table, id, order)) | ||
.on('error', function (sender, error){ | ||
_defer.reject(error); | ||
}) | ||
.on('finally', function (sender, data){ | ||
_defer.resolve(data); | ||
}) | ||
.commit(); | ||
return _defer.promise; | ||
}, | ||
insert: function (values){ | ||
@@ -10,0 +25,0 @@ var _defer = zn.async.defer(); |
@@ -16,2 +16,3 @@ /** | ||
var Collection = zn.Class('zn.db.data.Collection', { | ||
cn: 'zn.db.data.Collection', | ||
properties: { | ||
@@ -18,0 +19,0 @@ store: { |
@@ -233,3 +233,3 @@ /** | ||
path: _targetFile, | ||
url: _targetFile.replace(_uploadConfig.root, ''), | ||
url: zn.SLASH + _targetFile.replace(_uploadConfig.root, ''), | ||
lastModifiedDate: file.lastModifiedDate.toISOString().slice(0, 19) | ||
@@ -236,0 +236,0 @@ }; |
@@ -231,6 +231,6 @@ /** | ||
var _collections = []; | ||
this.__getModelCollections(ModelClass, _collections); | ||
var _methods = this.__getModelCollections(ModelClass, _collections); | ||
return zn.Collection({ | ||
model: ModelClass, | ||
mixins: _collections | ||
methods: _methods | ||
}); | ||
@@ -240,11 +240,14 @@ }, | ||
var _mixin = null, | ||
_methods = {}, | ||
_collection = ModelClass.getMeta('collection'), | ||
_mixins_ = ModelClass._mixins_; | ||
if(_collection){ | ||
_methods = _collection.getMeta('methods'); | ||
collections.push(_collection); | ||
} | ||
for(var _i = 0, _len = _mixins_.length; _i < _len; _i++){ | ||
this.__getModelCollections(_mixins_[_i], collections); | ||
zn.extend(_methods, this.__getModelCollections(_mixins_[_i], collections)); | ||
} | ||
return _methods; | ||
} | ||
@@ -251,0 +254,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258473
27
6044