diff --git a/ajax/genesis.php b/ajax/genesis.php index c2d33bee..fdebb1e2 100644 --- a/ajax/genesis.php +++ b/ajax/genesis.php @@ -11,7 +11,6 @@ namespace OCA\Office; -// Check if we are a user \OCP\User::checkLoggedIn(); $session = Session::getSession($_SERVER['QUERY_STRING']); diff --git a/ajax/otpoll.php b/ajax/otpoll.php index e7be378d..5de6e0ab 100644 --- a/ajax/otpoll.php +++ b/ajax/otpoll.php @@ -66,7 +66,7 @@ try{ $esId = $request->getParam('args/es_id'); $memberId = $request->getParam('args/member_id'); $ops = $request->getParam('args/client_ops'); - $hasOps = is_array($ops) && count($ops>0); + $hasOps = is_array($ops) && count($ops)>0; $currentHead = OCA\Office\Op::getHeadSeq($esId); diff --git a/ajax/sessions.php b/ajax/sessions.php new file mode 100644 index 00000000..1ade18d0 --- /dev/null +++ b/ajax/sessions.php @@ -0,0 +1,9 @@ + Session::getAllSessions() +)); \ No newline at end of file diff --git a/css/style.css b/css/style.css index e7e2150e..737c98da 100755 --- a/css/style.css +++ b/css/style.css @@ -4,3 +4,14 @@ .documentslist tr:hover { backgound-color:#aaa; } .documentslist tr td { padding:5px; } +#allsessions{ + position: absolute; + z-index: 100500; + top : 40px; + padding: 10px; + background: #ccc; +} + +#allsessions div{ + margin:5px 0; +} \ No newline at end of file diff --git a/js/office.js b/js/office.js index 4c0b58e4..7a529b0c 100644 --- a/js/office.js +++ b/js/office.js @@ -95,6 +95,26 @@ var officeMain = { officeMain.onView ); }, + + showSessions : function(){ + if ($('#allsessions').length){ + $('#allsessions').remove(); + return; + } + $.post(OC.filePath('office', 'ajax', 'sessions.php'), {}, officeMain.onSessions); + }, + onSessions : function(response){ + if (response && response.sessions){ + $(response.sessions).each( function(i, s){ officeMain.addSession(s) } ); + } + }, + addSession : function(s){ + if (!$('#allsessions').length){ + $(document.body).append('
'); + } + $('#allsessions').append('