Changeset 5398

Show
Ignore:
Timestamp:
12/10/07 13:43:31 (1 year ago)
Author:
p_lindheimer
Message:

add delguielem to allow hook to remove an element added from another module, minor formatting changes also

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/components.class.php

    r5275 r5398  
    6060        } 
    6161 
     62        function delguielem($section, $elemname) { 
     63                switch ($section) { 
     64                        case '_top': 
     65                                        foreach ($this->_guielems_top as $index1 => $elements) { 
     66                                                foreach ($elements as $index2 => $element) { 
     67                                                        if ($element->_elemname == $elemname) { 
     68                                                                unset($this->_guielems_top[$index1][$index2]); 
     69                                                                return true; 
     70                                                        } 
     71                                                } 
     72                                        } 
     73                                break; 
     74                        case '_bottom': 
     75                                        foreach ($this->_guielems_bottom as $index1 => $elements) { 
     76                                                foreach ($elements as $index2 => $element) { 
     77                                                        if ($element->_elemname == $elemname) { 
     78                                                                unset($this->_guielems_bottom[$index1][$index2]); 
     79                                                                return true; 
     80                                                        } 
     81                                                } 
     82                                        } 
     83                                break; 
     84                        default: 
     85                                        if (isset($this->_guielems_middle[$section])) { 
     86                                                foreach ($this->_guielems_middle[$section] as $index1 => $elements) { 
     87                                                        foreach ($elements as $index2 => $element) { 
     88                                                                if ($element->_elemname == $elemname) { 
     89                                                                        unset($this->_guielems_bottom[$index1][$index2]); 
     90                                                                        return true; 
     91                                                                } 
     92                                                        } 
     93                                                } 
     94                                        } 
     95                        } 
     96                return false; 
     97        } 
     98 
    6299        function addjsfunc($function, $jstext, $sortorder = 5) { 
    63100                if ( $sortorder < 0 || $sortorder > 9 ) { 
     
    275312                                        $htmlout .= "\t<tr>\n"; 
    276313                                        $htmlout .= "\t\t<td colspan=\"2\">"; 
    277                                         $htmlout .= "<h5><br>" . _($section) . "</h5><hr>"; 
     314                                        $htmlout .= "<h5>" . _($section) . "</h5><hr>"; 
    278315                                        $htmlout .= "</td>\n"; 
    279316                                        $htmlout .= "\t</tr>\n"; 
     
    295332                                $htmlout .= "\t<tr>\n"; 
    296333                                $htmlout .= "\t\t<td colspan=\"2\">"; 
    297                                 $htmlout .= "&nbsp;"; 
    298334                                $htmlout .= "</td>\n"; 
    299335                                $htmlout .= "\t</tr>\n"; 
     
    316352                $htmlout .= "\t<tr>\n"; 
    317353                $htmlout .= "\t\t<td colspan=\"2\">"; 
    318                 $htmlout .= "<br><br><h6>"; 
     354                $htmlout .= "<h6>"; 
    319355                $htmlout .= "<input name=\"Submit\" type=\"submit\" value=\""._("Submit")."\">"; 
    320356                $htmlout .= "</h6>"; 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads