4,656
edits
No edit summary |
No edit summary |
||
| Line 1,874: | Line 1,874: | ||
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" | ||
: "with"; | : "with"; | ||
// | // disable all related buttons | ||
jQuery(".print-selection-border, .print-selection-no-border, .print-selection-toggle") | |||
.prop("disabled", true) | |||
.css("opacity", "0.5"); | |||
// | // change ONLY clicked button text (native feeling) | ||
$btn. | var originalText = $btn.text(); | ||
$btn.text("working…"); | |||
swHandleBatchPrint(borderPref); | swHandleBatchPrint(borderPref); | ||
// optional reset (if user comes back) | |||
setTimeout(function () { | |||
$btn.text(originalText); | |||
jQuery(".print-selection-border, .print-selection-no-border, .print-selection-toggle") | |||
.prop("disabled", false) | |||
.css("opacity", ""); | |||
}, 2000); | |||
} | } | ||
); | ); | ||