+ Add js cookie set params.

This commit is contained in:
caoyanyi
2023-12-06 10:01:59 +08:00
parent d8c6bc8fbd
commit 313a45acd4
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -343,7 +343,7 @@ function openTab(entry, name)
function updateEditorInline(eleId)
{
$.cookie.set('renderSideBySide', diffAppose);
$.cookie.set('renderSideBySide', diffAppose, {expires:config.cookieLife, path:config.webRoot});
if(typeof $(eleId + ' iframe')[0].contentWindow.updateEditorInline == 'function')
{
$(eleId + ' iframe')[0].contentWindow.updateEditorInline(diffAppose);
+1 -1
View File
@@ -101,7 +101,7 @@ window.diffClick = function()
var newDiffLink = diffLink.replace('{oldRevision}', revisionMap[checkedIds[1]]);
newDiffLink = newDiffLink.replace('{newRevision}', revisionMap[checkedIds[0]]);
$.cookie.set('sideRepoSelected', checkedIds.join(','))
$.cookie.set('sideRepoSelected', checkedIds.join(','), {expires:config.cookieLife, path:config.webRoot})
openUrl(newDiffLink, {app: appTab});
}
+3 -3
View File
@@ -31,7 +31,7 @@ window.afterPageUpdate = function()
/* Load default tab content. */
var height = getIframeHeight();
$.cookie.set('repoCodePath', file);
$.cookie.set('repoCodePath', file, {expires:config.cookieLife, path:config.webRoot});
$('#tab-' + fileAsId).html("<iframe class='repo-iframe' src='" + $.createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', '')) + "' width='100%' height='" + height + "' scrolling='no'></iframe>")
/* Select default tree item. */
@@ -169,7 +169,7 @@ function openTab(entry, name)
$('#monacoTabs .nav-tabs').append(newTab);
var height = getIframeHeight();
$.cookie.set('repoCodePath', entry);
$.cookie.set('repoCodePath', entry, {expires:config.cookieLife, path:config.webRoot});
$('#monacoTabs .tab-content').append("<div id='" + eleId + "' class='tab-pane active in'><iframe class='repo-iframe' src='" + $.createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', '')) + "' width='100%' height='" + height + "' scrolling='no'></iframe></div>")
if($('.monaco-dropmenu').attr('class').indexOf('hidden')) $('.monaco-dropmenu').removeClass('hidden');
@@ -181,7 +181,7 @@ function openTab(entry, name)
function updateEditorInline(eleId)
{
$.cookie.set('renderSideBySide', diffAppose);
$.cookie.set('renderSideBySide', diffAppose, {expires:config.cookieLife, path:config.webRoot});
if(typeof $(eleId + ' iframe')[0].contentWindow.updateEditorInline == 'function')
{
$(eleId + ' iframe')[0].contentWindow.updateEditorInline(diffAppose);
+3 -3
View File
@@ -31,7 +31,7 @@ window.afterPageUpdate = function()
/* Load default tab content. */
var height = getIframeHeight();
$.cookie.set('repoCodePath', file);
$.cookie.set('repoCodePath', file, {expires:config.cookieLife, path:config.webRoot});
$('#tab-' + fileAsId).html("<iframe class='repo-iframe' src='" + $.createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', '')) + "' width='100%' height='" + height + "' scrolling='no'></iframe>")
/* Select default tree item. */
@@ -55,7 +55,7 @@ window.afterPageUpdate = function()
if(url != 'javascript:;') return;
if(branchOrTag != $.cookie.get('repoBranch')) $.cookie.set('repoBranch', branchOrTag);
if(branchOrTag != $.cookie.get('repoBranch')) $.cookie.set('repoBranch', branchOrTag, {expires:config.cookieLife, path:config.webRoot});
openUrl(currentLink, {app: appTab});
})
@@ -116,7 +116,7 @@ function openTab(entry, name)
$('#monacoTabs .nav-tabs').append(newTab);
var height = getIframeHeight();
$.cookie.set('repoCodePath', entry);
$.cookie.set('repoCodePath', entry, {expires:config.cookieLife, path:config.webRoot});
$('#monacoTabs .tab-content').append("<div id='" + eleId + "' class='tab-pane active in'><iframe class='repo-iframe' src='" + $.createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', '')) + "' width='100%' height='" + height + "' scrolling='no'></iframe></div>")
if($('.monaco-dropmenu').attr('class').indexOf('hidden')) $('.monaco-dropmenu').removeClass('hidden');