Fix router error

pull/1/head
Victor Dubiniuk 11 years ago committed by Tobias Hintze
parent efdb0ca00e
commit 98ad57eb1a

@ -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();

@ -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) {

@ -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>

Loading…
Cancel
Save