source: extensions/floOS/OS_glass/local_head.tpl

Last change on this file was 15941, checked in by flop25, 12 years ago

tiptip popup displayed only if a title exists
css for menu
dimensions of thumbnails set to !important

File size: 4.6 KB
Line 
1
2{footer_script}
3{literal}
4var max_dim_width = 0;
5var max_dim_height = 0;
6jQuery(window).load(function() {
7  $(".thumbnails img").each(function () {
8    if (jQuery(this).height() > max_dim_height)
9      max_dim_height = jQuery(this).height() + 10;
10    if (jQuery(this).width() > max_dim_width)
11      max_dim_width = jQuery(this).width() + 10;
12
13    jQuery(".wrap2")
14      .css('width', max_dim_width+'px')
15      .css('height', max_dim_height+'px');
16  });
17});
18{/literal}
19{/footer_script}
20
21{combine_script id='jquery.tipTip.minified' load='header' require='jquery' path='themes/OS_glass/tiptip/jquery.tipTip.minified.js'}
22{html_head}{literal}
23<script type="text/javascript">
24/**
25* jQuery Cookie plugin
26*
27* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
28* Dual licensed under the MIT and GPL licenses:
29* http://www.opensource.org/licenses/mit-license.php
30* http://www.gnu.org/licenses/gpl.html
31*
32*/
33jQuery.cookie = function (key, value, options) {
34
35    // key and at least value given, set cookie...
36    if (arguments.length > 1 && String(value) !== "[object Object]") {
37        options = jQuery.extend({}, options);
38
39        if (value === null || value === undefined) {
40            options.expires = -1;
41        }
42
43        if (typeof options.expires === 'number') {
44            var days = options.expires, t = options.expires = new Date();
45            t.setDate(t.getDate() + days);
46        }
47
48        value = String(value);
49
50        return (document.cookie = [
51            encodeURIComponent(key), '=',
52            options.raw ? value : encodeURIComponent(value),
53            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
54            options.path ? '; path=' + options.path : '',
55            options.domain ? '; domain=' + options.domain : '',
56            options.secure ? '; secure' : ''
57        ].join(''));
58    }
59
60    // key and possibly options given, get cookie...
61    options = value || {};
62    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
63    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
64};
65
66
67
68jQuery(document).ready(function(){
69        $(".titre_acordeon, .titre_acordeon_0").each(function () {
70                var id = $(this).parent().attr("id");
71                if (!jQuery.cookie(id))
72                {
73                        if ( $(this).attr("class")=="titre_acordeon")
74                        {
75                                jQuery.cookie($(this).parent().attr("id"),false, {path: "/"});
76                                $(this).next().hide();
77                        }
78                        else
79                        {
80                                $(this).next().show();
81                                jQuery.cookie($(this).parent().attr("id"),true, {path: "/"});
82                        }
83                }
84                else if (jQuery.cookie(id) == "true")
85                {
86                        $(this).next().show();
87                }
88                else
89                {
90                        $(this).next().hide();
91                }
92        });
93       
94        $(".titre_acordeon, .titre_acordeon_0").click(function() {
95                $(this).next().toggle("medium");
96                var id = $(this).parent().attr("id");
97                if ( jQuery.cookie(id) == "true")
98                {
99                        jQuery.cookie(id, false, {path: "/"});
100                }
101                else
102                {
103                        jQuery.cookie(id, true, {path: "/"});
104                }
105        });
106});
107$(function(){
108    $('.categoryActions li a[title]').tipTip({delay : 0, fadeIn : 200, fadeOut : 200, defaultPosition : "top"  });
109    $("#home_icon A[title]").tipTip({edgeOffset : 10, fadeIn : 200, fadeOut : 200, defaultPosition : "top" });
110    $(".randomButtons A[title]").tipTip({delay : 0, fadeIn : 200, fadeOut : 200 });
111    $(".navButtons A[title]").tipTip({delay : 0, fadeIn : 200, fadeOut : 200 });
112    $(".actionButtons a[title]").tipTip({delay : 0, fadeIn : 200, fadeOut : 200, defaultPosition : "top" });
113    $("#mbCategories a[title]").tipTip({delay : 0, fadeIn : 200, fadeOut : 200 });
114});
115  </script>
116{/literal}
117{/html_head}
118{literal}
119<!--[if lt IE 7]>
120<style>
121        #menubar dl, #section_in {
122        background:  #FFF!important;
123        }
124        /* contenu "section" */
125        #section_up_left, #section_up, #section_up_right, #section_left, #section_bottom_left, #section_bottom, #section_bottom_right, #section_right{
126        background:none!important;
127        }
128</style>
129<![endif]-->
130<!--[if IE 7]>
131<style>
132        #menubar dl, #section_in {
133        background:  #FFF!important;
134        }
135        /* contenu "section" */
136        #section_up_left, #section_up, #section_up_right, #section_left, #section_bottom_left, #section_bottom, #section_bottom_right, #section_right{
137        background:none!important;
138        }
139        BODY#theCommentsPage .content,
140        BODY#theUploadPage .content,
141        BODY#theRegisterPage .content,
142        BODY#theIdentificationPage .content,
143        BODY#theProfilePage .content,
144        BODY#theSearchPage .content,
145        BODY#theAboutPage .content,
146        BODY#thePopuphelpPage .content,
147        BODY#thePasswordPage .content,
148        BODY#theNotificationPage .content,
149        BODY#theTagsPage .content,
150        BODY#theNBMPage .content,
151        #action_pict,
152        #comments
153        {
154        background:  #FFF!important;
155        }
156</style>
157<![endif]-->
158{/literal}
Note: See TracBrowser for help on using the repository browser.