Feature #19543 » 9703v3.diff
t3lib/js/adminpanel_dnd.js (revision 0) | ||
---|---|---|
/***************************************************************
|
||
* Admin Panel drag and drop
|
||
*
|
||
* $Id$
|
||
*
|
||
* Copyright notice
|
||
*
|
||
* (c) 2008 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.
|
||
*
|
||
* 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!
|
||
***************************************************************/
|
||
var positionRestored = false;
|
||
var dragObject = null;
|
||
var dragx = 0;
|
||
var dragy = 0;
|
||
var posx = 0;
|
||
var posy = 0;
|
||
function saveposition(panel) {
|
||
var admPanelPosX = panel.offsetLeft;
|
||
var admPanelPosY = panel.offsetTop;
|
||
setCookie('admPanelPosX', admPanelPosX);
|
||
setCookie('admPanelPosY', admPanelPosY);
|
||
}
|
||
function restorePosition() {
|
||
if (positionRestored == false) {
|
||
var admPanelPosX = getCookie('admPanelPosX');
|
||
if (admPanelPosX > 0) {
|
||
document.getElementById('admPanel').style.left = admPanelPosX + 'px';
|
||
}
|
||
var admPanelPosY = getCookie('admPanelPosY');
|
||
if (admPanelPosY > 0) {
|
||
document.getElementById('admPanel').style.top = admPanelPosY + 'px';
|
||
}
|
||
positionRestored = true;
|
||
}
|
||
}
|
||
function setCookie(name, value, expires, path, domain, secure) {
|
||
document.cookie = name + '=' + escape(value)
|
||
+ ((expires) ? '; expires=' + expires.toGMTString() : '')
|
||
+ ((path) ? '; path=' + path : '')
|
||
+ ((domain) ? '; domain=' + domain : '')
|
||
+ ((secure) ? '; secure' : '');
|
||
}
|
||
function getCookie(name) {
|
||
var dc = document.cookie;
|
||
var prefix = name + '=';
|
||
var begin = dc.indexOf('; ' + prefix);
|
||
if (begin == -1) {
|
||
begin = dc.indexOf(prefix);
|
||
if (begin != 0)
|
||
return null;
|
||
} else {
|
||
begin += 2;
|
||
}
|
||
var end = dc.indexOf(';', begin);
|
||
if (end == -1) {
|
||
end = dc.length;
|
||
}
|
||
return unescape(dc.substring(begin + prefix.length, end));
|
||
};
|
||
function draginit() {
|
||
document.onmousemove = drag;
|
||
document.onmouseup = dragstop;
|
||
};
|
||
function dragstart(element) {
|
||
dragObject = element;
|
||
dragx = posx - dragObject.offsetLeft;
|
||
dragy = posy - dragObject.offsetTop;
|
||
};
|
||
function dragstop() {
|
||
dragObject = null;
|
||
};
|
||
function drag(dragEvent) {
|
||
posx = document.all ? window.event.clientX : dragEvent.pageX;
|
||
posy = document.all ? window.event.clientY : dragEvent.pageY;
|
||
if (dragObject != null) {
|
||
dragObject.style.left = (posx - dragx) + 'px';
|
||
dragObject.style.top = (posy - dragy) + 'px';
|
||
}
|
||
}
|
||
t3lib/class.t3lib_tsfebeuserauth.php (working copy) | ||
---|---|---|
* @see index_ts.php
|
||
*/
|
||
function extPrintFeAdminDialog() {
|
||
$out='';
|
||
$out = '<script type="text/javascript" src="t3lib/js/adminpanel_dnd.js"></script>';
|
||
if ($this->uc['TSFE_adminConfig']['display_top']) {
|
||
if ($this->extAdmModuleEnabled('preview')) $out.= $this->extGetCategory_preview();
|
||
if ($this->extAdmModuleEnabled('cache')) $out.= $this->extGetCategory_cache();
|
||
... | ... | |
$row.= $this->extFw(': '.$this->user['username']);
|
||
$header = '
|
||
<tr class="typo3-adminPanel-hRow" style="background-color:#9ba1a8;">
|
||
<tr class="typo3-adminPanel-hRow" style="background-color: #9ba1a8; cursor: move;">
|
||
<td colspan="4" style="text-align:left; white-space:nowrap;">'.
|
||
$this->extItemLink('top',$row).'
|
||
<img src="clear.gif" width="40" height="1" alt="" />
|
||
... | ... | |
</script>
|
||
<script language="javascript" type="text/javascript">'.$this->extJSCODE.'</script>';
|
||
}
|
||
return "\n\n\n\n".$out.'<br />';
|
||
$out = '
|
||
<div onmousedown="dragstart(this)" onmouseup="saveposition(this)" id="admPanel" style="position:absolute; left:10px; top:100px; width:30px; z-index:5;">
|
||
' . $out . '
|
||
<br /></div>
|
||
<script type="text/javascript">
|
||
draginit();
|
||
restorePosition();
|
||
</script>';
|
||
return $out;
|
||
}
|
||
/**
|
||
... | ... | |
$out = '
|
||
<tr class="typo3-adminPanel-itemRow">
|
||
<td><img src="clear.gif" width="50" height="1" alt="" /></td>
|
||
<td style="text-align:left; white-space:nowrap;">'.($pre ? $this->extFw($this->extGetLL($pre)) : ' ').'</td>
|
||
<td><img src="clear.gif" width="30" height="1" alt="" /></td>
|
||
<td style="text-align:left; white-space:nowrap;">'.$element.'</td>
|
||
<td colspan="3">'.$element.' '.($pre ? $this->extFw($this->extGetLL($pre)) : ' ').'</td>
|
||
</tr>';
|
||
return $out;
|
typo3/sysext/lang/locallang_tsfe.xml (working copy) | ||
---|---|---|
<label index="edit_editPageOverlay">Edit properties of translated page</label>
|
||
<label index="edit_db_list">Web>List module</label>
|
||
<label index="tsdebug">TypoScript</label>
|
||
<label index="tsdebug_tree">Tree display:</label>
|
||
<label index="tsdebug_LR">Track content rendering:</label>
|
||
<label index="tsdebug_forceTemplateParsing">Force TS Rendering:</label>
|
||
<label index="tsdebug_displayTimes">Display all times:</label>
|
||
<label index="tsdebug_displayMessages">Display messages:</label>
|
||
<label index="tsdebug_displayContent">Display content:</label>
|
||
<label index="tsdebug_displayQueries">Explain SELECT queries:</label>
|
||
<label index="tsdebug_tree">Show as Tree</label>
|
||
<label index="tsdebug_LR">Track content rendering</label>
|
||
<label index="tsdebug_forceTemplateParsing">Force TS Rendering</label>
|
||
<label index="tsdebug_displayTimes">Show all times</label>
|
||
<label index="tsdebug_displayMessages">Show messages</label>
|
||
<label index="tsdebug_displayContent">Show content</label>
|
||
<label index="tsdebug_displayQueries">Explain SELECT queries</label>
|
||
<label index="info">Info</label>
|
||
<label index="div_Levels_0">This page</label>
|
||
<label index="div_Levels_1">+ 1 sublevel</label>
|