summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e85940a)
raw | patch | inline | side by side (parent: e85940a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Feb 2010 09:45:50 +0000 (09:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 26 Feb 2010 09:45:50 +0000 (09:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15733 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_pluglist.inc | patch | blob | history |
index 0cf5f9fdcbb05b118358b253e55969c68b35ff6d..0e37c5daa588fdffafc880fd1f88980586a7359a 100644 (file)
}
- /*! \brief Generates an array containing plugin names (headlines) and theirs ids.
- * This is just used in the helpviewer.php
- */
- function gen_headlines()
- {
- $ret = array();
- if(count($this->headlines) == 0){
- foreach($this->config->data['MENU'] as $headline => $plugins){
- foreach( $plugins as $id => $plug){
- if (plugin_available($plug['CLASS'])){
- $attrs = (get_class_vars($plug['CLASS']));
- $ret[$id]['HEADLINE'] = $headline;
- $ret[$id]['NAME'] = $attrs['plHeadline'];
- }
- }
- }
- $this->headlines = $ret;
- }
- return($this->headlines);
- }
-
-
/*! \brief Check the accessibility of the configured plugins.
* We may simply have now permissions to access some plugins
* but some may be broken or missing!.
$this->allowed_plugins[$index] = $index;
$class= "";
if($id == count($plug)) $class=" class='menu-last' \n ";
- $menu .= "\n <li $class onClick='return question(\"".
- _("You are currently editing a database entry. Do you want to dismiss the changes?")."\",
- \"$href\");'>".$plHeadline."</li>";
+ $menu .= "\n <li $class onClick='return openPlugin({$index});'>".$plHeadline."</li>";
}
$menu.= "\n </ul>";
$menu.= "\n <div></div>\n";
$this->menu = $menu;
}
+ // Add javascript method to print out warning messages while leaving an unsaved form.
+ // We do it in here to get the string translated.
+ $this->menu .= "
+ <script language='javascript' type='text/javascript'>
+ function openPlugin(id){
+ return question(\""._("You are currently editing a database entry. Do you want to dismiss the changes?")."\",
+ \"main.php?plug=\" + id + \"&reset=1\");
+ }
+ </script>
+ ";
+
// Return the generated/cached gosa menu.
return ($this->menu);
}
if(!isset($this->dirlist[$index])){
return ("");
}
- echo "../".$this->dirlist[$index];
return ("../".$this->dirlist[$index]);
}
$this->iconmenu ="";
}
+
+ /*! \brief Generates an array containing plugin names (headlines) and theirs ids.
+ * This is just used in the helpviewer.php
+ */
+ function gen_headlines()
+ {
+ $ret = array();
+ if(count($this->headlines) == 0){
+ foreach($this->config->data['MENU'] as $headline => $plugins){
+ foreach( $plugins as $id => $plug){
+ if (plugin_available($plug['CLASS'])){
+ $attrs = (get_class_vars($plug['CLASS']));
+ $ret[$id]['HEADLINE'] = $headline;
+ $ret[$id]['NAME'] = $attrs['plHeadline'];
+ }
+ }
+ }
+ $this->headlines = $ret;
+ }
+ return($this->headlines);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>