Commit bcdcc215 authored by Lingnan Wu's avatar Lingnan Wu

when load the list , the text editor will load the name and content of the list which been clicked

parent 3db8de24
//automatically build the list
NewList = function (listnumber,listname,listcontent){
var listNumber=listnumber;
//get the main list
var mainList = document.getElementById("textlist");
//set the new element
......@@ -25,11 +24,10 @@ NewList = function (listnumber,listname,listcontent){
newFirstdiv.appendChild(newSeconddiv);
//set a tag
newa = document.createElement("a");
newa.setAttribute("id",listnumber);
newa.setAttribute("class","ui-link-inherit");
newa.setAttribute("href","#text");
//set the listnumber to control
newa.setAttribute("value",listNumber);
newa.setAttribute("onclick","setTextEditorInformation(OfficeJS.list[i].title,OfficeJS.list[i].title,OfficeJS.list[i].title,OfficeJS.list[i].text);");
newa.setAttribute("onclick","setTextEditorInformation(OfficeJS.list[this.id].title,OfficeJS.list[this.id].text);");
newSeconddiv.appendChild(newa);
//set head
newhead = document.createElement("h3");
......@@ -62,3 +60,10 @@ function CreateLists(){
}
}
function get_list_value(element){
tr=document.all.para.value;
document.all.para.value=element.value;
var trid = element.value;
alert(trid);
}
......@@ -517,7 +517,7 @@
newlist.title=basename;//object title and text
newlist.text=content;
newlist.number=that.list.length;
that.list.push(obj);//save in the list
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