Project

General

Profile

Bug #18206 ยป 20080209_new_menu_taskcenter2.diff

Administrator Admin, 2008-02-13 17:27

View differences:

typo3/stylesheet.css (working copy)
BODY#typo3-mod-tools-em-index-php TR.unsupported-ext TD A { color: #ff0000; }
BODY#typo3-mod-tools-em-index-php TR TD.extstate { color: #fff; font-weight: bold; text-align: center; }
/* Task Center */
#ext-taskcenter-task-index-php ul.taskcenter-module,ul.taskcenter-module li ul {list-style:none;margin:0;padding:0;}
#ext-taskcenter-task-index-php ul.taskcenter-module li a{cursor:pointer;border:1px solid black;background:#eee;padding:6px 12px;display:block;margin-bottom:-1px;}
#ext-taskcenter-task-index-php ul.taskcenter-module li a.active {background:#fefefe;}
#ext-taskcenter-task-index-php ul.taskcenter-module li a:hover {background:#d7dbe2;}
#ext-taskcenter-task-index-php ul.taskcenter-module li ul {margin:5px 0;}
#ext-taskcenter-task-index-php ul.taskcenter-module li ul li {display:block;padding-left:24px;}
#ext-taskcenter-task-index-php ul.taskcenter-module li ul li a {padding:0;border:none;background:transparent;display:inline;}
#ext-taskcenter-task-index-php {height:95%;}
/* Workspace */
div.workspace-info {
padding: 0px 2px 0px 2px;
typo3/sysext/taskcenter/ext_tables.php (working copy)
if (!defined ('TYPO3_MODE')) die ('Access denied.');
if (TYPO3_MODE=='BE') t3lib_extMgm::addModule('user','task','top',t3lib_extMgm::extPath($_EXTKEY).'task/');
?>
$TYPO3_CONF_VARS['BE']['AJAX']['TaskCenter::saveMenuState'] = t3lib_extMgm::extPath($_EXTKEY).'task/class.mod_user_task.php:mod_user_task->ajaxSaveMenuStatus';
?>
typo3/sysext/taskcenter/task/class.mod_user_task.php (working copy)
function urlInIframe($url,$max=0) {
return '<iframe onload="resizeIframe(this,'.$max.');" scrolling="auto" width="100%" src="'.$url.'" name="list_frame" frameborder="no" style="border: none;"></iframe>';
}
function ajaxSaveMenuStatus($params = array(), TYPO3AJAX &$ajaxObj = null) {
$menuid = t3lib_div::_POST('menuid');
$state = t3lib_div::_POST('state') === 'true' ? 0 : 1;
$GLOBALS['BE_USER']->uc['moduleData']['taskCenter'][$menuid] = $state;
$GLOBALS['BE_USER']->uc['moduleData']['taskCenter']['active'] = $menuid;
$GLOBALS['BE_USER']->writeUC();
}
}
// Include extension?
typo3/sysext/taskcenter/task/index.php (working copy)
$this->doc = t3lib_div::makeInstance('noDoc');
$this->doc->docType = 'xhtml_trans';
$this->doc->divClass = '';
$this->doc->form = '<form action="index.php" method="POST" name="editform">';
$this->backPath = $this->doc->backPath = $BACK_PATH;
$this->doc->JScode = ' <script language="javascript" type="text/javascript">
......
'.(is_object($this->extObj)?$this->extObj->JScode():"").'
</script>
';
$this->doc->JScode .= $this->doc->getDynTabMenuJScode();
$this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
$this->doc->JScode .= '<script language="javascript" type="text/javascript">
function resizeIframe(frame,max) {
try {
......
window.status = e.message;
}
}
</script>';
</script>
<script type="text/javascript" src="'.$BACK_PATH.t3lib_extMgm::extRelPath('taskcenter').'TaskCenterMenu.js"></script>
';
/* call getMainContent first, because what happens here might affect leftContent */
$mainContent = $this->getMainContent();
......
//walk through registered submodules and generate configuration
//for tabmenu
$parts = Array();
$i=0;
$output .= '<ul class="taskcenter-module">';
foreach($this->allExtClassConf as $conf) {
$extObj = t3lib_div::makeInstance($conf['name']);
/* call init to make sure the LOCAL_LANG is included for all listed
......
$extObj->mod_user_task_init($GLOBALS['BE_USER']);
$part = $extObj->overview_main();
if (is_array($part)) {
$parts[] = $part;
$parts[$i++] = $part;
$status = intval($GLOBALS['BE_USER']->uc['moduleData']['TaskCenter']['taskcenter-module-header-'.$i]);
$activeID = ($GLOBALS['BE_USER']->uc['moduleData']['TaskCenter']['active'] === 'taskcenter-module-header-'.$i);
$output .='<li class="taskcenter-module-header" id="taskcenter-module-header-'.$i.'"><a href="#"'.($activeID ? ' class="active"' : '').'>'.$part['icon'].'</a>';
if(isset($part['content'])) {
$items=explode('<BR>',$part['content']);
$output .= '<ul'.($status==1 ? ' style="display:none;"' : '').'>';
foreach($items as $item) {
if($item) $output .= '<li>'.$item.'</li>';
}
$output .= '</ul>';
}
$output .= '</li>';
}
}
return $this->doc->getDynTabMenu($parts, 'tx_taskcenter', 1, true);
$output .= '</ul>';
return $output;
}
/**
......
$this->content .= $this->doc->endPage();
echo $this->content;
}
}
    (1-1/1)