מדיה ויקי:Gadget-HotCat.js: הבדלים בין גרסאות בדף

Bug fix for upload form if category input form is still open.
Label translation if we're on the upload form
שורה 46: שורה 46:
   var np = document.createElement ( "p" ) ;
   var np = document.createElement ( "p" ) ;


   ntde.appendChild ( document.createTextNode ( "Categories:" ) ) ;
   ntde.setAttribute ('id', 'hotcatLabel');
  var label = null;
  if (typeof (UploadForm) != 'undefined' &&
      typeof (UploadForm.getLabel) == 'function') {
    try {
      label = UploadForm.getLabel ('wpCategoriesUploadLbl');
    } catch (ex) {
      label = null;
    }
  }
  if (label == null)
    ntde.appendChild (document.createTextNode ("Categories:"));
  else {
    ntde.setAttribute ('id', 'hotcatLabelTranslated');
    // Change the ID to avoid that UploadForm tries to translate it again.
    ntde.appendChild (label);
    ntde.appendChild (document.createTextNode (":"));
  }
   ntde.style.textAlign = "right" ;
   ntde.style.textAlign = "right" ;
   ntde.style.verticalAlign = "middle" ;
   ntde.style.verticalAlign = "middle" ;