Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
bcdcc215
Commit
bcdcc215
authored
Jul 04, 2012
by
Lingnan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when load the list , the text editor will load the name and content of the list which been clicked
parent
3db8de24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
OfficeJS-Mobile/js/list-page.js
OfficeJS-Mobile/js/list-page.js
+9
-4
OfficeJS-Mobile/js/officejs-mobile.js
OfficeJS-Mobile/js/officejs-mobile.js
+1
-1
No files found.
OfficeJS-Mobile/js/list-page.js
View file @
bcdcc215
//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
);
}
OfficeJS-Mobile/js/officejs-mobile.js
View file @
bcdcc215
...
...
@@ -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
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment