1(function($, undefined){ 2 window.kendoConsole = { 3 log: function(message, isError, container) { 4 var lastContainer = $(".console div:first", container), 5 counter = lastContainer.find(".count").detach(), 6 lastMessage = lastContainer.text(), 7 count = 1 * (counter.text() || 1); 8 9 lastContainer.append(counter); 10 11 if (!lastContainer.length || message !== lastMessage) { 12 $("<div" + (isError ? " class='error'" : "") + "/>") 13 .css({ 14 marginTop: -24, 15 backgroundColor: isError ? "#ffbbbb" : "#b2ebf2" 16 }) 17 .html(message) 18 .prependTo($(".console", container)) 19 .animate({ marginTop: 0 }, 300) 20 .animate({ backgroundColor: isError ? "#ffdddd" : "#ffffff" }, 800); 21 } else { 22 count++; 23 24 if (counter.length) { 25 counter.html(count); 26 } else { 27 lastContainer.html(lastMessage) 28 .append("<span class='count'>" + count + "</span>"); 29 } 30 } 31 }, 32 33 error: function(message) { 34 this.log(message, true); 35 } 36 }; 37})(jQuery); 38 39/* 40 * jQuery Color Animations 41 * Copyright 2007 John Resig 42 * Released under the MIT and GPL licenses. 43 */ 44 45(function(jQuery) { 46 47 // We override the animation for all of these color styles 48 jQuery.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function(i, attr) { 49 jQuery.fx.step[attr] = function(fx) { 50 if (!fx.state || typeof fx.end == typeof "") { 51 fx.start = getColor(fx.elem, attr); 52 fx.end = getRGB(fx.end); 53 } 54 55 fx.elem.style[attr] = ["rgb(", [ 56 Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0), 57 Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0), 58 Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) 59 ].join(","), ")"].join(""); 60 }; 61 }); 62 63 // Color Conversion functions from highlightFade 64 // By Blair Mitchelmore 65 // http://jquery.offput.ca/highlightFade/ 66 67 // Parse strings looking for color tuples [255,255,255] 68 function getRGB(color) { 69 var result; 70 71 // Check if we're already dealing with an array of colors 72 if (color && color.constructor == Array && color.length == 3) { 73 return color; 74 } 75 76 // Look for rgb(num,num,num) 77 result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color); 78 if (result) { 79 return [parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10)]; 80 } 81 82 // Look for #a0b1c2 83 result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color); 84 if (result) { 85 return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]; 86 } 87 88 // Otherwise, we're most likely dealing with a named color 89 return jQuery.trim(color).toLowerCase(); 90 } 91 92 function getColor(elem, attr) { 93 var color; 94 95 do { 96 color = jQuery.css(elem, attr); 97 98 // Keep going until we find an element that has color, or we hit the body 99 if (color && color != "transparent" || jQuery.nodeName(elem, "body")) { 100 break; 101 } 102 103 attr = "backgroundColor"; 104 105 elem = elem.parentNode; 106 } while (elem); 107 108 return getRGB(color); 109 } 110 111 var href = window.location.href; 112 if (href.indexOf("culture") > -1) { 113 $("#culture").val(href.replace(/(.*)culture=([^&]*)/, "$2")); 114 } 115 116 function onlocalizationchange() { 117 var value = $(this).val(); 118 var href = window.location.href; 119 if (href.indexOf("culture") > -1) { 120 href = href.replace(/culture=([^&]*)/, "culture=" + value); 121 } else { 122 href += href.indexOf("?") > -1 ? "&culture=" + value : "?culture=" + value; 123 } 124 window.location.href = href; 125 } 126 127 $("#culture").change(onlocalizationchange); 128})(jQuery);
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.