Hello, in the function toggle_filedetails and makeAJAXLoadFileDetails you might implements the Drupal.t() function for the changes of the innerHTML of the link names.
old :
function toggle_filedetails(e) {
if (Dom.get('editfiledetailslink').innerHTML == 'Display') {
//YAHOO.log('toggle_filedetails - none ');
Dom.setStyle('displayfiledetails', 'display', '');
Dom.setStyle('editfiledetails', 'display', 'none');
Dom.get('editfiledetailslink').innerHTML = 'Edit';
} else {
//YAHOO.log('toggle_filedetails - block');
Dom.setStyle('displayfiledetails', 'display', 'none');
Dom.setStyle('editfiledetails', 'display', '');
Dom.get('editfiledetailslink').innerHTML = 'Display';
}
}
and old :
var makeAJAXLoadFileDetails = function(id) {
closeAlert();
var reportmode = document.frmtoolbar.reportmode.value;
YAHOO.container.filedetails.focusFirst();
Dom.get('displayfiledetails').innerHTML = '';
YAHOO.container.menuBar.cfg.setProperty("visible",true);
YAHOO.container.filedetails.cfg.setProperty("visible",true);
YAHOO.container.filedetails.cfg.setProperty("fixedcenter",false);
document.frmFileDetails.description.value = '';
document.frmFileDetails.version_note.value = '';
document.frmFileDetails.editfile_tags.value = '';
Dom.setStyle('displayfiledetails', 'display', 'block');
Dom.setStyle('editfiledetails', 'display', 'none');
try {
Dom.get('editfiledetailslink').innerHTML = 'Edit';
} catch (e) {}
...
become :
function toggle_filedetails(e) {
if (Dom.get('editfiledetailslink').innerHTML == Drupal.t('Display')) {
//YAHOO.log('toggle_filedetails - none ');
Dom.setStyle('displayfiledetails', 'display', '');
Dom.setStyle('editfiledetails', 'display', 'none');
Dom.get('editfiledetailslink').innerHTML = Drupal.t('Edit');
} else {
//YAHOO.log('toggle_filedetails - block');
Dom.setStyle('displayfiledetails', 'display', 'none');
Dom.setStyle('editfiledetails', 'display', '');
Dom.get('editfiledetailslink').innerHTML = Drupal.t('Display');
}
}
and :
var makeAJAXLoadFileDetails = function(id) {
closeAlert();
var reportmode = document.frmtoolbar.reportmode.value;
YAHOO.container.filedetails.focusFirst();
Dom.get('displayfiledetails').innerHTML = '';
YAHOO.container.menuBar.cfg.setProperty("visible",true);
YAHOO.container.filedetails.cfg.setProperty("visible",true);
YAHOO.container.filedetails.cfg.setProperty("fixedcenter",false);
document.frmFileDetails.description.value = '';
document.frmFileDetails.version_note.value = '';
document.frmFileDetails.editfile_tags.value = '';
Dom.setStyle('displayfiledetails', 'display', 'block');
Dom.setStyle('editfiledetails', 'display', 'none');
try {
Dom.get('editfiledetailslink').innerHTML = Drupal.t('Edit');
} catch (e) {}
...