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 @@ ...@@ -513,11 +513,20 @@
that.getList(); that.getList();
} }
});*/ });*/
var newlist=new Object();//new object var newone=true;
newlist.title=basename;//object title and text for(var i=0;i<that.list.length;i++){
newlist.text=content; if(basename==that.list[i].title){
newlist.number=that.list.length; newone=false;
that.list.push(newlist);//save in the list 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