Example #1
0
function menu_update_entries(&$menu_list)
{
    global $menu_update_map;
    for ($idx = 0; $idx < count($menu_list); $idx++) {
        $entry = $menu_list[$idx];
        if (!isset($entry->url)) {
            if (isset($menu_update_map[$entry->label])) {
                $menu_update_map[$entry->label]($entry);
            }
        }
        // Translate the labels
        $entry->label = xlt($entry->label);
        // Recursive update of children
        if (isset($entry->children)) {
            menu_update_entries($entry->children);
        }
    }
}
Example #2
0
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
 *
 * @package OpenEMR
 * @author  Kevin Yeh <*****@*****.**>
 * @link    http://www.open-emr.org
 */
require_once "menu_data.php";
require_once "menu_updates.php";
require_once "menu_db.php";
$menu_parsed = load_menu("default");
if (count($menu_parsed) == 0) {
    $menu_parsed = json_decode($menu_json);
}
menu_update_entries($menu_parsed);
$menu_restrictions = array();
menu_apply_restrictions($menu_parsed, $menu_restrictions);
?>
<script type="text/javascript">
    
    function menu_entry(object)
    {
        var self=this;
        self.label=ko.observable(object.label);

        self.header=false;
        if('url' in object )
        {
            self.url=ko.observable(object.url);
            self.header=false;