summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39abe5f)
raw | patch | inline | side by side (parent: 39abe5f)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 08:15:06 +0000 (08:15 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 08:15:06 +0000 (08:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16712 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history | |
gosa-core/include/class_listing.inc | patch | blob | history |
index 606979b6ce4a6ed49f12f56be69983b02a877eee..42048258fbf8cd34d15e0bbb72c14743d2da032d 100644 (file)
}
// Save scope if needed
- if ($this->scopeMode == "auto" && isset($_POST['filter']) && $_POST['filter'] == "toggle-subtree") {
+ if ($this->scopeMode == "auto" && isset($_POST['act']) && $_POST['act'] == "toggle-subtree") {
$this->scope= ($this->scope == "one")?"sub":"one";
}
// Switch filter?
- if (isset($_POST['filter'])) {
+ if (isset($_POST['act'])) {
foreach ($this->searches as $tag => $cfg) {
- if ($_POST['filter'] == "filter-$tag") {
+ if ($_POST['act'] == "filter-$tag") {
$this->setSearch($tag);
break;
}
function renderFilterMenu()
{
// Load shortcut
- $result= "<input type='hidden' name='filter' id='filter' value=''><div style='display:none'><input type='submit' name='exec_filter' id='exec_filter' value=''></div>".
- "<ul class='level1' id='filter-root'><li><a href='#'>".image("images/filter.png").image("images/lists/sort-down.png")."</a>";
+ $result= "<ul class='level1' id='filter-root'><li><a href='#'>".image("images/filter.png").image("images/lists/sort-down.png")."</a>";
// Build ul/li list
$separator= " style='border-top:1px solid #AAA' ";
if ($tag == $this->search) {
$result.= "<li><a href='#'>".image("images/checked.png")." "._($config['label'])."</a></li>";
} else {
- $result.= "<li><a href='#' onClick='document.getElementById(\"filter\").value= \"filter-$tag\";mainform.submit();'>".image("images/empty.png")." "._($config['label'])."</a></li>";
+ $result.= "<li><a href='#' onClick='\$(\"act\").value= \"filter-$tag\";\$(\"exec_act\").click();'>".image("images/empty.png")." "._($config['label'])."</a></li>";
}
}
if ($tag == $this->search) {
$result.= "<li".($first?$separator:"")."><a href='#'>".image("images/checked.png")." "._($config['description'])."</a></li>";
} else {
- $result.= "<li".($first?$separator:"")."><a href='#' onClick='document.getElementById(\"filter\").value= \"filter-$tag\";mainform.submit();'>".image("images/empty.png")." "._($config['description'])."</a></li>";
+ $result.= "<li".($first?$separator:"")."><a href='#' onClick='\$(\"act\").value= \"filter-$tag\";\$(\"exec_act\").click();'>".image("images/empty.png")." "._($config['description'])."</a></li>";
}
$first= false;
// Render scope if set to auto
if ($this->scopeMode == "auto") {
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"filter\").value= \"toggle-subtree\";mainform.submit();'>".($this->scope=="one"?image("images/empty.png"):image("images/checked.png"))." "._("Search in subtrees")."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"toggle-subtree\";\$(\"exec_act\").click();'>".($this->scope=="one"?image("images/empty.png"):image("images/checked.png"))." "._("Search in subtrees")."</a></li>";
}
// Edit filter menu
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"filter\").value= \"config-filter\";mainform.submit();'>".image("images/configure.png")." "._("Edit filters")."...</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"config-filter\";\$(\"exec_act\").click();'>".image("images/configure.png")." "._("Edit filters")."...</a></li>";
$result.= "</ul>";
index 0b7219cc5218e1f66ddbc861f78969ee9175bbde..10fec9988334b15222a27ffd96ac1fd712a619fa 100644 (file)
// Render entry elseways
if (isset($action['label'])){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"".$action['name']."\";document.getElementById(\"exec_act\").click();'>$img"._($action['label'])."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"".$action['name']."\";\$(\"exec_act\").click();'>$img"._($action['label'])."</a></li>";
}
// Check for special types
// Copy entry
if($copy){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"copy\";document.getElementById(\"exec_act\").click();'>".image('images/lists/copy.png')." "._("Copy")."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"copy\";\$(\"exec_act\").click();'>".image('images/lists/copy.png')." "._("Copy")."</a></li>";
$separator= "";
}
// Cut entry
if($cut){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"cut\";document.getElementById(\"exec_act\").click();'>".image("images/lists/cut.png")." "._("Cut")."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"cut\";\$(\"exec_act\").click();'>".image("images/lists/cut.png")." "._("Cut")."</a></li>";
$separator= "";
}
}
// Draw entries that allow pasting entries
if($paste){
if($this->copyPasteHandler->entries_queued()){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"paste\";document.getElementById(\"exec_act\").click();'>".image("images/lists/paste.png")." "._("Paste")."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"paste\";\$(\"exec_act\").click();'>".image("images/lists/paste.png")." "._("Paste")."</a></li>";
}else{
$result.= "<li$separator><a href='#'>".image('images/lists/paste-grey.png')." "._("Paste")."</a></li>";
}
// Draw icons according to the restore flag
if($restore){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value= \"restore\";document.getElementById(\"exec_act\").click();'>".image('images/lists/restore.png')." "._("Restore snapshots")."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value= \"restore\";\$(\"exec_act\").click();'>".image('images/lists/restore.png')." "._("Restore snapshots")."</a></li>";
}else{
$result.= "<li$separator><a href='#'>".image('images/lists/restore-grey.png')." "._("Restore snapshots")."</a></li>";
}
// Export CVS as build in exporter
foreach ($this->exporter as $action => $exporter) {
- $result.= "<li><a href='#' onClick='document.getElementById(\"act\").value= \"$action\";document.getElementById(\"exec_act\").click();'>".image($exporter['image'])." ".$exporter['label']."</a></li>";
+ $result.= "<li><a href='#' onClick='\$(\"act\").value= \"$action\";\$(\"exec_act\").click();'>".image($exporter['image'])." ".$exporter['label']."</a></li>";
}
// Finalize list
$events= DaemonEvent::get_event_types_by_category($this->categories);
if(isset($events['BY_CLASS']) && count($events['BY_CLASS'])){
foreach($events['BY_CLASS'] as $name => $event){
- $result.= "<li$separator><a href='#' onClick='document.getElementById(\"act\").value=\"$name\";document.getElementById(\"exec_act\").click();'>".$event['MenuImage']." ".$event['s_Menu_Name']."</a></li>";
+ $result.= "<li$separator><a href='#' onClick='\$(\"act\").value=\"$name\";\$(\"exec_act\").click();'>".$event['MenuImage']." ".$event['s_Menu_Name']."</a></li>";
$separator= "";
}
}