quantum 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quantum/version.rb +1 -1
- data/vendor/assets/javascripts/alert.js +2 -2
- data/vendor/assets/javascripts/collapse.js +2 -2
- data/vendor/assets/javascripts/date_picker.js +0 -0
- data/vendor/assets/javascripts/dropdown.js +2 -2
- data/vendor/assets/javascripts/file_input.js +0 -0
- data/vendor/assets/javascripts/map.js +63 -15
- data/vendor/assets/javascripts/modal.js +2 -2
- data/vendor/assets/javascripts/popover.js +2 -2
- data/vendor/assets/javascripts/tab.js +2 -2
- data/vendor/assets/javascripts/time_picker.js +0 -0
- data/vendor/assets/javascripts/tooltip.js +2 -2
- data/vendor/assets/javascripts/transitions.js +2 -2
- data/vendor/assets/stylesheets/alert.css.scss +0 -0
- data/vendor/assets/stylesheets/breadcrumb.css.scss +1 -1
- data/vendor/assets/stylesheets/button.css.scss +0 -0
- data/vendor/assets/stylesheets/code.css.scss +7 -5
- data/vendor/assets/stylesheets/collapse.css.scss +0 -0
- data/vendor/assets/stylesheets/datepicker.css.scss +0 -0
- data/vendor/assets/stylesheets/dropdown.css.scss +0 -0
- data/vendor/assets/stylesheets/file_input.css.scss +0 -0
- data/vendor/assets/stylesheets/footer.css.scss +0 -0
- data/vendor/assets/stylesheets/form.css.scss +0 -0
- data/vendor/assets/stylesheets/grid.css.scss +1 -0
- data/vendor/assets/stylesheets/header.css.scss +1 -1
- data/vendor/assets/stylesheets/icon.css.scss +0 -0
- data/vendor/assets/stylesheets/image.css.scss +0 -0
- data/vendor/assets/stylesheets/label_and_badge.css.scss +0 -0
- data/vendor/assets/stylesheets/link.css.scss +4 -4
- data/vendor/assets/stylesheets/list.css.scss +0 -0
- data/vendor/assets/stylesheets/map.css.scss +0 -0
- data/vendor/assets/stylesheets/modal.css.scss +0 -0
- data/vendor/assets/stylesheets/pagination.css.scss +0 -0
- data/vendor/assets/stylesheets/popover.css.scss +0 -0
- data/vendor/assets/stylesheets/progress.css.scss +0 -0
- data/vendor/assets/stylesheets/reset.css.scss +3 -3
- data/vendor/assets/stylesheets/tab.css.scss +0 -0
- data/vendor/assets/stylesheets/table.css.scss +0 -0
- data/vendor/assets/stylesheets/timepicker.css.scss +0 -0
- data/vendor/assets/stylesheets/tooltip.css.scss +0 -0
- data/vendor/assets/stylesheets/transitions.css.scss +0 -0
- data/vendor/assets/stylesheets/trunk.css.scss +0 -0
- data/vendor/assets/stylesheets/typography.css.scss +43 -19
- metadata +3 -15
- data/vendor/assets/.keep +0 -0
- data/vendor/assets/javascripts/chart.js +0 -1424
- data/vendor/assets/javascripts/input_mask.js +0 -355
- data/vendor/assets/javascripts/qrcode.js +0 -89
- data/vendor/assets/javascripts/qrcoder.js +0 -1237
- data/vendor/assets/javascripts/typeahead.js +0 -335
- data/vendor/assets/javascripts/typer.js +0 -260
- data/vendor/assets/javascripts/wizard.js +0 -114
- data/vendor/assets/stylesheets/chart.css.scss +0 -10
- data/vendor/assets/stylesheets/qrcode.css.scss +0 -7
- data/vendor/assets/stylesheets/typeahead.css.scss +0 -7
- data/vendor/assets/stylesheets/wizard.css.scss +0 -27
@@ -1,114 +0,0 @@
|
|
1
|
-
(function( $ ){
|
2
|
-
|
3
|
-
$.fn.wizard = function(options) {
|
4
|
-
|
5
|
-
var settings = $.extend({
|
6
|
-
defaultTitle : 'Step',
|
7
|
-
nextClass: 'btn-wizard-next',
|
8
|
-
prevClass: 'btn-wizard-previous',
|
9
|
-
jumperClass: 'btn-wizard-jump',
|
10
|
-
primaryButtonClass : 'btn-wizard-submit'
|
11
|
-
}, options );
|
12
|
-
|
13
|
-
this.each(function() {
|
14
|
-
$(this).data('wizard', new Wizard(this, settings));
|
15
|
-
});
|
16
|
-
return this;
|
17
|
-
}
|
18
|
-
|
19
|
-
function Wizard(wizard, settings) {
|
20
|
-
this.settings = settings;
|
21
|
-
this.$wizard = $(wizard);
|
22
|
-
this.$fieldsets = this.$wizard.find('fieldset');
|
23
|
-
this.createBreadcrumb();
|
24
|
-
this.initEvents();
|
25
|
-
}
|
26
|
-
|
27
|
-
Wizard.prototype.initEvents = function() {
|
28
|
-
var _this = this
|
29
|
-
this.$wizard.on('click', '.' + this.settings.nextClass, function(e) {
|
30
|
-
e.stopPropagation();
|
31
|
-
var $fieldset = $(this).closest('fieldset'),
|
32
|
-
validation = $fieldset.data('validation');
|
33
|
-
if (validation) {
|
34
|
-
validation($fieldset,function(valid) {
|
35
|
-
if (!valid) return;
|
36
|
-
$nextFieldset = $fieldset.next('fieldset');
|
37
|
-
_this.showFieldset($fieldset, $nextFieldset);
|
38
|
-
});
|
39
|
-
} else {
|
40
|
-
$nextFieldset = $fieldset.next('fieldset');
|
41
|
-
_this.showFieldset($fieldset, $nextFieldset);
|
42
|
-
}
|
43
|
-
return false;
|
44
|
-
});
|
45
|
-
|
46
|
-
this.$wizard.on('click', '.' + this.settings.prevClass, function(e) {
|
47
|
-
e.stopPropagation();
|
48
|
-
var $fieldset = $(this).closest('fieldset'),
|
49
|
-
$prevFieldset = $fieldset.prev('fieldset');
|
50
|
-
_this.showFieldset($fieldset, $prevFieldset);
|
51
|
-
return false;
|
52
|
-
});
|
53
|
-
|
54
|
-
this.$wizard.on('click', 'a.' + this.settings.jumperClass, function(e) {
|
55
|
-
var step = this.href.split('#')[1];
|
56
|
-
e.stopPropagation();
|
57
|
-
_this.showFieldset($('fieldset:visible'), $('fieldset:eq('+step+')'));
|
58
|
-
return false;
|
59
|
-
});
|
60
|
-
|
61
|
-
this.$fieldsets.on('keydown',':input,.' + _this.settings.primaryButtonClass, function(e) {
|
62
|
-
if (e.which != keyCodeEnter) return true;
|
63
|
-
e.stopPropagation();
|
64
|
-
$(this).closest('fieldset').find('.' + _this.settings.primaryButtonClass).trigger('click');
|
65
|
-
return false;
|
66
|
-
});
|
67
|
-
};
|
68
|
-
|
69
|
-
Wizard.prototype.createBreadcrumb = function() {
|
70
|
-
var _this = this;
|
71
|
-
this.$breadcrumb = $(document.createElement('ul')).addClass('wizard-breadcrumb');
|
72
|
-
this.$fieldsets.each(function(i) {
|
73
|
-
var $fieldset = $(this);
|
74
|
-
var $li = $(document.createElement('li'));
|
75
|
-
if (i == 0) $li.addClass('active');
|
76
|
-
var $value = $(document.createElement('span')).addClass('value');
|
77
|
-
if ($fieldset.find('legend').length) $value.text($fieldset.find('legend').text());
|
78
|
-
else $value.text((i + 1) + '. ' + _this.settings.defaultTitle);
|
79
|
-
$li.append($value);
|
80
|
-
if (i < _this.$fieldsets.length - 1 ) {
|
81
|
-
var $divider = $(document.createElement('span')).addClass('divider');
|
82
|
-
$divider.append($(document.createElement('i')).addClass('icon-double-angle-right'));
|
83
|
-
$li.append($divider);
|
84
|
-
}
|
85
|
-
_this.$breadcrumb.append($li);
|
86
|
-
});
|
87
|
-
this.$fieldsets.hide();
|
88
|
-
this.$breadcrumb.insertBefore(this.$fieldsets.first().show());
|
89
|
-
};
|
90
|
-
|
91
|
-
Wizard.prototype.showFieldset = function($oldFieldset, $newFieldset) {
|
92
|
-
var _this = this;
|
93
|
-
$oldFieldset.hide().trigger('hide');
|
94
|
-
$newFieldset.show().trigger('show').find('input:visible:first').focus();
|
95
|
-
$('li.active', _this.$breadcrumb).removeClass('active').trigger('deactivate');
|
96
|
-
$('li', _this.$breadcrumb).eq($('fieldset').index($newFieldset)).addClass('active').trigger('activate');
|
97
|
-
$('li:not(.active)', _this.$breadcrumb).each(function() {
|
98
|
-
var $this = $(this);
|
99
|
-
if ($this.index() > $('fieldset').index($newFieldset)) {
|
100
|
-
$('.value', $(this)).html($(this).text());
|
101
|
-
return true;
|
102
|
-
}
|
103
|
-
var link = $(document.createElement('a'))
|
104
|
-
.addClass(_this.settings.jumperClass)
|
105
|
-
.prop('href', '#' + $this.index())
|
106
|
-
.append($('.value', $this).text());
|
107
|
-
$('.value', $this).html(link);
|
108
|
-
});
|
109
|
-
$('li.active', _this.$breadcrumb).each(function() {
|
110
|
-
$('.value', $(this)).html($(this).text());
|
111
|
-
});
|
112
|
-
};
|
113
|
-
|
114
|
-
})( window.jQuery );
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/* Table of Contents
|
2
|
-
==================================================
|
3
|
-
#Wizard */
|
4
|
-
|
5
|
-
/* #Wizard
|
6
|
-
================================================== */
|
7
|
-
.wizard legend { display: none; }
|
8
|
-
.wizard input[type="submit"] { margin-top: 0; }
|
9
|
-
.wizard-breadcrumb {
|
10
|
-
color: rgba(200,200,200,1);
|
11
|
-
font-size: 12.5px;
|
12
|
-
font-weight: bold;
|
13
|
-
list-style-type: none;
|
14
|
-
margin: -18px 0 30px 0;
|
15
|
-
padding: 0;
|
16
|
-
}
|
17
|
-
.wizard-breadcrumb li {
|
18
|
-
display: inline-block;
|
19
|
-
margin-right: 5px;
|
20
|
-
}
|
21
|
-
.wizard-breadcrumb li:last-child { margin-right: 0; }
|
22
|
-
.wizard-breadcrumb li.active { color: rgba(43,50,53,1); }
|
23
|
-
.wizard-breadcrumb a {
|
24
|
-
color: rgba(200,200,200,1);
|
25
|
-
text-decoration: none;
|
26
|
-
}
|
27
|
-
.wizard-breadcrumb a:hover { color: rgba(58,135,173,1); }
|