equal
deleted
inserted
replaced
1 Drupal.behaviors.rfPlayerOpeningLinks = function(context) { |
|
2 $('a.rf-player-open:not(.rf-player-open-processed)', context).each(function () { |
|
3 var common_settings = { |
|
4 height: 458, |
|
5 width: 560, |
|
6 top: 150, |
|
7 left: 250, |
|
8 windowName: 'player' |
|
9 } |
|
10 |
|
11 var chrome_settings = { |
|
12 height: 515, |
|
13 width: 560, |
|
14 top: 150, |
|
15 left: 250, |
|
16 windowName: 'player' |
|
17 } |
|
18 |
|
19 var chrome_settings_windows = { |
|
20 height: 465, |
|
21 width: 560, |
|
22 top: 150, |
|
23 left: 250, |
|
24 windowName: 'player' |
|
25 } |
|
26 |
|
27 var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase()); |
|
28 var is_windows = /windows/.test(navigator.userAgent.toLowerCase()); |
|
29 |
|
30 if (is_chrome == false) { |
|
31 $(this).popupWindow(common_settings); |
|
32 } |
|
33 else { |
|
34 if (is_windows == false) { |
|
35 $(this).popupWindow(chrome_settings); |
|
36 } |
|
37 else { |
|
38 $(this).popupWindow(chrome_settings_windows); |
|
39 } |
|
40 } |
|
41 |
|
42 // We can add the processed class |
|
43 $(this).addClass('rf-player-open-processed'); |
|
44 }); |
|
45 }; |
|