This commit is contained in:
wangyidong
2023-03-31 08:59:38 +08:00
6 changed files with 15 additions and 16 deletions
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2863,7 +2863,7 @@ EOT;
}
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
if($tab != 'doc') $this->loadModel($type)->setMenu($objectID);
if($tab != 'doc' and method_exists($type . 'Model', 'setMenu')) $this->loadModel($type)->setMenu($objectID);
$this->lang->TRActions = $this->buildCollectButton4Doc();
$this->lang->TRActions .= $this->buildCreateButton4Doc($type, $objectID, $libID);
+4 -4
View File
@@ -133,7 +133,7 @@ function getDiffs(fileName)
function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
var tabID = Base64.encode(filepath).replaceAll('=', '-');
var tabID = Base64.encode(filepath).replace(/=/g, '-');
return {
title: filename,
id: tabID,
@@ -200,7 +200,7 @@ $(document).ready(function()
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
@@ -213,7 +213,7 @@ $(document).ready(function()
/* Append file path into the title. */
$('#fileTabs').on('onLoad', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
$('#tab-nav-item-' + tab.id).attr('title', filepath);
document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
@@ -221,7 +221,7 @@ $(document).ready(function()
});
$('#fileTabs').on('onOpen', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1) document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
});
+4 -4
View File
@@ -84,7 +84,7 @@ function getDiffs(fileName)
function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
var tabID = Base64.encode(filepath).replaceAll('=', '-');
var tabID = Base64.encode(filepath).replace(/=/g, '-');
return {
id: tabID,
url: createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))),
@@ -141,7 +141,7 @@ $(document).ready(function()
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
@@ -154,7 +154,7 @@ $(document).ready(function()
/* Append file path into the title. */
$('#fileTabs').on('onLoad', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
$('#tab-nav-item-' + tab.id).attr('title', filepath);
document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
@@ -162,7 +162,7 @@ $(document).ready(function()
});
$('#fileTabs').on('onOpen', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1) document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
});
+3 -3
View File
@@ -10,7 +10,7 @@ function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
/* encode twice for resolving chinese character. */
var tabID = Base64.encode(Base64.encode(filepath).replaceAll('=', '-')).replaceAll('=', '-');
var tabID = Base64.encode(Base64.encode(filepath).replace(/=/g, '-')).replace(/=/g, '-');
return {
id: tabID,
url: createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))),
@@ -58,7 +58,7 @@ $(function()
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
/* encode twice for resolving chinese character. */
var filepath = decodeURIComponent(Base64.decode(Base64.decode(tab.id.replaceAll('-', '=')).replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(Base64.decode(tab.id.replace(/-/g, '=')).replace(/-/g, '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
@@ -71,7 +71,7 @@ $(function()
/* Append file path into the title. */
$('#fileTabs').on('onLoad', function(event, tab) {
var filepath = Base64.decode(tab.id.replaceAll('-', '='));
var filepath = Base64.decode(tab.id.replace(/-/g, '='));
$('#tab-nav-item-' + tab.id).attr('title', decodeURIComponent(filepath));
});
-1
View File
@@ -1396,7 +1396,6 @@ class story extends control
if($tab == 'product' and !empty($product->shadow))
{
$backLink = $this->session->productList ? $this->session->productList : inlink('product', 'all');
$viewLink = $this->createLink('story', 'view', "storyID=$storyID&version=$version&param=$param&storyType=$storyType") . '#app=project';
$js = js::start();
$js .= "setTimeout(\"parent.$.apps.open('$uri#app=project')\", 100)";
$js .= js::end();