source: extensions/Mail_supervisor/include/Scripts.js @ 13572

Last change on this file since 13572 was 11807, checked in by cljosse, 13 years ago

[extensions] mail_supervisor add 'title' and subject in tab test

File size: 2.5 KB
Line 
1function blockToggleDisplay(headerId, contentId) {
2 var revHeader = document.getElementById(headerId);
3 var revContent = document.getElementById(contentId);
4 if (revContent==null ) return;
5 if (revContent.style.display == 'none') {
6  revContent.style.display = 'block';
7  revHeader.className = 'instructionBlockHeaderExpanded';
8 }
9 else {
10  revContent.style.display = 'none';
11  revHeader.className = 'instructionBlockHeaderCollapsed';
12 }
13}
14/*******************************************
15* get_script_geo()
16********************************************/
17function get_script_geo() {
18 try {
19  if (typeof pays == "undefined") {
20   pays = geoip_country_name();
21   ville = geoip_city();
22   region = geoip_region_name();
23   latitude = geoip_latitude();
24   longitude = geoip_longitude();
25  }
26  jQuery("#pays").val(pays);
27  jQuery("#ville").val(ville);
28  jQuery("#region").val(region);
29  jQuery("#latitude").val(latitude);
30  jQuery("#longitude").val(longitude);
31
32 } catch (e) {
33  url = "http://j.maxmind.com/app/geoip.js";
34  jQuery.getScript(url, function () {
35   try {
36    pays = geoip_country_name();
37    ville = geoip_city();
38    region = geoip_region_name();
39    latitude = geoip_latitude();
40    longitude = geoip_longitude();
41    jQuery("#pays").val(pays);
42    jQuery("#ville").val(ville);
43    jQuery("#region").val(region);
44    jQuery("#latitude").val(latitude);
45    jQuery("#longitude").val(longitude);
46   } catch (e) {
47
48   }
49  });
50 }
51
52}
53jQuery(document).ready(
54     function (jQuery) {
55       jQuery(window).load(function () {
56         // get_script_geo();
57
58         if (typeof is_supervisor == "boolean") {
59           jQuery('.cluetip').cluetip({
60             width: 300,
61             splitTitle: '|',
62             clickThrough: true
63           });
64         }
65         spam = jQuery("#action_spam").val();
66         if (spam == "true") get_script_geo();
67         if (jQuery(".infos").length > 0)
68           if (spam == "true") {
69             jQuery(".infos").css("color", "red");
70
71           }
72
73         jQuery(".bp").click(function () {
74           if (confirm(this.alt + '\n\n' + confirm_message)) form_black.info1.value = this.rel;
75
76         });
77
78         jQuery("input").click(function () {
79
80           if (this.name != "chk_mail_list") return;
81           // this.alt
82           //  this.rel
83           //form.submit();
84
85           return;
86
87
88
89
90         });
91
92         function ajout_action(titre, message, valeur) {
93           alert("");
94
95
96         }
97
98
99       });
100     });
Note: See TracBrowser for help on using the repository browser.