MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1,872: Line 1,872:
     function (e) {
     function (e) {
         e.preventDefault();
         e.preventDefault();
         console.log("PRINT BUTTON CLICKED");
         console.log("PRINT BUTTON CLICKED");


         var $btn = jQuery(this);
         var $btn = jQuery(this);
         var borderPref = $btn.hasClass("print-selection-no-border")
         var borderPref = $btn.hasClass("print-selection-no-border")
         ? "without"
         ? "without"
Line 1,883: Line 1,885:
         $btn.prop("disabled", true);
         $btn.prop("disabled", true);


        // 👇 force repaint
         $btn[0].offsetHeight;
         $btn[0].offsetHeight;


        // 👇 delay EVERYTHING that hides or blocks UI
        setTimeout(function () {
         hidePrintSelectionOptions();
         hidePrintSelectionOptions();
        swHandleBatchPrint(borderPref);


        setTimeout(function () {
        swHandleBatchPrint(borderPref);
         $btn.text(originalText);
         $btn.text(originalText);
         $btn.prop("disabled", false);
         $btn.prop("disabled", false);
         }, 150);
         }, 150);
     }
     }
    );
  );


   /* ---------- /Softwear PRINT ---------- */
   /* ---------- /Softwear PRINT ---------- */

Navigation menu