mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API CHANGE Removed baseHref() javascript method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92638 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d5d4d73141
commit
9b1f5bc81c
@ -690,11 +690,6 @@ function hideLoading() {
|
||||
if($('Loading')) $('Loading').style.display = 'none';
|
||||
Element.removeClassName(document.body, 'stillLoading');
|
||||
}
|
||||
function baseHref() {
|
||||
var baseTags = document.getElementsByTagName('base');
|
||||
if(baseTags) return baseTags[0].href;
|
||||
else return "";
|
||||
}
|
||||
|
||||
returnFalse = function() {
|
||||
return false;
|
||||
|
@ -265,7 +265,7 @@ TreeNodeAPI.prototype = {
|
||||
parentClause = "&parentID=" + this.parentTreeNode.getIdx();
|
||||
}
|
||||
|
||||
new Ajax.Request(baseHref() + 'admin/duplicate/' + this.getIdx() + '?ajax=1' + parentClause, {
|
||||
new Ajax.Request(jQuery('base').attr('href') + 'admin/duplicate/' + this.getIdx() + '?ajax=1' + parentClause, {
|
||||
method : 'get',
|
||||
onSuccess : Ajax.Evaluator,
|
||||
onFailure : function(response) {
|
||||
@ -274,7 +274,7 @@ TreeNodeAPI.prototype = {
|
||||
});
|
||||
},
|
||||
duplicatePageWithChildren: function() {
|
||||
new Ajax.Request(baseHref() + 'admin/duplicatewithchildren/' + this.getIdx() + '?ajax=1', {
|
||||
new Ajax.Request(jQuery('base').attr('href') + 'admin/duplicatewithchildren/' + this.getIdx() + '?ajax=1', {
|
||||
method : 'get',
|
||||
onSuccess : Ajax.Evaluator,
|
||||
onFailure : function(response) {
|
||||
|
@ -81,7 +81,7 @@ CMSForm.prototype = {
|
||||
rightHTML = rightHTML.replace(/(<a[^>]+href *= *")#/g, '$1' + window.location.href.replace(/#.*$/,'') + '#');
|
||||
|
||||
// Rewrite iframe links (for IE)
|
||||
rightHTML = rightHTML.replace(/(<iframe[^>]*src=")([^"]+)("[^>]*>)/g, '$1' + baseHref() + '$2$3');
|
||||
rightHTML = rightHTML.replace(/(<iframe[^>]*src=")([^"]+)("[^>]*>)/g, '$1' + jQuery('base').attr('href') + '$2$3');
|
||||
|
||||
// Note: TinyMCE coupling
|
||||
tinymce_removeAll();
|
||||
|
@ -6,7 +6,7 @@ Behaviour.register({
|
||||
if(originalID && originalID.substr(0,3) == 'new') {
|
||||
alert("You have to save a page before translating it");
|
||||
} else {
|
||||
var url = baseHref() + 'admin/' + this.name.substring(7) + '?ID=' + $('Form_EditForm_ID').value + '&newlang=' +
|
||||
var url = jQuery('base').attr('href') + 'admin/' + this.name.substring(7) + '?ID=' + $('Form_EditForm_ID').value + '&newlang=' +
|
||||
$('Form_EditForm_NewTransLang').value + '&ajax=1';
|
||||
url += "&locale=" + $('Form_EditForm_Locale').value;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user