jquery-qtip2-rails 0.2.0 → 0.3.0
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.
- data/README.md +16 -13
- data/jquery-qtip2-rails.gemspec +7 -4
- data/lib/jquery-qtip2-rails/version.rb +1 -1
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/javascripts/home.js +48 -0
- data/test/dummy/app/assets/stylesheets/application.css +14 -0
- data/test/dummy/app/assets/stylesheets/home.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/home_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/home_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/views/home/index.html.erb +14 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +68 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +31 -0
- data/test/dummy/config/environments/production.rb +64 -0
- data/test/dummy/config/environments/test.rb +35 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/vendor/assets/jquery-qtip/jquery-qtip/src/ajax/ajax.js +3 -2
- data/vendor/assets/jquery-qtip/jquery-qtip/src/{styles.css → basic.css} +0 -0
- data/vendor/assets/jquery-qtip/jquery-qtip/src/core.css +27 -22
- data/vendor/assets/jquery-qtip/jquery-qtip/src/core.js +162 -315
- data/vendor/assets/jquery-qtip/jquery-qtip/src/{extra.css → css3.css} +70 -30
- data/vendor/assets/jquery-qtip/jquery-qtip/src/imagemap/imagemap.js +59 -45
- data/vendor/assets/jquery-qtip/jquery-qtip/src/intro.js +31 -29
- data/vendor/assets/jquery-qtip/jquery-qtip/src/modal/modal.js +7 -5
- data/vendor/assets/jquery-qtip/jquery-qtip/src/outro.js +2 -2
- data/vendor/assets/jquery-qtip/jquery-qtip/src/svg/svg.js +8 -8
- data/vendor/assets/jquery-qtip/jquery-qtip/src/tips/tips.css +7 -3
- data/vendor/assets/jquery-qtip/jquery-qtip/src/tips/tips.js +159 -147
- data/vendor/assets/jquery-qtip/jquery-qtip/src/viewport/viewport.js +112 -0
- data/vendor/assets/jquery-qtip/jquery.qtip.basic.css +5 -0
- data/vendor/assets/jquery-qtip/jquery.qtip.basic.js +0 -1
- data/vendor/assets/jquery-qtip/jquery.qtip.css +3 -4
- data/vendor/assets/jquery-qtip/jquery.qtip.js +5 -5
- metadata +103 -8
- data/vendor/assets/jquery-qtip/jquery-qtip/src/header.txt +0 -14
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
/* Add shadows to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
|
2
2
|
.ui-tooltip-shadow{
|
3
3
|
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
4
4
|
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
5
5
|
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
6
6
|
}
|
7
7
|
|
8
|
-
|
8
|
+
/* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
|
9
9
|
.ui-tooltip-rounded,
|
10
10
|
.ui-tooltip-tipsy,
|
11
11
|
.ui-tooltip-bootstrap{
|
@@ -14,7 +14,7 @@
|
|
14
14
|
border-radius: 5px;
|
15
15
|
}
|
16
16
|
|
17
|
-
|
17
|
+
/* Youtube tooltip style */
|
18
18
|
.ui-tooltip-youtube{
|
19
19
|
-moz-border-radius: 2px;
|
20
20
|
-webkit-border-radius: 2px;
|
@@ -28,12 +28,11 @@
|
|
28
28
|
border-width: 0;
|
29
29
|
|
30
30
|
background: #4A4A4A;
|
31
|
+
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
|
32
|
+
background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
|
31
33
|
background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
|
32
34
|
background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
|
33
35
|
background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
|
34
|
-
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
|
35
|
-
background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
|
36
|
-
background-image: linear-gradient(to bottom,#4A4A4A 0,black 100%);
|
37
36
|
}
|
38
37
|
|
39
38
|
.ui-tooltip-youtube .ui-tooltip-titlebar{
|
@@ -62,8 +61,11 @@
|
|
62
61
|
.ui-tooltip-jtools{
|
63
62
|
background: #232323;
|
64
63
|
background: rgba(0, 0, 0, 0.7);
|
65
|
-
background-image: -moz-linear-gradient(top, #717171, #232323);
|
66
64
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
|
65
|
+
background-image: -moz-linear-gradient(top, #717171, #232323);
|
66
|
+
background-image: -webkit-linear-gradient(top, #717171, #232323);
|
67
|
+
background-image: -ms-linear-gradient(top, #717171, #232323);
|
68
|
+
background-image: -o-linear-gradient(top, #717171, #232323);
|
67
69
|
|
68
70
|
border: 2px solid #ddd;
|
69
71
|
border: 2px solid rgba(241,241,241,1);
|
@@ -137,7 +139,7 @@
|
|
137
139
|
background: rgba(0, 0, 0, .87);
|
138
140
|
|
139
141
|
color: white;
|
140
|
-
border:
|
142
|
+
border: 0 solid transparent;
|
141
143
|
|
142
144
|
font-size: 11px;
|
143
145
|
font-family: 'Lucida Grande', sans-serif;
|
@@ -185,8 +187,11 @@
|
|
185
187
|
|
186
188
|
color: white;
|
187
189
|
background: #3A79B8;
|
188
|
-
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
|
189
190
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
|
191
|
+
background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
|
192
|
+
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
|
193
|
+
background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
|
194
|
+
background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
|
190
195
|
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
|
191
196
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
|
192
197
|
}
|
@@ -209,52 +214,86 @@
|
|
209
214
|
* Does not work with IE 7.
|
210
215
|
*/
|
211
216
|
.ui-tooltip-bootstrap{
|
212
|
-
|
213
|
-
|
214
|
-
|
217
|
+
/** Taken from Bootstrap body */
|
218
|
+
font-size: 14px;
|
219
|
+
line-height: 20px;
|
215
220
|
color: #333333;
|
216
|
-
background-color: #ffffff;
|
217
|
-
|
218
221
|
|
222
|
+
/** Taken from Bootstrap .popover */
|
223
|
+
padding: 1px;
|
224
|
+
background-color: #ffffff;
|
219
225
|
border: 1px solid #ccc;
|
220
226
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
-webkit-border-radius: 5px;
|
226
|
-
-moz-border-radius: 5px;
|
227
|
-
border-radius: 5px;
|
228
|
-
|
227
|
+
-webkit-border-radius: 6px;
|
228
|
+
-moz-border-radius: 6px;
|
229
|
+
border-radius: 6px;
|
229
230
|
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
230
231
|
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
231
232
|
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
232
|
-
|
233
233
|
-webkit-background-clip: padding-box;
|
234
234
|
-moz-background-clip: padding;
|
235
235
|
background-clip: padding-box;
|
236
236
|
}
|
237
237
|
|
238
238
|
.ui-tooltip-bootstrap .ui-tooltip-titlebar{
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
239
|
+
/** Taken from Bootstrap .popover-title */
|
240
|
+
padding: 8px 14px;
|
241
|
+
margin: 0;
|
242
|
+
font-size: 14px;
|
243
|
+
font-weight: normal;
|
244
|
+
line-height: 18px;
|
245
|
+
background-color: #f7f7f7;
|
246
|
+
border-bottom: 1px solid #ebebeb;
|
247
|
+
-webkit-border-radius: 5px 5px 0 0;
|
248
|
+
-moz-border-radius: 5px 5px 0 0;
|
249
|
+
border-radius: 5px 5px 0 0;
|
244
250
|
}
|
245
251
|
|
246
252
|
.ui-tooltip-bootstrap .ui-tooltip-titlebar .ui-state-default{
|
247
|
-
|
253
|
+
/**
|
254
|
+
* Overrides qTip2:
|
255
|
+
* .ui-tooltip-titlebar .ui-state-default{
|
256
|
+
* [...]
|
257
|
+
* right: 4px;
|
258
|
+
* top: 50%;
|
259
|
+
* [...]
|
260
|
+
* border-style: solid;
|
261
|
+
* }
|
262
|
+
*/
|
263
|
+
right: 11px;
|
264
|
+
top: 45%;
|
248
265
|
border-style: none;
|
249
266
|
}
|
250
267
|
|
268
|
+
.ui-tooltip-bootstrap .ui-tooltip-content{
|
269
|
+
/** Taken from Bootstrap .popover-content */
|
270
|
+
padding: 9px 14px;
|
271
|
+
}
|
272
|
+
|
251
273
|
.ui-tooltip-bootstrap .ui-tooltip-icon{
|
252
|
-
|
274
|
+
/**
|
275
|
+
* Overrides qTip2:
|
276
|
+
* .ui-tooltip-default .ui-tooltip-icon {
|
277
|
+
* border-color: #CCC;
|
278
|
+
* background: #F1F1F1;
|
279
|
+
* color: #777;
|
280
|
+
* }
|
281
|
+
*/
|
282
|
+
background: transparent;
|
253
283
|
}
|
254
284
|
|
255
285
|
.ui-tooltip-bootstrap .ui-tooltip-icon .ui-icon{
|
286
|
+
/**
|
287
|
+
* Overrides qTip2:
|
288
|
+
* .ui-tooltip-icon .ui-icon{
|
289
|
+
* width: 18px;
|
290
|
+
* height: 14px;
|
291
|
+
* }
|
292
|
+
*/
|
256
293
|
width: auto;
|
257
294
|
height: auto;
|
295
|
+
|
296
|
+
/* Taken from Bootstrap .close */
|
258
297
|
float: right;
|
259
298
|
font-size: 20px;
|
260
299
|
font-weight: bold;
|
@@ -266,6 +305,7 @@
|
|
266
305
|
}
|
267
306
|
|
268
307
|
.ui-tooltip-bootstrap .ui-tooltip-icon .ui-icon:hover{
|
308
|
+
/* Taken from Bootstrap .close:hover */
|
269
309
|
color: #000000;
|
270
310
|
text-decoration: none;
|
271
311
|
cursor: pointer;
|
@@ -1,15 +1,20 @@
|
|
1
|
-
PLUGINS.imagemap = function(area, corner,
|
1
|
+
PLUGINS.imagemap = function(api, area, corner, adjustMethod)
|
2
2
|
{
|
3
3
|
if(!area.jquery) { area = $(area); }
|
4
4
|
|
5
|
-
var
|
6
|
-
|
5
|
+
var cache = (api.cache.areas = {}),
|
6
|
+
shape = (area[0].shape || area.attr('shape')).toLowerCase(),
|
7
|
+
coordsString = area[0].coords || area.attr('coords'),
|
8
|
+
baseCoords = coordsString.split(','),
|
7
9
|
coords = [],
|
8
10
|
image = $('img[usemap="#'+area.parent('map').attr('name')+'"]'),
|
9
11
|
imageOffset = image.offset(),
|
10
12
|
result = {
|
11
13
|
width: 0, height: 0,
|
12
|
-
|
14
|
+
position: {
|
15
|
+
top: 1e10, right: 0,
|
16
|
+
bottom: 0, left: 1e10
|
17
|
+
}
|
13
18
|
},
|
14
19
|
i = 0, next = 0, dimensions;
|
15
20
|
|
@@ -30,27 +35,27 @@ PLUGINS.imagemap = function(area, corner, flip)
|
|
30
35
|
newWidth = Math.floor(newWidth / 2);
|
31
36
|
newHeight = Math.floor(newHeight / 2);
|
32
37
|
|
33
|
-
if(corner.x ===
|
34
|
-
else if(corner.x ===
|
38
|
+
if(corner.x === LEFT){ compareX = newWidth; }
|
39
|
+
else if(corner.x === RIGHT){ compareX = result.width - newWidth; }
|
35
40
|
else{ compareX += Math.floor(newWidth / 2); }
|
36
41
|
|
37
|
-
if(corner.y ===
|
38
|
-
else if(corner.y ===
|
42
|
+
if(corner.y === TOP){ compareY = newHeight; }
|
43
|
+
else if(corner.y === BOTTOM){ compareY = result.height - newHeight; }
|
39
44
|
else{ compareY += Math.floor(newHeight / 2); }
|
40
45
|
|
41
46
|
i = coords.length; while(i--)
|
42
47
|
{
|
43
48
|
if(coords.length < 2){ break; }
|
44
49
|
|
45
|
-
realX = coords[i][0] - result.
|
46
|
-
realY = coords[i][1] - result.
|
50
|
+
realX = coords[i][0] - result.position.left;
|
51
|
+
realY = coords[i][1] - result.position.top;
|
47
52
|
|
48
|
-
if((corner.x ===
|
49
|
-
(corner.x ===
|
50
|
-
(corner.x ===
|
51
|
-
(corner.y ===
|
52
|
-
(corner.y ===
|
53
|
-
(corner.y ===
|
53
|
+
if((corner.x === LEFT && realX >= compareX) ||
|
54
|
+
(corner.x === RIGHT && realX <= compareX) ||
|
55
|
+
(corner.x === CENTER && (realX < compareX || realX > (result.width - compareX))) ||
|
56
|
+
(corner.y === TOP && realY >= compareY) ||
|
57
|
+
(corner.y === BOTTOM && realY <= compareY) ||
|
58
|
+
(corner.y === CENTER && (realY < compareY || realY > (result.height - compareY)))) {
|
54
59
|
coords.splice(i, 1);
|
55
60
|
}
|
56
61
|
}
|
@@ -69,16 +74,18 @@ PLUGINS.imagemap = function(area, corner, flip)
|
|
69
74
|
{
|
70
75
|
next = [ parseInt(baseCoords[--i], 10), parseInt(baseCoords[i+1], 10) ];
|
71
76
|
|
72
|
-
if(next[0] > result.
|
73
|
-
if(next[0] < result.
|
74
|
-
if(next[1] > result.
|
75
|
-
if(next[1] < result.
|
77
|
+
if(next[0] > result.position.right){ result.position.right = next[0]; }
|
78
|
+
if(next[0] < result.position.left){ result.position.left = next[0]; }
|
79
|
+
if(next[1] > result.position.bottom){ result.position.bottom = next[1]; }
|
80
|
+
if(next[1] < result.position.top){ result.position.top = next[1]; }
|
76
81
|
|
77
82
|
coords.push(next);
|
78
83
|
}
|
79
84
|
}
|
80
85
|
else {
|
81
|
-
|
86
|
+
i = -1; while(i++ < baseCoords.length) {
|
87
|
+
coords.push( parseInt(baseCoords[i], 10) );
|
88
|
+
}
|
82
89
|
}
|
83
90
|
|
84
91
|
// Calculate details
|
@@ -88,7 +95,7 @@ PLUGINS.imagemap = function(area, corner, flip)
|
|
88
95
|
result = {
|
89
96
|
width: Math.abs(coords[2] - coords[0]),
|
90
97
|
height: Math.abs(coords[3] - coords[1]),
|
91
|
-
|
98
|
+
position: {
|
92
99
|
left: Math.min(coords[0], coords[2]),
|
93
100
|
top: Math.min(coords[1], coords[3])
|
94
101
|
}
|
@@ -99,35 +106,42 @@ PLUGINS.imagemap = function(area, corner, flip)
|
|
99
106
|
result = {
|
100
107
|
width: coords[2] + 2,
|
101
108
|
height: coords[2] + 2,
|
102
|
-
|
109
|
+
position: { left: coords[0], top: coords[1] }
|
103
110
|
};
|
104
111
|
break;
|
105
112
|
|
106
113
|
case 'poly':
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
left: result.offset.left + (result.width / 2),
|
115
|
-
top: result.offset.top + (result.height / 2)
|
114
|
+
result.width = Math.abs(result.position.right - result.position.left);
|
115
|
+
result.height = Math.abs(result.position.bottom - result.position.top);
|
116
|
+
|
117
|
+
if(corner.abbrev() === 'c') {
|
118
|
+
result.position = {
|
119
|
+
left: result.position.left + (result.width / 2),
|
120
|
+
top: result.position.top + (result.height / 2)
|
116
121
|
};
|
117
122
|
}
|
118
123
|
else {
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
124
|
+
// Calculate if we can't find a cached value
|
125
|
+
if(!cache[corner+coordsString]) {
|
126
|
+
result.position = polyCoordinates(result, coords.slice(), corner);
|
127
|
+
|
128
|
+
// If flip adjustment is enabled, also calculate the closest opposite point
|
129
|
+
if(adjustMethod && (adjustMethod[0] === 'flip' || adjustMethod[1] === 'flip')) {
|
130
|
+
result.offset = polyCoordinates(result, coords.slice(), {
|
131
|
+
x: corner.x === LEFT ? RIGHT : corner.x === RIGHT ? LEFT : CENTER,
|
132
|
+
y: corner.y === TOP ? BOTTOM : corner.y === BOTTOM ? TOP : CENTER
|
133
|
+
});
|
134
|
+
|
135
|
+
result.offset.left -= result.position.left;
|
136
|
+
result.offset.top -= result.position.top;
|
137
|
+
}
|
138
|
+
|
139
|
+
// Store the result
|
140
|
+
cache[corner+coordsString] = result;
|
130
141
|
}
|
142
|
+
|
143
|
+
// Grab the cached result
|
144
|
+
result = cache[corner+coordsString];
|
131
145
|
}
|
132
146
|
|
133
147
|
result.width = result.height = 0;
|
@@ -135,8 +149,8 @@ PLUGINS.imagemap = function(area, corner, flip)
|
|
135
149
|
}
|
136
150
|
|
137
151
|
// Add image position to offset coordinates
|
138
|
-
result.
|
139
|
-
result.
|
152
|
+
result.position.left += imageOffset.left;
|
153
|
+
result.position.top += imageOffset.top;
|
140
154
|
|
141
155
|
return result;
|
142
156
|
};
|
@@ -1,25 +1,41 @@
|
|
1
1
|
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
|
2
2
|
/*global window: false, jQuery: false, console: false, define: false */
|
3
3
|
|
4
|
+
/* Cache window, document, undefined */
|
5
|
+
(function( window, document, undefined ) {
|
6
|
+
|
4
7
|
// Uses AMD or browser globals to create a jQuery plugin.
|
5
|
-
(function(factory) {
|
8
|
+
(function( factory ) {
|
9
|
+
"use strict";
|
6
10
|
if(typeof define === 'function' && define.amd) {
|
7
11
|
define(['jquery'], factory);
|
8
12
|
}
|
9
|
-
else {
|
13
|
+
else if(jQuery && !jQuery.fn.qtip) {
|
10
14
|
factory(jQuery);
|
11
15
|
}
|
12
16
|
}
|
13
17
|
(function($) {
|
18
|
+
/* This currently causes issues with Safari 6, so for it's disabled */
|
19
|
+
//"use strict"; // (Dis)able ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
|
14
20
|
|
15
|
-
"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
|
16
|
-
|
17
21
|
// Munge the primitives - Paul Irish tip
|
18
22
|
var TRUE = true,
|
19
23
|
FALSE = false,
|
20
24
|
NULL = null,
|
21
|
-
|
22
|
-
|
25
|
+
|
26
|
+
// Side names and other stuff
|
27
|
+
X = 'x', Y = 'y',
|
28
|
+
WIDTH = 'width',
|
29
|
+
HEIGHT = 'height',
|
30
|
+
TOP = 'top',
|
31
|
+
LEFT = 'left',
|
32
|
+
BOTTOM = 'bottom',
|
33
|
+
RIGHT = 'right',
|
34
|
+
CENTER = 'center',
|
35
|
+
FLIP = 'flip',
|
36
|
+
FLIPINVERT = 'flipinvert',
|
37
|
+
SHIFT = 'shift',
|
38
|
+
|
23
39
|
// Shortcut vars
|
24
40
|
QTIP, PLUGINS, MOUSE,
|
25
41
|
usedIDs = {},
|
@@ -30,29 +46,15 @@
|
|
30
46
|
defaultClass = uitooltip + '-default',
|
31
47
|
focusClass = uitooltip + '-focus',
|
32
48
|
hoverClass = uitooltip + '-hover',
|
33
|
-
fluidClass = uitooltip + '-fluid',
|
34
|
-
hideOffset = '-31000px',
|
35
49
|
replaceSuffix = '_replacedByqTip',
|
36
50
|
oldtitle = 'oldtitle',
|
37
|
-
trackingBound
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
// Setup console and arguments
|
48
|
-
var c = console[ console.warn ? 'warn' : 'log' ],
|
49
|
-
args = Array.prototype.slice.call(arguments), a;
|
50
|
-
|
51
|
-
// Add qTip2 marker to first argument if it's a string
|
52
|
-
if(typeof arguments[0] === 'string') { args[0] = 'qTip2: ' + args[0]; }
|
53
|
-
|
54
|
-
// Apply console.warn or .log if not supported
|
55
|
-
a = c.apply ? c.apply(console, args) : c(args);
|
56
|
-
}
|
57
|
-
}
|
51
|
+
trackingBound,
|
52
|
+
redrawContainer;
|
53
|
+
|
54
|
+
/*
|
55
|
+
* redraw() container for width/height calculations
|
56
|
+
*/
|
57
|
+
redrawContainer = $('<div/>', { id: 'qtip-rcontainer' });
|
58
|
+
$(function() { redrawContainer.appendTo(document.body); });
|
59
|
+
|
58
60
|
|
@@ -21,7 +21,9 @@ function Modal(api)
|
|
21
21
|
// Show the modal if not visible already and tooltip is visible
|
22
22
|
elems.overlay.toggle( tooltip.is(':visible') );
|
23
23
|
},
|
24
|
-
'^content.text$':
|
24
|
+
'^content.text$': function() {
|
25
|
+
updateFocusable();
|
26
|
+
}
|
25
27
|
};
|
26
28
|
|
27
29
|
function updateFocusable() {
|
@@ -211,7 +213,7 @@ function Modal(api)
|
|
211
213
|
docBody.bind('focusin'+namespace, stealFocus);
|
212
214
|
|
213
215
|
// Blur the current item and focus anything in the modal we an
|
214
|
-
focusInputs( $('body
|
216
|
+
focusInputs( $('body :focus') );
|
215
217
|
}
|
216
218
|
}
|
217
219
|
else {
|
@@ -300,11 +302,11 @@ PLUGINS.modal.sanitize = function(opts) {
|
|
300
302
|
};
|
301
303
|
|
302
304
|
// Base z-index for all modal tooltips (use qTip core z-index as a base)
|
303
|
-
PLUGINS.modal.zindex = QTIP.zindex
|
305
|
+
PLUGINS.modal.zindex = QTIP.zindex - 200;
|
304
306
|
|
305
307
|
// Defines the selector used to select all 'focusable' elements within the modal when using the show.modal.stealfocus option.
|
306
|
-
//
|
307
|
-
PLUGINS.modal.focusable = ['a[href]', 'area[href]', 'input', 'select', 'textarea', 'button', 'iframe', 'object', 'embed', '[tabindex]', '[contenteditable]']
|
308
|
+
// Selectors initially taken from http://stackoverflow.com/questions/7668525/is-there-a-jquery-selector-to-get-all-elements-that-can-get-focus
|
309
|
+
PLUGINS.modal.focusable = ['a[href]', 'area[href]', 'input', 'select', 'textarea', 'button', 'iframe', 'object', 'embed', '[tabindex]', '[contenteditable]'];
|
308
310
|
|
309
311
|
// Extend original api defaults
|
310
312
|
$.extend(TRUE, QTIP.defaults, {
|