function runAllForms() {

  /*
   * BOOTSTRAP SLIDER PLUGIN
   * Usage:
   * Dependency: js/plugin/bootstrap-slider
   */
  if ($.fn.slider) {
    $('.slider').slider();
  }

  /*
   * SELECT2 PLUGIN
   * Usage:
   * Dependency: js/plugin/select2/
   */
  if ($.fn.select2) {
    $('.select2').each(function() {
      var $this = $(this);
      var width = $this.attr('data-select-width') || '100%';
      //, _showSearchInput = $this.attr('data-select-search') === 'true';
      $this.select2({
        //showSearchInput : _showSearchInput,
        allowClear : true,
        width : width
      })
    })
  }

  /*
   * MASKING
   * Dependency: js/plugin/masked-input/
   */
  if ($.fn.mask) {
    $('[data-mask]').each(function() {

      var $this = $(this);
      var mask = $this.attr('data-mask') || 'error...', mask_placeholder = $this.attr('data-mask-placeholder') || 'X';

      $this.mask(mask, {
        placeholder : mask_placeholder
      });
    })
  }

  /*
   * Autocomplete
   * Dependency: js/jqui
   */
  if ($.fn.autocomplete) {
    $('[data-autocomplete]').each(function() {

      var $this = $(this);
      var availableTags = $this.data('autocomplete') || ["The", "Quick", "Brown", "Fox", "Jumps", "Over", "Three", "Lazy", "Dogs"];

      $this.autocomplete({
        source : availableTags
      });
    })
  }

  /*
   * JQUERY UI DATE
   * Dependency: js/libs/jquery-ui-1.10.3.min.js
   * Usage:
   */
  if ($.fn.datepicker) {
    $('.datepicker').each(function() {

      var $this = $(this);
      var dataDateFormat = $this.attr('data-dateformat') || 'dd.mm.yy';

      $this.datepicker({
        dateFormat : dataDateFormat,
        prevText : '<i class="fa fa-chevron-left"></i>',
        nextText : '<i class="fa fa-chevron-right"></i>',
      });
    })
  }

  /*
   * AJAX BUTTON LOADING TEXT
   * Usage: <button type="button" data-loading-text="Loading..." class="btn btn-xs btn-default ajax-refresh"> .. </button>
   */
  $('button[data-loading-text]').on('click', function() {
    var btn = $(this)
    btn.button('loading')
    setTimeout(function() {
      btn.button('reset')
    }, 3000)
  });

}
/*
 * INITIALIZE FORMS
 * Description: Select2, Masking, Datepicker, Autocomplete
 */
INITIALIZE FORMS
Description: Select2, Masking, Datepicker, Autocomplete
INITIALIZE FORMS Description : Select2 Masking Datepicker Autocomplete
function runAllForms() {
  if ($.fn.slider) {
    $('.slider').slider();
  }
  if ($.fn.select2) {
    $('.select2').each(function() {
      var $this = $(this);
      var width = $this.attr('data-select-width') || '100%';
      $this.select2({
        allowClear : true,
        width : width
      })
    })
  }
  if ($.fn.mask) {
    $('[data-mask]').each(function() {
      var $this = $(this);
      var mask = $this.attr('data-mask') || 'error...', mask_placeholder = $this.attr('data-mask-placeholder') || 'X';
      $this.mask(mask, {
        placeholder : mask_placeholder
      });
    })
  }
  if ($.fn.autocomplete) {
    $('[data-autocomplete]').each(function() {
      var $this = $(this);
      var availableTags = $this.data('autocomplete') || ["The", "Quick", "Brown", "Fox", "Jumps", "Over", "Three", "Lazy", "Dogs"];
      $this.autocomplete({
        source : availableTags
      });
    })
  }
  if ($.fn.datepicker) {
    $('.datepicker').each(function() {
      var $this = $(this);
      var dataDateFormat = $this.attr('data-dateformat') || 'dd.mm.yy';
      $this.datepicker({
        dateFormat : dataDateFormat,
        prevText : '<i class="fa fa-chevron-left"></i>',
        nextText : '<i class="fa fa-chevron-right"></i>',
      });
    })
  }
  $('button[data-loading-text]').on('click', function() {
    var btn = $(this)
    btn.button('loading')
    setTimeout(function() {
      btn.button('reset')
    }, 3000)
  });
}
function runAllForms ( ) { if ( $ . fn . slider ) { $ ( '.slider' ) . slider ( ) ; } if ( $ . fn . select2 ) { $ ( '.select2' ) . each ( function ( ) { var $this = $ ( this ) ; var width = $this . attr ( 'data-select-width' ) || '100%' ; $this . select2 ( { allowClear : true , width : width } ) } ) } if ( $ . fn . mask ) { $ ( '[data-mask]' ) . each ( function ( ) { var $this = $ ( this ) ; var mask = $this . attr ( 'data-mask' ) || 'error...' , mask_placeholder = $this . attr ( 'data-mask-placeholder' ) || 'X' ; $this . mask ( mask , { placeholder : mask_placeholder } ) ; } ) } if ( $ . fn . autocomplete ) { $ ( '[data-autocomplete]' ) . each ( function ( ) { var $this = $ ( this ) ; var availableTags = $this . data ( 'autocomplete' ) || [ "The" , "Quick" , "Brown" , "Fox" , "Jumps" , "Over" , "Three" , "Lazy" , "Dogs" ] ; $this . autocomplete ( { source : availableTags } ) ; } ) } if ( $ . fn . datepicker ) { $ ( '.datepicker' ) . each ( function ( ) { var $this = $ ( this ) ; var dataDateFormat = $this . attr ( 'data-dateformat' ) || 'dd.mm.yy' ; $this . datepicker ( { dateFormat : dataDateFormat , prevText : '<i class="fa fa-chevron-left"></i>' , nextText : '<i class="fa fa-chevron-right"></i>' , } ) ; } ) } $ ( 'button[data-loading-text]' ) . on ( 'click' , function ( ) { var btn = $ ( this ) btn . button ( 'loading' ) setTimeout ( function ( ) { btn . button ( 'reset' ) } , 3000 ) } ) ; }
INITIALIZE FORMS
 Description: Select2, Masking, Datepicker, Autocomplete
INITIALIZE FORMS Description : Select2 Masking Datepicker Autocomplete
/*
   * BOOTSTRAP SLIDER PLUGIN
   * Usage:
   * Dependency: js/plugin/bootstrap-slider
   */ /*
   * SELECT2 PLUGIN
   * Usage:
   * Dependency: js/plugin/select2/
   */ //, _showSearchInput = $this.attr('data-select-search') === 'true'; //showSearchInput : _showSearchInput, /*
   * MASKING
   * Dependency: js/plugin/masked-input/
   */ /*
   * Autocomplete
   * Dependency: js/jqui
   */ /*
   * JQUERY UI DATE
   * Dependency: js/libs/jquery-ui-1.10.3.min.js
   * Usage:
   */ /*
   * AJAX BUTTON LOADING TEXT
   * Usage: <button type="button" data-loading-text="Loading..." class="btn btn-xs btn-default ajax-refresh"> .. </button>
   */