updates till now

Dieser Commit ist enthalten in:
Oldperl 2017-08-09 20:03:52 +00:00
Ursprung c21108e5b0
Commit 16a806d17b
7 geänderte Dateien mit 188 neuen und 183 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* *
* @package Core * @package Core
@ -6,21 +7,33 @@
* *
* $Id$ * $Id$
*/ */
// security check // security check
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
class cApiNavMainCollection extends ItemCollection { class cApiNavMainCollection extends ItemCollection {
public function __construct() { public function __construct() {
global $cfg; global $cfg;
parent::__construct(cRegistry::getConfigValue('tab', 'nav_main'), 'idnavm'); parent::__construct(cRegistry::getConfigValue('tab', 'nav_main'), 'idnavm');
$this->_setItemClass("cApiNavMain"); $this->_setItemClass("cApiNavMain");
} }
public function create($sName, $sLocation, $iId = NULL) {
$oItem = $this->createNewItem($iId);
if ($oItem->isLoaded()) {
$oItem->set('name', $name);
$oItem->set('location', $location);
$oItem->store();
return $oItem;
}
}
} }
class cApiNavMain extends Item { class cApiNavMain extends Item {
public function __construct($mId = false) { public function __construct($mId = false) {
global $cfg; global $cfg;
parent::__construct(cRegistry::getConfigValue('tab', 'nav_main'), 'idnavm'); parent::__construct(cRegistry::getConfigValue('tab', 'nav_main'), 'idnavm');
@ -28,4 +41,5 @@ class cApiNavMain extends Item {
$this->loadByPrimaryKey($mId); $this->loadByPrimaryKey($mId);
} }
} }
}
}

Datei anzeigen

@ -1153,7 +1153,14 @@ abstract class ItemCollection extends cItemBaseAbstract
public function createNewItem($aData = NULL) public function createNewItem($aData = NULL)
{ /* @var $oDb DB_ConLite */ { /* @var $oDb DB_ConLite */
$oDb = $this->_getSecondDBInstance(); $oDb = $this->_getSecondDBInstance();
$iNextId = $oDb->nextid($this->table); if(is_null($aData) || empty($aData)) {
$iNextId = $oDb->nextid($this->table);
} else if(is_array($aData) && key_exists($this->primaryKey, $aData)) {
$iNextId = (int) $aData[$this->primaryKey];
} else {
$iNextId = (int) $aData;
}
$sql = 'INSERT INTO `%s` (%s) VALUES (%d)'; $sql = 'INSERT INTO `%s` (%s) VALUES (%d)';
$oDb->query($sql, $this->table, $this->primaryKey, $iNextId); $oDb->query($sql, $this->table, $this->primaryKey, $iNextId);
return $this->loadItem($iNextId); return $this->loadItem($iNextId);

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -32,15 +33,13 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
cInclude('includes', 'functions.api.string.php'); cInclude('includes', 'functions.api.string.php');
cInclude('includes', 'functions.api.images.php'); cInclude('includes', 'functions.api.images.php');
/** /**
* Backend navigaton class. Renders the header navigation document containing the navigtion structure. * Backend navigaton class. Renders the header navigation document containing the navigtion structure.
* *
@ -62,7 +61,6 @@ class Contenido_Navigation {
*/ */
var $data = array(); var $data = array();
/** /**
* Constructor. Loads the XML language file using XML_Doc. * Constructor. Loads the XML language file using XML_Doc.
*/ */
@ -80,7 +78,6 @@ class Contenido_Navigation {
} }
} }
/** /**
* Extracts caption from the XML language file including plugins extended multilang version. * Extracts caption from the XML language file including plugins extended multilang version.
* *
@ -98,25 +95,25 @@ class Contenido_Navigation {
# second is xpath location in xml file # second is xpath location in xml file
if (strstr($location, ';')) { if (strstr($location, ';')) {
$locs = explode(';', $location); $locs = explode(';', $location);
$file = trim($locs[0]); $file = trim($locs[0]);
$xpath = trim($locs[1]); $xpath = trim($locs[1]);
$filepath = explode('/', $file); $filepath = explode('/', $file);
$counter = count($filepath)-1; $counter = count($filepath) - 1;
if ($filepath[$counter] == '') { if ($filepath[$counter] == '') {
unset($filepath[$counter]); unset($filepath[$counter]);
$counter--; $counter--;
} }
if(strstr($filepath[$counter], '.xml')) { if (strstr($filepath[$counter], '.xml')) {
$filename = $filepath[$counter]; $filename = $filepath[$counter];
unset($filepath[$counter]); unset($filepath[$counter]);
$counter--; $counter--;
} }
$filepath[($counter+1)] = ''; $filepath[($counter + 1)] = '';
$filepath = implode('/', $filepath); $filepath = implode('/', $filepath);
@ -129,7 +126,6 @@ class Contenido_Navigation {
} }
} }
$caption = $this->plugxml->valueOf($xpath); $caption = $this->plugxml->valueOf($xpath);
} else { } else {
$caption = $this->xml->valueOf($location); $caption = $this->xml->valueOf($location);
} }
@ -137,20 +133,19 @@ class Contenido_Navigation {
return $caption; return $caption;
} }
/**
/** * Reads and fills the navigation structure data
* Reads and fills the navigation structure data *
* * @return void
* @return void */
*/
function _buildHeaderData() { function _buildHeaderData() {
global $cfg, $perm, $belang; global $cfg, $perm, $belang;
$db = new DB_ConLite(); $db = new DB_ConLite();
$db2 = new DB_ConLite(); $db2 = new DB_ConLite();
# Load main items # Load main items
$sql = "SELECT idnavm, location FROM ".$cfg['tab']['nav_main']." ORDER BY idnavm"; $sql = "SELECT idnavm, location FROM " . $cfg['tab']['nav_main'] . " ORDER BY idnavm";
$db->query($sql); $db->query($sql);
@ -166,9 +161,9 @@ class Contenido_Navigation {
$sql = "SELECT $sql = "SELECT
a.location AS location, b.name AS area, b.relevant a.location AS location, b.name AS area, b.relevant
FROM FROM
".$cfg['tab']['nav_sub']." AS a, ".$cfg['tab']['area']." AS b " . $cfg['tab']['nav_sub'] . " AS a, " . $cfg['tab']['area'] . " AS b
WHERE WHERE
a.idnavm = '".$db->f('idnavm')."' AND a.idnavm = '" . $db->f('idnavm') . "' AND
a.level = '0' AND a.level = '0' AND
b.idarea = a.idarea AND b.idarea = a.idarea AND
a.online = '1' AND a.online = '1' AND
@ -180,13 +175,12 @@ class Contenido_Navigation {
while ($db2->next_record()) { while ($db2->next_record()) {
$area = $db2->f('area'); $area = $db2->f('area');
if ($perm->have_perm_area_action($area) || $db2->f('relevant') == 0){ if ($perm->have_perm_area_action($area) || $db2->f('relevant') == 0) {
# Extract names from the XML document. # Extract names from the XML document.
$name = $this->getName($db2->f('location')); $name = $this->getName($db2->f('location'));
$this->data[$db->f('idnavm')][] = array($name, $area); $this->data[$db->f('idnavm')][] = array($name, $area);
} }
} }
} }
# debugging information # debugging information
@ -195,7 +189,6 @@ class Contenido_Navigation {
} }
} }
/** /**
* Function to build the Contenido header document for backend * Function to build the Contenido header document for backend
* *
@ -208,7 +201,7 @@ class Contenido_Navigation {
$this->_buildHeaderData(); $this->_buildHeaderData();
$main = new Template(); $main = new Template();
$sub = new Template(); $sub = new Template();
$cnt = 0; $cnt = 0;
$t_sub = ''; $t_sub = '';
@ -224,7 +217,7 @@ class Contenido_Navigation {
foreach ($item as $key => $value) { foreach ($item as $key => $value) {
if (is_array($value)) { if (is_array($value)) {
$sub->set('s', 'SUBID', 'sub_'.$id); $sub->set('s', 'SUBID', 'sub_' . $id);
// create sub menu link // create sub menu link
$link = new cHTMLLink(); $link = new cHTMLLink();
@ -236,7 +229,7 @@ class Contenido_Navigation {
$link->setContent($value[0]); $link->setContent($value[0]);
if ($cfg['help'] == true) { if ($cfg['help'] == true) {
$sJsEvents .= "\n\t" . '$("#sub_' . $value[1] . '").click(function(){ $("#help").attr("data", "'.$value[1].'"); });'; $sJsEvents .= "\n\t" . '$("#sub_' . $value[1] . '").click(function(){ $("#help").attr("data", "' . $value[1] . '"); });';
} }
$sub->set('d', 'CAPTION', $link->render()); $sub->set('d', 'CAPTION', $link->render());
@ -257,7 +250,6 @@ class Contenido_Navigation {
$main->next(); $main->next();
$numSubMenus++; $numSubMenus++;
} else { } else {
# first entry in array is a main menu item # first entry in array is a main menu item
} }
@ -266,7 +258,7 @@ class Contenido_Navigation {
$t_sub .= $sub->generate($cfg['path']['templates'] . $cfg['templates']['submenu'], true); $t_sub .= $sub->generate($cfg['path']['templates'] . $cfg['templates']['submenu'], true);
$cnt ++; $cnt ++;
} }
if ($cfg['help'] == true) { if ($cfg['help'] == true) {
$sJsEvents .= "\n\t" . 'help.setArea("mycontenido");'; $sJsEvents .= "\n\t" . 'help.setArea("mycontenido");';
} }
@ -284,8 +276,8 @@ class Contenido_Navigation {
$oMyConLink->setTargetFrame('content'); $oMyConLink->setTargetFrame('content');
$oMyConLink->attachEventDefinition('help_mycontenido', 'onclick', 'help.setArea("mycontenido")'); $oMyConLink->attachEventDefinition('help_mycontenido', 'onclick', 'help.setArea("mycontenido")');
$oMyConLink->setLink($sess->url("frameset.php?area=mycontenido&frame=4")); $oMyConLink->setLink($sess->url("frameset.php?area=mycontenido&frame=4"));
$oMyConLink->setContent('<img src="'.$cfg['path']['contenido_fullhtml'].$cfg['path']['images'].'my_contenido.gif" border="0" alt="MyContenido" id="imgMyContenido" title="MyContenido">'); $oMyConLink->setContent('<img src="' . $cfg['path']['contenido_fullhtml'] . $cfg['path']['images'] . 'my_contenido.gif" border="0" alt="MyConLite" id="imgMyContenido" title="MyConLite">');
$main->set('s', 'MYCONTENIDO', $oMyConLink->render()); $main->set('s', 'MYCONLITE', $oMyConLink->render());
// info link // info link
$oInfoLink = new cHTMLLink(); $oInfoLink = new cHTMLLink();
@ -293,7 +285,7 @@ class Contenido_Navigation {
$oInfoLink->setTargetFrame('content'); $oInfoLink->setTargetFrame('content');
$oInfoLink->attachEventDefinition('help_info', 'onclick', 'help.setArea("info")'); $oInfoLink->attachEventDefinition('help_info', 'onclick', 'help.setArea("info")');
$oInfoLink->setLink($sess->url('frameset.php?area=info&frame=4')); $oInfoLink->setLink($sess->url('frameset.php?area=info&frame=4'));
$oInfoLink->setContent('<img src="'.$cfg['path']['contenido_fullhtml'].$cfg['path']['images'].'info.gif" border="0" alt="Info" title="Info" id="imgInfo">'); $oInfoLink->setContent('<img src="' . $cfg['path']['contenido_fullhtml'] . $cfg['path']['images'] . 'info.gif" border="0" alt="Info" title="Info" id="imgInfo">');
$main->set('s', 'INFO', $oInfoLink->render()); $main->set('s', 'INFO', $oInfoLink->render());
$main->set('s', 'LOGOUT', $sess->url('logout.php')); $main->set('s', 'LOGOUT', $sess->url('logout.php'));
@ -305,7 +297,7 @@ class Contenido_Navigation {
$oHelpLink->setClass('main'); $oHelpLink->setClass('main');
$oHelpLink->setLink('javascript://'); $oHelpLink->setLink('javascript://');
$oHelpLink->setEvent('click', 'callHelp($(\'#help\').attr(\'data\'));'); $oHelpLink->setEvent('click', 'callHelp($(\'#help\').attr(\'data\'));');
$oHelpLink->setContent('<img src="'.$cfg['path']['contenido_fullhtml'].$cfg['path']['images'].'but_help.gif" border="0" alt="Hilfe" title="Hilfe">'); $oHelpLink->setContent('<img src="' . $cfg['path']['contenido_fullhtml'] . $cfg['path']['images'] . 'but_help.gif" border="0" alt="Hilfe" title="Hilfe">');
$main->set('s', 'HELP', $oHelpLink->render()); $main->set('s', 'HELP', $oHelpLink->render());
} else { } else {
$main->set('s', 'HELP', ''); $main->set('s', 'HELP', '');
@ -321,9 +313,9 @@ class Contenido_Navigation {
} else { } else {
// set delay menu // set delay menu
$mouseOver = getEffectiveSetting('system', 'delaymenu_mouseover', 300); $mouseOver = getEffectiveSetting('system', 'delaymenu_mouseover', 300);
$mouseOot = getEffectiveSetting('system', 'delaymenu_mouseout', 1000); $mouseOot = getEffectiveSetting('system', 'delaymenu_mouseout', 1000);
$main->set('s', 'HEADER_MENU_OBJ', 'HeaderDelayMenu'); $main->set('s', 'HEADER_MENU_OBJ', 'HeaderDelayMenu');
$main->set('s', 'HEADER_MENU_OPTIONS', '{menuId: "main_0", subMenuId: "sub_0", mouseOverDelay: '.$mouseOver.', mouseOutDelay: '.$mouseOot.'}'); $main->set('s', 'HEADER_MENU_OPTIONS', '{menuId: "main_0", subMenuId: "sub_0", mouseOverDelay: ' . $mouseOver . ', mouseOutDelay: ' . $mouseOot . '}');
} }
$main->set('s', 'ACTION', $sess->url('index.php')); $main->set('s', 'ACTION', $sess->url('index.php'));
@ -334,30 +326,30 @@ class Contenido_Navigation {
if (strlen($sClientName) > 25) { if (strlen($sClientName) > 25) {
$sClientName = capiStrTrimHard($sClientName, 25); $sClientName = capiStrTrimHard($sClientName, 25);
} }
$client = Contenido_Security::toInteger($client);
if ( $client == 0 ) {
$sClientNameTemplate = '<b>' . i18n("Client") . ':</b> %s';
$main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientName));
} else {
$sClientNameTemplate = '<b>' . i18n("Client") . ':</b> <a href="%s" target="_blank">%s</a>';
$sClientName = $classclient->getClientName($client).' ('.$client.')';
$sClientUrl = $cfgClient[$client]["path"]["htmlpath"];
if ($clientImage !== false && $clientImage != "" && file_exists($cfgClient[$client]['path']['frontend'].$clientImage)) { $client = Contenido_Security::toInteger($client);
$sClientImageTemplate = '<img src="%s" alt="%s" title="%s" />'; if ($client == 0) {
$sClientNameTemplate = '<b>' . i18n("Client") . ':</b> %s';
$sThumbnailPath = capiImgScale($cfgClient[$client]['path']['frontend'].$clientImage, 80, 25, 0, 1); $main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientName));
$sClientImageTag = sprintf($sClientImageTemplate, $sThumbnailPath, $sClientName, $sClientName); } else {
$sClientNameTemplate = '<b>' . i18n("Client") . ':</b> <a href="%s" target="_blank">%s</a>';
$main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientUrl, $sClientImageTag));
} else { $sClientName = $classclient->getClientName($client) . ' (' . $client . ')';
$main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientUrl, $sClientName)); $sClientUrl = $cfgClient[$client]["path"]["htmlpath"];
}
} if ($clientImage !== false && $clientImage != "" && file_exists($cfgClient[$client]['path']['frontend'] . $clientImage)) {
$sClientImageTemplate = '<img src="%s" alt="%s" title="%s" />';
$main->set('s', 'CHOSENUSER', "<b>".i18n("User").":</b> ".$classuser->getRealname($auth->auth["uid"], true));
$sThumbnailPath = capiImgScale($cfgClient[$client]['path']['frontend'] . $clientImage, 80, 25, 0, 1);
$sClientImageTag = sprintf($sClientImageTemplate, $sThumbnailPath, $sClientName, $sClientName);
$main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientUrl, $sClientImageTag));
} else {
$main->set('s', 'CHOSENCLIENT', sprintf($sClientNameTemplate, $sClientUrl, $sClientName));
}
}
$main->set('s', 'CHOSENUSER', "<b>" . i18n("User") . ":</b> " . $classuser->getRealname($auth->auth["uid"], true));
$main->set('s', 'SID', $sess->id); $main->set('s', 'SID', $sess->id);
$main->set('s', 'MAINLOGINLINK', $sess->url("frameset.php?area=mycontenido&frame=4")); $main->set('s', 'MAINLOGINLINK', $sess->url("frameset.php?area=mycontenido&frame=4"));
@ -371,7 +363,6 @@ class Contenido_Navigation {
$main->generate($cfg['path']['templates'] . $cfg['templates']['header']); $main->generate($cfg['path']['templates'] . $cfg['templates']['header']);
} }
/** /**
* Renders the language select box * Renders the language select box
* *
@ -379,8 +370,7 @@ class Contenido_Navigation {
* *
* @return string * @return string
*/ */
function _renderLanguageSelect() function _renderLanguageSelect() {
{
global $cfg, $client, $lang; global $cfg, $client, $lang;
$tpl = new Template(); $tpl = new Template();
@ -402,13 +392,13 @@ class Contenido_Navigation {
if ($availableLanguages->count() > 0) { if ($availableLanguages->count() > 0) {
while ($myLang = $availableLanguages->nextAccessible()) { while ($myLang = $availableLanguages->nextAccessible()) {
$key = $myLang->get('idlang'); $key = $myLang->get('idlang');
$value = $myLang->get('name'); $value = $myLang->get('name');
// I want to get rid of such silly constructs very soon :) // I want to get rid of such silly constructs very soon :)
$sql = "SELECT idclient FROM ".$cfg['tab']['clients_lang']." WHERE $sql = "SELECT idclient FROM " . $cfg['tab']['clients_lang'] . " WHERE
idlang = '".Contenido_Security::toInteger($key)."'"; idlang = '" . Contenido_Security::toInteger($key) . "'";
$db->query($sql); $db->query($sql);
@ -425,7 +415,7 @@ class Contenido_Navigation {
} }
$tpl->set('d', 'VALUE', $key); $tpl->set('d', 'VALUE', $key);
$tpl->set('d', 'CAPTION', $value.' ('.$key.')'); $tpl->set('d', 'CAPTION', $value . ' (' . $key . ')');
$tpl->next(); $tpl->next();
} }
} }
@ -438,4 +428,5 @@ class Contenido_Navigation {
return $tpl->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true); return $tpl->generate($cfg['path']['templates'] . $cfg['templates']['generic_select'], true);
} }
} }

Datei anzeigen

@ -53,7 +53,6 @@ class ModRewrite extends ModRewriteBase {
*/ */
public static function initialize($clientId) { public static function initialize($clientId) {
mr_loadConfiguration($clientId, true); mr_loadConfiguration($clientId, true);
parent::initialize();
self::$_db = new DB_Contenido(); self::$_db = new DB_Contenido();
self::$_lookupTable = array(); self::$_lookupTable = array();
} }

Datei anzeigen

@ -1,112 +0,0 @@
var display_url;
function createMenu (menuname, items, links)
{
document.writeln('<div id="'+menuname+'" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>');
document.writeln('<div class="skin1">Context Menu</div>');
for (var i=0;i<items.length;i++)
{
if (items[i] == "--")
{
document.writeln('<hr style="line-height:4px;border: 0px;border-bottom:1px;border-color: black; border-style: solid;">');
} else {
document.writeln('<div class="menuitems" url="'+links[i]+'">'+items[i]+'</div>');
}
}
document.writeln('</div>');
document.getElementById(menuname).style.display='';
}
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
//var menuobj=document.getElementById("ie5menu")
function showmenuie5(e){
if (ie5)
{
menuobj = document.getElementById(window.event.srcElement.getAttribute("helpid"));
} else
{
menuobj = document.getElementById(e.target.getAttribute("helpid"));
}
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX
var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX
//same concept with the vertical position
if (bottomedge<menuobj.offsetHeight)
menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
else
menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY
menuobj.style.visibility="visible"
return false;
return false
}
function hidemenuie5(e){
if (typeof menuobj == "object")
{
menuobj.style.visibility="hidden"
}
}
function highlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor="#F4F8BD"
firingobj.style.color="black"
firingobj.style.cursor="pointer"
if (display_url==1)
window.status=event.srcElement.url
}
}
function lowlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor=""
firingobj.style.color="black"
window.status=''
}
}
function jumptoie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode
if (firingobj.getAttribute("target"))
window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))
else
window.location=firingobj.getAttribute("url")
}
}
var menuobj;
if (ie5||ns6){
//menuobj.style.display=''
document.oncontextmenu=showmenuie5
document.onclick=hidemenuie5
}

Datei anzeigen

@ -0,0 +1,106 @@
var display_url;
function createMenu (menuname, items, links)
{
document.writeln('<div id="' + menuname + '" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>');
document.writeln('<div class="skin1">Context Menu</div>');
for (var i = 0; i < items.length; i++)
{
if (items[i] == "--")
{
document.writeln('<hr style="line-height:4px;border: 0px;border-bottom:1px;border-color: black; border-style: solid;">');
} else {
document.writeln('<div class="menuitems" url="' + links[i] + '">' + items[i] + '</div>');
}
}
document.writeln('</div>');
document.getElementById(menuname).style.display = '';
}
var ie5 = document.all && document.getElementById
var ns6 = document.getElementById && !document.all
if (ie5 || ns6)
//var menuobj=document.getElementById("ie5menu")
function showmenuie5(e){
if (ie5)
{
menuobj = document.getElementById(window.event.srcElement.getAttribute("helpid"));
} else
{
menuobj = document.getElementById(e.target.getAttribute("helpid"));
}
//Find out how close the mouse is to the corner of the window
var rightedge = ie5? document.body.clientWidth - event.clientX : window.innerWidth - e.clientX
var bottomedge = ie5? document.body.clientHeight - event.clientY : window.innerHeight - e.clientY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge < menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left = ie5? document.body.scrollLeft + event.clientX - menuobj.offsetWidth : window.pageXOffset + e.clientX - menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left = ie5? document.body.scrollLeft + event.clientX : window.pageXOffset + e.clientX
//same concept with the vertical position
if (bottomedge < menuobj.offsetHeight)
menuobj.style.top = ie5? document.body.scrollTop + event.clientY - menuobj.offsetHeight : window.pageYOffset + e.clientY - menuobj.offsetHeight
else
menuobj.style.top = ie5? document.body.scrollTop + event.clientY : window.pageYOffset + e.clientY
menuobj.style.visibility = "visible"
return false;
}
function hidemenuie5(e){
if (typeof menuobj == "object")
{
menuobj.style.visibility = "hidden"
}
}
function highlightie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
firingobj.style.backgroundColor = "#F4F8BD"
firingobj.style.color = "black"
firingobj.style.cursor = "pointer"
if (display_url == 1)
window.status = event.srcElement.url
}
}
function lowlightie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
firingobj.style.backgroundColor = ""
firingobj.style.color = "black"
window.status = ''
}
}
function jumptoie5(e){
var firingobj = ie5? event.srcElement : e.target
if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems"){
if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode
if (firingobj.getAttribute("target"))
window.open(firingobj.getAttribute("url"), firingobj.getAttribute("target"))
else
window.location = firingobj.getAttribute("url")
}
}
var menuobj;
if (ie5 || ns6){
//menuobj.style.display=''
document.oncontextmenu = showmenuie5
document.onclick = hidemenuie5
}

Datei anzeigen

@ -40,7 +40,7 @@
</div> </div>
<div id="operate"> <div id="operate">
{LANG} {LANG}
{MYCONTENIDO} {MYCONLITE}
{INFO} {INFO}
{HELP} {HELP}
<a class="main" href="{LOGOUT}" target="_top"> <a class="main" href="{LOGOUT}" target="_top">
@ -67,7 +67,7 @@
{HEADER_MENU_OBJ}.initialize({HEADER_MENU_OPTIONS}); {HEADER_MENU_OBJ}.initialize({HEADER_MENU_OPTIONS});
ContenidoRegistry.set("headerMenu", {HEADER_MENU_OBJ}); ContenidoRegistry.set("headerMenu", {HEADER_MENU_OBJ});
$(["#head_logo", "#imgMyContenido", "#imgInfo"]).click(function(){ $(["#head_logo", "#imgMyContenidoontenido", "#imgInfo"]).click(function(){
resetHeaderMenu(); resetHeaderMenu();
}); });
}); });