1function IsUserLogged() 2{ 3 return (arrSettings['username'] != ''); 4} 5 6 7$.fn.extend({ 8 animateCss: function (animationName) { 9 var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; 10 this.addClass('animated ' + animationName).one(animationEnd, function() { 11 $(this).removeClass('animated ' + animationName); 12 }); 13 } 14}); 15 16 17 18 19$.fn.isOnScreen = function(){ 20 21 var win = $(window); 22 23 var viewport = { 24 top : win.scrollTop(), 25 left : win.scrollLeft() 26 }; 27 viewport.right = viewport.left + win.width(); 28 viewport.bottom = viewport.top + win.height(); 29 30 var bounds = this.offset(); 31 bounds.right = bounds.left + this.outerWidth(); 32 bounds.bottom = bounds.top + this.outerHeight(); 33 34 return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); 35 36}; 37 38$(document).ready(function(){ 39 40 41 /* Changeable Input */ 42 $('.changable').removeClass('changable').closest('li').addClass('changable'); 43 $('.changable:not(.password) input[value=""]').parent().removeClass('changable'); 44 $('.changable input').attr('readonly', true).after('<a class="change">ש×× ××</a>'); 45 46 $('body').on('click', '.changable .change', function(){ 47 $(this).closest('.changable').find('input').removeAttr("readonly"); 48 $(this).closest('.changable').removeClass('changable'); 49 $(this).remove(); 50 }); 51 52 $('#page').on('REQUIRE_LOGIN', function(){ 53 $.MyFancy('signup'); 54 }); 55 56 $('#page').on('loginCompleted', function(){ 57 document.location.href = document.location.href; 58 }); 59 $('#page').on('FB_SIGNUP', function(){ 60 document.location.href = '/?new_user=true'; 61 }); 62 $('#page').on('signupCompleted', function(){ 63 document.location.href = document.location.href; 64 }); 65 66 $('#page').on('connectFBfailed', function(){ 67 //MyAlert("×× ××××ª× ×פשר×ת ×××ר ×ת ×ש××× ×פ××ס×××§ ××ש××× × ××××רת,<br>×× ×¨×× ×©××ר × ×¨×©×ת ×¢× ×ש××× ×פ××ס×××§ ש×× ××תר ××¢×ר."); 68 }); 69 70}); 71 72 73function loading_animation() 74{ 75 var opts = { 76 lines: 17, // The number of lines to draw 77 length: 9, // The length of each line 78 width: 5, // The line thickness 79 radius: 26, // The radius of the inner circle 80 corners: 1, // Corner roundness (0..1) 81 rotate: 30, // The rotation offset 82 direction: 1, // 1: clockwise, -1: counterclockwise 83 color: '#ea1316', // #rgb or #rrggbb or array of colors 84 speed: 1.2, // Rounds per second 85 trail: 52, // Afterglow percentage 86 shadow: false, // Whether to render a shadow 87 hwaccel: false, // Whether to use hardware acceleration 88 className: 'spinner', // The CSS class to assign to the spinner 89 zIndex: 2e9 90 }; 91 92 $('#loading_animation').show(); 93 var target = document.getElementById('loading_animation'); 94 var spinner = new Spinner(opts).spin(target); 95 $('#loading_animation').append('<span class="loading_txt">×××¢× ×¢××</span>'); 96 97} 98 99function loading_animation_kill() 100{ 101 $('#loading_animation').html('').hide(); 102} 103 104function init_frm(selector) 105{ 106 $(selector).each(function(index, element) { 107 108 var removeLabels = true; 109 if ($(this).hasClass('with_labels')) removeLabels = false; 110 111 $(this).find('table tr, ul li').each(function(index, element) { 112 var lbl = $('.caption', this).text(); 113 if (removeLabels) $('.caption', this).remove(); 114 $('input, textarea',this).watermark(lbl); 115 116 }); 117 118 //$('select:not(.normal_selectbox)', this).selectBox({ keepInViewport: false }); 119 120 }); 121} 122 123 124 125var bubbleClicked = false; 126jQuery.fn.bubbleWin = function() { 127 $(this).addClass('bubbleWin'); 128 $(this).each(function(){ 129 130 var win = $($(this).data('win')); 131 132 win.addClass('bubble_container'); 133 134 var name = $(this).data('name'); 135 win.css('opacity', 0); 136 137 win.prepend('<div class="bubbleArrow"></div>').hide(); 138 //if (!$(win).hasClass('noOpacity')) $(win).css('opacity', 0.8); 139 140 win.click(function(e){ bubbleClicked = true; }); 141 142 $(this).click(function(e){
143 e.stopPropagation(); 144 145 ret = false; 146 if (win.is(':visible')) ret = true; 147 148 CloseBubble(); 149 150 if (ret) return; 151 152 153 $(this).addClass('selected'); 154 $(this).trigger('bubbleOpened'); 155 156 win.show().css('opacity', 1); 157 win.trigger('opened'); 158 var pos = win.offset(); 159 var pos2 = $(this).offset(); 160 161 if ((pos.top - $(this).height()) > pos2.top) 162 { 163 plc = ($(this).width() / 2) - (25 / 2); 164 $('.bubbleArrow', win).addClass('top').offset({left: (pos2.left + plc)}); 165 $('.bubbleArrow', win).addClass('top').offset({left: (pos2.left + plc)}); // Duplicate because bug in chrome 166 } 167 else if ((pos.top + win.height()) < pos2.top) 168 { 169 plc = ($(this).width() / 2) - (25 / 2); 170 $('.bubbleArrow', win).addClass('bot').offset({left: (pos2.left + plc)}); 171 } 172 else if (pos.left > pos2.left) 173 { 174 plc = ($(this).height() / 2) - (25 / 2); 175 $('.bubbleArrow', win).addClass('l').offset({top: (pos2.top + plc)}); 176 } 177 else 178 { 179 plc = ($(this).height() / 2) - (25 / 2); 180 $('.bubbleArrow', win).addClass('r').offset({top:(pos2.top + plc)}); 181 } 182 183 }); 184 }); 185}; 186 187function CloseBubble() 188{ 189 $('.bubbleWin.selected').each(function(){ 190 191 $(this).removeClass('selected'); 192 $($(this).data('win')).hide(); 193 return; 194 }); 195} 196 197 198$(document).ready(function(){ 199 200 $(document).click(function (event) { 201 if(bubbleClicked) { bubbleClicked=false;} 202 else CloseBubble(); 203 }); 204}); 205 206 207 208 function check_abuse(str) 209 { 210 var retVal = false; 211 $.ajax({ 212 async: false, 213 url: 'ps_actions/check_abuse', 214 type: 'POST', 215 dataType: 'json', 216 data: {'value': str}, 217 success: function(data) 218 { 219 retVal = (data.result == true); 220 } 221 }); 222 223 return retVal; 224 } 225 226function playSound(name){ 227 document.getElementById("sound").innerHTML='<audio autoplay="autoplay"><source src="Templates/PS/images/' + name + '.mp3" type="audio/mpeg" /><source src="Templates/PS/images/' + name + '.ogg" type="audio/ogg" /><embed hidden="true" autostart="true" loop="false" src="Templates/PS/images/' + name + '.mp3" /></audio>'; 228} 229 230 231 232FORM_AlertMsg = function(el, msg) 233{ 234 $(el).focus().addClass('errorInp').bind('keypress.error', function(){ $(this).removeClass('errorInp').unbind('keypress.error'); }); 235 AlertMsg(msg, 'red'); 236} 237 238function AlertMsg(msg, className) 239{ 240 var newDate = new Date; 241 var id = newDate.getTime(); 242 243 var htmlPop = $('<div class="AlertMsg" id="AlertMsg_' + id + '"><a class="close"></a><div class="inner">' + msg + '</div></div>'); 244 $('#page').before(htmlPop); 245 //$('#AlertMsg_' + id).center(); 246 247 if (className != undefined) htmlPop.addClass(className) 248 249 if (htmlPop.hasClass('animate')) htmlPop.fadeIn(); 250 else htmlPop.show(); 251 252 $('#AlertMsg_' + id + ' .close').click(function(){ 253 if (htmlPop.hasClass('animate')) htmlPop.fadeOut(function(){ $(this).remove(); }); 254 else htmlPop.remove(); 255 }); 256 257 if (htmlPop.hasClass('closeAfter')) setTimeout(function(){ $('.close', htmlPop).click(); }, 2000); 258 259} 260 261 262 263function api_call(settings) 264{ 265 //var settings = { url: m_settings.url, onComplete: m_settings.onComplete, cache_key: false }; 266 if (!isNull(settings.cache_key)) settings.cache_key = settings.cache_key + '_' + arrSettings['lang']; 267 268 if (isNull(settings.onComplete)) 269 { 270 settings.onComplete = function(){}; 271 } 272 else 273 { 274 var real_func = settings.onComplete; 275 settings.onComplete = function(data){ 276 if (!isNull(settings.cache_key)) $.localStorage.set(settings.cache_key, data); 277 real_func(data); 278 }; 279 } 280 281 if (settings.async === false) settings.async = false; 282 else settings.async = true; 283 284 if (isNull(settings.data)) settings.data = {}; 285 //settings.data.api_user_token = $.localStorage.get('user_token'); 286 287 288 if (!isNull(settings.cache_key) && $.localStorage.isSet(settings.cache_key)) 289 { 290 return settings.onComplete($.localStorage.get(settings.cache_key)); 291 } 292 else 293 { 294 return $.ajax({ 295 type: 'POST', 296 url: '/api/' + settings.url, 297 data: settings.data, 298 async: settings.async, 299 dataType: 'json', 300 success: settings.onComplete, 301 error: function (responseData, textStatus, errorThrown) { 302 //console.log('POST failed. - ' + settings.url); 303 } 304 }); 305 } 306} 307 308 309function close_kehila_cont(){ 310 $("#kehila_lomedet_cont").slideUp(); 311 312 $.get("/home/close_kehila",function(){ 313 314 }); 315}
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.