Forráskód Böngészése

ration tuning night

TonyKang 8 éve
szülő
commit
ab70480a87

+ 15 - 0
modules/rationRepository/models/rationChapterTree.js

@@ -63,6 +63,21 @@ rationChapterTreeDAO.prototype.tempRationChapterTreeInsert = function(repository
     })
 }
 
+rationChapterTreeDAO.prototype.updateNodes = function(nodes,callback){
+    var functions = [];
+    for (var i=0; i < nodes.length; i++) {
+        functions.push((function(doc) {
+            return function(cb) {
+                doc.save(cb);
+            };
+        })(nodes[i]));
+    }
+    async.parallel(functions, function(err, results) {
+        //console.log(err);
+        //console.log(results);
+    });
+};
+
 rationChapterTreeDAO.prototype.sectionUpsert = function(repositoryName,section,callback){
     var db = dbm.getCfgConnection(repositoryName);
     var rationChapterTreeModel = db.model("rationChapterTrees",rationChapterTreeSchema, "rationChapterTrees");

+ 3 - 0
web/rationLibEditor/js/dinge.js

@@ -116,6 +116,9 @@ function addNewNode(rawNode, callback) {
         }
     })
 };
+function updateNodes(nodes){
+    //
+};
 //保存新增的节点
 function saveNewSection(n){
     var sec={};