1/*<![CDATA[*/ 2/** 3* @version $Id: bojForumCore.js 512 2007-12-18 22:15:28Z danialt $ 4* Fireboard Component 5* @package Fireboard 6* @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved 7* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL 8* @link http://www.bestofjoomla.com 9**/ 10 11jQuery.cookie = function(name, value, options) 12{ 13 if (typeof value != 'undefined') 14 { // name and value given, set cookie 15 options = options || { }; 16 var expires = ''; 17 18 if (options.expires && ( typeof options.expires == 'number' || options.expires.toGMTString)) 19 { 20 var date; 21 22 if (typeof options.expires == 'number') 23 { 24 date = new Date(); 25 date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 26 } 27 else 28 { 29 date = options.expires; 30 } 31 32 expires = '; expires=' + date.toGMTString(); // use expires attribute, max-age is not supported by IE 33 } 34 35 var path = options.path ? '; path=' + options.path : ''; 36 var domain = options.domain ? '; domain=' + options.domain : ''; 37 var secure = options.secure ? '; secure' : ''; 38 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 39 } 40 else 41 { // only name given, get cookie 42 var cookieValue = null; 43 44 if (document.cookie && document.cookie != '') 45 { 46 var cookies = document.cookie.split(';'); 47 48 for (var i = 0; i < cookies.length; i++) 49 { 50 var cookie = jQuery.trim(cookies[i]); 51 52 // Does this cookie string begin with the name we want? 53 if (cookie.substring(0, name.length + 1) == (name + '=')) 54 { 55 cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 56 break; 57 } 58 } 59 } 60 61 return cookieValue; 62 } 63}; 64 65function JRshrinkHeaderMulti(mode, imgId, cid) 66{ 67 if (mode == 1) 68 { 69 cMod = 0; 70 } 71 else 72 { 73 cMod = 1; 74 } 75 76 jQuery.cookie("upshrink_" + imgId, cMod); 77 jQuery("#" + imgId).attr("src", window.jr_expandImg_url + (cMod ? "expand.gif" : "shrink.gif")); 78 79 if (cMod) 80 { 81 jQuery("#" + cid).hide(); 82 } 83 else 84 { 85 jQuery("#" + cid).show(); 86 } 87} 88 89 90function fbGetPreview(content, sitemid) { 91 var templatePath = document.postform.templatePath.value; 92 var content = escape(content); 93 jQuery.ajax({url:"index2.php", 94 data : { msgpreview : content, Itemid : sitemid , option: "com_fireboard" , func: "getpreview" , no_html: 1}, 95 type: "POST", 96 beforeSend : function (req){ 97 jQuery('#previewContainer').show(); 98 jQuery('#previewMsg'). html("<img src='"+templatePath+"/images/preview_loading.gif' />"); 99 }, 100 success : function (req){ 101 jQuery('#previewMsg'). html(req) 102 return; 103 } 104 }); 105 return false; 106} 107 108jQuery(function() 109{ 110 jQuery(".hideshow").click(function() 111 { 112 var imgId = jQuery(this).attr("id"); 113 var cId = imgId.split("__")[1]; 114 var cVal = jQuery.cookie("upshrink_" + imgId); 115 JRshrinkHeaderMulti(cVal, imgId, cId); 116 }).each(function() 117 { 118 var imgId = jQuery(this).attr("id"); 119 var cId = imgId.split("__")[1]; 120 121 if (jQuery.cookie("upshrink_" + imgId) == 1) 122 { 123 JRshrinkHeaderMulti(0, imgId, cId); 124 } 125 }); 126 127}); 128 129/*]]>*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.