diff --git a/external/jquery/addons/css/images/alert.png b/external/jquery/addons/css/images/alert.png new file mode 100644 index 0000000000..c37bd062e6 Binary files /dev/null and b/external/jquery/addons/css/images/alert.png differ diff --git a/external/jquery/addons/css/images/error.png b/external/jquery/addons/css/images/error.png new file mode 100644 index 0000000000..94af849e72 Binary files /dev/null and b/external/jquery/addons/css/images/error.png differ diff --git a/external/jquery/addons/css/jquery.stepy.css b/external/jquery/addons/css/jquery.stepy.css new file mode 100644 index 0000000000..23a02887ca --- /dev/null +++ b/external/jquery/addons/css/jquery.stepy.css @@ -0,0 +1,134 @@ +.stepy-header { + margin : 0; + padding : 0; + width : 724px; + margin-left : 0; +} + +.stepy-header li { + color : #DDDDDD; + list-style : none; + cursor : pointer; + float : left; + padding : 10px +} + +.stepy-header li.stepy-error { + background : url('images/error.png') no-repeat right top +} + +.stepy-header li div { + color : #CCC; + font : bold 1.5em verdana; + /*text-shadow : 1px 1px #F8F8F8*/ +} + +.stepy-header li.stepy-active div { + color : #369; + cursor : auto +} + +.stepy-header li span { + color : #CCC; + font : 1.2em verdana +} + +.stepy-header li.stepy-active span { + color : #BBB +} + +.stepy-step { + border : 1px solid #BBB; + clear : left; + padding : 0 20px; + width : 600px; + -khtml-border-radius : 3px; + -moz-border-radius : 3px; + -opera-border-radius : 3px; + -webkit-border-radius : 3px; + border-radius : 3px +} + +.stepy-step legend { + color : #4080BF; + font : bold 1.0em arial; + letter-spacing : .7px; + padding : 0 5px 5px; + width : auto; + margin-bottom : 12px; + border-bottom : 0; +} + +.stepy-step label { + /*color : #222;*/ + display : block; + /*font : bold 1.5em arial;*/ + letter-spacing : .7px; + margin : 10px 0 3px 1px +} + +.stepy-navigator { + height : 33px; + margin-top : 20px +} + +.button-back { + float : left +} + +.finish, +.button-next, +.stepy-navigator input[type="submit"] { + float : right +} + +.button-back, +.button-next, +.stepy-navigator input[type="submit"] { + border : 1px solid #CCC; + color : #7F0055; + cursor : pointer; + font : 1.2em verdana; + padding : 7px 15px 8px; + text-decoration : none; + -khtml-border-radius : 3px; + -moz-border-radius : 3px; + -opera-border-radius : 3px; + -webkit-border-radius : 3px; + border-radius : 3px +} + +.stepy-navigator input[type="submit"] { + background-color : transparent; + border-color : #CCC; + margin-bottom : 0; + padding : 7px 15px 24px; + width : 90px +} + +.button-back:hover, +.button-next:hover, +.stepy-navigator input[type="submit"]:hover { + border-color : #BBB; + color : #B07 +} + +.error-image { + background : url("images/error.png") no-repeat scroll right top transparent; +} + +.error { + background-color : #FAF4F4; +} + +label.error { + background : url("images/alert.png") no-repeat scroll 0 0 transparent; + color : #DE5130; + display : block; + float : right; + font : 10px verdana; + height : 13px; + margin : 3px 3px 0 10px; + padding-left : 21px; + padding-top : 2px; +} diff --git a/external/jquery/addons/js/jquery.stepy.js b/external/jquery/addons/js/jquery.stepy.js new file mode 100644 index 0000000000..4672323dc9 --- /dev/null +++ b/external/jquery/addons/js/jquery.stepy.js @@ -0,0 +1,410 @@ +/*! + * jQuery Stepy - A Wizard Plugin + * -------------------------------------------------------------- + * + * jQuery Stepy is a plugin that generates a customizable wizard. + * + * Licensed under The MIT License + * + * @version 1.1.0 + * @since 2010-07-03 + * @author Washington Botelho + * @documentation wbotelhos.com/stepy + * + * -------------------------------------------------------------- + * + *
+ * + * $('form').stepy(); + * + */ + +; +(function ($) { + + var methods = { + init: function (settings) { + return this.each(function () { + methods.destroy.call(this); + + this.opt = $.extend({}, $.fn.stepy.defaults, settings); + + var self = this, + that = $(this), + id = that.attr('id'); + + if (id === undefined || id === '') { + var id = methods._hash.call(self); + + that.attr('id', id); + } + + if (self.opt.validate) { + jQuery.validator.setDefaults({ ignore: self.opt.ignore }); + + that.append(''); + } + + self.header = methods._header.call(self); + self.steps = that.children('fieldset'); + + self.steps.each(function (index) { + methods._createHead.call(self, this, index); + methods._createButtons.call(self, this, index); + }); + + self.heads = self.header.children('li'); + + self.heads.first().addClass('stepy-active'); + + if (self.opt.finishButton) { + methods._bindFinish.call(self); + } + + if (self.opt.titleClick) { + self.heads.click(function () { + var array = self.heads.filter('.stepy-active').attr('id').split('-'), // TODO: try keep the number in an attribute. + current = parseInt(array[array.length - 1], 10), + clicked = $(this).index(); + + if (clicked > current) { + if (self.opt.next && !methods._execute.call(that, self.opt.next, clicked)) { + return false; + } + } else if (clicked < current) { + if (self.opt.back && !methods._execute.call(that, self.opt.back, clicked)) { + return false; + } + } + + if (clicked != current) { + methods.step.call(self, (clicked) + 1); + } + }); + } else { + self.heads.css('cursor', 'default'); + } + + if (self.opt.enter) { + methods._bindEnter.call(self); + } + + self.steps.first().find(':input:visible:enabled').first().select().focus(); + + that.data({ 'settings': this.opt, 'stepy': true }); + }); + }, _bindEnter: function () { + var self = this; + + self.steps.delegate('input[type="text"], input[type="password"]', 'keypress', function (evt) { + var key = (evt.keyCode ? evt.keyCode : evt.which); + + if (key == 13) { + evt.preventDefault(); + + var buttons = $(this).closest('fieldset').find('.stepy-navigator'); + + if (buttons.length) { + var next = buttons.children('.button-next'); + + if (next.length) { + next.click(); + } else if (self.finish) { + self.finish.click(); + } + } + } + }); + }, _bindFinish: function () { + var self = this, + that = $(this), + finish = $(':submit', that); + + self.finish = (finish.length === 1) ? finish : that.children('.stepy-finish'); + + if (self.finish.length) { + var isForm = that.is('form'), + onSubmit = undefined; + + if (isForm && self.opt.finish) { + onSubmit = that.attr('onsubmit'); + + that.attr('onsubmit', 'return false;'); + } + + self.finish.on('click.stepy', function (evt) { + if (self.opt.finish && !methods._execute.call(that, self.opt.finish, self.steps.length - 1)) { + evt.preventDefault(); + } else if (isForm) { + if (onSubmit) { + that.attr('onsubmit', onSubmit); + } else { + that.removeAttr('onsubmit'); + } + + var isSubmit = self.finish.attr('type') === 'submit'; + + if (!isSubmit && (!self.opt.validate || methods.validate.call(that, self.steps.length - 1))) { + that.submit(); + } + } + }); + + self.steps.last().children('.stepy-navigator').append(self.finish); + } else { + $.error('Submit button or element with class "stepy-finish" missing!'); + } + }, _createBackButton: function (nav, index) { + var self = this, + that = $(this), + attributes = { href: 'javascript:void(0);', 'class': 'button-back '+self.opt.btnClass, html: self.opt.backLabel }; + + $('', attributes).on('click.stepy',function () { + if (!self.opt.back || methods._execute.call(self, self.opt.back, index - 1)) { + methods.step.call(self, (index - 1) + 1); + } + }).appendTo(nav); + }, _createButtons: function (step, index) { + var nav = methods._navigator.call(this).appendTo(step); + + if (index === 0) { + if (this.steps.length > 1) { + methods._createNextButton.call(this, nav, index); + } + } else { + $(step).hide(); + + methods._createBackButton.call(this, nav, index); + + if (index < this.steps.length - 1) { + methods._createNextButton.call(this, nav, index); + } + } + }, _createHead: function (step, index) { + var step = $(step).attr('id', $(this).attr('id') + '-step-' + index).addClass('stepy-step'), + head = methods._head.call(this, index); + + head.append(methods._title.call(this, step)); + + if (this.opt.description) { + head.append(methods._description.call(this, step)); + } + + this.header.append(head); + }, _createNextButton: function (nav, index) { + var self = this, + that = $(this), + attributes = { href: 'javascript:void(0);', 'class': 'button-next '+self.opt.btnClass, html: self.opt.nextLabel }; + + $('', attributes).on('click.stepy',function () { + if (!self.opt.next || methods._execute.call(that, self.opt.next, index + 1)) { + methods.step.call(self, (index + 1) + 1); + } + }).appendTo(nav); + }, _description: function (step) { + var legend = step.children('legend'); + + if (!this.opt.legend) { + legend.hide(); + } + + if (legend.length) { + return $('', { html: legend.html() }); + } + + methods._error.call(this, ' element missing!'); + }, _error: function (message) { + $(this).html(message); + + $.error(message); + }, _execute: function (callback, index) { + var isValid = callback.call(this, index + 1); + + return isValid || isValid === undefined; + }, _hash: function () { + this.hash = 'stepy-' + Math.random().toString().substring(2) + + return this.hash; + }, _head: function (index) { + return $('', { id: $(this).attr('id') + '-head-' + index }); + }, _header: function () { + var header = $('