Fix router error

This commit is contained in:
Victor Dubiniuk 2013-08-17 13:19:35 +03:00 committed by Tobias Hintze
parent efdb0ca00e
commit 98ad57eb1a
3 changed files with 12 additions and 10 deletions

View File

@ -31,6 +31,7 @@ OCP\Util::addStyle( 'office', 'editor' );
OCP\Util::addScript('office', 'office');
$list=\OCA\Office\Storage::getDocuments();
$tmpl = new OCP\Template('office', 'documents', 'user');
$tmpl->assign('list', $list);
$tmpl->printPage();

View File

@ -18,7 +18,6 @@ var officeMain = {
});
});
});
officeMain.updateSessions();
setInterval(officeMain.updateSessions, 10000);
},
initSession: function(response) {
@ -103,16 +102,9 @@ var officeMain = {
);
},
updateSessions: function() {
$('#editing-sessions').load(OC.Router.generate('office_session_listhtml'), {}, officeMain.onSessions);
},
onSessions: function() {
$('#editing-sessions a').click(
function(event) {
event.preventDefault();
officeMain.joinSession($(this).attr('data-esid'));
}
);
$('#editing-sessions').load(OC.Router.generate('office_session_listhtml'), {});
},
onInvite: function(event) {
event.preventDefault();
$('#invite-block').toggle();
@ -154,6 +146,14 @@ $(document).ready(function() {
$(this).remove();
});
$('#editing-sessions a').live('click',
function(event) {
event.preventDefault();
officeMain.joinSession($(this).attr('data-esid'));
}
);
$('#inivite-input').autocomplete({
minLength: 1,
source: function(search, response) {

View File

@ -7,6 +7,7 @@
</div>
<div id="office-content">
<div id="editing-sessions">
<?php \OCA\Office\Controller::listSessionsHtml() ?>
</div>
<?php if(empty($_['list'])) { ?>
<div id="emptyfolder"><?php p('No documents are found. Please upload a document into your ownCloud');?></div>