1 | /** |
||
2 | * Javascript handler for the Lingo extension |
||
3 | * |
||
4 | * This file is part of the MediaWiki extension Lingo. |
||
5 | * |
||
6 | * @copyright 2011 - 2018, Stephan Gambke |
||
7 | * @license GNU General Public License, version 2 (or any later version) |
||
8 | * |
||
9 | * The Lingo extension is free software: you can redistribute it and/or modify |
||
10 | * it under the terms of the GNU General Public License as published by the Free |
||
11 | * Software Foundation; either version 2 of the License, or (at your option) any |
||
12 | * later version. |
||
13 | * |
||
14 | * The Lingo extension is distributed in the hope that it will be useful, but |
||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
||
16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
||
17 | * details. |
||
18 | * |
||
19 | * You should have received a copy of the GNU General Public License along |
||
20 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
||
21 | * |
||
22 | * @author Stephan Gambke |
||
23 | * |
||
24 | * @file |
||
25 | * @ingroup Lingo |
||
26 | */ |
||
27 | |||
28 | /*global confirm */ |
||
29 | |||
30 | ( function ( $ ) { |
||
31 | |||
32 | 'use strict'; |
||
33 | |||
34 | $( function ( $ ) { |
||
35 | |||
36 | $( 'span.mw-lingo-term' ).each( function ( index ) { |
||
0 ignored issues
–
show
|
|||
37 | |||
38 | var termId = $(this).attr( 'data-lingo-term-id'); |
||
39 | |||
40 | var tooltip = $( '#' + termId ); |
||
41 | |||
42 | $( this ).qtip( { |
||
43 | content : tooltip.html(), |
||
44 | position: { |
||
45 | my: 'top left', // Position tooltip's top left... |
||
46 | at: 'bottom left' // at the bottom left of target |
||
47 | }, |
||
48 | hide : { |
||
49 | fixed: true, |
||
50 | delay: 300 |
||
51 | }, |
||
52 | style : { |
||
53 | classes: tooltip.attr( 'class' ) + ' qtip-shadow', |
||
54 | def : false |
||
55 | } |
||
56 | |||
57 | } ); |
||
58 | |||
59 | } ); |
||
60 | |||
61 | } ); |
||
62 | }( jQuery ) ); |
||
63 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.