Commit 21ddc353 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

Get document list inside nav bar.

parent 6f672beb
......@@ -2,11 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<litk rel="icon" href="img/officejs/favicon.png" />
<link 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>&nbsp;
</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">Documents</li>
<li class="nav-header">Tools</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>
......
......@@ -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) {
htmlList += '<li>\n';
htmlList += result.list[i].fileName;
htmlList += '</li>\n';
}
htmlList += '</ul>\n';
$('#document_list').html(htmlList);
ich_object.DocumentList = result.list;
console.log (result.list);
alert (result.message);
htmlString += '<li>\n';
htmlString += result.list[i].fileName;
htmlString += '</li>\n';
}
if (htmlString === '') {
htmlString = 'No document';
}
document.querySelector ('#document_list').
innerHTML = htmlString;
}
});
};
......
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