Commit 793e25a7 authored by Lingnan Wu's avatar Lingnan Wu

if the name of the new doc is the same as the old one .it will replace the old doc

parent bcdcc215
......@@ -513,11 +513,20 @@
that.getList();
}
});*/
var newlist=new Object();//new object
newlist.title=basename;//object title and text
newlist.text=content;
newlist.number=that.list.length;
that.list.push(newlist);//save in the list
var newone=true;
for(var i=0;i<that.list.length;i++){
if(basename==that.list[i].title){
newone=false;
that.list[i].text=content;
}
}
if(newone){
var newlist=new Object();//new object
newlist.title=basename;//object title and text
newlist.text=content;
newlist.number=that.list.length;
that.list.push(newlist);//save in the list
}
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment