public function navigate_title() { global $website; global $DB; $DB->query('SELECT * FROM nv_websites WHERE 1 = 1 ORDER BY name ASC'); $websites = $DB->result(); $extruder = ''; $main_title = ''; $main_url = ''; foreach ($websites as $web) { $style = ' display: none; '; $ws = new website(); $ws->load_from_resultset(array($web)); if ($ws->id == $website->id) { $style = ' display: block; '; } $url = $ws->absolute_path(true); if ($ws->id == $website->id) { $main_title = $ws->name; $main_url = $url; $main_config_url = '?fid=websites&act=2&id=' . $ws->id; } else { $extruder .= '<div class="voice {}" style=" display: none; "> <a href="' . $url . '" target="_blank"><img align="absmiddle" src="' . NAVIGATE_URL . '/img/icons/silk/house_link.png" width="16px" height="16px" /></a> <a class="label" href="?act=0&wid=' . $ws->id . '">' . $ws->name . '</a> </div>'; } } $extruder .= '<div style="clear: both;"></div>'; if (!empty($main_title)) { // mb extruder $this->add_content(' <div id="navigate-website-selector-top" class="{title:\'' . str_replace("'", "\\'", htmlspecialchars($main_title)) . '\'}"> ' . $extruder . ' </div> <a id="navigate-website-main-link" href="' . $main_url . '" target="_blank" style=" margin-right: 5px; display: none; "><img align="absmiddle" src="' . NAVIGATE_URL . '/img/icons/silk/house_link.png" width="16px" height="16px" /></a> '); $this->add_script(' $("#navigate-website-selector-top").buildMbExtruder( { positionFixed:true, width:400, sensibility:800, position:"top", // left, right, bottom extruderOpacity: 1, // was 0.9 for better integration (FF 8.0 problems) flapDim:100, textOrientation:"bt", // or "tb" (top-bottom or bottom-top) onExtOpen:function() {}, onExtContentLoad:function(){}, onExtClose:function(){}, hidePanelsOnClose:true, autoCloseTime:3000, // 0=never slideTimer:300 }); '); $this->add_script(' $("#navigate-website-selector-top").find(".flapLabel").css("padding-left", "21px"); $("#navigate-website-selector-top div.flap").addClass("ui-corner-bottom"); $("#navigate-website-selector-top div.flap").css("opacity", 1); $("#navigate-website-selector-top").on("click", ".silk-sprite", function(e) { setTimeout( function() { $("#navigate-website-selector-top").closeMbExtruder(); }, 1000 ); }); '); } }