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'); OCP\Util::addScript('office', 'office');
$list=\OCA\Office\Storage::getDocuments(); $list=\OCA\Office\Storage::getDocuments();
$tmpl = new OCP\Template('office', 'documents', 'user'); $tmpl = new OCP\Template('office', 'documents', 'user');
$tmpl->assign('list', $list); $tmpl->assign('list', $list);
$tmpl->printPage(); $tmpl->printPage();

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

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

Loading…
Cancel
Save