- 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()
{