- Neue JQuery Version (draggable Unterstützung für IE9, neues Autocomplete)

- Coodle Anpassung neue JQuery Version und Bugfixes für aktuelle Browserversionen
- Freebusy Plugin für SOGo Kalender
This commit is contained in:
Andreas Österreicher
2013-01-25 09:05:06 +00:00
parent 1ce0f55915
commit bf5dc880da
11 changed files with 1102 additions and 50 deletions
+18 -3
View File
@@ -25,11 +25,15 @@ if(!isset($_REQUEST['work']))
die('Parameter Work missing');
$work = $_REQUEST['work'];
$q = $_REQUEST['q'];
if(isset($_REQUEST['term']))
$q = $_REQUEST['term'];
else
$q = $_REQUEST['q'];
switch($work)
{
case 'ressource':
$result =array();
$ort = new ort();
if(!$ort->filter($q))
@@ -38,7 +42,13 @@ switch($work)
foreach($ort->result as $row)
{
if($row->aktiv)
echo html_entity_decode($row->ort_kurzbz.'|Ort|'.$row->bezeichnung."\n");
{
//echo html_entity_decode($row->ort_kurzbz.'|Ort|'.$row->bezeichnung."\n");
$item['uid']=$row->ort_kurzbz;
$item['typ']='Ort';
$item['bezeichnung']=$row->bezeichnung;
$result[]=$item;
}
}
$benutzer = new benutzer();
@@ -48,8 +58,13 @@ switch($work)
foreach($benutzer->result as $row)
{
echo html_entity_decode($row->uid.'|Person|'.$row->nachname.' '.$row->vorname."\n");
//echo html_entity_decode($row->uid.'|Person|'.$row->nachname.' '.$row->vorname."\n");
$item['uid']=$row->uid;
$item['typ']='Person';
$item['bezeichnung']=$row->nachname.' '.$row->vorname;
$result[]=$item;
}
echo json_encode($result);
break;
default:
die('Invalid Work Parameter');
+2 -4
View File
@@ -45,10 +45,8 @@ echo '
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
<link rel="stylesheet" href="../../../skin/styles/jquery.css" type="text/css">
<link rel="stylesheet" href="../../../skin/styles/jquery-ui.css" type="text/css">
<script src="../../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../../include/js/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../../skin/styles/jquery-ui1.9.2.custom.min.css" type="text/css">
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../../../include/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
+34 -38
View File
@@ -167,10 +167,10 @@ echo '<html>
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
<link rel="stylesheet" href="../../../skin/jquery.css" type="text/css"/>
<script type="text/javascript" src="../../../include/js/jquery.js"></script>
<script type="text/javascript" src="../../../include/js/jquery1.9.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../../include/js/fullcalendar/fullcalendar.css" />
<link rel="stylesheet" type="text/css" href="../../../include/js/fullcalendar/fullcalendar.print.css" media="print" />
<script type="text/javascript" src="../../../include/js/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css"/>
<script type="text/javascript" src="../../../include/js/fullcalendar/fullcalendar.min.js"></script>
<script type="text/javascript" src="../../../include/js/jquery.contextmenu.r2.js"></script>
<title>'.$p->t('coodle/coodle').' - '.$p->t('coodle/termine').'</title>
@@ -314,8 +314,9 @@ echo '<html>
$(this).draggable(
{
zIndex: 999,
revert: true, // will cause the event to go back to its
revertDuration: 0 // original position after the drag
revert: true, // will cause the event to go back to its
revertDuration: 0, // original position after the drag
scroll: false // behebt ruckeln im IE7
});
});
@@ -505,6 +506,14 @@ echo '<html>
}
});
}
},
dayClick: function(date, allDay, jsEvent, view)
{
if(view.name=="month")
{
$("#calendar").fullCalendar("changeView", "agendaWeek");
$("#calendar").fullCalendar("gotoDate", date);
}
}
});
});
@@ -544,44 +553,31 @@ echo '
'.$p->t('coodle/ressource').':<br>
<input id="input_ressource" type="text" size="10" />
</p>
<script>
// Formatieren des Eintrages im Autocomplete Feld
function formatItem(row)
{
if(row[1]=="Ort")
return "<i>" + row[0] + "<\/i> - "+ row[2] +" " + row[1];
else
return "<i>" + row[2] + "<\/i> - "+ row[0] +" " + row[1];
}
function selectItem(li)
{
return false;
}
<script>
$(document).ready(function()
{
// Autocomplete Feld fuer Ressourcen initialisieren
$("#input_ressource").autocomplete("coodle_autocomplete.php", {
minChars:2,
matchSubset:1,matchContains:1,
width:300,
cacheLength:0,
onItemSelect:selectItem,
formatItem:formatItem,
extraParams:{"work":"ressource"}
});
// Auswahl eines Eintrages im Autocomplete Feld
$("#input_ressource").result(function(event, data, formatted)
{
var uid = data[0];
var typ = data[1];
var bezeichnung = data[2];
addRessource(uid, typ, bezeichnung);
this.value="";
});
$("#input_ressource").autocomplete({
source: "coodle_autocomplete.php?work=ressource",
minLength:2,
response: function(event, ui)
{
//Value und Label fuer die Anzeige setzen
for(i in ui.content)
{
ui.content[i].value=ui.content[i].typ+ui.content[i].uid;
ui.content[i].label=ui.content[i].bezeichnung+" "+ui.content[i].uid;
}
},
select: function(event, ui)
{
//Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren
addRessource(ui.item.uid, ui.item.typ, ui.item.bezeichnung);
ui.item.value="";
ui.item.label="";
}
});
});
/*
+1 -2
View File
@@ -45,8 +45,7 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
<link href="../../../skin/tablesort.css" rel="stylesheet" type="text/css">
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
<script src="../../../include/js/tablesort/table.js" type="text/javascript"></script>
<script src="../../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
+62
View File
@@ -0,0 +1,62 @@
<?php
/* Copyright (C) 2012 FH Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
*/
/**
* Dieses Script liefert die FreeBusy Informationen aus dem Sogo Kalender
*
* Aufruf: http://www.example.com/cis/public/freebusy_sogo.php/[uid]
* zB
* http://www.example.com/cis/public/freebusy_sogo.php/oesi
*/
require_once('../../config/cis.config.inc.php');
require_once('../../include/benutzer.class.php');
require_once('../../include/functions.inc.php');
require_once('../../include/zeitsperre.class.php');
require_once('../../include/ical.class.php');
require_once('../../include/stunde.class.php');
$uid = mb_substr($_SERVER['PATH_INFO'],1);
$bn = new benutzer();
if(!$bn->load($uid))
die('User invalid');
$curl = curl_init(SOGO_SERVER.'dav/'.$uid.'/freebusy.ifb');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, SOGO_USER.':'.SOGO_PASSWD);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'FH Complete');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200)
{
header("Content-Type: text/calendar; charset=UTF-8");
echo $response;
}
else
{
echo 'Call Failed '.print_r($resultStatus);
}
?>
+5
View File
@@ -141,6 +141,11 @@ define('OPUS_DB','bla');
// Pfad zu den Opus Volltexten
define('OPUS_PATH_PAA','/var/www/opus/volltexte/');
// ***** SOGO *****
define('SOGO_SERVER','https://sogo.technikum-wien.at/SOGo/');
define('SOGO_USER','user');
define('SOGO_PASSWD','passwort');
// ***** Nicht aendern *****
define('TABLE_ID','_id');
define('TABLE_BEGIN','tbl_');
+19
View File
@@ -96,6 +96,25 @@ class ical extends basis_db
$dtend='';
}
}
elseif($typ=='SoGo')
{
if(mb_strstr($row,'FREEBUSY'))
{
$len = mb_strlen($row);
$doppelpunktpos = mb_strpos($row, ':');
$row = mb_substr($row, $doppelpunktpos+1);
$slashpos = mb_strpos($row, '/');
$dtstart = mb_substr($row, 0, $slashpos);
$dtend = mb_substr($row, $slashpos+1);
$this->dtresult[]=array('dtstart'=>trim($dtstart),'dtend'=>trim($dtend));
$dtstart = $this->ConvertTimezone($dtstart);
$dtend = $this->ConvertTimezone($dtend);
$this->result[$idx].='FREEBUSY:'.$dtstart.'/'.$dtend."\n";
$dtstart='';
$dtend='';
}
}
elseif(mb_strpos($row,'FREEBUSY')===0)
$this->result[$idx].=$row."\n";
}
+12 -1
View File
@@ -20,9 +20,20 @@ JS FILES
in einzubindender Reihenfolge
Alle JS Files im Ordner trunk/include/js
// DEPRECATED NICHT MEHR VERWENDEN!
jquery.js
->autocomplete
->autocomplete (Plugin Version)
->datepicker
->tablesorter
->Deutsches Schema fuer datepicker
jquery-1.9.min.js
-> jqueryUI (autocomplete, datepicker, etc)
-> Deutsches Schema für datepicker
-> tablesorter
+942
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -19,7 +19,7 @@ $this->phrasen['coodle/termine']='Termine verwalten';
$this->phrasen['coodle/dragEvent']='Termin';
$this->phrasen['coodle/terminZiehenBeschreibung']='Ziehen Sie den Termin an die gewünschte Position um Terminvorschläge zu setzen';
$this->phrasen['coodle/ressourcenBeschreibung']='Hier können Sie Räume und Personen zur Umfrage hinzufügen. <br><br>Tippen sie dazu den Namen in das Textfeld und wählen Sie den entsprechenden Eintrag aus.';
$this->phrasen['coodle/ressourcen']='Ressourcen / Teilnehmer';
$this->phrasen['coodle/ressourcen']='Ressourcen / TeilnehmerIn';
$this->phrasen['coodle/weiterZurTerminauswahl']='Weiter zur Terminauswahl';
$this->phrasen['coodle/ressourceEntfernen']='Ressource entfernen';
$this->phrasen['coodle/umfrageStarten']='Umfrage starten';
@@ -47,7 +47,7 @@ $this->phrasen['coodle/einladungNeuVerschicken']='Einladungen neu verschicken';
$this->phrasen['coodle/umfrageAbgeschlossen']='Die Umfrage ist abgeschlossen';
$this->phrasen['coodle/loeschen']='Umfrage stornieren';
$this->phrasen['coodle/zurUmfrage']='Zur Umfrage';
$this->phrasen['coodle/ressource']='Ressource / Teilnehmer';
$this->phrasen['coodle/ressource']='Ressource / TeilnehmerIn';
$this->phrasen['coodle/raumBelegt']='Der Raum %s kann nicht reserviert werden, da er belegt ist!';
$this->phrasen['coodle/laufendeUmfragen']='Laufende Umfragen';
$this->phrasen['coodle/beendeteUmfragen']='Beendete Umfragen';
+5
View File
File diff suppressed because one or more lines are too long