updates till now
Dieser Commit ist enthalten in:
Ursprung
c21108e5b0
Commit
16a806d17b
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -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();
|
||||||
|
if(is_null($aData) || empty($aData)) {
|
||||||
$iNextId = $oDb->nextid($this->table);
|
$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);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project:
|
* Project:
|
||||||
* Contenido Content Management System
|
* Contenido Content Management System
|
||||||
|
@ -32,7 +33,6 @@
|
||||||
* }}
|
* }}
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('CON_FRAMEWORK')) {
|
if (!defined('CON_FRAMEWORK')) {
|
||||||
die('Illegal call');
|
die('Illegal call');
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ if(!defined('CON_FRAMEWORK')) {
|
||||||
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.
|
||||||
*
|
*
|
||||||
|
@ -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,7 +133,6 @@ class Contenido_Navigation {
|
||||||
return $caption;
|
return $caption;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads and fills the navigation structure data
|
* Reads and fills the navigation structure data
|
||||||
*
|
*
|
||||||
|
@ -186,7 +181,6 @@ class Contenido_Navigation {
|
||||||
$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
|
||||||
*
|
*
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -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
|
||||||
|
}
|
|
@ -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();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Laden…
In neuem Issue referenzieren