Project

General

Profile

Feature #17996 ยป sc_manager.diff

Administrator Admin, 2008-01-15 15:07

View differences:

typo3/alt_main.php (working copy)
function startModule() {
global $BE_USER;
$module = preg_replace('/[^[:alnum:]_]/','',t3lib_div::_GET('module'));
if (!$module) {
if ($BE_USER->uc['startModule']) {
$module = $BE_USER->uc['startModule'];
......
$GLOBALS['TBE_TEMPLATE']->JScode= '
<script type="text/javascript" src="md5.js"></script>
<script type="text/javascript" src="../t3lib/jsfunc.evalfield.js"></script>
<script type="text/javascript" src="js/backend.js"></script>
';
$GLOBALS['TBE_TEMPLATE']->JScode.=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags($this->mainJScode);
typo3/js/backend.js (revision 0)
/***************************************************************
* Copyright notice
*
* (c) 2007 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* general backend javascript functions
*/
/**
* jump the backend to a module
*/
function jump(url, modName, mainModName) {
// clear information about which entry in nav. tree that might have been highlighted.
top.fsMod.navFrameHighlightedID = new Array();
if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
top.content.nav_frame.refresh_nav();
}
top.nextLoadModuleUrl = url;
top.goToModule(modName);
}
/**
* shortcut manager to delegate the action of creating shortcuts to the new
* backend.php shortcut menu or the old shortcut frame depending on what is available
*/
var ShortcutManager = {
/**
* central entry point to create a shortcut, delegates the call to correct endpoint
*/
createShortcut: function(confirmQuestion, backPath, moduleName, url) {
if(confirm(confirmQuestion)) {
if(typeof TYPO3BackendShortcutMenu != 'undefined') {
TYPO3BackendShortcutMenu.createShortcut(moduleName, url);
}
if(top.shortcutFrame) {
var location = backPath + 'alt_shortcut.php?modName=' + moduleName + '&URL=' + url;
shortcutFrame.location.href = location;
}
}
}
}
typo3/template.php (working copy)
$mMN='&motherModName='.rawurlencode($motherModName);
} else $mMN='';
$onClick = 'if (top.shortcutFrame && confirm('.
$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut')).
')){top.shortcutFrame.location.href=\''.$backPath.'alt_shortcut.php?modName='.rawurlencode($modName).
'&URL='.rawurlencode($pathInfo['path']."?".$storeUrl).
$mMN.
'\';}return false;';
$onClick = 'top.ShortcutManager.createShortcut('
.$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut')).', '
.'\''.$backPath.'\', '
.'\''.rawurlencode($modName).'\', '
.'\''.rawurlencode($pathInfo['path']."?".$storeUrl).$mMN.'\''
.');return false;';
$sIcon = '<a href="#" onclick="'.htmlspecialchars($onClick).'"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut',1).'" alt="" /></a>';
return $sIcon;
......
/**
* Includes a javascript library that exists in the core /typo3/ directory. The
* Includes a javascript library that exists in the core /typo3/ directory. The
* backpath is automatically applied
*
* @param string $lib: Library name. Call it with the full path
......
* @param boolean If set, tab table cells are not allowed to wrap their content
* @param boolean If set, the tabs will span the full width of their position
* @param integer Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
* @param integer If set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled
* @param integer If set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled
* @return string JavaScript section for the HTML header.
*/
function getDynTabMenu($menuItems,$identString,$toggle=0,$foldout=FALSE,$newRowCharLimit=50,$noWrap=1,$fullWidth=FALSE,$defaultTabIndex=1,$dividers2tabs=2) {
......
}
return $content;
}
/**
* Creates the id for dynTabMenus.
*
    (1-1/1)