This commit is contained in:
Andreas Österreicher
2008-03-07 13:43:28 +00:00
parent 8b84af19d8
commit b4f02fe06c
6 changed files with 158 additions and 9 deletions
@@ -156,6 +156,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
<label value="Foto" />
<hbox>
<button id="student-detail-button-image-upload" label="Upload" oncommand="StudentImageUpload();" disabled="true"/>
<button id="student-detail-button-image-delete" label="Delete" oncommand="StudentImageDelete();" disabled="true"/>
<spacer flex="1" />
</hbox>
</vbox>
+43
View File
@@ -525,6 +525,7 @@ function StudentDetailDisableFields(val)
document.getElementById('student-detail-menulist-sprache').disabled=val;
//document.getElementById('student-detail-textbox-matrikelnummer').disabled=val;
document.getElementById('student-detail-button-image-upload').disabled=val;
document.getElementById('student-detail-button-image-delete').disabled=val;
//document.getElementById('student-detail-menulist-studiengang_kz').disabled=val;
document.getElementById('student-detail-textbox-semester').disabled=val;
document.getElementById('student-detail-textbox-verband').disabled=val;
@@ -646,6 +647,9 @@ function StudentDetailSave()
}
}
// ****
// * Ladt ein Script zum Upload des Bildes
// ****
function StudentImageUpload()
{
person_id = document.getElementById('student-detail-textbox-person_id').value;
@@ -657,6 +661,45 @@ function StudentImageUpload()
alert('Es wurde keine Person ausgewaehlt');
}
// ****
// * Loescht das Bild aus der DB
// ****
function StudentImageDelete()
{
person_id = document.getElementById('student-detail-textbox-person_id').value;
if(person_id!='')
{
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
var req = new phpRequest(url,'','');
var studiengang_kz = document.getElementById('student-prestudent-menulist-studiengang_kz').value;
req.add('type', 'imagedelete');
req.add('person_id', person_id);
req.add('studiengang_kz', studiengang_kz);
var response = req.executePOST();
var val = new ParseReturnValue(response)
if (!val.dbdml_return)
{
if(val.dbdml_errormsg=='')
alert(response)
else
alert(val.dbdml_errormsg)
}
else
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
StudentSelectID=document.getElementById('student-prestudent-textbox-prestudent_id').value;
StudentTreeDatasource.Refresh(false); //non blocking
SetStatusBarText('Bild wurde geloescht');
}
}
else
alert('Es wurde keine Person ausgewaehlt');
}
// ****
// * Auswahl eines Studenten
// * bei Auswahl eines Studenten wird dieser geladen