mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Made SideTabs and SideReports work with Translatable by explicitly passing a "locale" GET parameter (see #4014)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76650 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b0bbadc665
commit
b270615c18
@ -32,7 +32,9 @@ SideReports.prototype = {
|
|||||||
SideReportRecord.applyTo('#' + this.id + ' a');
|
SideReportRecord.applyTo('#' + this.id + ' a');
|
||||||
},
|
},
|
||||||
ajaxURL: function() {
|
ajaxURL: function() {
|
||||||
return 'admin/sidereport/' + this.selector.value;
|
var url = 'admin/sidereport/' + this.selector.value;
|
||||||
|
if($('LangSelector')) url += "?locale=" + $('LangSelector').value;
|
||||||
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -213,8 +213,11 @@ SidePanel.prototype = {
|
|||||||
var srcName = this.id.replace('_holder','');
|
var srcName = this.id.replace('_holder','');
|
||||||
var id = $('Form_EditForm').elements.ID;
|
var id = $('Form_EditForm').elements.ID;
|
||||||
if(id) id = id.value; else id = "";
|
if(id) id = id.value; else id = "";
|
||||||
|
|
||||||
// This assumes that admin/cms/ refers to CMSMain
|
// This assumes that admin/cms/ refers to CMSMain
|
||||||
return 'admin/cms/' + srcName + '/' + id + '?ajax=1';
|
var url = 'admin/cms/' + srcName + '/' + id + '?ajax=1';
|
||||||
|
if($('Form_EditForm_Locale')) url += "&locale=" + $('Form_EditForm_Locale').value;
|
||||||
|
return url;
|
||||||
},
|
},
|
||||||
|
|
||||||
afterPanelLoaded : function() {
|
afterPanelLoaded : function() {
|
||||||
@ -303,7 +306,9 @@ VersionList.prototype = {
|
|||||||
select : function(pageID, versionID, sourceEl) {
|
select : function(pageID, versionID, sourceEl) {
|
||||||
if(this.mode == 'view') {
|
if(this.mode == 'view') {
|
||||||
sourceEl.select();
|
sourceEl.select();
|
||||||
$('Form_EditForm').loadURLFromServer('admin/getversion/' + pageID + '/' + versionID);
|
var url = 'admin/getversion/' + pageID + '/' + versionID;
|
||||||
|
if($('Form_EditForm_Locale')) url += "?locale=" + $('Form_EditForm_Locale').value;
|
||||||
|
$('Form_EditForm').loadURLFromServer(url);
|
||||||
$('viewArchivedSite').style.display = '';
|
$('viewArchivedSite').style.display = '';
|
||||||
$('viewArchivedSite').getVars = '?archiveDate=' + sourceEl.getElementsByTagName('td')[1].className;
|
$('viewArchivedSite').getVars = '?archiveDate=' + sourceEl.getElementsByTagName('td')[1].className;
|
||||||
|
|
||||||
@ -314,7 +319,9 @@ VersionList.prototype = {
|
|||||||
sourceEl.select();
|
sourceEl.select();
|
||||||
this.otherSourceEl.select(true);
|
this.otherSourceEl.select(true);
|
||||||
statusMessage('Loading comparison...');
|
statusMessage('Loading comparison...');
|
||||||
$('Form_EditForm').loadURLFromServer('admin/compareversions/' + pageID + '/?From=' + this.otherVersionID + '&To=' + versionID);
|
var url = 'admin/compareversions/' + pageID + '/?From=' + this.otherVersionID + '&To=' + versionID;
|
||||||
|
if($('Form_EditForm_Locale')) url += "&locale=" + $('Form_EditForm_Locale').value;
|
||||||
|
$('Form_EditForm').loadURLFromServer(url);
|
||||||
} else {
|
} else {
|
||||||
sourceEl.select();
|
sourceEl.select();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user