Skip to content
Snippets Groups Projects
Commit 07bcd0ff authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'projects-in-ldap' into 'master'

Projects in ldap

See merge request !16
parents 21246c7a b641e871
No related branches found
No related tags found
No related merge requests found
......@@ -172,7 +172,7 @@ class projectlist extends base{
/**
* filter table and tiles by filtertext
*/
function filterTable(){
function filterTableByTyping(){
var sVisible="";
var sSearch=$("#efilter").val();
localStorage.setItem("efilter", sSearch);
......@@ -233,7 +233,7 @@ class projectlist extends base{
if (localStorage.getItem("efilter") && localStorage.getItem("efilter")!=\'null\') {
$("#efilter").val(localStorage.getItem("efilter"));
window.setTimeout("filterTable();", 10);
window.setTimeout("filterTableByTyping();", 10);
}
if (localStorage.getItem("role") && localStorage.getItem("role")!=\'null\') {
$("#rolefilter").val(localStorage.getItem("role"));
......@@ -266,7 +266,7 @@ class projectlist extends base{
// $("#phasefilter").val("");
filterOverviewTable();
$("#efilter").val("");
window.setTimeout("filterTable();", 10);
window.setTimeout("filterTableByTyping();", 10);
$("#rolefilter").val("");
window.setTimeout("setrole();", 20);
showResetbtn();
......@@ -289,9 +289,9 @@ class projectlist extends base{
<input type="text" id="efilter" name="efilter"
class="form-control"
style="width: 150px;"
onchange="filterTable();"
onKeypress="filterTable(); "
onKeyup="filterTable(); "
onchange="filterTableByTyping();"
onKeypress="filterTableByTyping(); "
onKeyup="filterTableByTyping(); "
title="' . t("overview-textsearch-hint") . '"
>
......
......@@ -18,7 +18,7 @@
* $oVersion = new valuestore();
*
* to delete values for a single place:
* $oVersion->setProject("", $this->_aPrjConfig["fileprefix"]$sPhase, $sPlace);
* $oVersion->setProject("", $this->_aPrjConfig["fileprefix"], $sPhase, $sPlace);
* $aVersions=$oVersion->deleteValues();
*
* to delete all version items for a whole whole project (packages) in all phases
......@@ -338,13 +338,14 @@ class valuestore {
// ----------------------------------------------------------------------
/**
* init before setting or getting
* init a "position" before getting or updating deleting a value
*
* @param string $sProject project id
* @param string $sPackage package id
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place()
* @param string $sHost
* @return type
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public function setProject($sProject, $sPackage, $sPhase=false, $sPlace=false, $sHost=false){
$this->sProject=preg_replace('/[^a-z\-\_0-9]/', '' ,$sProject);
......@@ -352,12 +353,31 @@ class valuestore {
return $this->sProject;
}
/**
* set a package (and more granular items)
* @see setProject()
*
* @param string $sPackage package id
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public function setPackage($sPackage, $sPhase, $sPlace=false, $sHost=false){
$this->sPackage=preg_replace('/[^a-z\-\_0-9]/', '' ,$sPackage);
$this->setPhase($sPhase, $sPlace, $sHost);
return $this->sPackage;
}
/**
* set a phase (and more granular items)
* @see setProject()
*
* @param string $sPhase phase (preview|stage|live)
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public function setPhase($sPhase, $sPlace=false, $sHost=false){
if (!$this->sProject && !$this->sPackage){
$this->_quit(__FUNCTION__ , "ERROR: you need to set a project. Use the setProject() method to do so.");
......@@ -371,6 +391,14 @@ class valuestore {
return $this->sPhase;
}
/**
* set a place (and host)
* @see setProject()
*
* @param string $sPlace place (onhold|ready2install|deployed)
* @param string $sHost hostname (for place deployed)
* @return type string
*/
public function setPlace($sPlace, $sHost=false){
if ((!$this->sProject && !$this->sPackage)){
$this->_quit(__FUNCTION__ , "ERROR: you need to set a project and phase. Use the setProject() method to do so.");
......@@ -387,6 +415,13 @@ class valuestore {
return $this->sPlace;
}
/**
* set a host for place "deployed"
* @see setProject()
*
* @param string $sHost hostname
* @return type string
*/
public function setHost($sHost=false){
if ((!$this->sProject && !$this->sPackage)){
$this->_quit(__FUNCTION__ , "ERROR: you need to set a project, phase and place. Use the setProject() method to do so.");
......@@ -423,11 +458,6 @@ class valuestore {
return true;
}
/**
* delete values
* @return boolean
*/
/**
* delete values from value store. You need to call setProject() to set
* project or package and optional phase, place, host. Then call this delete
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment