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
e772613d
Commit
e772613d
authored
Jun 29, 2012
by
Lingnan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the list will increase when we save the text .
parent
e075ab68
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
317 additions
and
23 deletions
+317
-23
OfficeJS-Mobile/index.html
OfficeJS-Mobile/index.html
+33
-23
ez_setup.py
ez_setup.py
+284
-0
No files found.
OfficeJS-Mobile/index.html
View file @
e772613d
...
...
@@ -76,12 +76,12 @@
Tools
</li>
<li
data-theme=
"c"
>
<a
href=
"#list"
data-transition=
"slide"
>
<a
href=
"#list"
data-transition=
"slide"
onclick=
"CreateLists();"
>
Document list
</a>
</li>
<li
data-theme=
"c"
>
<a
href=
"#text"
data-transition=
"slide"
onclick=
"
OfficeJS.open({app:'text_editor'}); return false;"
>
<a
href=
"#text"
data-transition=
"slide"
onclick=
"
setTextEditorInformation('untitled','');
OfficeJS.open({app:'text_editor'}); return false;"
>
New Text Document
</a>
</li>
...
...
@@ -120,20 +120,10 @@
<div
data-role=
"content"
style=
"padding: 15px"
>
<ul
class=
"ui-listview"
data-role=
"listview"
id=
"textlist"
>
<li
class=
"ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c"
data-corners=
"false"
data-shadow=
"false"
data-iconshadow=
"true"
data-wrapperels=
"div"
data-icon=
"arrow-r"
data-iconpos=
"right"
data-theme=
"c"
>
<div
class=
"ui-btn-inner ui-li"
>
<div
class=
"ui-btn-text"
>
<a
class=
"ui-link-inherit"
href=
"#text"
onclick=
"console.log('name is '+OfficeJS.list[0].title+' text is '+OfficeJS.list[0].text)"
>
<h3
class=
"ui-li-heading"
>
name
</h3>
<p
class=
"ui-li-desc"
>
Text Editor
</p>
</a>
</div>
<span
class=
"ui-icon ui-icon-arrow-r ui-icon-shadow"
>
</span>
</div>
</li>
</ul>
<script
type=
"text/javascript"
>
NewList
=
function
(
listname
,
list
type
){
NewList
=
function
(
listname
,
list
content
){
//get the main list
var
mainList
=
document
.
getElementById
(
"
textlist
"
);
//set the new element
...
...
@@ -159,7 +149,7 @@
newa
=
document
.
createElement
(
"
a
"
);
newa
.
setAttribute
(
"
class
"
,
"
ui-link-inherit
"
);
newa
.
setAttribute
(
"
href
"
,
"
#text
"
);
newa
.
setAttribute
(
"
onclick
"
,
"
console.log('
name is '+OfficeJS.list[0].title+' text is '+OfficeJS.list[0].text)
"
);
newa
.
setAttribute
(
"
onclick
"
,
"
console.log('
asdf a');setTextEditorInformation(listname,listcontent);
"
);
newSeconddiv
.
appendChild
(
newa
);
//set head
newhead
=
document
.
createElement
(
"
h3
"
);
...
...
@@ -169,20 +159,32 @@
newHeadtext
=
document
.
createTextNode
(
listname
);
newhead
.
appendChild
(
newHeadtext
);
//set
type
new
type
=
document
.
createElement
(
"
p
"
);
new
type
.
setAttribute
(
"
class
"
,
"
ui-li-desc
"
);
newa
.
appendChild
(
new
type
);
//set
content
new
content
=
document
.
createElement
(
"
p
"
);
new
content
.
setAttribute
(
"
class
"
,
"
ui-li-desc
"
);
newa
.
appendChild
(
new
content
);
new
Typetext
=
document
.
createTextNode
(
listtype
);
new
type
.
appendChild
(
newType
text
);
new
Contenttext
=
document
.
createTextNode
(
listcontent
);
new
content
.
appendChild
(
newContent
text
);
//set shadow
newshadow
=
document
.
createElement
(
"
span
"
);
newshadow
.
setAttribute
(
"
class
"
,
"
ui-icon ui-icon-arrow-r ui-icon-shadow
"
);
newFirstdiv
.
appendChild
(
newshadow
);
}
NewList
(
"
name
"
,
"
Text Editor
"
);
function
CreateLists
(){
//clean all the lists
var
n
=
document
.
getElementById
(
'
textlist
'
).
childNodes
.
length
;
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
document
.
getElementById
(
'
textlist
'
).
removeChild
(
document
.
getElementById
(
'
textlist
'
).
firstChild
);
}
//set the new lists
for
(
i
=
0
;
i
<
OfficeJS
.
list
.
length
;
i
++
){
NewList
(
OfficeJS
.
list
[
i
].
title
,
OfficeJS
.
list
[
i
].
text
);}
}
</script>
</div>
...
...
@@ -225,8 +227,16 @@
Save
</a>
</div>
<script>
function
setTextEditorInformation
(
name
,
content
){
var
nameTextarea
=
document
.
getElementById
(
"
input_file_name
"
);
nameTextarea
.
value
=
name
;
var
contentTextarea
=
document
.
getElementById
(
"
input_file_content
"
);
contentTextarea
.
value
=
content
;
}
</script>
</div>
</div>
...
...
ez_setup.py
0 → 100644
View file @
e772613d
This diff is collapsed.
Click to expand it.
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