Various fixes
This commit is contained in:
parent
c3fae98bfe
commit
70b2b2bb69
@ -98,6 +98,29 @@ class Controller {
|
||||
"session_list" => $preparedSessions
|
||||
));
|
||||
}
|
||||
|
||||
public static function listSessionsHtml(){
|
||||
self::getUser();
|
||||
$sessions = Session::getAll();
|
||||
if (!is_array($sessions)){
|
||||
$sessions = array();
|
||||
}
|
||||
|
||||
$preparedSessions = array_map(
|
||||
function($x){return ($x['es_id']);},
|
||||
$sessions
|
||||
);
|
||||
|
||||
$invites = Invite::getAllInvites();
|
||||
if (!is_array($invites)){
|
||||
$invites = array();
|
||||
}
|
||||
|
||||
$tmpl = new \OCP\Template('office', 'part.sessions', '');
|
||||
$tmpl->assign('invites', $invites);
|
||||
$tmpl->assign('sessions', $sessions);
|
||||
echo $tmpl->fetchPage();
|
||||
}
|
||||
|
||||
protected static function getUser(){
|
||||
\OCP\JSON::checkLoggedIn();
|
||||
|
@ -77,7 +77,7 @@ try{
|
||||
);
|
||||
break;
|
||||
case 'sync_ops':
|
||||
$seqHead = $request->getParam('args/seq_head');
|
||||
$seqHead = (string) $request->getParam('args/seq_head');
|
||||
if (!is_null($seqHead)){
|
||||
$esId = $request->getParam('args/es_id');
|
||||
$memberId = $request->getParam('args/member_id');
|
||||
|
@ -1,18 +1,26 @@
|
||||
#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; }
|
||||
|
||||
.documentslist { position:relative;top:3em; padding:5px; width:100%;}
|
||||
.documentslist { padding:5px; width:100%;}
|
||||
.documentslist tr:hover { backgound-color:#aaa; }
|
||||
.documentslist tr td { padding:5px; }
|
||||
|
||||
#allsessions{
|
||||
position: absolute;
|
||||
z-index: 100500;
|
||||
top : 40px;
|
||||
padding: 10px;
|
||||
background: #ccc;
|
||||
#office-content{
|
||||
padding-left:160px;
|
||||
}
|
||||
#editing-sessions{
|
||||
position:absolute;
|
||||
left:0;
|
||||
padding:5px;
|
||||
top:3em;
|
||||
width:150px;
|
||||
overflow:hidden;
|
||||
}
|
||||
#editor-content{
|
||||
position:relative;top:3em;width: 100%;
|
||||
}
|
||||
|
||||
#allsessions div{
|
||||
|
||||
#editing-sessions div{
|
||||
margin:5px 0;
|
||||
}
|
||||
|
||||
|
@ -36,14 +36,14 @@ class Member {
|
||||
|
||||
public static function getMembersAsArray($ids){
|
||||
$memberCount = count($ids);
|
||||
if (!$memberCount || !$is_array($ids)){
|
||||
if (!$memberCount || !is_array($ids)){
|
||||
return array();
|
||||
}
|
||||
|
||||
$placeholders = array_fill(0, $memberCount, '?');
|
||||
$stmt = implode(', ', $placeholders);
|
||||
$query = \OCP\DB::prepare('SELECT * FROM `*PREFIX*office_member` WHERE `member_id`IN (' . $stmt . ')');
|
||||
$result = $query->execute(array($ids));
|
||||
$result = $query->execute($ids);
|
||||
return $result->fetchAll();
|
||||
}
|
||||
|
||||
|
@ -49,10 +49,13 @@ class Op {
|
||||
|
||||
public static function getOpsAfterJson($esId, $seq){
|
||||
$ops = self::getOpsAfter($esId, $seq);
|
||||
if (!is_array($ops)){
|
||||
$ops = array();
|
||||
}
|
||||
$ops = array_map(
|
||||
function($x){
|
||||
$decoded = json_decode($x['opspec']);
|
||||
$decoded['memberId'] = strval($decoded['memberId']);
|
||||
$decoded = json_decode($x['opspec'], true);
|
||||
$decoded['memberid'] = strval($decoded['memberid']);
|
||||
return $decoded;
|
||||
},
|
||||
$ops
|
||||
|
Loading…
x
Reference in New Issue
Block a user