* adjust for tid.
This commit is contained in:
@@ -189,6 +189,7 @@ class baseHelper
|
||||
*/
|
||||
public static function isWithTID()
|
||||
{
|
||||
global $config;
|
||||
return (!empty($config->tabSession) and isset($_GET['tid']));
|
||||
}
|
||||
|
||||
|
||||
@@ -1168,7 +1168,7 @@ EOT;
|
||||
$jsConfig->pingInterval = isset($config->pingInterval) ? $config->pingInterval : '';
|
||||
$jsConfig->onlybody = zget($_GET, 'onlybody', 'no');
|
||||
$jsConfig->tabSession = $config->tabSession;
|
||||
if($config->tabSession and helper::inTabIDMode()) $jsConfig->tid = zget($_GET, 'tid', '');
|
||||
if($config->tabSession and helper::isWithTID()) $jsConfig->tid = zget($_GET, 'tid', '');
|
||||
|
||||
$jsLang = new stdclass();
|
||||
$jsLang->submitting = isset($lang->loading) ? $lang->loading : '';
|
||||
|
||||
@@ -577,7 +577,7 @@ function notice()
|
||||
var branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
var link = createLink('release', 'create', 'productID=' + $('#product').val() + '&branch=' + branch);
|
||||
if(config.onlybody != 'yes') link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
|
||||
if(config.onlybody != 'yes') link += link.indexOf('?') >= 0 ? '&onlybody=yes' : '?onlybody=yes';
|
||||
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
|
||||
html += '<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>';
|
||||
}
|
||||
@@ -587,7 +587,7 @@ function notice()
|
||||
productID = $('#product').val();
|
||||
projectID = $('#project').val();
|
||||
link = createLink('build', 'create','executionID=' + executionID + '&productID=' + productID + '&projectID=' + projectID);
|
||||
link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
|
||||
link += link.indexOf('?') >= 0 ? '&onlybody=yes' : '?onlybody=yes';
|
||||
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
|
||||
html += '<a href="javascript:loadExecutionBuilds(' + executionID + ')">' + refresh + '</a>';
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ $(function()
|
||||
adjustBoardsHeight();
|
||||
|
||||
var boardID = '';
|
||||
var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes";
|
||||
var onlybody = "onlybody=yes";
|
||||
$.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot});
|
||||
var $kanban = $('#kanban');
|
||||
|
||||
@@ -124,7 +124,7 @@ $(function()
|
||||
{
|
||||
kanbanModalTrigger.show(
|
||||
{
|
||||
url: link + onlybody,
|
||||
url: link + (link.indexOf('?') >= 0 ? '&' : '?') + onlybody,
|
||||
shown: function(){$('.modal-iframe').addClass('with-titlebar').data('cancel-reload', true)},
|
||||
width: 900,
|
||||
hidden: refresh
|
||||
|
||||
@@ -6,6 +6,7 @@ $(function()
|
||||
if(typeof rawMethod === 'string' && rawMethod == 'work') $('#subNavbar li[data-id=' + mode + '] a').append('<span class="label label-light label-badge">' + total + '</span>');
|
||||
}
|
||||
var scp = $('[data-id="changePassword"] a');
|
||||
var sign = config.requestType == 'GET' ? '&' : '?';
|
||||
scp.attr('href', scp.attr('href') + sign + 'onlybody=yes').modalTrigger({width:500, type:'iframe'});
|
||||
var link = scp.attr('href');
|
||||
var sign = link.indexOf('?') >= 0 ? '&' : '?';
|
||||
scp.attr('href', link + sign + 'onlybody=yes').modalTrigger({width:500, type:'iframe'});
|
||||
});
|
||||
|
||||
@@ -834,8 +834,9 @@ class task extends control
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('estimateList', $this->app->getURI(true), 'execution');
|
||||
if(isonlybody() && $this->config->requestType != 'GET') $this->session->set('estimateList', $this->app->getURI(true) . '?onlybody=yes', 'execution');
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('estimateList', $uri, 'execution');
|
||||
if(isonlybody()) $this->session->set('estimateList', $uri . (substr($uri, '?') === false ? '?' : '&') . 'onlybody=yes', 'execution');
|
||||
|
||||
$this->view->task = $this->task->getById($taskID);
|
||||
$this->view->estimates = $this->task->getTaskEstimate($taskID);
|
||||
|
||||
@@ -101,7 +101,7 @@ function setStoryRelated(num)
|
||||
});
|
||||
|
||||
storyLink = createLink('story', 'view', "storyID=" + storyID);
|
||||
var concat = config.requestType != 'GET' ? '?' : '&';
|
||||
var concat = storyLink.indexOf('?') >= 0 ? '&' : '?';
|
||||
storyLink = storyLink + concat + 'onlybody=yes';
|
||||
$('#preview' + num).removeAttr('disabled');
|
||||
$('#preview' + num).attr('href', storyLink);
|
||||
|
||||
@@ -62,7 +62,7 @@ function loadExecutionStories(executionID)
|
||||
$('#story').next('.picker').remove();
|
||||
$('#story').replaceWith(data);
|
||||
$('#story').addClass('filled').chosen();
|
||||
|
||||
|
||||
/* If there is no story option, select will be hidden and text will be displayed; otherwise, the opposite is true */
|
||||
if($('#story option').length > 1)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ function loadExecutionStories(executionID)
|
||||
$('#storyBox').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$('#storyBox').removeClass('hidden');
|
||||
$('#story').parent().addClass('hidden');
|
||||
}
|
||||
@@ -199,7 +199,7 @@ function setPreview()
|
||||
else
|
||||
{
|
||||
storyLink = createLink('story', 'view', "storyID=" + $('#story').val());
|
||||
var concat = config.requestType != 'GET' ? '?' : '&';
|
||||
var concat = storyLink.indexOf('?') < 0 ? '?' : '&';
|
||||
|
||||
if(storyLink.indexOf("onlybody=yes") < 0) storyLink = storyLink + concat + 'onlybody=yes';
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ function setPreview()
|
||||
}
|
||||
else
|
||||
{
|
||||
storyLink = createLink('story', 'view', "storyID=" + $('#story').val());
|
||||
var concat = config.requestType != 'GET' ? '?' : '&';
|
||||
storyLink = createLink('story', 'view', "storyID=" + $('#story').val());
|
||||
var concat = storyLink.indexOf('?') < 0 ? '?' : '&';
|
||||
storyLink = storyLink + concat + 'onlybody=yes';
|
||||
$('#preview').removeClass('hidden');
|
||||
$('#preview').attr('href', storyLink);
|
||||
|
||||
@@ -827,7 +827,7 @@ class user extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['locate'] = $this->config->webRoot . (helper::inTabIDMode() ? "?tid={$this->get->tid}" : '');
|
||||
$response['locate'] = $this->config->webRoot . (helper::isWithTID() ? "?tid={$this->get->tid}" : '');
|
||||
return $this->send($response);
|
||||
}
|
||||
}
|
||||
@@ -902,7 +902,7 @@ class user extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['locate'] = $this->config->webRoot . (helper::inTabIDMode() ? "?tid={$this->get->tid}" : '');
|
||||
$response['locate'] = $this->config->webRoot . (helper::isWithTID() ? "?tid={$this->get->tid}" : '');
|
||||
return $this->send($response);
|
||||
}
|
||||
}
|
||||
@@ -914,7 +914,7 @@ class user extends control
|
||||
die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
|
||||
}
|
||||
|
||||
$response['locate'] = $this->config->webRoot . (helper::inTabIDMode() ? "?tid={$this->get->tid}" : '');
|
||||
$response['locate'] = $this->config->webRoot . (helper::isWithTID() ? "?tid={$this->get->tid}" : '');
|
||||
$response['result'] = 'success';
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user