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
21ddc353
Commit
21ddc353
authored
May 21, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get document list inside nav bar.
parent
6f672beb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
19 deletions
+25
-19
OfficeJS/index.html
OfficeJS/index.html
+15
-9
OfficeJS/js/officejs.js
OfficeJS/js/officejs.js
+10
-10
No files found.
OfficeJS/index.html
View file @
21ddc353
...
...
@@ -2,11 +2,15 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<li
t
k
rel=
"icon"
href=
"img/officejs/favicon.png"
/>
<li
n
k
rel=
"icon"
href=
"img/officejs/favicon.png"
/>
<link
rel=
"shortcut icon"
href=
"img/icons/favicon.png"
/>
<link
rel=
"stylesheet"
href=
"lib/bootstrap/css/bootstrap.min.css"
/>
<title>
OfficeJS
</title>
<!-- js scripts -->
<script
type=
"text/javascript"
src=
"lib/xinha/XinhaLoader.js?lang=en"
>
</script>
<script
type=
"text/javascript"
src=
"js/XinhaConfig.js"
>
</script>
<script
type=
"text/javascript"
src=
"lib/icanhaz/ICanHaz.min.js"
></script>
<script
data-main=
"js/officejs"
type=
"text/javascript"
...
...
@@ -93,13 +97,13 @@
Get
List
<
/button> 
;
<
/div
>
<
div
id
=
"
document_list
"
class
=
"
span4
"
>
<
ul
>
{{
#
DocumentList
}}
<
li
>
{{
fileName
}}
<
/li
>
{{
/
DocumentList
}}
<
/ul
>
<
/div
>
<
!--
<
div
id
=
"
document_list
"
class
=
"
span4
"
>
--
>
<!--
<
ul
>
--
>
<!--
{{
#
DocumentList
}}
-->
<!--
<
li
>
{{
fileName
}}
<
/li> --
>
<!--
{{
/
DocumentList
}}
-->
<!--
<
/ul> --
>
<
!--
<
/div> --
>
<
/article
>
</script>
</head>
...
...
@@ -132,10 +136,12 @@
<ul
class=
"nav nav-list"
>
<li
class=
"nav-header"
>
Nav
</li>
<li><a
href=
"#/login"
><i
class=
"icon-ok"
></i>
Login
</a></li>
<li
class=
"nav-header"
>
Document
s
</li>
<li
class=
"nav-header"
>
Tool
s
</li>
<li
class=
"texteditor"
>
<a
href=
"#/texteditor"
><i
class=
"icon-font"
></i>
Text Editor
</a>
</li>
<li
class=
"nav-header"
>
Document List
</li>
<div
id=
"document_list"
></div>
</ul>
</div>
</div>
...
...
OfficeJS/js/officejs.js
View file @
21ddc353
...
...
@@ -89,6 +89,7 @@ require(['OfficeJS'],function (OJS) {
JSON
.
parse
(
$
(
'
#input_json_storage
'
).
attr
(
'
value
'
)
),
JSON
.
parse
(
$
(
'
#input_json_applicant
'
).
attr
(
'
value
'
)
)
);
publ
.
getlist
();
};
publ
.
save
=
function
()
{
var
filename
,
filecontent
;
...
...
@@ -153,18 +154,17 @@ require(['OfficeJS'],function (OJS) {
priv
.
jio
.
getDocumentList
({
'
maxtries
'
:
3
,
'
callback
'
:
function
(
result
)
{
var
htmlList
,
i
;
htmlList
=
'
<ul>
\n
'
;
var
htmlString
=
''
,
i
;
for
(
i
in
result
.
list
)
{
html
List
+=
'
<li>
\n
'
;
html
List
+=
result
.
list
[
i
].
fileName
;
html
List
+=
'
</li>
\n
'
;
html
String
+=
'
<li>
\n
'
;
html
String
+=
result
.
list
[
i
].
fileName
;
html
String
+=
'
</li>
\n
'
;
}
htmlList
+=
'
</ul>
\n
'
;
$
(
'
#document_list
'
).
html
(
htmlList
)
;
ich_object
.
DocumentList
=
result
.
list
;
console
.
log
(
result
.
list
);
alert
(
result
.
message
)
;
if
(
htmlString
===
''
)
{
htmlString
=
'
No document
'
;
}
document
.
querySelector
(
'
#document_list
'
).
innerHTML
=
htmlString
;
}
});
};
...
...
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