dist/angular-promise-buttons.js
function addHandlersForCurrentBtnOnly(btnEl) {
          // handle current button only options via click
          if (cfg.addClassToCurrentBtnOnly) {
            btnEl.on(cfg.CLICK_EVENT, function () {
              btnEl.addClass(cfg.btnLoadingClass);
            });
          }

          if (cfg.disableCurrentBtnOnly) {
            btnEl.on(cfg.CLICK_EVENT, function () {
              btnEl.attr('disabled', 'disabled');
            });
          }
        }
function addHandlersForCurrentBtnOnly(btnEl) {
          // handle current button only options via click
          if (cfg.addClassToCurrentBtnOnly) {
            btnEl.on(cfg.CLICK_EVENT, function () {
              btnEl.addClass(cfg.btnLoadingClass);
            });
          }

          if (cfg.disableCurrentBtnOnly) {
            btnEl.on(cfg.CLICK_EVENT, function () {
              btnEl.attr('disabled', 'disabled');
            });
          }
        }
function addHandlersForCurrentBtnOnly ( btnEl ) { // handle current button only options via click if ( cfg . addClassToCurrentBtnOnly ) { btnEl . on ( cfg . CLICK_EVENT , function ( ) { btnEl . addClass ( cfg . btnLoadingClass ) ; } ) ; } if ( cfg . disableCurrentBtnOnly ) { btnEl . on ( cfg . CLICK_EVENT , function ( ) { btnEl . attr ( 'disabled' , 'disabled' ) ; } ) ; } }
Used to limit loading state to show only for the currently
clicked button.
@param {Object}btnEl
Used to limit loading state to show only for the currently clicked button .