active_frontend 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/active_frontend/version.rb +1 -1
- data/vendor/assets/javascripts/affix.js +1 -1
- data/vendor/assets/javascripts/button.js +11 -7
- data/vendor/assets/javascripts/color_picker.js +128 -0
- data/vendor/assets/javascripts/dropdown.js +38 -38
- data/vendor/assets/javascripts/map.js +30 -16
- data/vendor/assets/javascripts/tab.js +3 -1
- data/vendor/assets/javascripts/tooltip.js +56 -18
- data/vendor/assets/stylesheets/colorpicker.scss +81 -0
- data/vendor/assets/stylesheets/datepicker.scss +6 -6
- data/vendor/assets/stylesheets/dropdown.scss +7 -7
- data/vendor/assets/stylesheets/header.scss +2 -2
- data/vendor/assets/stylesheets/timepicker.scss +5 -5
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86f36cc3a03316f1ecd96cc4fa5a5679bc86287d
|
|
4
|
+
data.tar.gz: 092ccf8ffff34a6876df3fac289d9a1f4e58fd90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 049c00f131fa20db347da9e44e3bce7debd42c59d54ab4b8407809701ebdb88efbff9ae095e6c836143213d0cb0cf0d6b64c9a46cb130598eb138d75703deb1b
|
|
7
|
+
data.tar.gz: f307d02a9a328c7404ebc86191a1e6ab3af39d5ef69b64279582a4d320d59955f5122f1ceb8f20ab9a18b13f1b7a3150cb1d95d8c68c52271e15c85db0709343
|
data/README.md
CHANGED
|
@@ -37,6 +37,7 @@ Add the CSS files you want to include:
|
|
|
37
37
|
*= require chart.css
|
|
38
38
|
*= require code.css
|
|
39
39
|
*= require collapse.css
|
|
40
|
+
*= require colorpicker.css
|
|
40
41
|
*= require datepicker.css
|
|
41
42
|
*= require dropdown.css
|
|
42
43
|
*= require footer.css
|
|
@@ -80,6 +81,7 @@ Add the JS files you want to include:
|
|
|
80
81
|
//= require carousel.js
|
|
81
82
|
//= require chart.js
|
|
82
83
|
//= require collapse.js
|
|
84
|
+
//= require color_picker.js
|
|
83
85
|
//= require date_picker.js
|
|
84
86
|
//= require dropdown.js
|
|
85
87
|
//= require file_input.js
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
var offset = this.options.offset
|
|
70
70
|
var offsetTop = offset.top
|
|
71
71
|
var offsetBottom = offset.bottom
|
|
72
|
-
var scrollHeight = $(document.body).height()
|
|
72
|
+
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
|
73
73
|
|
|
74
74
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
|
75
75
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
var val = $el.is('input') ? 'val' : 'html'
|
|
23
23
|
var data = $el.data()
|
|
24
24
|
|
|
25
|
-
state
|
|
25
|
+
state += 'Text'
|
|
26
26
|
|
|
27
27
|
if (data.resetText == null) $el.data('resetText', $el[val]())
|
|
28
28
|
|
|
@@ -47,15 +47,19 @@
|
|
|
47
47
|
if ($parent.length) {
|
|
48
48
|
var $input = this.$element.find('input')
|
|
49
49
|
if ($input.prop('type') == 'radio') {
|
|
50
|
-
if ($input.prop('checked')
|
|
51
|
-
|
|
50
|
+
if ($input.prop('checked')) changed = false
|
|
51
|
+
$parent.find('.active').removeClass('active')
|
|
52
|
+
this.$element.addClass('active')
|
|
53
|
+
} else if ($input.prop('type') == 'checkbox') {
|
|
54
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
|
55
|
+
this.$element.toggleClass('active')
|
|
52
56
|
}
|
|
53
|
-
|
|
57
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
|
58
|
+
if (changed) $input.trigger('change')
|
|
54
59
|
} else {
|
|
55
60
|
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
|
61
|
+
this.$element.toggleClass('active')
|
|
56
62
|
}
|
|
57
|
-
|
|
58
|
-
if (changed) this.$element.toggleClass('active')
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
|
|
@@ -98,7 +102,7 @@
|
|
|
98
102
|
var $btn = $(e.target)
|
|
99
103
|
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
|
100
104
|
Plugin.call($btn, 'toggle')
|
|
101
|
-
e.preventDefault()
|
|
105
|
+
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
|
|
102
106
|
})
|
|
103
107
|
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
|
104
108
|
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var ColorPicker = function(select, options) {
|
|
5
|
+
this.options = options;
|
|
6
|
+
this.$select = $(select);
|
|
7
|
+
this._init();
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
ColorPicker.prototype = {
|
|
11
|
+
|
|
12
|
+
constructor : ColorPicker,
|
|
13
|
+
|
|
14
|
+
_init : function() {
|
|
15
|
+
|
|
16
|
+
var callback = this.options.callback;
|
|
17
|
+
|
|
18
|
+
var selectValue = this.$select.val();
|
|
19
|
+
var selectColor = this.$select.find("option:selected").data("color");
|
|
20
|
+
|
|
21
|
+
var $markupUl = $("<ul>").addClass("dropdown-menu").addClass("dropdown-caret");
|
|
22
|
+
var $markupDiv = $("<div>").addClass("dropdown").addClass("dropdown-colorpicker");
|
|
23
|
+
var $markupSpan = $("<span>").addClass("btn-colorpicker").css("background-color", selectColor);
|
|
24
|
+
var $markupA = $("<a>").attr("data-toggle", "dropdown").addClass("dropdown-toggle").attr("href", "#").append($markupSpan);
|
|
25
|
+
|
|
26
|
+
// create an li-tag for every option of the select
|
|
27
|
+
$("option", this.$select).each(function() {
|
|
28
|
+
|
|
29
|
+
var option = $(this);
|
|
30
|
+
var value = option.attr("value");
|
|
31
|
+
var color = option.data("color");
|
|
32
|
+
var title = option.text();
|
|
33
|
+
|
|
34
|
+
// create a-tag
|
|
35
|
+
var $markupA = $("<a>").addClass("color-btn");
|
|
36
|
+
if (option.prop("selected") === true || selectValue === color) {
|
|
37
|
+
$markupA.addClass("selected");
|
|
38
|
+
}
|
|
39
|
+
$markupA.css("background-color", color);
|
|
40
|
+
$markupA.attr("href", "#").attr("data-color", color).attr("data-value", value).attr("title", title);
|
|
41
|
+
|
|
42
|
+
// create li-tag
|
|
43
|
+
$markupUl.append($("<li>").append($markupA));
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// append the colorpicker
|
|
47
|
+
$markupDiv.append($markupA);
|
|
48
|
+
// append the colorpicker-dropdown
|
|
49
|
+
$markupDiv.append($markupUl);
|
|
50
|
+
|
|
51
|
+
// hide the select
|
|
52
|
+
this.$select.hide();
|
|
53
|
+
|
|
54
|
+
// insert the colorpicker
|
|
55
|
+
this.$selector = $($markupDiv).insertAfter(this.$select);
|
|
56
|
+
|
|
57
|
+
// register change handler
|
|
58
|
+
this.$select.on("change", function() {
|
|
59
|
+
|
|
60
|
+
var value = $(this).val();
|
|
61
|
+
var color = $(this).find("option[value='" + value + "']").data("color");
|
|
62
|
+
var title = $(this).find("option[value='" + value + "']").text();
|
|
63
|
+
|
|
64
|
+
// remove old and set new selected color
|
|
65
|
+
$(this).next().find("ul").find("li").find(".selected").removeClass("selected");
|
|
66
|
+
$(this).next().find("ul").find("li").find("a[data-color='" + color + "']").addClass("selected");
|
|
67
|
+
|
|
68
|
+
$(this).next().find(".btn-colorpicker").css("background-color", color);
|
|
69
|
+
|
|
70
|
+
callback(value, color, title);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// register click handler
|
|
74
|
+
$markupUl.on('click.colorpicker', $.proxy(this._clickColor, this));
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
_clickColor : function(e) {
|
|
78
|
+
|
|
79
|
+
var a = $(e.target);
|
|
80
|
+
|
|
81
|
+
if (!a.is(".color-btn")) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
this.$select.val(a.data("value")).change();
|
|
86
|
+
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
return true;
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
setColor : function(color) {
|
|
92
|
+
// find value for color
|
|
93
|
+
var value = $(this.$selector).find("li").find("a[data-color='" + color + "']").data("value");
|
|
94
|
+
this.setValue(value);
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
setValue : function(value) {
|
|
98
|
+
this.$select.val(value).change();
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
$.fn.colorpicker = function(option) {
|
|
104
|
+
var args = Array.apply(null, arguments);
|
|
105
|
+
args.shift();
|
|
106
|
+
|
|
107
|
+
return this.each(function() {
|
|
108
|
+
|
|
109
|
+
var $this = $(this), data = $this.data("colorpicker"), options = $.extend({}, $.fn.colorpicker.defaults, $this.data(), typeof option == "object" && option);
|
|
110
|
+
|
|
111
|
+
if (!data) {
|
|
112
|
+
$this.data("colorpicker", (data = new ColorPicker(this, options)));
|
|
113
|
+
}
|
|
114
|
+
if (typeof option == "string") {
|
|
115
|
+
data[option].apply(data, args);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
$.fn.colorpicker.defaults = {
|
|
121
|
+
callback : function(value, color, title) {
|
|
122
|
+
},
|
|
123
|
+
colorsPerRow : 8
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
$.fn.colorpicker.Constructor = ColorPicker;
|
|
127
|
+
|
|
128
|
+
})(jQuery, window, document);
|
|
@@ -12,6 +12,40 @@
|
|
|
12
12
|
|
|
13
13
|
Dropdown.VERSION = '3.3.4'
|
|
14
14
|
|
|
15
|
+
function getParent($this) {
|
|
16
|
+
var selector = $this.attr('data-target')
|
|
17
|
+
|
|
18
|
+
if (!selector) {
|
|
19
|
+
selector = $this.attr('href')
|
|
20
|
+
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var $parent = selector && $(selector)
|
|
24
|
+
|
|
25
|
+
return $parent && $parent.length ? $parent : $this.parent()
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function clearMenus(e) {
|
|
29
|
+
if (e && e.which === 3) return
|
|
30
|
+
$(backdrop).remove()
|
|
31
|
+
$(toggle).each(function () {
|
|
32
|
+
var $this = $(this)
|
|
33
|
+
var $parent = getParent($this)
|
|
34
|
+
var relatedTarget = { relatedTarget: this }
|
|
35
|
+
|
|
36
|
+
if (!$parent.hasClass('open')) return
|
|
37
|
+
|
|
38
|
+
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
|
|
39
|
+
|
|
40
|
+
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
|
41
|
+
|
|
42
|
+
if (e.isDefaultPrevented()) return
|
|
43
|
+
|
|
44
|
+
$this.attr('aria-expanded', 'false')
|
|
45
|
+
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
15
49
|
Dropdown.prototype.toggle = function (e) {
|
|
16
50
|
var $this = $(this)
|
|
17
51
|
|
|
@@ -61,7 +95,7 @@
|
|
|
61
95
|
var $parent = getParent($this)
|
|
62
96
|
var isActive = $parent.hasClass('open')
|
|
63
97
|
|
|
64
|
-
if (
|
|
98
|
+
if (!isActive && e.which != 27 || isActive && e.which == 27) {
|
|
65
99
|
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
|
66
100
|
return $this.trigger('click')
|
|
67
101
|
}
|
|
@@ -73,47 +107,13 @@
|
|
|
73
107
|
|
|
74
108
|
var index = $items.index(e.target)
|
|
75
109
|
|
|
76
|
-
if (e.which == 38 && index > 0) index--
|
|
77
|
-
if (e.which == 40 && index < $items.length - 1) index++
|
|
78
|
-
if (!~index)
|
|
110
|
+
if (e.which == 38 && index > 0) index-- // up
|
|
111
|
+
if (e.which == 40 && index < $items.length - 1) index++ // down
|
|
112
|
+
if (!~index) index = 0
|
|
79
113
|
|
|
80
114
|
$items.eq(index).trigger('focus')
|
|
81
115
|
}
|
|
82
116
|
|
|
83
|
-
function clearMenus(e) {
|
|
84
|
-
if (e && e.which === 3) return
|
|
85
|
-
$(backdrop).remove()
|
|
86
|
-
$(toggle).each(function () {
|
|
87
|
-
var $this = $(this)
|
|
88
|
-
var $parent = getParent($this)
|
|
89
|
-
var relatedTarget = { relatedTarget: this }
|
|
90
|
-
|
|
91
|
-
if (!$parent.hasClass('open')) return
|
|
92
|
-
|
|
93
|
-
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
|
|
94
|
-
|
|
95
|
-
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
|
96
|
-
|
|
97
|
-
if (e.isDefaultPrevented()) return
|
|
98
|
-
|
|
99
|
-
$this.attr('aria-expanded', 'false')
|
|
100
|
-
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function getParent($this) {
|
|
105
|
-
var selector = $this.attr('data-target')
|
|
106
|
-
|
|
107
|
-
if (!selector) {
|
|
108
|
-
selector = $this.attr('href')
|
|
109
|
-
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var $parent = selector && $(selector)
|
|
113
|
-
|
|
114
|
-
return $parent && $parent.length ? $parent : $this.parent()
|
|
115
|
-
}
|
|
116
|
-
|
|
117
117
|
|
|
118
118
|
// DROPDOWN PLUGIN DEFINITION
|
|
119
119
|
// ==========================
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
(function(root, factory) {
|
|
2
3
|
if(typeof exports === 'object') {
|
|
3
4
|
module.exports = factory();
|
|
@@ -10,14 +11,6 @@
|
|
|
10
11
|
|
|
11
12
|
}(this, function() {
|
|
12
13
|
|
|
13
|
-
/*!
|
|
14
|
-
* GMaps.js v0.4.17
|
|
15
|
-
* http://hpneo.github.com/gmaps/
|
|
16
|
-
*
|
|
17
|
-
* Copyright 2015, Gustavo Leon
|
|
18
|
-
* Released under the MIT License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
14
|
if (!(typeof window.google === 'object' && window.google.maps)) {
|
|
22
15
|
throw 'Google Maps API is required. Please register the following JavaScript library http://maps.google.com/maps/api/js?sensor=true.'
|
|
23
16
|
}
|
|
@@ -60,7 +53,7 @@ var array_map = function(array, callback) {
|
|
|
60
53
|
|
|
61
54
|
if (Array.prototype.map && array.map === Array.prototype.map) {
|
|
62
55
|
array_return = Array.prototype.map.call(array, function(item) {
|
|
63
|
-
callback_params = original_callback_params;
|
|
56
|
+
var callback_params = original_callback_params.slice(0);
|
|
64
57
|
callback_params.splice(0, 0, item);
|
|
65
58
|
|
|
66
59
|
return callback.apply(this, callback_params);
|
|
@@ -117,11 +110,26 @@ var arrayToLatLng = function(coords, useGeoJSON) {
|
|
|
117
110
|
return coords;
|
|
118
111
|
};
|
|
119
112
|
|
|
113
|
+
|
|
114
|
+
var getElementsByClassName = function (class_name, context) {
|
|
115
|
+
|
|
116
|
+
var element,
|
|
117
|
+
_class = class_name.replace('.', '');
|
|
118
|
+
|
|
119
|
+
if ('jQuery' in this && context) {
|
|
120
|
+
element = $("." + _class, context)[0];
|
|
121
|
+
} else {
|
|
122
|
+
element = document.getElementsByClassName(_class)[0];
|
|
123
|
+
}
|
|
124
|
+
return element;
|
|
125
|
+
|
|
126
|
+
};
|
|
127
|
+
|
|
120
128
|
var getElementById = function(id, context) {
|
|
121
129
|
var element,
|
|
122
130
|
id = id.replace('#', '');
|
|
123
131
|
|
|
124
|
-
if ('jQuery' in
|
|
132
|
+
if ('jQuery' in window && context) {
|
|
125
133
|
element = $('#' + id, context)[0];
|
|
126
134
|
} else {
|
|
127
135
|
element = document.getElementById(id);
|
|
@@ -164,7 +172,7 @@ var GMaps = (function(global) {
|
|
|
164
172
|
],
|
|
165
173
|
events_that_doesnt_hide_context_menu = ['mousemove', 'mouseout', 'mouseover'],
|
|
166
174
|
options_to_be_deleted = ['el', 'lat', 'lng', 'mapType', 'width', 'height', 'markerClusterer', 'enableNewStyle'],
|
|
167
|
-
|
|
175
|
+
identifier = options.el || options.div,
|
|
168
176
|
markerClustererFunction = options.markerClusterer,
|
|
169
177
|
mapType = google.maps.MapTypeId[options.mapType.toUpperCase()],
|
|
170
178
|
map_center = new google.maps.LatLng(options.lat, options.lng),
|
|
@@ -199,11 +207,17 @@ var GMaps = (function(global) {
|
|
|
199
207
|
overviewMapControl: overviewMapControl
|
|
200
208
|
};
|
|
201
209
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {
|
|
211
|
+
|
|
212
|
+
if (identifier.indexOf("#") > -1) {
|
|
213
|
+
this.el = getElementById(identifier, options.context);
|
|
214
|
+
} else {
|
|
215
|
+
this.el = getElementsByClassName.apply(this, [identifier, options.context]);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
} else {
|
|
219
|
+
this.el = identifier;
|
|
220
|
+
}
|
|
207
221
|
|
|
208
222
|
if (typeof(this.el) === 'undefined' || this.el === null) {
|
|
209
223
|
throw 'No element defined.';
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
// ====================
|
|
6
6
|
|
|
7
7
|
var Tab = function (element) {
|
|
8
|
+
// jscs:disable requireDollarBeforejQueryAssignment
|
|
8
9
|
this.element = $(element)
|
|
10
|
+
// jscs:enable requireDollarBeforejQueryAssignment
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
Tab.VERSION = '3.3.4'
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
var $active = container.find('> .active')
|
|
57
59
|
var transition = callback
|
|
58
60
|
&& $.support.transition
|
|
59
|
-
&& (
|
|
61
|
+
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
|
60
62
|
|
|
61
63
|
function next() {
|
|
62
64
|
$active
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
this.timeout = null
|
|
12
12
|
this.hoverState = null
|
|
13
13
|
this.$element = null
|
|
14
|
+
this.inState = null
|
|
14
15
|
|
|
15
16
|
this.init('tooltip', element, options)
|
|
16
17
|
}
|
|
@@ -40,7 +41,8 @@
|
|
|
40
41
|
this.type = type
|
|
41
42
|
this.$element = $(element)
|
|
42
43
|
this.options = this.getOptions(options)
|
|
43
|
-
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
|
44
|
+
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
|
45
|
+
this.inState = { click: false, hover: false, focus: false }
|
|
44
46
|
|
|
45
47
|
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
|
46
48
|
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
|
@@ -99,16 +101,20 @@
|
|
|
99
101
|
var self = obj instanceof this.constructor ?
|
|
100
102
|
obj : $(obj.currentTarget).data('bs.' + this.type)
|
|
101
103
|
|
|
102
|
-
if (self && self.$tip && self.$tip.is(':visible')) {
|
|
103
|
-
self.hoverState = 'in'
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
104
|
if (!self) {
|
|
108
105
|
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
|
109
106
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
|
110
107
|
}
|
|
111
108
|
|
|
109
|
+
if (obj instanceof $.Event) {
|
|
110
|
+
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (self.tip().hasClass('in') || self.hoverState == 'in') {
|
|
114
|
+
self.hoverState = 'in'
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
clearTimeout(self.timeout)
|
|
113
119
|
|
|
114
120
|
self.hoverState = 'in'
|
|
@@ -120,6 +126,14 @@
|
|
|
120
126
|
}, self.options.delay.show)
|
|
121
127
|
}
|
|
122
128
|
|
|
129
|
+
Tooltip.prototype.isInStateTrue = function () {
|
|
130
|
+
for (var key in this.inState) {
|
|
131
|
+
if (this.inState[key]) return true
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return false
|
|
135
|
+
}
|
|
136
|
+
|
|
123
137
|
Tooltip.prototype.leave = function (obj) {
|
|
124
138
|
var self = obj instanceof this.constructor ?
|
|
125
139
|
obj : $(obj.currentTarget).data('bs.' + this.type)
|
|
@@ -129,6 +143,12 @@
|
|
|
129
143
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
|
130
144
|
}
|
|
131
145
|
|
|
146
|
+
if (obj instanceof $.Event) {
|
|
147
|
+
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (self.isInStateTrue()) return
|
|
151
|
+
|
|
132
152
|
clearTimeout(self.timeout)
|
|
133
153
|
|
|
134
154
|
self.hoverState = 'out'
|
|
@@ -175,6 +195,7 @@
|
|
|
175
195
|
.data('bs.' + this.type, this)
|
|
176
196
|
|
|
177
197
|
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
|
198
|
+
this.$element.trigger('inserted.bs.' + this.type)
|
|
178
199
|
|
|
179
200
|
var pos = this.getPosition()
|
|
180
201
|
var actualWidth = $tip[0].offsetWidth
|
|
@@ -182,13 +203,12 @@
|
|
|
182
203
|
|
|
183
204
|
if (autoPlace) {
|
|
184
205
|
var orgPlacement = placement
|
|
185
|
-
var
|
|
186
|
-
var containerDim = this.getPosition($container)
|
|
206
|
+
var viewportDim = this.getPosition(this.$viewport)
|
|
187
207
|
|
|
188
|
-
placement = placement == 'bottom' && pos.bottom + actualHeight >
|
|
189
|
-
placement == 'top' && pos.top - actualHeight <
|
|
190
|
-
placement == 'right' && pos.right + actualWidth >
|
|
191
|
-
placement == 'left' && pos.left - actualWidth <
|
|
208
|
+
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
|
209
|
+
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
|
210
|
+
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
|
211
|
+
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
|
192
212
|
placement
|
|
193
213
|
|
|
194
214
|
$tip
|
|
@@ -229,8 +249,8 @@
|
|
|
229
249
|
if (isNaN(marginTop)) marginTop = 0
|
|
230
250
|
if (isNaN(marginLeft)) marginLeft = 0
|
|
231
251
|
|
|
232
|
-
offset.top
|
|
233
|
-
offset.left
|
|
252
|
+
offset.top += marginTop
|
|
253
|
+
offset.left += marginLeft
|
|
234
254
|
|
|
235
255
|
// $.fn.offset doesn't round pixel values
|
|
236
256
|
// so we use setOffset directly with our own function B-0
|
|
@@ -312,7 +332,7 @@
|
|
|
312
332
|
|
|
313
333
|
Tooltip.prototype.fixTitle = function () {
|
|
314
334
|
var $e = this.$element
|
|
315
|
-
if ($e.attr('title') || typeof
|
|
335
|
+
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
|
|
316
336
|
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
|
317
337
|
}
|
|
318
338
|
}
|
|
@@ -367,7 +387,7 @@
|
|
|
367
387
|
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
|
368
388
|
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
|
369
389
|
delta.left = viewportDimensions.left - leftEdgeOffset
|
|
370
|
-
} else if (rightEdgeOffset > viewportDimensions.
|
|
390
|
+
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
|
371
391
|
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
|
372
392
|
}
|
|
373
393
|
}
|
|
@@ -393,7 +413,13 @@
|
|
|
393
413
|
}
|
|
394
414
|
|
|
395
415
|
Tooltip.prototype.tip = function () {
|
|
396
|
-
|
|
416
|
+
if (!this.$tip) {
|
|
417
|
+
this.$tip = $(this.options.template)
|
|
418
|
+
if (this.$tip.length != 1) {
|
|
419
|
+
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return this.$tip
|
|
397
423
|
}
|
|
398
424
|
|
|
399
425
|
Tooltip.prototype.arrow = function () {
|
|
@@ -422,7 +448,13 @@
|
|
|
422
448
|
}
|
|
423
449
|
}
|
|
424
450
|
|
|
425
|
-
|
|
451
|
+
if (e) {
|
|
452
|
+
self.inState.click = !self.inState.click
|
|
453
|
+
if (self.isInStateTrue()) self.enter(self)
|
|
454
|
+
else self.leave(self)
|
|
455
|
+
} else {
|
|
456
|
+
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
|
457
|
+
}
|
|
426
458
|
}
|
|
427
459
|
|
|
428
460
|
Tooltip.prototype.destroy = function () {
|
|
@@ -430,6 +462,12 @@
|
|
|
430
462
|
clearTimeout(this.timeout)
|
|
431
463
|
this.hide(function () {
|
|
432
464
|
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
|
465
|
+
if (that.$tip) {
|
|
466
|
+
that.$tip.detach()
|
|
467
|
+
}
|
|
468
|
+
that.$tip = null
|
|
469
|
+
that.$arrow = null
|
|
470
|
+
that.$viewport = null
|
|
433
471
|
})
|
|
434
472
|
}
|
|
435
473
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* Table of Contents
|
|
2
|
+
==================================================
|
|
3
|
+
# Colorpicker */
|
|
4
|
+
|
|
5
|
+
/* # Colorpicker
|
|
6
|
+
================================================== */
|
|
7
|
+
.dropdown-colorpicker > .dropdown-menu {
|
|
8
|
+
left: -7px;
|
|
9
|
+
padding: 4px;
|
|
10
|
+
}
|
|
11
|
+
.dropdown-colorpicker > .dropdown-menu.pull-right {
|
|
12
|
+
left: auto;
|
|
13
|
+
right: -7px;
|
|
14
|
+
}
|
|
15
|
+
.dropdown-colorpicker > .dropdown-menu.dropdown-caret:before {
|
|
16
|
+
border-bottom: 7px solid rgba(245,248,250,1);
|
|
17
|
+
border-left: 7px solid transparent;
|
|
18
|
+
border-right: 7px solid transparent;
|
|
19
|
+
content: "";
|
|
20
|
+
display: inline-block;
|
|
21
|
+
left: 9px;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: -7px;
|
|
24
|
+
}
|
|
25
|
+
.dropdown-colorpicker > .dropdown-menu.dropdown-caret:after {
|
|
26
|
+
border-bottom: 6px solid rgba(245,248,250,1);
|
|
27
|
+
border-left: 6px solid transparent;
|
|
28
|
+
border-right: 6px solid transparent;
|
|
29
|
+
content: "";
|
|
30
|
+
display: inline-block;
|
|
31
|
+
left: 10px;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: -6px;
|
|
34
|
+
}
|
|
35
|
+
.dropdown-colorpicker > .dropdown-menu.pull-right.dropdown-caret:before {
|
|
36
|
+
left: auto;
|
|
37
|
+
right: 9px;
|
|
38
|
+
}
|
|
39
|
+
.dropdown-colorpicker > .dropdown-menu.pull-right.dropdown-caret:after {
|
|
40
|
+
left: auto;
|
|
41
|
+
right: 10px;
|
|
42
|
+
}
|
|
43
|
+
.dropdown-colorpicker > .dropdown-menu > li {
|
|
44
|
+
display: block;
|
|
45
|
+
float: left;
|
|
46
|
+
width: 26px;
|
|
47
|
+
height: 26px;
|
|
48
|
+
margin: 2px;
|
|
49
|
+
}
|
|
50
|
+
.dropdown-colorpicker > .dropdown-menu > li > .color-btn {
|
|
51
|
+
border-radius: 2px;
|
|
52
|
+
display: block;
|
|
53
|
+
height: 26px;
|
|
54
|
+
margin: 0;
|
|
55
|
+
padding: 0;
|
|
56
|
+
position: relative;
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
-webkit-transition: all ease 0.1s;
|
|
59
|
+
transition: all ease 0.1s;
|
|
60
|
+
width: 26px;
|
|
61
|
+
}
|
|
62
|
+
.dropdown-colorpicker > .dropdown-menu > li > .color-btn.selected:after {
|
|
63
|
+
color: rgba(255,255,255,1);
|
|
64
|
+
content: "\f3fe";
|
|
65
|
+
display: inline-block;
|
|
66
|
+
font-family: "Ionicons";
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
left: 0;
|
|
69
|
+
line-height: 26px;
|
|
70
|
+
position: absolute;
|
|
71
|
+
right: 0;
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
.btn-colorpicker {
|
|
75
|
+
background: rgba(102,117,127,1);
|
|
76
|
+
border-radius: 2px;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
height: 25px;
|
|
79
|
+
vertical-align: middle;
|
|
80
|
+
width: 25px;
|
|
81
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
z-index: 1060;
|
|
13
13
|
}
|
|
14
14
|
.datepicker:before {
|
|
15
|
-
border-bottom: 7px solid rgba(
|
|
15
|
+
border-bottom: 7px solid rgba(245,248,250,1);
|
|
16
16
|
border-right: 7px solid transparent;
|
|
17
17
|
border-left: 7px solid transparent;
|
|
18
18
|
content: '';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
position: absolute;
|
|
21
21
|
}
|
|
22
22
|
.datepicker:after {
|
|
23
|
-
border-bottom: 6px solid rgba(
|
|
23
|
+
border-bottom: 6px solid rgba(245,248,250,1);
|
|
24
24
|
border-right: 6px solid transparent;
|
|
25
25
|
border-left: 6px solid transparent;
|
|
26
26
|
content: '';
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
.datepicker.datepicker-orient-bottom:before {
|
|
37
37
|
bottom: -7px;
|
|
38
38
|
border-bottom: 0;
|
|
39
|
-
border-top: 7px solid rgba(
|
|
39
|
+
border-top: 7px solid rgba(245,248,250,1);
|
|
40
40
|
}
|
|
41
41
|
.datepicker.datepicker-orient-bottom:after {
|
|
42
42
|
bottom: -6px;
|
|
43
43
|
border-bottom: 0;
|
|
44
|
-
border-top: 6px rgba(
|
|
44
|
+
border-top: 6px rgba(245,248,250,1);
|
|
45
45
|
}
|
|
46
46
|
.dow {
|
|
47
|
-
color: rgba(
|
|
47
|
+
color: rgba(43,50,53,1);
|
|
48
48
|
font-weight: bold;
|
|
49
49
|
}
|
|
50
50
|
.datepicker > div { display: none; }
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
.datepicker td span:hover {
|
|
106
106
|
background: rgba(0,132,255,1);
|
|
107
|
-
color: rgba(
|
|
107
|
+
color: rgba(43,50,53,1);
|
|
108
108
|
cursor: pointer;
|
|
109
109
|
}
|
|
110
110
|
.datepicker td span.active,
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
.dropdown-toggle:active,
|
|
11
11
|
.open .dropdown-toggle { outline: 0; }
|
|
12
12
|
.dropdown-menu {
|
|
13
|
-
background: rgba(
|
|
13
|
+
background: rgba(245,248,250,1);
|
|
14
14
|
background-clip: padding-box;
|
|
15
|
-
border: 1px solid rgba(
|
|
15
|
+
border: 1px solid rgba(230,237,242,1);
|
|
16
16
|
border-radius: 4px;
|
|
17
|
-
box-shadow: 0 0 3px rgba(
|
|
17
|
+
box-shadow: 0 0 3px rgba(225,232,237,1);
|
|
18
18
|
box-sizing: border-box;
|
|
19
|
-
color: rgba(
|
|
19
|
+
color: rgba(43,50,53,1);
|
|
20
20
|
display: none;
|
|
21
21
|
float: left;
|
|
22
22
|
font-weight: bold;
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
right: 0;
|
|
37
37
|
}
|
|
38
38
|
.dropdown-menu > .divider {
|
|
39
|
-
background: rgba(
|
|
39
|
+
background: rgba(230,237,242,1);
|
|
40
40
|
height: 1px;
|
|
41
41
|
margin: 5px 0px;
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
}
|
|
44
44
|
.dropdown-menu > li > a {
|
|
45
45
|
clear: both;
|
|
46
|
-
color: rgba(
|
|
46
|
+
color: rgba(43,50,53,1);
|
|
47
47
|
cursor: pointer;
|
|
48
48
|
display: block;
|
|
49
49
|
padding: 5px 15px;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
.dropdown .dropdown-menu .nav-header {
|
|
67
67
|
padding-right: 20px;
|
|
68
|
-
|
|
68
|
+
padding-left: 20px;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/* # Submenu
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
.header-trunk > li > ul.dropdown-menu {
|
|
85
85
|
border-top-right-radius: 0;
|
|
86
86
|
border-top-left-radius: 0;
|
|
87
|
-
box-shadow: 0 1px 2px rgba(
|
|
87
|
+
box-shadow: 0 1px 2px rgba(225,232,237,1);
|
|
88
88
|
margin: 0 0 0 -1px;
|
|
89
89
|
padding: 10px 0;
|
|
90
|
-
width: calc(100% +
|
|
90
|
+
width: calc(100% + 1px);
|
|
91
91
|
}
|
|
92
92
|
.header-trunk > li > ul.dropdown-menu > li.divider { margin: 14px 0 10px 0; }
|
|
93
93
|
.header-trunk > li .badge,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
z-index: 1060;
|
|
13
13
|
}
|
|
14
14
|
.timepicker-widget.dropdown-menu:before {
|
|
15
|
-
border-bottom: 7px solid rgba(
|
|
15
|
+
border-bottom: 7px solid rgba(245,248,250,1);
|
|
16
16
|
border-right: 7px solid transparent;
|
|
17
17
|
border-left: 7px solid transparent;
|
|
18
18
|
content: "";
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
position: absolute;
|
|
21
21
|
}
|
|
22
22
|
.timepicker-widget.dropdown-menu:after {
|
|
23
|
-
border-bottom: 6px solid rgba(
|
|
23
|
+
border-bottom: 6px solid rgba(245,248,250,1);
|
|
24
24
|
border-right: 6px solid transparent;
|
|
25
25
|
border-left: 6px solid transparent;
|
|
26
26
|
content: "";
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
.timepicker-widget.timepicker-orient-top:after { top: -6px; }
|
|
36
36
|
.timepicker-widget.timepicker-orient-bottom:before {
|
|
37
37
|
border-bottom: 0;
|
|
38
|
-
border-top: 7px solid rgba(
|
|
38
|
+
border-top: 7px solid rgba(245,248,250,1);
|
|
39
39
|
bottom: -7px;
|
|
40
40
|
}
|
|
41
41
|
.timepicker-widget.timepicker-orient-bottom:after {
|
|
42
42
|
border-bottom: 0;
|
|
43
|
-
border-top: 6px solid rgba(
|
|
43
|
+
border-top: 6px solid rgba(245,248,250,1);
|
|
44
44
|
bottom: -6px;
|
|
45
45
|
}
|
|
46
46
|
.timepicker-widget a.btn,
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.timepicker-widget table td:not(.separator) { min-width: 30px; }
|
|
58
58
|
.timepicker-widget table td span { width: 100%; }
|
|
59
59
|
.timepicker-widget table td a {
|
|
60
|
-
color: rgba(
|
|
60
|
+
color: rgba(43,50,53,1);
|
|
61
61
|
display: inline-block;
|
|
62
62
|
margin: 0;
|
|
63
63
|
padding: 8px 0;
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_frontend
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -82,6 +82,7 @@ files:
|
|
|
82
82
|
- vendor/assets/javascripts/carousel.js
|
|
83
83
|
- vendor/assets/javascripts/chart.js
|
|
84
84
|
- vendor/assets/javascripts/collapse.js
|
|
85
|
+
- vendor/assets/javascripts/color_picker.js
|
|
85
86
|
- vendor/assets/javascripts/date_picker.js
|
|
86
87
|
- vendor/assets/javascripts/dropdown.js
|
|
87
88
|
- vendor/assets/javascripts/file_input.js
|
|
@@ -113,6 +114,7 @@ files:
|
|
|
113
114
|
- vendor/assets/stylesheets/chart.scss
|
|
114
115
|
- vendor/assets/stylesheets/code.scss
|
|
115
116
|
- vendor/assets/stylesheets/collapse.scss
|
|
117
|
+
- vendor/assets/stylesheets/colorpicker.scss
|
|
116
118
|
- vendor/assets/stylesheets/datepicker.scss
|
|
117
119
|
- vendor/assets/stylesheets/dropdown.scss
|
|
118
120
|
- vendor/assets/stylesheets/footer.scss
|
|
@@ -164,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
164
166
|
version: '0'
|
|
165
167
|
requirements: []
|
|
166
168
|
rubyforge_project:
|
|
167
|
-
rubygems_version: 2.4.
|
|
169
|
+
rubygems_version: 2.4.6
|
|
168
170
|
signing_key:
|
|
169
171
|
specification_version: 4
|
|
170
172
|
summary: ActiveFrontend Responsive Web Framework
|