mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
a2541c2949
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@73343 467b73ca-7a2a-4603-9d3b-597d59a354a9
21 lines
611 B
JavaScript
Executable File
21 lines
611 B
JavaScript
Executable File
Behaviour.register({
|
|
'input#Form_EditForm_createtranslation': {
|
|
onclick: function(e) {
|
|
var st = $('sitetree');
|
|
var originalID = st.getIdxOf(st.firstSelected());
|
|
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=' +
|
|
$('Form_EditForm_NewTransLang').value + '&ajax=1';
|
|
|
|
new Ajax.Request( url, {
|
|
onSuccess: Ajax.Evaluator,
|
|
onFailure: Ajax.Evaluator
|
|
});
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}); |