defaults.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. Wizard.defaults = {
  2. step: '.wizard-steps > li',
  3. getPane: function(index, step){
  4. return this.$element.find('.wizard-content').children().eq(index);
  5. },
  6. buttonsAppendTo: 'this',
  7. templates: {
  8. buttons: function(){
  9. var options = this.options;
  10. return '<div class="wizard-buttons">'+
  11. '<a class="wizard-back" href="#'+this.id+'" data-wizard="back" role="button">'+options.buttonLabels.back+'</a>' +
  12. '<a class="wizard-next" href="#'+this.id+'" data-wizard="next" role="button">'+options.buttonLabels.next+'</a>' +
  13. '<a class="wizard-finish" href="#'+this.id+'" data-wizard="finish" role="button">'+options.buttonLabels.finish+'</a>' +
  14. '</div>';
  15. }
  16. },
  17. classes: {
  18. step: {
  19. done: 'done',
  20. error: 'error',
  21. active: 'current',
  22. disabled: 'disabled',
  23. activing: 'activing',
  24. loading: 'loading'
  25. },
  26. pane: {
  27. active: 'active',
  28. activing: 'activing'
  29. },
  30. button: {
  31. hide: 'hide',
  32. disabled: 'disabled'
  33. }
  34. },
  35. autoFocus: true,
  36. keyboard: true,
  37. enableWhenVisited: false,
  38. buttonLabels: {
  39. next: 'Next',
  40. back: 'Back',
  41. finish: 'Finish'
  42. },
  43. loading: {
  44. show: function(step) {},
  45. hide: function(step) {},
  46. fail: function(step) {}
  47. },
  48. cacheContent: false,
  49. validator: function(step){
  50. return true;
  51. },
  52. onInit: null,
  53. onNext: null,
  54. onBack: null,
  55. onReset: null,
  56. onBeforeShow: null,
  57. onAfterShow: null,
  58. onBeforeHide: null,
  59. onAfterHide: null,
  60. onBeforeLoad: null,
  61. onAfterLoad: null,
  62. onBeforeChange: null,
  63. onAfterChange: null,
  64. onStateChange: null,
  65. onFinish: null
  66. };