Skip to content
Snippets Groups Projects
Commit 5b2f71b8 authored by hahn's avatar hahn
Browse files

- footer navigation in actions was simplified

- fetch output instead of fille $sPhpOut
- first ajax test
parent c353235d
No related branches found
No related tags found
No related merge requests found
......@@ -106,9 +106,9 @@ if (array_key_exists("confirm", $aParams)) {
}
$sOut.='<hr>' . aHome() .' '. aPrjHome();
$sOut.= '<hr>' .aPrjHome();
// -- Ausgabe
$sPhpOut=$sOut;
echo $sOut;
?>
......@@ -21,8 +21,50 @@ $oPrj = new project($aParams["prj"]);
$sOut = '';
print_r($aParams);
if (array_key_exists("confirm", $aParams)) {
$sOut.=$oPrj->build();
$sOutDir="/tmp"; // Ausgabeverzeichnis
$sTmpFile=tempnam("", $aParams["prj"]);
$sDivname="outAjax";
$sUrl="?"
."&prj=".$aParams["prj"]
."&action=".$aParams["action"]
."&ajax=".$sTmpFile
;
$sUrlStartAction=$sUrl."&run=1";
// im Hintergrund Prozess ankicken
if (array_key_exists("run", $aParams)){
$oPrj->build($sOutDir."/".$aParams["ajax"]);
die();
}
// im Hintergrund Prozess ankicken
if (array_key_exists("ajax", $aParams)){
echo file_get_contents($sOutDir."/".$aParams["ajax"]);
die();
}
$sOut.='<div id="'.$sDivname.'">Moment...</div>'
. '<script>
// init build process
$.post( "'.$sUrlStartAction.'", function( data ) {
$( ".'.$sDivname.'" ).html( data );
});
function AjaxPolling(sUrl, sDivname, iRepeat){
$.post( sUrl, function( data ) {
$("#"+sDivname ).html( data );
});
if (iRepeat){
window.settimeout("AjaxPolling( \'"+sUrl+"\', \'"+sDivname+"\', \'"+iRepeat+"\')", iRepeat);
}
}
</script>';
// $sOut.=$oPrj->build($sTmpFile);
} else {
$sNext = $oPrj->getNextPhase();
$aPhaseData2 = $oPrj->getPhaseInfos($sNext);
......@@ -96,9 +138,9 @@ if (array_key_exists("confirm", $aParams)) {
}
$sOut.='<hr>' . aHome() . ' ' . aPrjHome();
$sOut.='<hr>' . aPrjHome();
// -- Ausgabe
$sPhpOut = $sOut;
echo $sOut;
?>
......@@ -17,7 +17,7 @@ require_once("./classes/project.class.php");
$oPrj = new project($sPrj);
$sPhpOut = '
$sOut = '
<h3>Archive Dir: ' . $aConfig['archiveDir'] . '</h3>
deleted:<br>
......@@ -27,6 +27,9 @@ $sPhpOut = '
<h3>Builds Dir: ' . $aConfig['buildDir'] . '/[project]/</h3>
<pre>' . print_r($oPrj->cleanupBuilds(), true) . '</pre>
<hr>' . aHome() .' '. aPrjHome();
<hr>' . aPrjHome();
// -- Ausgabe
echo $sOut;
?>
......@@ -66,9 +66,9 @@ if (array_key_exists("confirm", $aParams)) {
}
$sOut.='<hr>' . aHome() .' '. aPrjHome();
$sOut.='<hr>' . aPrjHome();
// -- Ausgabe
$sPhpOut = $sOut;
echo $sOut;
?>
......@@ -17,31 +17,35 @@ $aClasses=array(
"formgen"=>array("name"=>"formgen", "info" => "Zeichnen von FORM Elementen"),
);
$sPhpOut='';
$sPhpOut.='<a href="/deployment/all/doc/">Start</a> | ';
$sOut='';
$sOut.='<a href="/deployment/all/doc/">Start</a> | ';
foreach ($aClasses as $sClassfile=>$aInfos){
$sPhpOut.='<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a> | ';
$sOut.='<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a> | ';
}
$sPhpOut.= '<hr>';
$sOut.= '<hr>';
if (array_key_exists("par3", $aParams)) {
$sClass=$aParams["par3"];
if (!array_key_exists($sClass, $aClasses)){
$sPhpOut.= getBox("error", "Die Doku kann nicht angezeigt werden. Eine Klasse &quot;$sClass&quot; ist nicht konfiguriert in ". __FILE__ .".");
$sOut.= getBox("error", "Die Doku kann nicht angezeigt werden. Eine Klasse &quot;$sClass&quot; ist nicht konfiguriert in ". __FILE__ .".");
} else {
require_once("./classes/$sClass.class.php");
$o=new classinfos($aClasses[$sClass]["name"]);
$sPhpOut.=$aClasses[$sClass]["info"] . $o->render();
$sOut.=$aClasses[$sClass]["info"] . $o->render();
}
} else {
$sPhpOut.='Wähle eine Klasse.<ul>';
$sOut.='Wähle eine Klasse.<ul>';
foreach ($aClasses as $sClassfile=>$aInfos){
$sPhpOut.='<li>'
$sOut.='<li>'
. '<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a>'
. ' ' . $aInfos["info"]
. '</li>';
}
$sPhpOut.='</ul>';
$sOut.='</ul>';
}
// -- Ausgabe
echo $sOut;
?>
......@@ -19,11 +19,11 @@ if (!array_key_exists("prj", $aParams)) {
require_once("./classes/projectlist.class.php");
$oPrjList = new projectlist();
$sPhpOut = $oPrjList->renderOverview();
$sOut = $oPrjList->renderOverview();
} else {
require_once("./classes/project.class.php");
$oPrj = new project($aParams["prj"]);
$sPhpOut = '
$sOut = '
<div class="infobox" style="float: right;">
<h3>Steckbrief</h3>
' . $oPrj->renderProjektInfos() . '
......@@ -33,7 +33,7 @@ if (!array_key_exists("prj", $aParams)) {
<h3>Phasen</h3>';
if ($oPrj->getActivePhases()) {
$sPhpOut.='
$sOut.='
<div class="tabbable">
<ul class="nav nav-tabs" style="float: left; width: 50%;">
<li class="active"><a href="#tab1" data-toggle="tab">Phasen</a></li>
......@@ -54,10 +54,12 @@ if (!array_key_exists("prj", $aParams)) {
</div>
</div>';
} else {
$sPhpOut.=getBox("info", "Es wurde noch keine URL in keiner der Phasen definiert") .
$sOut.=getBox("info", "Es wurde noch keine URL in keiner der Phasen definiert") .
$oPrj->renderLink("setup");
}
$sPhpOut .= '<div style="clear: both"></div><hr>' . aHome();
$sOut .= '<div style="clear: both"></div><hr>' . aHome();
}
//
echo $sOut;
?>
......@@ -45,17 +45,20 @@ if ($sPhase) {
</tbody>
</table>
';
/*
if ($sFirst == $sPhase) {
$sOut.='<br><h3>weitere Aktionen</h3>' . $oPrj->renderLink("build");
}
*
*/
} else {
$sOut.=getBox("error", 'ERROR: missing name of the phase.');
}
$sOut.='<hr>' . aHome() .' '. aPrjHome();
$sOut.= '<hr>' .aPrjHome();
// -- Ausgabe
$sPhpOut = $sOut;
echo $sOut;
?>
......@@ -54,8 +54,8 @@ if ($aParams["prj"] == "all") {
$sOut.=$oPrj->renderProjectSetup();
}
$sOut.='<hr>' . aHome() .' '. aPrjHome();
$sOut.='<hr>' . aPrjHome();
// -- Ausgabe
$sPhpOut = $sOut;
echo $sOut;
?>
......@@ -283,14 +283,5 @@ function enterDeployinfos() {
return $sOut;
}
function getChecksumDiv($sText) {
return '<div style="background: ' . getChecksumColor($sText) . '; width: 20px; height: 20px;"> </div>';
}
function getChecksumColor($sText) {
$sReturn = '';
$s = md5($sText);
return "#" . substr($s, 0, 2) . substr($s, 2, 2) . substr($s, 4, 2);
}
?>
......@@ -36,7 +36,14 @@ if (array_key_exists("action", $aParams)) {
// ------ action
$sActionFile = __DIR__ . '/act_' . $sAction . ".php";
include($sActionFile);
ob_start();
if (!@include($sActionFile)) {
include("./pages/error_404.php");
}
$sPhpOut = ob_get_contents();
ob_end_clean();
// ------ Ausgabe
$sPhpOut = '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment