Changeset 11941 for extensions
- Timestamp:
- Aug 12, 2011, 6:52:50 PM (13 years ago)
- Location:
- extensions/floOS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/floOS/OS_glass_clear/local_head.tpl
r10290 r11941 2 2 {html_head}{literal} 3 3 <script type="text/javascript"> 4 /** 5 * jQuery Cookie plugin 6 * 7 * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 8 * Dual licensed under the MIT and GPL licenses: 9 * http://www.opensource.org/licenses/mit-license.php 10 * http://www.gnu.org/licenses/gpl.html 11 * 12 */ 13 jQuery.cookie = function (key, value, options) { 14 15 // key and at least value given, set cookie... 16 if (arguments.length > 1 && String(value) !== "[object Object]") { 17 options = jQuery.extend({}, options); 18 19 if (value === null || value === undefined) { 20 options.expires = -1; 21 } 22 23 if (typeof options.expires === 'number') { 24 var days = options.expires, t = options.expires = new Date(); 25 t.setDate(t.getDate() + days); 26 } 27 28 value = String(value); 29 30 return (document.cookie = [ 31 encodeURIComponent(key), '=', 32 options.raw ? value : encodeURIComponent(value), 33 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 34 options.path ? '; path=' + options.path : '', 35 options.domain ? '; domain=' + options.domain : '', 36 options.secure ? '; secure' : '' 37 ].join('')); 38 } 39 40 // key and possibly options given, get cookie... 41 options = value || {}; 42 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 43 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 44 }; 45 46 47 4 48 jQuery(document).ready(function(){ 5 $(".titre_acordeon").click(function() { 49 $(".titre_acordeon, .titre_acordeon_0").each(function () { 50 var id = $(this).parent().attr("id"); 51 if (!jQuery.cookie(id)) 52 { 53 if ( $(this).attr("class")=="titre_acordeon") 54 { 55 jQuery.cookie($(this).parent().attr("id"),false, {path: "/"}); 56 $(this).next().hide(); 57 } 58 else 59 { 60 $(this).next().show(); 61 jQuery.cookie($(this).parent().attr("id"),true, {path: "/"}); 62 } 63 } 64 else if (jQuery.cookie(id) == "true") 65 { 66 $(this).next().show(); 67 } 68 else 69 { 70 $(this).next().hide(); 71 } 72 }); 73 74 $(".titre_acordeon, .titre_acordeon_0").click(function() { 6 75 $(this).next().toggle("medium"); 7 }).next().hide(); 8 }); 9 jQuery(document).ready(function(){ 10 $(".titre_acordeon_0").click(function() { 11 $(this).next().toggle("medium"); 12 }).next().show(); 76 var id = $(this).parent().attr("id"); 77 if ( jQuery.cookie(id) == "true") 78 { 79 jQuery.cookie(id, false, {path: "/"}); 80 } 81 else 82 { 83 jQuery.cookie(id, true, {path: "/"}); 84 } 85 }); 13 86 }); 14 87 $(function(){ -
extensions/floOS/OS_glass_dark/local_head.tpl
r10289 r11941 2 2 {html_head}{literal} 3 3 <script type="text/javascript"> 4 /** 5 * jQuery Cookie plugin 6 * 7 * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 8 * Dual licensed under the MIT and GPL licenses: 9 * http://www.opensource.org/licenses/mit-license.php 10 * http://www.gnu.org/licenses/gpl.html 11 * 12 */ 13 jQuery.cookie = function (key, value, options) { 14 15 // key and at least value given, set cookie... 16 if (arguments.length > 1 && String(value) !== "[object Object]") { 17 options = jQuery.extend({}, options); 18 19 if (value === null || value === undefined) { 20 options.expires = -1; 21 } 22 23 if (typeof options.expires === 'number') { 24 var days = options.expires, t = options.expires = new Date(); 25 t.setDate(t.getDate() + days); 26 } 27 28 value = String(value); 29 30 return (document.cookie = [ 31 encodeURIComponent(key), '=', 32 options.raw ? value : encodeURIComponent(value), 33 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 34 options.path ? '; path=' + options.path : '', 35 options.domain ? '; domain=' + options.domain : '', 36 options.secure ? '; secure' : '' 37 ].join('')); 38 } 39 40 // key and possibly options given, get cookie... 41 options = value || {}; 42 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 43 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 44 }; 45 46 47 4 48 jQuery(document).ready(function(){ 5 $(".titre_acordeon").click(function() { 49 $(".titre_acordeon, .titre_acordeon_0").each(function () { 50 var id = $(this).parent().attr("id"); 51 if (!jQuery.cookie(id)) 52 { 53 if ( $(this).attr("class")=="titre_acordeon") 54 { 55 jQuery.cookie($(this).parent().attr("id"),false, {path: "/"}); 56 $(this).next().hide(); 57 } 58 else 59 { 60 $(this).next().show(); 61 jQuery.cookie($(this).parent().attr("id"),true, {path: "/"}); 62 } 63 } 64 else if (jQuery.cookie(id) == "true") 65 { 66 $(this).next().show(); 67 } 68 else 69 { 70 $(this).next().hide(); 71 } 72 }); 73 74 $(".titre_acordeon, .titre_acordeon_0").click(function() { 6 75 $(this).next().toggle("medium"); 7 }).next().hide(); 8 }); 9 jQuery(document).ready(function(){ 10 $(".titre_acordeon_0").click(function() { 11 $(this).next().toggle("medium"); 12 }).next().show(); 76 var id = $(this).parent().attr("id"); 77 if ( jQuery.cookie(id) == "true") 78 { 79 jQuery.cookie(id, false, {path: "/"}); 80 } 81 else 82 { 83 jQuery.cookie(id, true, {path: "/"}); 84 } 85 }); 13 86 }); 14 87 $(function(){ -
extensions/floOS/OS_glass_dark_2/local_head.tpl
r10288 r11941 2 2 {html_head}{literal} 3 3 <script type="text/javascript"> 4 /** 5 * jQuery Cookie plugin 6 * 7 * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 8 * Dual licensed under the MIT and GPL licenses: 9 * http://www.opensource.org/licenses/mit-license.php 10 * http://www.gnu.org/licenses/gpl.html 11 * 12 */ 13 jQuery.cookie = function (key, value, options) { 14 15 // key and at least value given, set cookie... 16 if (arguments.length > 1 && String(value) !== "[object Object]") { 17 options = jQuery.extend({}, options); 18 19 if (value === null || value === undefined) { 20 options.expires = -1; 21 } 22 23 if (typeof options.expires === 'number') { 24 var days = options.expires, t = options.expires = new Date(); 25 t.setDate(t.getDate() + days); 26 } 27 28 value = String(value); 29 30 return (document.cookie = [ 31 encodeURIComponent(key), '=', 32 options.raw ? value : encodeURIComponent(value), 33 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 34 options.path ? '; path=' + options.path : '', 35 options.domain ? '; domain=' + options.domain : '', 36 options.secure ? '; secure' : '' 37 ].join('')); 38 } 39 40 // key and possibly options given, get cookie... 41 options = value || {}; 42 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 43 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 44 }; 45 46 47 4 48 jQuery(document).ready(function(){ 5 $(".titre_acordeon").click(function() { 49 $(".titre_acordeon, .titre_acordeon_0").each(function () { 50 var id = $(this).parent().attr("id"); 51 if (!jQuery.cookie(id)) 52 { 53 if ( $(this).attr("class")=="titre_acordeon") 54 { 55 jQuery.cookie($(this).parent().attr("id"),false, {path: "/"}); 56 $(this).next().hide(); 57 } 58 else 59 { 60 $(this).next().show(); 61 jQuery.cookie($(this).parent().attr("id"),true, {path: "/"}); 62 } 63 } 64 else if (jQuery.cookie(id) == "true") 65 { 66 $(this).next().show(); 67 } 68 else 69 { 70 $(this).next().hide(); 71 } 72 }); 73 74 $(".titre_acordeon, .titre_acordeon_0").click(function() { 6 75 $(this).next().toggle("medium"); 7 }).next().hide(); 8 }); 9 jQuery(document).ready(function(){ 10 $(".titre_acordeon_0").click(function() { 11 $(this).next().toggle("medium"); 12 }).next().show(); 76 var id = $(this).parent().attr("id"); 77 if ( jQuery.cookie(id) == "true") 78 { 79 jQuery.cookie(id, false, {path: "/"}); 80 } 81 else 82 { 83 jQuery.cookie(id, true, {path: "/"}); 84 } 85 }); 13 86 }); 14 87 $(function(){
Note: See TracChangeset
for help on using the changeset viewer.