Bug #22921 » 14771_updates_taskcenter_v2.patch
typo3/sysext/taskcenter/classes/class.tx_taskcenter_status.php (Arbeitskopie) | ||
---|---|---|
/**
|
||
* Status of tasks
|
||
*
|
||
* @author Georg Ringer <typo3@ringerge.org
|
||
* @author Georg Ringer <typo3@ringerge.org>
|
||
* @package TYPO3
|
||
* @subpackage taskcenter
|
||
*
|
||
... | ... | |
* @return void
|
||
*/
|
||
public function saveCollapseState(array $params, TYPO3AJAX $ajaxObj) {
|
||
// remove 'el_' in the beginning which is needed for the saveSortingState
|
||
// remove 'el_' in the beginning which is needed for the saveSortingState()
|
||
$item = substr(htmlspecialchars(t3lib_div::_POST('item')), 3);
|
||
$state = (bool)t3lib_div::_POST('state');
|
||
typo3/sysext/taskcenter/ext_autoload.php (Arbeitskopie) | ||
---|---|---|
*/
|
||
$extensionPath = t3lib_extMgm::extPath('taskcenter');
|
||
return array (
|
||
'tx_taskcenter_task' => $extensionPath . 'interfaces/interface.tx_taskcenter_task.php',
|
||
'tx_taskcenter_about' => $extensionPath . 'task/class.tx_taskcenter_about.php',
|
||
'tx_taskcenter_task' => $extensionPath . 'interfaces/interface.tx_taskcenter_task.php'
|
||
);
|
||
?>
|
||
?>
|
typo3/sysext/taskcenter/ext_emconf.php (Arbeitskopie) | ||
---|---|---|
'author_company' => 'Curby Soft Multimedia',
|
||
'CGLcompliance' => '',
|
||
'CGLcompliance_note' => '',
|
||
'version' => '1.0.0',
|
||
'version' => '2.0.0',
|
||
'_md5_values_when_last_written' => 'a:22:{s:16:"ext_autoload.php";s:4:"db4e";s:12:"ext_icon.gif";s:4:"fc53";s:14:"ext_tables.php";s:4:"697a";s:13:"locallang.xml";s:4:"5e6d";s:38:"classes/class.tx_taskcenter_status.php";s:4:"bdbe";s:43:"interfaces/interface.tx_taskcenter_task.php";s:4:"a913";s:13:"res/Thumbs.db";s:4:"2468";s:23:"res/item-background.jpg";s:4:"c87c";s:21:"res/list-item-act.gif";s:4:"6fa4";s:17:"res/list-item.gif";s:4:"e82d";s:18:"res/mod_styles.css";s:4:"a29c";s:19:"res/mod_styles2.css";s:4:"a66b";s:21:"res/mod_template.html";s:4:"eb07";s:28:"task/class.mod_user_task.php";s:4:"5869";s:34:"task/class.tx_taskcenter_about.php";s:4:"3ca7";s:14:"task/clear.gif";s:4:"cc11";s:13:"task/conf.php";s:4:"e419";s:13:"task/icon.gif";s:4:"7941";s:14:"task/index.php";s:4:"2baa";s:18:"task/locallang.xml";s:4:"c202";s:22:"task/locallang_mod.xml";s:4:"c0f2";s:13:"task/task.gif";s:4:"fc53";}',
|
||
'constraints' => array(
|
||
'depends' => array(
|
||
'php' => '5.1.0-0.0.0',
|
||
'typo3' => '4.3.0-0.0.0',
|
||
'typo3' => '4.4.0-0.0.0'
|
||
),
|
||
'conflicts' => array(
|
||
),
|
||
'suggests' => array(
|
||
'sys_action' => '1.2.0-0.0.0'
|
||
),
|
||
),
|
||
'suggests' => array(
|
typo3/sysext/taskcenter/ext_tables.php (Arbeitskopie) | ||
---|---|---|
t3lib_extMgm::addModulePath('tools_txtaskcenterM1', t3lib_extMgm::extPath($_EXTKEY) . 'task/');
|
||
t3lib_extMgm::addModule('user','task', 'top', t3lib_extMgm::extPath($_EXTKEY) . 'task/');
|
||
// $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['taskcenter']['about'] = array(
|
||
// 'title' => 'LLL:EXT:taskcenter/locallang.xml:task_help_title',
|
||
// 'description' => 'LLL:EXT:taskcenter/locallang.xml:task_help_description',
|
||
// 'icon' => 'EXT:taskcenter/task/icon.gif',
|
||
// 'task' => 'tx_taskcenter_about'
|
||
// );
|
||
$GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveCollapseState'] = 'EXT:taskcenter/classes/class.tx_taskcenter_status.php:tx_taskcenter_status->saveCollapseState';
|
||
$GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveSortingState'] = 'EXT:taskcenter/classes/class.tx_taskcenter_status.php:tx_taskcenter_status->saveSortingState';
|
||
}
|
typo3/sysext/taskcenter/interfaces/interface.tx_taskcenter_task.php (Arbeitskopie) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2010 Georg Ringer <typo3@ringerge.orgY
|
||
* (c) 2010 Georg Ringer <typo3@ringerge.org>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
... | ... | |
/**
|
||
* Interface for classes which provide a report.
|
||
* Interface for classes which provide a task.
|
||
*
|
||
* @author Georg Ringer <typo3@ringerge.org
|
||
* @package TYPO3
|
typo3/sysext/taskcenter/res/mod_styles.css (Arbeitskopie) | ||
---|---|---|
/* general */
|
||
body#ext-taskcenter-task-index-php {
|
||
margin:0;
|
||
margin: 0;
|
||
}
|
||
body#ext-taskcenter-task-index-php div#typo3-docbody {
|
||
top:60px;
|
||
top: 60px;
|
||
}
|
||
body#ext-taskcenter-task-index-php div#typo3-inner-docbody {
|
||
padding:0 10px;
|
||
height:100%;
|
||
padding: 0 10px;
|
||
height: 100%;
|
||
}
|
||
#typo3-inner-docbody p.help {
|
||
... | ... | |
}
|
||
body#ext-taskcenter-task-index-php h3 {
|
||
margin:4px 0 8px;
|
||
padding:0;
|
||
margin: 4px 0 8px;
|
||
padding: 0;
|
||
}
|
||
/* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
|
||
/* overview */
|
||
#taskcenter-main {
|
||
width:100%;
|
||
width: 100%;
|
||
}
|
||
#taskcenter-main #taskcenter-menu {
|
||
width:250px;
|
||
width: 250px;
|
||
}
|
||
#taskcenter-main #taskcenter-item {
|
||
position:absolute;
|
||
margin-left:270px;
|
||
margin-right:20px;
|
||
top:0;
|
||
min-width:300px;
|
||
position: absolute;
|
||
margin-left: 270px;
|
||
margin-right: 20px;
|
||
top: 0;
|
||
min-width: 300px;
|
||
}
|
||
/* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
|
||
/* menu */
|
||
#taskcenter-menu ul {
|
||
list-style:none;
|
||
padding:0;
|
||
margin:0;
|
||
border-bottom:1px solid #b0b7c2;
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
border-bottom: 1px solid #b0b7c2;
|
||
}
|
||
#taskcenter-menu li {
|
||
margin-top:1px;
|
||
border-top:1px solid #EFEFF4;
|
||
margin-top: 1px;
|
||
border-top: 1px solid #EFEFF4;
|
||
}
|
||
#taskcenter-menu .image {
|
||
float:left;
|
||
height:23px;
|
||
width:23px;
|
||
float: left;
|
||
height: 23px;
|
||
width: 23px;
|
||
}
|
||
#taskcenter-menu .image img {
|
||
margin:3px 0 0 1px;
|
||
margin: 3px 0 0 1px;
|
||
}
|
||
#taskcenter-menu .down {
|
||
background:url(../../t3skin/icons/gfx/pil2down.gif) no-repeat 5px 7px;
|
||
height:23px;
|
||
float:left;
|
||
width:25px;
|
||
cursor:pointer;
|
||
background: url(../../t3skin/icons/gfx/pil2right.gif) no-repeat 5px 7px;
|
||
height: 23px;
|
||
float: left;
|
||
width: 25px;
|
||
cursor: pointer;
|
||
}
|
||
#taskcenter-menu .collapsed .down {
|
||
background-image:url(../../t3skin/icons/gfx/pil2right.gif);
|
||
background-image: url(../../t3skin/icons/gfx/pil2down.gif);
|
||
}
|
||
#taskcenter-menu .drag {
|
||
float:right;
|
||
height:23px;
|
||
width:24px;
|
||
float: right;
|
||
height: 23px;
|
||
width: 24px;
|
||
}
|
||
#taskcenter-menu .drag img {
|
||
margin-top:6px;
|
||
cursor:move;
|
||
margin-top: 6px;
|
||
cursor: move;
|
||
}
|
||
#taskcenter-menu .link {
|
||
background:url(item-background.jpg) repeat-x;
|
||
border:1px solid #b0b7c2;
|
||
border-width:1px 1px 0;
|
||
line-height:18px;
|
||
/*height:23px;*/
|
||
display:block;
|
||
background: url(item-background.jpg) repeat-x;
|
||
border: 1px solid #b0b7c2;
|
||
border-width: 1px 1px 0;
|
||
line-height: 18px;
|
||
display: block;
|
||
}
|
||
#taskcenter-menu .link a {
|
||
padding:2px 5px;
|
||
display:block;
|
||
color:#fff;
|
||
padding: 2px 5px;
|
||
display: block;
|
||
color: #fff;
|
||
}
|
||
#taskcenter-menu .active-task .link a {
|
||
font-weight:bold;
|
||
font-weight: bold;
|
||
}
|
||
#taskcenter-menu .content {
|
||
padding:5px 0;
|
||
background:#fff;
|
||
border:1px solid #b7bec9;
|
||
padding: 5px 0;
|
||
background: #fff;
|
||
border: 1px solid #b7bec9;
|
||
}
|
||
#taskcenter-menu .content p {
|
||
padding:3px 5px 5px 5px;
|
||
margin:0;
|
||
padding: 3px 5px 5px 5px;
|
||
margin: 0;
|
||
}
|
||
#taskcenter-menu .content ul, #taskcenter-menu .content ul li {
|
||
border:0;
|
||
border: 0;
|
||
}
|
||
#taskcenter-menu .content ul li a {
|
||
display:block;
|
||
line-height:16px;
|
||
margin:0;
|
||
padding:2px 24px;
|
||
background:url(list-item.gif) no-repeat 10px 6px;
|
||
display: block;
|
||
line-height: 16px;
|
||
margin: 0;
|
||
padding: 2px 24px;
|
||
background: url(list-item.gif) no-repeat 10px 6px;
|
||
}
|
||
#taskcenter-menu .content ul li.active {
|
||
background-color:#e1e6ec;
|
||
background-color: #e1e6ec;
|
||
}
|
||
#taskcenter-menu .content ul li.active a {
|
||
color:#272527;
|
||
font-weight:bold;
|
||
background-image:url(list-item-act.gif);
|
||
color: #272527;
|
||
font-weight: bold;
|
||
background-image: url(list-item-act.gif);
|
||
}
|
||
... | ... | |
/* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
|
||
/* content section */
|
||
#taskcenter-item ul {
|
||
padding:5px 0 5px 5px;
|
||
margin:0;
|
||
list-style:none;
|
||
padding: 5px 0 5px 5px;
|
||
margin: 0;
|
||
list-style: none;
|
||
}
|
||
#taskcenter-item ul li {
|
||
padding:5px 0 0 12px;
|
||
padding: 5px 0 0 12px;
|
||
}
|
||
#taskcenter-item ul.withicons li {
|
||
background:url(list-item.gif) no-repeat 0 7px;
|
||
background: url(list-item.gif) no-repeat 0 7px;
|
||
}
|
||
#taskcenter-item ul .image {
|
||
float:left;
|
||
float: left;
|
||
width: 20px;
|
||
}
|
||
... | ... | |
}
|
||
#taskcenter-item ul .link a {
|
||
padding:5px;
|
||
padding: 5px;
|
||
}
|
||
#taskcenter-item ul .link a:hover {
|
||
text-decoration:underline;
|
||
#taskcenter-item ul .link a: hover {
|
||
text-decoration: underline;
|
||
}
|
||
#taskcenter-item ul .content {
|
||
padding:2px 0 0 25px;
|
||
padding: 2px 0 0 25px;
|
||
}
|
||
#taskcenter-item ul .content .edit {
|
||
display:block;
|
||
margin-top:2px;
|
||
display: block;
|
||
margin-top: 2px;
|
||
}
|
||
/* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */
|
||
/* forms */
|
||
#taskcenter-item fieldset.fields legend {
|
||
font-weight:bold;
|
||
border-bottom:1px solid #ccc;
|
||
width:100%;
|
||
padding:0 0 2px 20px;
|
||
font-weight: bold;
|
||
border-bottom: 1px solid #ccc;
|
||
width: 100%;
|
||
padding: 0 0 2px 20px;
|
||
}
|
||
#taskcenter-item fieldset.fields {
|
||
border:0;
|
||
border: 0;
|
||
}
|
||
#taskcenter-item fieldset.fields .row {
|
||
width:350px;
|
||
clear:both;
|
||
padding:5px 0;
|
||
width: 350px;
|
||
clear: both;
|
||
padding: 5px 0;
|
||
}
|
||
#taskcenter-item fieldset.fields label {
|
||
width:120px;
|
||
display:block;
|
||
float:left;
|
||
width: 120px;
|
||
display: block;
|
||
float: left;
|
||
}
|
||
#taskcenter-item fieldset.fields input, #taskcenter-item fieldset.fields select {
|
||
/*margin-left:140px;*/
|
||
width:160px;
|
||
float:left;
|
||
border:1px solid #ccc;
|
||
padding:2px 3px;
|
||
width: 160px;
|
||
float: left;
|
||
border: 1px solid #ccc;
|
||
padding: 2px 3px;
|
||
}
|
||
#taskcenter-item fieldset.fields select {
|
||
width:170px;
|
||
width: 170px;
|
||
}
|
||
#taskcenter-item fieldset.fields input[type=checkbox] {
|
||
width:16px;
|
||
text-align:left;
|
||
width: 16px;
|
||
text-align: left;
|
||
}
|
typo3/sysext/taskcenter/task/class.mod_user_task.php (Arbeitskopie) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2010 Kasper Skaarhoj (kasperYYYY@typo3.com)
|
||
* 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!
|
||
***************************************************************/
|
||
/**
|
||
* Module class for task module
|
||
*
|
||
* @author Kasper Sk?rh?j <kasperYYYY@typo3.com>
|
||
* @author Christian Jul Jensen <christian(at)jul(dot)net>
|
||
*
|
||
* Revision for TYPO3 3.8.0 / Native Workflow System
|
||
*/
|
||
class mod_user_task extends t3lib_extobjbase {
|
||
var $getUserNamesFields = 'username,usergroup,usergroup_cached_list,uid,realName,email';
|
||
var $userGroupArray = array();
|
||
var $perms_clause = '';
|
||
var $backPath;
|
||
/**
|
||
* BE user
|
||
*
|
||
* @var t3lib_beUserAuth
|
||
*/
|
||
var $BE_USER;
|
||
function JScode() {
|
||
}
|
||
/**
|
||
* Send an email...
|
||
*
|
||
* @param string $email: the email address to send to
|
||
* @param string $subject: the subject of the emil
|
||
* @param string $message: the message body of the email
|
||
* @return void
|
||
*/
|
||
function sendEmail($recipient, $subject, $message) {
|
||
$message .= '
|
||
--------
|
||
'.sprintf($GLOBALS['LANG']->getLL('messages_emailFooter'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], t3lib_div::getIndpEnv('HTTP_HOST'));
|
||
$email = t3lib_div::makeInstance('t3lib_htmlmail');
|
||
$email->start();
|
||
$email->useBase64();
|
||
$email->subject = $GLOBALS['TYPO3_CONF_VARS']['BE']['notificationPrefix'].' '.$subject;
|
||
$email->from_email = $this->BE_USER->user['email'];
|
||
$email->from_name = $this->BE_USER->user['realName'];
|
||
$email->addPlain($message);
|
||
$email->setHTML($email->encodeMsg($message));
|
||
$email->setHeaders();
|
||
$email->setContent();
|
||
$email->recipient = $recipient;
|
||
$email->sendTheMail();
|
||
}
|
||
/**
|
||
* Initialise the object
|
||
*
|
||
* @param object $BE_USER: instance of t3lib_beuserauth representing the current be user.
|
||
* @return void
|
||
*/
|
||
function mod_user_task_init($BE_USER) {
|
||
$this->BE_USER = $BE_USER;
|
||
$this->perms_clause = $this->BE_USER->getPagePermsClause(1);
|
||
}
|
||
/**
|
||
* Return helpbubble image
|
||
*
|
||
* @return string image tag (HTML)
|
||
*/
|
||
function helpBubble() {
|
||
return '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace=2 align=top'.$GLOBALS['SOBE']->doc->helpStyle().'>';
|
||
}
|
||
/**
|
||
* Create a link to the module with the name of the module as link text.
|
||
*
|
||
* @param string $key: the classname of the module
|
||
* @param bool $dontLink: Just return the name of the module without a link.
|
||
* @param stting $params: HTTP GET parameter string to add to the link (not used if dontLink true)
|
||
* @return string link (HTML) / name of module (regular string)
|
||
*/
|
||
function headLink($key, $dontLink = false, $params = '') {
|
||
$str = $GLOBALS['SOBE']->MOD_MENU['function'][$key];
|
||
if (!$dontLink) $str = '<a href="index.php?SET[function]='.$key.$params.'" onClick="this.blur();">'.htmlspecialchars($str).'</a>';
|
||
return $str;
|
||
}
|
||
/**
|
||
* Return a string cropped to a fixed length according to system setting or parameter
|
||
*
|
||
* @param string $str: string to be cropped.
|
||
* @param int $len: length of the cropped string, system settings is used if none is given
|
||
* @return string cropped string
|
||
*/
|
||
function fixed_lgd($str, $len = 0) {
|
||
return t3lib_div::fixed_lgd_cs($str, $len?$len:$this->BE_USER->uc['titleLen']);
|
||
}
|
||
/**
|
||
* Return an error icon
|
||
*
|
||
* @return string Image tag (HTML)
|
||
*/
|
||
function errorIcon() {
|
||
return '<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" align=top>';
|
||
}
|
||
/**
|
||
* [Describe function...]
|
||
*
|
||
* @return array ...
|
||
*/
|
||
function getUserAndGroupArrays() {
|
||
// Get groupnames for todo-tasks
|
||
$be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
|
||
$groupArray = array_keys($be_group_Array);
|
||
// Usernames
|
||
$be_user_Array = $be_user_Array_o = t3lib_BEfunc::getUserNames($this->getUserNamesFields);
|
||
if (!$GLOBALS['BE_USER']->isAdmin()) $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array, $groupArray, 1);
|
||
$this->userGroupArray = array($be_user_Array, $be_group_Array, $be_user_Array_o);
|
||
return $this->userGroupArray;
|
||
}
|
||
/**
|
||
* [Describe function...]
|
||
*
|
||
* @param [type] $tstamp: ...
|
||
* @param [type] $prefix: ...
|
||
* @return [type] ...
|
||
*/
|
||
function dateTimeAge($tstamp, $prefix = 1) {
|
||
return t3lib_BEfunc::dateTimeAge($tstamp, $prefix);
|
||
}
|
||
/**
|
||
* [Describe function...]
|
||
*
|
||
* @param [type] $mod: ...
|
||
* @return [type] ...
|
||
*/
|
||
function accessMod($mod) {
|
||
return $this->BE_USER->modAccess(array('name' => $mod, 'access' => 'user,group'), 0);
|
||
}
|
||
/**
|
||
* Create configuration for entry in the left tab menu.
|
||
*
|
||
* @param string $htmlContent: Content that does not get escaped, use this for icons links etc. (HTML)
|
||
* @param string $label: bTitle of the tab, escaped for HTML, dispalyed after html content.
|
||
* @param string $content: html content that gets displayed when the tab is activated. (HTML)
|
||
* @param string $popUpDescription: alt-text for the tab text
|
||
* @return array proper configuration for the tab menu.
|
||
*/
|
||
function mkMenuConfig($htmlContent, $label = "", $content = "", $popUpDescription = '') {
|
||
$configArr = Array();
|
||
if ((string) $htmlContent) $configArr['icon'] = $htmlContent;
|
||
if ((string) $label) $configArr['label'] = $label;
|
||
if ((string) $content) $configArr['content'] = $content;
|
||
if ((string) $linkTitle) $configArr['linkTitle'] = $linkTitle;
|
||
return $configArr;
|
||
}
|
||
/**
|
||
* Returns HTML code to dislay an url in an iframe with the right side of the taskcenter
|
||
*
|
||
* @param string $url: url to display
|
||
* @param [type] $max: ...
|
||
* @return string code that inserts the iframe (HTML)
|
||
*/
|
||
function urlInIframe($url,$max=0) {
|
||
return '<iframe onload="resizeIframe(this,'.$max.');" scrolling="auto" width="100%" src="'.$url.'" name="list_frame" id="list_frame" frameborder="no" style="border: none;"></iframe>';
|
||
}
|
||
}
|
||
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']) {
|
||
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']);
|
||
}
|
||
?>
|
typo3/sysext/taskcenter/task/index.php (Arbeitskopie) | ||
---|---|---|
* @return void
|
||
*/
|
||
public function menuConfig() {
|
||
$this->MOD_MENU = array('mode' => array());
|
||
$this->MOD_MENU = array('mode' => array());
|
||
$this->MOD_MENU['mode']['tasks'] = 'Tasks';
|
||
$this->MOD_MENU['mode']['information'] = $GLOBALS['LANG']->sL('LLL:EXT:scheduler/mod1/locallang.xml:function.info');
|
||
... | ... | |
$docHeaderButtons = $this->getButtons();
|
||
$markers = array();
|
||
// Access check! @todo: need access check?
|
||
if ($GLOBALS['BE_USER']->user['admin'] || 1==1) {
|
||
$this->doc->JScodeArray[] = '
|
||
script_ended = 0;
|
||
function jumpToUrl(URL) {
|
||
document.location = URL;
|
||
}
|
||
$this->doc->JScodeArray[] = '
|
||
script_ended = 0;
|
||
function jumpToUrl(URL) {
|
||
document.location = URL;
|
||
}
|
||
Event.observe(document, "dom:loaded", function(){
|
||
var changeEffect;
|
||
Sortable.create("task-list", { handles:$$("#task-list .drag"), tag: "li", ghosting:false, overlap:"vertical", constraint:false,
|
||
onChange: function(item) {
|
||
var list = Sortable.options(item).element;
|
||
// deactivate link
|
||
$$("#task-list a").each(function(link) {
|
||
link.writeAttribute("onclick","return false;");
|
||
});
|
||
Event.observe(document, "dom:loaded", function(){
|
||
var changeEffect;
|
||
Sortable.create("task-list", { handles:$$("#task-list .drag"), tag: "li", ghosting:false, overlap:"vertical", constraint:false,
|
||
onChange: function(item) {
|
||
var list = Sortable.options(item).element;
|
||
// deactivate link
|
||
},
|
||
onUpdate: function(list) {
|
||
new Ajax.Request("ajax.php", {
|
||
method: "post",
|
||
parameters: { ajaxID :"Taskcenter::saveSortingState", data: Sortable.serialize(list)}
|
||
});
|
||
// activate link
|
||
Event.observe(window,"mouseup",function(){
|
||
$$("#task-list a").each(function(link) {
|
||
link.writeAttribute("onclick","return false;");
|
||
link.writeAttribute("onclick","");
|
||
});
|
||
});
|
||
},
|
||
}
|
||
});
|
||
onUpdate: function(list) {
|
||
new Ajax.Request("ajax.php", {
|
||
method: "post",
|
||
parameters: { ajaxID :"Taskcenter::saveSortingState", data: Sortable.serialize(list)}
|
||
});
|
||
// activate link
|
||
Event.observe(window,"mouseup",function(){
|
||
$$("#task-list a").each(function(link) {
|
||
link.writeAttribute("onclick","");
|
||
});
|
||
});
|
||
$$("#taskcenter-menu .down").invoke("observe", "click", function(event){
|
||
var item = Event.element(event);
|
||
var itemParent = item.up();
|
||
item = item.next("div").next("div").next("div").next("div");
|
||
}
|
||
if (itemParent.hasClassName("expanded")) {
|
||
itemParent.removeClassName("expanded").addClassName("collapsed");
|
||
Effect.BlindUp(item, {duration : 0.5});
|
||
state = 1;
|
||
} else {
|
||
itemParent.removeClassName("collapsed").addClassName("expanded");
|
||
Effect.BlindDown(item, {duration : 0.5});
|
||
state = 0;
|
||
}
|
||
new Ajax.Request("ajax.php", {
|
||
parameters : "ajaxID=Taskcenter::saveCollapseState&item=" + itemParent.id + "&state=" + state
|
||
});
|
||
$$("#taskcenter-menu .down").invoke("observe", "click", function(event){
|
||
var item = Event.element(event);
|
||
var itemParent = item.up();
|
||
item = item.next("div").next("div").next("div").next("div");
|
||
if (itemParent.hasClassName("expanded")) {
|
||
itemParent.removeClassName("expanded").addClassName("collapsed");
|
||
Effect.BlindUp(item, {duration : 0.5});
|
||
state = 1;
|
||
} else {
|
||
itemParent.removeClassName("collapsed").addClassName("expanded");
|
||
Effect.BlindDown(item, {duration : 0.5});
|
||
state = 0;
|
||
}
|
||
new Ajax.Request("ajax.php", {
|
||
parameters : "ajaxID=Taskcenter::saveCollapseState&item=" + itemParent.id + "&state=" + state
|
||
});
|
||
});
|
||
});
|
||
';
|
||
$this->doc->postCode='
|
||
<script language="javascript" type="text/javascript">
|
||
script_ended = 1;
|
||
if (top.fsMod) {
|
||
top.fsMod.recentIds["web"] = 0;
|
||
}
|
||
</script>
|
||
';
|
||
});
|
||
';
|
||
$this->doc->postCode='
|
||
<script language="javascript" type="text/javascript">
|
||
script_ended = 1;
|
||
if (top.fsMod) {
|
||
top.fsMod.recentIds["web"] = 0;
|
||
}
|
||
</script>
|
||
';
|
||
// Render content depending on the mode
|
||
$mode = (string)$this->MOD_SETTINGS['mode'];
|
||
if ($mode == 'information') {
|
||
$this->renderInformationContent();
|
||
} else {
|
||
$this->renderModuleContent();
|
||
}
|
||
|
||
// Render content depending on the mode
|
||
$mode = (string)$this->MOD_SETTINGS['mode'];
|
||
if ($mode == 'information') {
|
||
$this->renderInformationContent();
|
||
} else {
|
||
$flashMessage = t3lib_div::makeInstance(
|
||
't3lib_FlashMessage',
|
||
$GLOBALS['LANG']->getLL('error-access', true),
|
||
$GLOBALS['LANG']->getLL('error_header'),
|
||
t3lib_FlashMessage::ERROR
|
||
);
|
||
$this->content.= $flashMessage->render();
|
||
$this->renderModuleContent();
|
||
}
|
||
// compile document
|
||
... | ... | |
}
|
||
// remder the task
|
||
list($extKey, $taskName) = explode('.', $chosenTask, 2);
|
||
list($extKey, $taskClass) = explode('.', $chosenTask, 2);
|
||
$title = $GLOBALS['LANG']->sL($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskClass]['title']);
|
||
$taskClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['task'];
|
||
$title = $GLOBALS['LANG']->sL($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['title']);
|
||
if (class_exists($taskClass)) {
|
||
$taskInstance = t3lib_div::makeInstance($taskClass, $this);
|
||
if ($taskInstance instanceof tx_taskcenter_Task) {
|
||
// check if the task is restricted to admins only
|
||
if ($this->checkAccess($extKey, $taskName)) {
|
||
if ($this->checkAccess($extKey, $taskClass)) {
|
||
$actionContent .= $taskInstance->getTask();
|
||
} else {
|
||
$flashMessage = t3lib_div::makeInstance(
|
||
... | ... | |
);
|
||
$actionContent .= $flashMessage->render();
|
||
}
|
||
} else {
|
||
$flashMessage = t3lib_div::makeInstance(
|
||
't3lib_FlashMessage',
|
||
$GLOBALS['LANG']->sL('LLL:EXT:taskcenter/task/locallang_mod.xml:mlang_labels_tabdescr'),
|
||
$GLOBALS['LANG']->sL('LLL:EXT:taskcenter/task/locallang_mod.xml:mlang_tabs_tab'),
|
||
t3lib_FlashMessage::INFO
|
||
);
|
||
$actionContent .= $flashMessage->render();
|
||
}
|
||
$content = '<div id="taskcenter-main">
|
||
<div id="taskcenter-menu">' . $this->indexAction() . '</div>
|
||
<div id="taskcenter-item" class="' . $extKey . '-' . $taskName . '">' .
|
||
<div id="taskcenter-item" class="' . $extKey . '-' . $taskClass . '">' .
|
||
$actionContent . '
|
||
</div>
|
||
</div>';
|
||
... | ... | |
* description
|
||
*
|
||
* @param array $items: List of items to be displayed in the definition list.
|
||
* @param boolean $mainMenu: Set it to true to render the main menu
|
||
* @param boolean $mainMenu: Set it to TRUE to render the main menu
|
||
* @return string definition list
|
||
*/
|
||
public function renderListMenu($items, $mainMenu=FALSE) {
|
||
$content = '';
|
||
public function renderListMenu($items, $mainMenu = FALSE) {
|
||
$content = $section = '';
|
||
$count = 0;
|
||
// change the sorting of items to the user's one
|
||
... | ... | |
// active menu item
|
||
$active = ((string) $this->MOD_SETTINGS['function'] == $item['uid']) ? ' active-task' : '';
|
||
// Main menu: Render additional syntax to sort tasks
|
||
if ($mainMenu) {
|
||
$dragIcon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/move.gif', 'width="16" height="16" hspace="2"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.move', 1) . '" alt="" />';
|
||
$section = '<div class="down"> </div>
|
||
<div class="image">' . $icon . '</div>
|
||
<div class="drag">
|
||
<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/move.gif', 'width="16" height="16" hspace="2"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.move', 1) . '" alt="" />
|
||
</div>';
|
||
<div class="drag">' . $dragIcon . '</div>';
|
||
}
|
||
$content .= '<li class="' . $additionalClass . $active . '" id="el_' .$id . '">
|
||
' . $section . '
|
||
<div class="image">' . $icon . '</div>
|
||
<div class="link"><a href="' . $item['link'] . '">' . $title . '</a></div>
|
||
|
||
<div class="content " ' . $collapsedStyle . '>' . $description . '</div>
|
||
</li>';
|
||
$count++;
|
||
}
|
||
$navId = ($mainMenu) ? 'id="task-list"' : '';
|
||
$navigationId = ($mainMenu) ? 'id="task-list"' : '';
|
||
$content = '<ul ' . $navId . ' class="task-list">' . $content . '</ul>';
|
||
$content = '<ul ' . $navigationId . ' class="task-list">' . $content . '</ul>';
|
||
}
|
||
... | ... | |
* @return string list of available reports
|
||
*/
|
||
protected function indexAction() {
|
||
$icon = t3lib_extMgm::extRelPath('taskcenter') . 'task/task.gif';
|
||
$content = '';
|
||
$tasks = array();
|
||
|
||
$icon = t3lib_extMgm::extRelPath('taskcenter') . 'task/task.gif';
|
||
|
||
// render the tasks only if there are any available
|
||
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) && count($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']) > 0) {
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'] as $extKey => $extensionReports) {
|
||
foreach ($extensionReports as $taskName => $task) {
|
||
if (!$this->checkAccess($extKey, $taskName)) {
|
||
foreach ($extensionReports as $taskClass => $task) {
|
||
if (!$this->checkAccess($extKey, $taskClass)) {
|
||
continue;
|
||
}
|
||
$link = 'mod.php?M=user_task&SET[function]=' . $extKey . '.' . $taskName;
|
||
$link = 'mod.php?M=user_task&SET[function]=' . $extKey . '.' . $taskClass;
|
||
$taskTitle = $GLOBALS['LANG']->sL($task['title']);
|
||
$taskDescriptionHtml = '';
|
||
|
||
... | ... | |
$icon = t3lib_div::getFileAbsFilename($task['icon']);
|
||
}
|
||
|
||
$taskInstance = t3lib_div::makeInstance($task['task'], $this);
|
||
$taskInstance = t3lib_div::makeInstance($taskClass, $this);
|
||
if ($taskInstance instanceof tx_taskcenter_Task) {
|
||
$taskDescriptionHtml = $taskInstance->getOverview();
|
||
}
|
||
|
||
|
||
$uniqueKey = $this->getUniqueKey($extKey . '.' . $taskName);
|
||
// generate an array of all tasks
|
||
$uniqueKey = $this->getUniqueKey($extKey . '.' . $taskClass);
|
||
$tasks[$uniqueKey] = array(
|
||
'title' => $taskTitle,
|
||
'descriptionHtml' => $taskDescriptionHtml,
|
||
'description' => $GLOBALS['LANG']->sL($task['description']),
|
||
'icon' => $icon,
|
||
'link' => $link,
|
||
'uid' => $extKey . '.' . $taskName
|
||
'uid' => $extKey . '.' . $taskClass
|
||
);
|
||
}
|
||
}
|
||
... | ... | |
'',
|
||
t3lib_FlashMessage::INFO
|
||
);
|
||
$this->content.= $flashMessage->render();
|
||
|
||
$this->content .= $flashMessage->render();
|
||
}
|
||
return $content;
|
||
... | ... | |
* - Tasks can be blinded for Users with TsConfig taskcenter.<extensionkey>.<taskName> = 0
|
||
*
|
||
* @param string $extKey: Extension key
|
||
* @param string $taskName: Name of the task
|
||
* @param string $taskClass: Name of the task
|
||
* @return boolean Access to the task allowed or not
|
||
*/
|
||
protected function checkAccess($extKey, $taskName) {
|
||
protected function checkAccess($extKey, $taskClass) {
|
||
// check if task is blinded with TsConfig (taskcenter.<extkey>.<taskName>
|
||
$tsConfig = $GLOBALS['BE_USER']->getTSConfig('taskcenter.' . $extKey . '.' . $taskName);
|
||
$tsConfig = $GLOBALS['BE_USER']->getTSConfig('taskcenter.' . $extKey . '.' . $taskClass);
|
||
if (isset($tsConfig['value']) && intval($tsConfig['value']) == 0) {
|
||
return FALSE;
|
||
}
|
||
... | ... | |
}
|
||
// check if task is restricted to admins
|
||
if (intval($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskName]['admin']) == 1) {
|
||
if (intval($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter'][$extKey][$taskClass]['admin']) == 1) {
|
||
return FALSE;
|
||
}
|
||
return FALSE;
|
||
}
|
||
/**
|
||
... | ... | |
// Make instance:
|
||
// Make instance:
|
||
$SOBE = t3lib_div::makeInstance('SC_mod_user_task_index');
|
||
// Include files?
|
||
// Include files?
|
||
foreach($SOBE->include_once as $INC_FILE) {
|
||
include_once($INC_FILE);
|
||
}
|
- « Previous
- 1
- 2
- 3
- 4
- Next »