From 98ad57eb1a70d9b55cc191ca3b56f85223ecf240 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Sat, 17 Aug 2013 13:19:35 +0300 Subject: [PATCH] Fix router error --- index.php | 1 + js/office.js | 20 ++++++++++---------- templates/documents.php | 1 + 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index fecbf373..a5d9796a 100755 --- a/index.php +++ b/index.php @@ -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(); diff --git a/js/office.js b/js/office.js index 2bfb8d97..4b1c1b4c 100644 --- a/js/office.js +++ b/js/office.js @@ -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) { diff --git a/templates/documents.php b/templates/documents.php index bf2feb46..fa155798 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -7,6 +7,7 @@
+