1function CheckFollowerCount() { 2 var i; 3 var count = 0; 4 for (i = 0; i < document.forms[0].elements.length; i++) { 5 if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf('chkSelect') > -1)) { 6 if (document.forms[0].elements[i].checked == true) { 7 count += 1; 8 if (count > 25) { 9 alert("You can only select 25 users for bulk follow at a time"); 10 return false; 11 } 12 } 13 // var selectioncheck = document.getElementById('selectioncheck'); 14 // if (selectioncheck != null) { 15 // selectioncheck.value = true; 16 // } 17 } 18 } 19} 20 21 22var config = { 23 tooltip: { 24 gravity: 'nw', 25 fade: false, 26 opacity: 1, 27 offset: 0 28 } 29}; 30 31$(document).ready(function () { 32 33 34 //for Caching 35 var $content = $('#content'); 36 37 38 39 // $content.find("[data-datetimetext]").datetimepicker({ 40 // showSecond: false, 41 // showMillisec: false, 42 // ampm: true, 43 // timeFormat: 'hh:mm tt' 44 // }); 45 46 // $content.find("[data-datetimeimage]").click(function () { 47 // var x = $content.find("[data-datetimeimage]").data("datetimeimage") 48 // alert(x); 49 // $content.find(x).trigger('focus'); 50 // }); 51 52 // // $content.find("[data-datetimetext]").mouseover({ 53 // // $(this).css('cursor', 'pointer'); 54 // // }); 55 56 57 58 59 60 /*----------------------------------------------------------------------*/ 61 /* Saran: I have commented out un used inizalisation code to make dom 62 /* Processing faster [7th March 2012] 63 /*----------------------------------------------------------------------*/ 64 65 66 67 68 /*----------------------------------------------------------------------*/ 69 /* preload images 70 /*----------------------------------------------------------------------*/ 71 72 //$.preload(); 73 74 /*----------------------------------------------------------------------*/ 75 /* Widgets 76 /*----------------------------------------------------------------------*/ 77 78 $content.find('div.widgets').wl_Widget(); 79 80 81 /*----------------------------------------------------------------------*/ 82 /* All Form Plugins 83 /*----------------------------------------------------------------------*/ 84 85 //Integers and decimals 86 //$content.find('input[type=number].integer').wl_Number(); 87 //$content.find('input[type=number].decimal').wl_Number({ decimals: 2, step: 0.5 }); 88 89 //Date and Time fields 90 //$content.find('input.date, div.date').wl_Date(); 91 //$content.find('input.time').wl_Time(); 92 93 //Autocompletes (source is required) 94 //$content.find('input.autocomplete').wl_Autocomplete({ 95 // source: ["ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme"] 96 //}); 97 98 //Elastic textareas (autogrow) 99 $content.find('textarea[data-autogrow]').elastic(); 100 //WYSIWYG Editor 101 //$content.find('textarea.html').wl_Editor(); 102 103 //Validation 104 //$content.find('input[data-regex]').wl_Valid(); 105 //$content.find('input[type=email]').wl_Mail(); 106 //$content.find('input[type=url]').wl_URL(); 107 108 //File Upload 109 //$content.find('input[type=file]').wl_File(); 110 111 //Password and Color 112 //$content.find('input[type=password]').wl_Password(); 113 //$content.find('input.color').wl_Color(); 114 115 //Sliders 116 //$content.find('div.slider').wl_Slider(); 117 118 119 //The Form itself 120 $content.find('form').wl_Form(); 121 122 /*----------------------------------------------------------------------*/ 123 /* Alert boxes 124 /*----------------------------------------------------------------------*/ 125 126 $content.find('div.alert').wl_Alert(); 127 128 /*----------------------------------------------------------------------*/ 129 /* Breadcrumb 130 /*----------------------------------------------------------------------*/ 131 132 $content.find('ul.breadcrumb').wl_Breadcrumb(); 133 134 /*----------------------------------------------------------------------*/ 135 /* datatable plugin 136 /*----------------------------------------------------------------------*/ 137 138 //$content.find("table.datatable").dataTable(); 139 140 /*----------------------------------------------------------------------*/ 141 /* uniform plugin 142 /*----------------------------------------------------------------------*/ 143 144 $("select, textarea, input").not('input[type=submit], textarea.html').uniform(); 145 /*$("textarea, input").not('input[type=submit], textarea.html').uniform();*/ 146 147 /*----------------------------------------------------------------------*/ 148 /* Charts 149 /*----------------------------------------------------------------------*/ 150 151 $content.find('table.chart').wl_Chart({ 152 onClick: function (value, legend, label, id) { 153 //$.msg("value is " + value + " from " + legend + " at " + label + " (" + id + ")", { header: 'Custom Callback' }); 154 //$.msg(value + " at " + label, { header: 'Detail' }); 155 } 156 }); 157 158 /*----------------------------------------------------------------------*/ 159 /* Fileexplorer 160 /*----------------------------------------------------------------------*/ 161 162 //$content.find('div.fileexplorer').wl_Fileexplorer(); 163 164 165 /*----------------------------------------------------------------------*/ 166 /* Calendar (read http://arshaw.com/fullcalendar/docs/ for more info!) 167 /*----------------------------------------------------------------------*/ 168 169 // $content.find('div.calendar').wl_Calendar({ 170 // eventSources: [ 171 // { 172 // url: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic' 173 // }, {
174 // events: [ // put the array in the `events` property 175 // { 176 // title: 'Fixed Event', 177 // start: '2011-06-01' 178 // }, 179 // { 180 // title: 'long fixed Event', 181 // start: '2011-06-06', 182 // end: '2011-06-14' 183 // } 184 // ], 185 // color: '#f0a8a8', // an option! 186 // textColor: '#ffffff' // an option! 187 // }, { 188 // events: [ // put the array in the `events` property 189 // { 190 // title: 'Editable', 191 // start: '2011-06-09 12:30:00' 192 // } 193 // ], 194 // editable: true, 195 // color: '#a2e8a2', // an option! 196 // textColor: '#ffffff' // an option! 197 // } 198 // // any other event sources... 199 200 // ] 201 // }); 202 203 /*----------------------------------------------------------------------*/ 204 /* Gallery 205 /*----------------------------------------------------------------------*/ 206 207 //$content.find('ul.gallery').wl_Gallery(); 208 209 210 /*----------------------------------------------------------------------*/ 211 /* Tipsy Tooltip 212 /*----------------------------------------------------------------------*/ 213 214 215 $content.find('input[title]').tipsy({ 216 gravity: function () { return ($(this).data('tooltip-gravity') || config.tooltip.gravity); }, 217 fade: config.tooltip.fade, 218 opacity: config.tooltip.opacity, 219 color: config.tooltip.color, 220 offset: config.tooltip.offset 221 }); 222 223 224 /*----------------------------------------------------------------------*/ 225 /* Accordions 226 /*----------------------------------------------------------------------*/ 227 228 $content.find('div.accordion').accordion({ 229 collapsible: true, 230 autoHeight: false 231 }); 232 233 /*----------------------------------------------------------------------*/ 234 /* Tabs 235 /*----------------------------------------------------------------------*/ 236 237 $content.find('div.tab').tabs({ 238 fx: { 239 opacity: 'toggle', 240 duration: 'fast', 241 height: 'auto' 242 } 243 }); 244 245 /*----------------------------------------------------------------------*/ 246 /* Buttons 247 /*----------------------------------------------------------------------*/ 248 249 //$content.find('button, input[type=submit]').button(); 250 251 252 253 /*----------------------------------------------------------------------*/ 254 /* Navigation Stuff 255 /*----------------------------------------------------------------------*/ 256 257 258 //Top Pageoptions 259 // $('#wl_config').click(function () { 260 // var $pageoptions = $('#pageoptions'); 261 // if ($pageoptions.height() < 200) { 262 // $pageoptions.animate({ 'height': 200 }); 263 // $(this).addClass('active'); 264 // } else { 265 // $pageoptions.animate({ 'height': 20 }); 266 // $(this).removeClass('active'); 267 // } 268 // return false; 269 // }); 270 271 272 //Header navigation for smaller screens 273 var $headernav = $('ul#headernav'); 274 275 $headernav.bind('click', function () { 276 //if(window.innerWidth > 800) return false; 277 var ul = $headernav.find('ul').eq(0); 278 (ul.is(':hidden')) ? ul.addClass('shown') : ul.removeClass('shown'); 279 }); 280 281 $headernav.find('ul > li').bind('click', function (event) { 282 event.stopPropagation(); 283 var children = $(this).children('ul'); 284 285 if (children.length) { 286 (children.is(':hidden')) ? children.addClass('shown') : children.removeClass('shown'); 287 } 288 }); 289 290 //Search Field Stuff 291 var $searchform = $('#searchform'), 292 $searchfield = $('#search'); 293 294 $searchfield 295 .bind('focus.wl', function () { 296 $searchfield.parent().animate({ width: '150px' }, 100).select(); 297 }) 298 .bind('blur.wl', function () { 299 $searchfield.parent().animate({ width: '90px' }, 100); 300 }); 301 302 $searchform 303 .bind('submit.wl', function () { 304 //do something on submit 305 var query = $searchfield.val(); 306 }); 307 308 309 //Main Navigation 310 var $nav = $('#nav'); 311 312 $nav.delegate('li', 'click.wl', function (event) { 313 var _this = $(this), 314 _parent = _this.parent(), 315 a = _parent.find('a'); 316 _parent.find('ul').slideUp('fast'); 317 a.removeClass('active'); 318 _this.find('ul:hidden').slideDown('fast'); 319 _this.find('a').eq(0).addClass('active'); 320 event.stopPropagation(); 321 }); 322 323 /*----------------------------------------------------------------------*/ 324 /* Helpers 325 /*----------------------------------------------------------------------*/ 326
327 //placholder in inputs is not implemented well in all browsers, so we need to trick this 328 $("[placeholder]").bind('focus.placeholder', function () { 329 var el = $(this); 330 if (el.val() == el.attr("placeholder") && !el.data('uservalue')) { 331 el.val(""); 332 el.removeClass("placeholder"); 333 } 334 }).bind('blur.placeholder', function () { 335 var el = $(this); 336 if (el.val() == "" || el.val() == el.attr("placeholder") && !el.data('uservalue')) { 337 el.addClass("placeholder"); 338 el.val(el.attr("placeholder")); 339 el.data("uservalue", false); 340 } else { 341 342 } 343 }).bind('keyup.placeholder', function () { 344 var el = $(this); 345 if (el.val() == "") { 346 el.data("uservalue", false); 347 } else { 348 el.data("uservalue", true); 349 } 350 }).trigger('blur.placeholder'); 351 352 353 354 355 /*-----------------------------------------------------------------------------------------------------------------------------*/ 356 /* Following code is for the Demonstration only! 357 /* Get inspired and use it further or just remove it! 358 /*-----------------------------------------------------------------------------------------------------------------------------*/ 359 360 361 362 363 /*----------------------------------------------------------------------*/ 364 /* Callback for Slider 365 /*----------------------------------------------------------------------*/ 366 // $content.find('div.slider#slider_callback').wl_Slider({ 367 // onSlide: function (value) { 368 // $('#slider_callback_bar').width(value + '%').text(value); 369 // } 370 // }); 371 372 /*----------------------------------------------------------------------*/ 373 374 375 376 /*----------------------------------------------------------------------*/ 377 /* Rangeslider area how to 378 /* http://themeforest.revaxarts.com/whitelabel/doc-sliders.html 379 /*----------------------------------------------------------------------*/ 380 381 // $content.find('div.slider#slider_mousewheel').wl_Slider({ 382 // onSlide: function (values) { 383 // var _this = $('#slider_mousewheel'), 384 // _handler = _this.find('a'); 385 // _h1 = _handler.eq(0).offset(), 386 // _h2 = _handler.eq(1).offset(), 387 // value = _h1.left + (_h2.left - _h1.left) / 2 - _this.offset().left + 5; 388 // $('#slider_mousewheel_left').width(value); 389 // $('#slider_mousewheel_right').width(_this.width() - value); 390 // } 391 // }); 392 // $('#slider_mousewheel_left, #slider_mousewheel_right').bind('mousewheel', function (event, delta) { 393 // event.preventDefault(); 394 // $.alert('Use the Slider above!\nThis is just for visualisation'); 395 // }); 396 397 /*----------------------------------------------------------------------*/ 398 399 400 /*----------------------------------------------------------------------*/ 401 /* Button to clear localStorage 402 /* http://themeforest.revaxarts.com/whitelabel/widgets.html 403 /*----------------------------------------------------------------------*/ 404 405 // $content.find('.clearLocalStorage').bind('click', function () { 406 // var wl_Store = new $.wl_Store(); 407 // if (wl_Store.flush()) { 408 // $.msg("LocalStorage as been cleared!"); 409 // }; 410 // return false; 411 // }); 412 413 /*----------------------------------------------------------------------*/ 414 415 /*----------------------------------------------------------------------*/ 416 /* needed for the Store Documentation 417 /* http://themeforest.revaxarts.com/whitelabel/doc-store.html 418 /*----------------------------------------------------------------------*/ 419 420 // $content.find('#save_store').bind('click', function () { 421 // $.prompt('Storing some values?', 'This text is for the storage', function (value) { 422 // var wl_Store = new $.wl_Store('doc-store'); 423 // if (wl_Store.save('testvalue', value)) { 424 // $.msg('Your data has been saved!. You can reload the page now!', { live: 10000 }); 425 // } else { 426 // $.msg('Sorry, but a problem while storing your data occurs! Maybe your browser isn\'t supported!', { live: 10000 }); 427 // } 428 // }); 429 // }); 430 431 // $content.find('#restore_store').bind('click', function () { 432 // var wl_Store = new $.wl_Store('doc-store'); 433 // var value = wl_Store.get('testvalue'); 434 // if (value) { 435 // $.alert('your value is:\n' + value); 436 // } else { 437 // $.alert('No value is set!'); 438 // } 439 // }); 440 441 /*----------------------------------------------------------------------*/ 442 443 /*----------------------------------------------------------------------*/ 444 /* Confirm Box for the Form Filler 445 /* http://themeforest.revaxarts.com/whitelabel/form.html 446 /*----------------------------------------------------------------------*/ 447 448 // $('#formfiller').click(function () { 449 // var _this = this; 450 // $.confirm('To fill a form with your data you have to add a query string to the location.\nhttp://domain.tld/path?key=value&key2=value2', function () { 451 // window.location.href = _this.href; 452 // }); 453 // return false;
454 // }); 455 456 /*----------------------------------------------------------------------*/ 457 458 459 /*----------------------------------------------------------------------*/ 460 /* add some Callbacks to the Form 461 /* http://themeforest.revaxarts.com/whitelabel/form.html 462 /*----------------------------------------------------------------------*/ 463 464 // $content.find('form').wl_Form({ 465 // onSuccess: function (data, status) { 466 // if (window.console) console.log(status, data); 467 // $.msg("Custom Callback on success\nDevelopers! Check your Console!"); 468 // }, 469 // onError: function (status, error, jqXHR) { 470 // $.msg("Callback on Error\nError Status: " + status + "\nError Msg: " + error); 471 // } 472 // }); 473 474 475 476 477 /*----------------------------------------------------------------------*/ 478 /* Simple Styleswitcher 479 /*----------------------------------------------------------------------*/ 480 481 482 483 /*----------------------------------------------------------------------*/ 484 /* Gallery with some custom callbacks 485 /* http://themeforest.revaxarts.com/whitelabel/gallery.html 486 /*----------------------------------------------------------------------*/ 487 488 // $content.find('ul.gallery').wl_Gallery({ 489 // onEdit: function (el, href, title) { 490 // if (href) { 491 // $.confirm('For demonstration I use pixlr to edit images.\nDo you like to continue?', function () { 492 // window.open('http://pixlr.com/editor/?referrer=whitelabel&image=' + escape(href) + '&title=' + escape(title) + ''); 493 // }); 494 // } 495 // }, 496 // onDelete: function (el, href, title) { 497 // if (href) { 498 // $.confirm('Do you really like to delete this?', function () { 499 // el.fadeOut(); 500 // }); 501 // } 502 // } 503 504 // }); 505 506 /*----------------------------------------------------------------------*/ 507 508 509 /*----------------------------------------------------------------------*/ 510 /* Message trigger buttons 511 /* http://themeforest.revaxarts.com/whitelabel/dialogs_and_buttons.html 512 /*----------------------------------------------------------------------*/ 513 514 // $('#message').click(function () { 515 // $.msg("This is a simple Message"); 516 // }); 517 // $('#message_sticky').click(function () { 518 // $.msg("This Message will stay until you click the cross", { sticky: true }); 519 // }); 520 // $('#message_header').click(function () { 521 // $.msg("This is with a custom Header", { header: 'Custom Header' }); 522 // }); 523 // $('#message_delay').click(function () { 524 // $.msg("This stays exactly 10 seconds", { live: 10000 }); 525 // }); 526 527 528 /*----------------------------------------------------------------------*/ 529 530 531 /*----------------------------------------------------------------------*/ 532 /* Dialog trigger buttons 533 /* http://themeforest.revaxarts.com/whitelabel/dialogs_and_buttons.html 534 /*----------------------------------------------------------------------*/ 535 536 537 // $('#dialog').click(function () { 538 // $.alert("This is a simple Message"); 539 // }); 540 // $('#dialog_confirm').click(function () { 541 // $.confirm("Do you really like to confirm this?", 542 // function () { 543 // $.msg("confirmed!"); 544 // }, 545 // function () { 546 // $.msg("You clicked cancel!"); 547 // }); 548 // }); 549 // $('#dialog_prompt').click(function () { 550 // $.prompt("What do you really like?", "Pizza", 551 // function (value) { 552 // $.msg("So, you like '" + value + "'?"); 553 // }, 554 // function () { 555 // $.msg("You clicked cancel!"); 556 // }); 557 // }); 558 // $('#dialog_switch').click(function () { 559 // if ($.alert.defaults.nativ) { 560 // $(this).text('switch to nativ dialogs'); 561 // } else { 562 // $(this).text('switch to jQuery Dialogs'); 563 // } 564 // $.alert.defaults.nativ = !$.alert.defaults.nativ; 565 // }); 566 567 568 /*----------------------------------------------------------------------*/ 569 570 571 /*----------------------------------------------------------------------*/ 572 /* Breadcrumb Demos 573 /* http://themeforest.revaxarts.com/whitelabel/breadcrumb.html 574 /*----------------------------------------------------------------------*/ 575 576 // $('#enablebreadcrumb').click(function () { 577 // $('ul.breadcrumb').eq(4).wl_Breadcrumb('enable'); 578 // $.msg('enabled!'); 579 // }); 580 // $('#disablebreadcrumb').click(function () { 581 // $('ul.breadcrumb').eq(4).wl_Breadcrumb('disable'); 582 // $.msg('disabled!'); 583 // }); 584 585 // $('ul.breadcrumb').eq(5).wl_Breadcrumb({ 586 // onChange: function (element, id) {
587 // $.msg(element.text() + ' with id ' + id); 588 // } 589 // }); 590 591 /*----------------------------------------------------------------------*/ 592 593 594 /*----------------------------------------------------------------------*/ 595 /* Helps to make current section active in the Mainbar 596 /*----------------------------------------------------------------------*/ 597 598 var loc = location.pathname.replace(/\/([^.]+)\//g, ''); 599 //var current = $nav.find('a[href="' + loc + '"]'); 600 var current = $nav.find("[data-postbackurl='" + loc + "']"); 601 602 if (current.parent().parent().is('#nav')) { 603 current.addClass('active'); 604 } else { 605 current.parent().parent().parent().find('a').eq(0).addClass('active'); 606 current.addClass('active'); 607 608 } 609 610 /*----------------------------------------------------------------------*/ 611 612}); 613 614//$(document).ready(function () { 615(function ($) { 616 jQuery.fn.rebind = function () { 617 618 619 //for Caching 620 var $content = $('#content'); 621 622 $('.popwindow').popupWindow({ 623 centerBrowser: 1, 624 resizable: 1, 625 scrollbars: 1 626 }); 627 628 $('#txtRetweetDate').bind('click', function () { 629 $('#rbtRetweetSubmitLater').trigger('click'); 630 }); 631 632 $('#txtRetweetDate').focus(function () { 633 $('#rbtRetweetSubmitLater').trigger('click'); 634 }); 635 636 $('#drpRetweetHour').focus(function () { 637 $('#rbtRetweetSubmitLater').trigger('click'); 638 }); 639 640 $('#drpRetweetHour').bind('click', function () { 641 $('#rbtRetweetSubmitLater').trigger('click'); 642 }); 643 644 $('#rbtSubmitNow').focus(function () { 645 $("#phSubmitLater").hide(); 646 }); 647 648 $('#rbtSubmitNow').click(function () { 649 $("#phSubmitLater").hide(); 650 }); 651 652 $('#drpRetweetMinutes').focus(function () { 653 $('#rbtRetweetSubmitLater').trigger('click'); 654 }); 655 656 $('#drpRetweetMinutes').bind('click', function () { 657 $('#rbtRetweetSubmitLater').trigger('click'); 658 }); 659 660 $('#drpRetweetAMPM').focus(function () { 661 $('#rbtRetweetSubmitLater').trigger('click'); 662 }); 663 664 $('#drpRetweetAMPM').bind('click', function () { 665 $('#rbtRetweetSubmitLater').trigger('click'); 666 }); 667 668 669 $('#txtReplyDate').bind('click', function () { 670 $('#rbtReplySubmitLater').trigger('click'); 671 }); 672 673 $('#txtReplyDate').focus(function () { 674 $('#rbtReplySubmitLater').trigger('click'); 675 }); 676 677 $('#drpReplyHour').focus(function () { 678 $('#rbtReplySubmitLater').trigger('click'); 679 }); 680 681 $('#drpReplyHour').bind('click', function () { 682 $('#rbtReplySubmitLater').trigger('click'); 683 }); 684 685 $('#drpReplyMinutes').focus(function () { 686 $('#rbtReplySubmitLater').trigger('click'); 687 }); 688 689 $('#drpReplyMinutes').bind('click', function () { 690 $('#rbtReplySubmitLater').trigger('click'); 691 }); 692 693 $('#drpReplyAMPM').focus(function () { 694 $('#rbtReplySubmitLater').trigger('click'); 695 }); 696 697 $('#drpReplyAMPM').bind('click', function () { 698 $('#rbtReplySubmitLater').trigger('click'); 699 }); 700 701 $("#txtReplyPopData").keyup(function () { 702 var sUpdateText = $("#txtReplyPopData").val(); 703 var maxlength = 140; 704 var iShortUrlLenght = 20; //20 for http://t.co/52T60C3w and 21 for https://t.co/52T60C3w. So set to 21 by default. actually this can https: //api.twitter.com/1/help/configuration.json 705 var bLoopValidator = true 706 var iPointer = 0 707 var iNextPointer = 0 708 var iTotalUrlLength = sUpdateText.length 709 var iLoopCount = 0 710 //var iTrackingCampaing = $('#drpTrackingCampaign').val(); 711 712 var bRunLoop = true; 713 714 if (bRunLoop) { 715 while (bLoopValidator) { 716 717 if (sUpdateText.length == 0) { 718 bLoopValidator = false; 719 continue; 720 } 721 722 var iStartLocation = 0 723 iStartLocation = sUpdateText.indexOf("http://", iPointer) 724 if (iStartLocation == -1) { 725 iStartLocation = sUpdateText.indexOf("https://", iPointer) 726 } 727 728 if (iStartLocation == -1) { 729 iStartLocation = sUpdateText.indexOf("www.", iPointer) 730 } 731 732 if (iStartLocation == -1) { 733 bLoopValidator = false; 734 continue; 735 } 736 else { 737 iPointer = iStartLocation 738 iNextPointer = sUpdateText.indexOf(" ", iPointer); 739 if (iNextPointer == -1) { 740 iNextPointer = sUpdateText.length //basically user typing in a url but not finished yet. 741 } 742 iTotalUrlLength = iTotalUrlLength - iNextPointer + iPointer + iShortUrlLenght; 743 iPointer = iNextPointer + 1; 744 } 745 746 747 iLoopCount = iLoopCount + 1; //this is to prevent infinite loop. Assuming it wont be executed more than 100 748 if (iLoopCount > 300) { 749 bLoopValidator = false;
750 continue; 751 } 752 753 if (sUpdateText.length <= iPointer) { 754 bLoopValidator = false; 755 continue; 756 } 757 } 758 } 759 760 if (iTotalUrlLength != sUpdateText.length) { 761 if ((maxlength - iTotalUrlLength) < 0) { 762 $("#lblMsg").text("All URL will be shortened. If posting to Twitter, character limit exceeded by : " + (iTotalUrlLength - maxlength)); 763 $("#lblMsg").css("color", "#C90016"); 764 } 765 else { 766 $("#lblMsg").text("All URL will be shortened. Characters remaining : " + (maxlength - iTotalUrlLength)); 767 $("#lblMsg").css("color", ""); 768 } 769 } 770 else { 771 if ((maxlength - iTotalUrlLength) < 0) { 772 $("#lblMsg").text("If posting to Twitter, character limit exceeded by : " + (iTotalUrlLength - maxlength)); 773 $("#lblMsg").css("color", "#C90016"); 774 } 775 else { 776 $("#lblMsg").text("Characters remaining : " + (maxlength - iTotalUrlLength)); 777 $("#lblMsg").css("color", ""); 778 } 779 } 780 }); 781 782 var val = $('#txtReplyPopData').val(); //store the value of the element 783 $('#txtReplyPopData').val(''); //clear the value of the element 784 $('#txtReplyPopData').val(val); 785 $('#txtReplyPopData').focus(); 786 $('#txtReplyPopData').trigger('keyup'); 787 788 /*----------------------------------------------------------------------*/ 789 /* preload images 790 /*----------------------------------------------------------------------*/ 791 792 //$.preload(); 793 794 /*----------------------------------------------------------------------*/ 795 /* Widgets 796 /*----------------------------------------------------------------------*/ 797 798 $content.find('div.widgets').wl_Widget(); 799 //$content.find('div.widget').wl_Widget(); 800 801 802 /*----------------------------------------------------------------------*/ 803 /* All Form Plugins 804 /*----------------------------------------------------------------------*/ 805 806 //Integers and decimals 807 // $content.find('input[type=number].integer').wl_Number(); 808 //$content.find('input[type=number].decimal').wl_Number({ decimals: 2, step: 0.5 }); 809 810 //Date and Time fields 811 //$content.find('input.date, div.date').wl_Date(); 812 //$content.find('input.time').wl_Time(); 813 814 //Autocompletes (source is required) 815 //$content.find('input.autocomplete').wl_Autocomplete({ 816 // source: ["ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme"] 817 //}); 818 819 //Elastic textareas (autogrow) 820 $content.find('textarea[data-autogrow]').elastic(); 821 //WYSIWYG Editor 822 //$content.find('textarea.html').wl_Editor(); 823 824 //Validation 825 //$content.find('input[data-regex]').wl_Valid(); 826 //$content.find('input[type=email]').wl_Mail(); 827 //$content.find('input[type=url]').wl_URL(); 828 829 //File Upload 830 //$content.find('input[type=file]').wl_File(); 831 832 //Password and Color 833 //$content.find('input[type=password]').wl_Password(); 834 //$content.find('input.color').wl_Color(); 835 836 //Sliders 837 //$content.find('div.slider').wl_Slider(); 838 839 840 //The Form itself 841 $content.find('form').wl_Form(); 842 843 /*----------------------------------------------------------------------*/ 844 /* Alert boxes 845 /*----------------------------------------------------------------------*/ 846 847 $content.find('div.alert').wl_Alert(); 848 849 /*----------------------------------------------------------------------*/ 850 /* Breadcrumb 851 /*----------------------------------------------------------------------*/ 852 853 $content.find('ul.breadcrumb').wl_Breadcrumb(); 854 855 /*----------------------------------------------------------------------*/ 856 /* datatable plugin 857 /*----------------------------------------------------------------------*/ 858 859 //$content.find("table.datatable").dataTable(); 860 861 /*----------------------------------------------------------------------*/ 862 /* uniform plugin 863 /*----------------------------------------------------------------------*/ 864 865 $("select, textarea, input").not('input[type=submit], textarea.html').uniform(); 866 /*$("textarea, input").not('input[type=submit], textarea.html').uniform();*/ 867 868 /*----------------------------------------------------------------------*/ 869 /* Charts 870 /*----------------------------------------------------------------------*/ 871 872 $content.find('table.chart').wl_Chart({ 873 onClick: function (value, legend, label, id) { 874 //$.msg("value is " + value + " from " + legend + " at " + label + " (" + id + ")", { header: 'Custom Callback' }); 875 //$.msg("value is " + value + " at " + label, { header: 'Detail' }); 876 } 877 }); 878 879 /*----------------------------------------------------------------------*/ 880 /* Fileexplorer 881 /*----------------------------------------------------------------------*/ 882 883 //$content.find('div.fileexplorer').wl_Fileexplorer(); 884 885 886 /*----------------------------------------------------------------------*/ 887 /* Calendar (read http://arshaw.com/fullcalendar/docs/ for more info!) 888 /*----------------------------------------------------------------------*/ 889 890 // $content.find('div.calendar').wl_Calendar({ 891 // eventSources: [ 892 // { 893 // url: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic' 894 // }, {
895 // events: [ // put the array in the `events` property 896 // { 897 // title: 'Fixed Event', 898 // start: '2011-06-01' 899 // }, 900 // { 901 // title: 'long fixed Event', 902 // start: '2011-06-06', 903 // end: '2011-06-14' 904 // } 905 // ], 906 // color: '#f0a8a8', // an option! 907 // textColor: '#ffffff' // an option! 908 // }, { 909 // events: [ // put the array in the `events` property 910 // { 911 // title: 'Editable', 912 // start: '2011-06-09 12:30:00' 913 // } 914 // ], 915 // editable: true, 916 // color: '#a2e8a2', // an option! 917 // textColor: '#ffffff' // an option! 918 // } 919 // // any other event sources... 920 921 // ] 922 // }); 923 924 /*----------------------------------------------------------------------*/ 925 /* Gallery 926 /*----------------------------------------------------------------------*/ 927 928 //$content.find('ul.gallery').wl_Gallery(); 929 930 931 /*----------------------------------------------------------------------*/ 932 /* Tipsy Tooltip 933 /*----------------------------------------------------------------------*/ 934 935 936 // $content.find('input[title]').tipsy({ 937 // gravity: function () { return ($(this).data('tooltip-gravity') || config.tooltip.gravity); }, 938 // fade: config.tooltip.fade, 939 // opacity: config.tooltip.opacity, 940 // color: config.tooltip.color, 941 // offset: config.tooltip.offset 942 // }); 943 944 945 /*----------------------------------------------------------------------*/ 946 /* Accordions 947 /*----------------------------------------------------------------------*/ 948 949 $content.find('div.accordion').accordion({ 950 collapsible: true, 951 autoHeight: false 952 }); 953 954 /*----------------------------------------------------------------------*/ 955 /* Tabs 956 /*----------------------------------------------------------------------*/ 957 958 $content.find('div.tab').tabs({ 959 fx: { 960 opacity: 'toggle', 961 duration: 'fast', 962 height: 'auto' 963 } 964 }); 965 966 /*----------------------------------------------------------------------*/ 967 /* Buttons 968 /*----------------------------------------------------------------------*/ 969 970 //$content.find('button, input[type=submit]').button(); 971 972 973 974 /*----------------------------------------------------------------------*/ 975 /* Navigation Stuff 976 /*----------------------------------------------------------------------*/ 977 978 979 //Top Pageoptions 980 $('#wl_config').click(function () { 981 var $pageoptions = $('#pageoptions'); 982 if ($pageoptions.height() < 200) { 983 $pageoptions.animate({ 'height': 200 }); 984 $(this).addClass('active'); 985 } else { 986 $pageoptions.animate({ 'height': 20 }); 987 $(this).removeClass('active'); 988 } 989 return false; 990 }); 991 992 993 //Header navigation for smaller screens 994 var $headernav = $('ul#headernav'); 995 996 $headernav.bind('click', function () { 997 //if(window.innerWidth > 800) return false; 998 var ul = $headernav.find('ul').eq(0); 999 (ul.is(':hidden')) ? ul.addClass('shown') : ul.removeClass('shown'); 1000 }); 1001 1002 $headernav.find('ul > li').bind('click', function (event) { 1003 event.stopPropagation(); 1004 var children = $(this).children('ul'); 1005 1006 if (children.length) { 1007 (children.is(':hidden')) ? children.addClass('shown') : children.removeClass('shown'); 1008 } 1009 }); 1010 1011 //Search Field Stuff 1012 var $searchform = $('#searchform'), 1013 $searchfield = $('#search'); 1014 1015 $searchfield 1016 .bind('focus.wl', function () { 1017 $searchfield.parent().animate({ width: '150px' }, 100).select(); 1018 }) 1019 .bind('blur.wl', function () { 1020 $searchfield.parent().animate({ width: '90px' }, 100); 1021 }); 1022 1023 $searchform 1024 .bind('submit.wl', function () { 1025 //do something on submit 1026 var query = $searchfield.val(); 1027 }); 1028 1029 1030 //Main Navigation 1031 var $nav = $('#nav'); 1032 1033 $nav.delegate('li', 'click.wl', function (event) { 1034 var _this = $(this), 1035 _parent = _this.parent(), 1036 a = _parent.find('a'); 1037 _parent.find('ul').slideUp('fast'); 1038 a.removeClass('active'); 1039 _this.find('ul:hidden').slideDown('fast'); 1040 _this.find('a').eq(0).addClass('active'); 1041 event.stopPropagation(); 1042 }); 1043 1044 /*----------------------------------------------------------------------*/ 1045 /* Helpers 1046 /*----------------------------------------------------------------------*/ 1047
1048 //placholder in inputs is not implemented well in all browsers, so we need to trick this 1049 $("[placeholder]").bind('focus.placeholder', function () { 1050 var el = $(this); 1051 if (el.val() == el.attr("placeholder") && !el.data('uservalue')) { 1052 el.val(""); 1053 el.removeClass("placeholder"); 1054 } 1055 }).bind('blur.placeholder', function () { 1056 var el = $(this); 1057 if (el.val() == "" || el.val() == el.attr("placeholder") && !el.data('uservalue')) { 1058 el.addClass("placeholder"); 1059 el.val(el.attr("placeholder")); 1060 el.data("uservalue", false); 1061 } else { 1062 1063 } 1064 }).bind('keyup.placeholder', function () { 1065 var el = $(this); 1066 if (el.val() == "") { 1067 el.data("uservalue", false); 1068 } else { 1069 el.data("uservalue", true); 1070 } 1071 }).trigger('blur.placeholder'); 1072 1073 1074 1075 1076 /*-----------------------------------------------------------------------------------------------------------------------------*/ 1077 /* Following code is for the Demonstration only! 1078 /* Get inspired and use it further or just remove it! 1079 /*-----------------------------------------------------------------------------------------------------------------------------*/ 1080 1081 1082 1083 1084 /*----------------------------------------------------------------------*/ 1085 /* Callback for Slider 1086 /*----------------------------------------------------------------------*/ 1087 // $content.find('div.slider#slider_callback').wl_Slider({ 1088 // onSlide: function (value) { 1089 // $('#slider_callback_bar').width(value + '%').text(value); 1090 // } 1091 // }); 1092 1093 /*----------------------------------------------------------------------*/ 1094 1095 1096 1097 /*----------------------------------------------------------------------*/ 1098 /* Rangeslider area how to 1099 /* http://themeforest.revaxarts.com/whitelabel/doc-sliders.html 1100 /*----------------------------------------------------------------------*/ 1101 1102 // $content.find('div.slider#slider_mousewheel').wl_Slider({ 1103 // onSlide: function (values) { 1104 // var _this = $('#slider_mousewheel'), 1105 // _handler = _this.find('a'); 1106 // _h1 = _handler.eq(0).offset(), 1107 // _h2 = _handler.eq(1).offset(), 1108 // value = _h1.left + (_h2.left - _h1.left) / 2 - _this.offset().left + 5; 1109 // $('#slider_mousewheel_left').width(value); 1110 // $('#slider_mousewheel_right').width(_this.width() - value); 1111 // } 1112 // }); 1113 // $('#slider_mousewheel_left, #slider_mousewheel_right').bind('mousewheel', function (event, delta) { 1114 // event.preventDefault(); 1115 // $.alert('Use the Slider above!\nThis is just for visualisation'); 1116 // }); 1117 1118 /*----------------------------------------------------------------------*/ 1119 1120 1121 /*----------------------------------------------------------------------*/ 1122 /* Button to clear localStorage 1123 /* http://themeforest.revaxarts.com/whitelabel/widgets.html 1124 /*----------------------------------------------------------------------*/ 1125 1126 $content.find('.clearLocalStorage').bind('click', function () { 1127 var wl_Store = new $.wl_Store(); 1128 if (wl_Store.flush()) { 1129 $.msg("LocalStorage as been cleared!"); 1130 }; 1131 return false; 1132 }); 1133 1134 /*----------------------------------------------------------------------*/ 1135 1136 /*----------------------------------------------------------------------*/ 1137 /* needed for the Store Documentation 1138 /* http://themeforest.revaxarts.com/whitelabel/doc-store.html 1139 /*----------------------------------------------------------------------*/ 1140 1141 // $content.find('#save_store').bind('click', function () { 1142 // $.prompt('Storing some values?', 'This text is for the storage', function (value) { 1143 // var wl_Store = new $.wl_Store('doc-store'); 1144 // if (wl_Store.save('testvalue', value)) { 1145 // $.msg('Your data has been saved!. You can reload the page now!', { live: 10000 }); 1146 // } else { 1147 // $.msg('Sorry, but a problem while storing your data occurs! Maybe your browser isn\'t supported!', { live: 10000 }); 1148 // } 1149 // }); 1150 // }); 1151 1152 // $content.find('#restore_store').bind('click', function () { 1153 // var wl_Store = new $.wl_Store('doc-store'); 1154 // var value = wl_Store.get('testvalue'); 1155 // if (value) { 1156 // $.alert('your value is:\n' + value); 1157 // } else { 1158 // $.alert('No value is set!'); 1159 // } 1160 // }); 1161 1162 /*----------------------------------------------------------------------*/ 1163 1164 /*----------------------------------------------------------------------*/ 1165 /* Confirm Box for the Form Filler 1166 /* http://themeforest.revaxarts.com/whitelabel/form.html 1167 /*----------------------------------------------------------------------*/ 1168 1169 // $('#formfiller').click(function () { 1170 // var _this = this; 1171 // $.confirm('To fill a form with your data you have to add a query string to the location.\nhttp://domain.tld/path?key=value&key2=value2', function () { 1172 // window.location.href = _this.href; 1173 // }); 1174 // return false;
1175 // }); 1176 1177 /*----------------------------------------------------------------------*/ 1178 1179 1180 /*----------------------------------------------------------------------*/ 1181 /* add some Callbacks to the Form 1182 /* http://themeforest.revaxarts.com/whitelabel/form.html 1183 /*----------------------------------------------------------------------*/ 1184 1185 // $content.find('form').wl_Form({ 1186 // onSuccess: function (data, status) { 1187 // if (window.console) console.log(status, data); 1188 // $.msg("Custom Callback on success\nDevelopers! Check your Console!"); 1189 // }, 1190 // onError: function (status, error, jqXHR) { 1191 // $.msg("Callback on Error\nError Status: " + status + "\nError Msg: " + error); 1192 // } 1193 // }); 1194 1195 1196 1197 1198 /*----------------------------------------------------------------------*/ 1199 /* Simple Styleswitcher 1200 /*----------------------------------------------------------------------*/ 1201 1202 1203 1204 /*----------------------------------------------------------------------*/ 1205 /* Gallery with some custom callbacks 1206 /* http://themeforest.revaxarts.com/whitelabel/gallery.html 1207 /*----------------------------------------------------------------------*/ 1208 1209 // $content.find('ul.gallery').wl_Gallery({ 1210 // onEdit: function (el, href, title) { 1211 // if (href) { 1212 // $.confirm('For demonstration I use pixlr to edit images.\nDo you like to continue?', function () { 1213 // window.open('http://pixlr.com/editor/?referrer=whitelabel&image=' + escape(href) + '&title=' + escape(title) + ''); 1214 // }); 1215 // } 1216 // }, 1217 // onDelete: function (el, href, title) { 1218 // if (href) { 1219 // $.confirm('Do you really like to delete this?', function () { 1220 // el.fadeOut(); 1221 // }); 1222 // } 1223 // } 1224 1225 // }); 1226 1227 /*----------------------------------------------------------------------*/ 1228 1229 1230 /*----------------------------------------------------------------------*/ 1231 /* Message trigger buttons 1232 /* http://themeforest.revaxarts.com/whitelabel/dialogs_and_buttons.html 1233 /*----------------------------------------------------------------------*/ 1234 1235 // $('#message').click(function () { 1236 // $.msg("This is a simple Message"); 1237 // }); 1238 // $('#message_sticky').click(function () { 1239 // $.msg("This Message will stay until you click the cross", { sticky: true }); 1240 // }); 1241 // $('#message_header').click(function () { 1242 // $.msg("This is with a custom Header", { header: 'Custom Header' }); 1243 // }); 1244 // $('#message_delay').click(function () { 1245 // $.msg("This stays exactly 10 seconds", { live: 10000 }); 1246 // }); 1247 1248 1249 /*----------------------------------------------------------------------*/ 1250 1251 1252 /*----------------------------------------------------------------------*/ 1253 /* Dialog trigger buttons 1254 /* http://themeforest.revaxarts.com/whitelabel/dialogs_and_buttons.html 1255 /*----------------------------------------------------------------------*/ 1256 1257 1258 // $('#dialog').click(function () { 1259 // $.alert("This is a simple Message"); 1260 // }); 1261 // $('#dialog_confirm').click(function () { 1262 // $.confirm("Do you really like to confirm this?", 1263 // function () { 1264 // $.msg("confirmed!"); 1265 // }, 1266 // function () { 1267 // $.msg("You clicked cancel!"); 1268 // }); 1269 // }); 1270 // $('#dialog_prompt').click(function () { 1271 // $.prompt("What do you really like?", "Pizza", 1272 // function (value) { 1273 // $.msg("So, you like '" + value + "'?"); 1274 // }, 1275 // function () { 1276 // $.msg("You clicked cancel!"); 1277 // }); 1278 // }); 1279 // $('#dialog_switch').click(function () { 1280 // if ($.alert.defaults.nativ) { 1281 // $(this).text('switch to nativ dialogs'); 1282 // } else { 1283 // $(this).text('switch to jQuery Dialogs'); 1284 // } 1285 // $.alert.defaults.nativ = !$.alert.defaults.nativ; 1286 // }); 1287 1288 1289 /*----------------------------------------------------------------------*/ 1290 1291 1292 /*----------------------------------------------------------------------*/ 1293 /* Breadcrumb Demos 1294 /* http://themeforest.revaxarts.com/whitelabel/breadcrumb.html 1295 /*----------------------------------------------------------------------*/ 1296 1297 $('#enablebreadcrumb').click(function () { 1298 $('ul.breadcrumb').eq(4).wl_Breadcrumb('enable'); 1299 $.msg('enabled!'); 1300 }); 1301 $('#disablebreadcrumb').click(function () { 1302 $('ul.breadcrumb').eq(4).wl_Breadcrumb('disable'); 1303 $.msg('disabled!'); 1304 }); 1305 1306 $('ul.breadcrumb').eq(5).wl_Breadcrumb({ 1307 onChange: function (element, id) {
1308 $.msg(element.text() + ' with id ' + id); 1309 } 1310 }); 1311 1312 /*----------------------------------------------------------------------*/ 1313 1314 1315 /*----------------------------------------------------------------------*/ 1316 /* Helps to make current section active in the Mainbar 1317 /*----------------------------------------------------------------------*/ 1318 1319 var loc = location.pathname.replace(/\/([^.]+)\//g, ''); 1320 var current = $nav.find('a[href="' + loc + '"]'); 1321 1322 if (current.parent().parent().is('#nav')) { 1323 current.addClass('active'); 1324 } else { 1325 current.parent().parent().parent().find('a').eq(0).addClass('active'); 1326 current.addClass('active'); 1327 1328 } 1329 1330 /*----------------------------------------------------------------------*/ 1331 1332 }; 1333})(jQuery); 1334 1335 1336 1337/*----------------------------------------------------------------------*/ 1338/* Autocomplete Function must be available befor wl_Autocomplete is called 1339/*----------------------------------------------------------------------*/ 1340 1341//window.myAutocompleteFunction = function(){ 1342// return ['Lorem ipsum dolor','sit amet consectetur adipiscing','elit Nulla et justo','est Vestibulum libero','enim adipiscing in','porta mollis sem','Duis lacinia','velit et est rhoncus','mattis Aliquam at','diam eu ipsum','rutrum tincidunt Etiam','nec porta erat Pellentesque','et elit sed sem','bibendum posuere Curabitur id','purus erat vel pretium','erat Ut ultricies semper','quam eu dignissim Cras sed','sapien arcu Phasellus sit amet','venenatis sapien Nulla facilisi','Curabitur ut','bibendum odio Fusce','vitae velit hendrerit','dui convallis tristique','eget nec leo','Vestibulum fermentum leo','ac rutrum interdum mauris','felis sodales arcu','non vehicula odio magna sed','tortor Etiam enim leo','interdum vitae elementum id','laoreet at massa Curabitur nisi dui','lobortis ut rutrum','quis gravida ut velit','Phasellus augue quam gravida non','vulputate vel tempus sit amet','nunc Proin convallis tristique purus']; 1343//}; 1344 1345 1346/*----------------------------------------------------------------------*/ 1347/* Popupwindow Function to be used in new social account. 1348/* http://swip.codylindley.com/popupWindowDemo.html 1349/*----------------------------------------------------------------------*/ 1350 1351(function ($) { 1352 $.fn.popupWindow = function (instanceSettings) { 1353 1354 return this.each(function () { 1355 1356 $(this).click(function () { 1357 1358 $.fn.popupWindow.defaultSettings = { 1359 centerBrowser: 0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left 1360 centerScreen: 0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left 1361 height: 768, // sets the height in pixels of the window. 1362 left: 0, // left position when the window appears. 1363 location: 0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}. 1364 menubar: 0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}. 1365 resizable: 0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable. 1366 scrollbars: 0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. 1367 status: 0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}. 1368 width: 1024, // sets the width in pixels of the window. 1369 windowName: null, // name of window set from the name attribute of the element that invokes the click 1370 windowURL: null, // url used for the popup 1371 top: 0, // top position when the window appears. 1372 toolbar: 0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. 1373 }; 1374 1375 settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {}); 1376 1377 var windowFeatures = 'height=' + settings.height + 1378 ',width=' + settings.width + 1379 ',toolbar=' + settings.toolbar + 1380 ',scrollbars=' + settings.scrollbars + 1381 ',status=' + settings.status + 1382 ',resizable=' + settings.resizable + 1383 ',location=' + settings.location + 1384 ',menuBar=' + settings.menubar; 1385 1386 settings.windowName = this.name || settings.windowName; 1387 settings.windowURL = this.href || settings.windowURL; 1388 var centeredY, centeredX; 1389 1390 if (settings.centerBrowser) { 1391 1392 if ($.browser.msie) {//hacked together for IE browsers 1393 centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120) / 2) - (settings.height / 2))); 1394 centeredX = window.screenLeft + ((((document.body.offsetWidth + 20) / 2) - (settings.width / 2))); 1395 } else { 1396 centeredY = window.screenY + (((window.outerHeight / 2) - (settings.height / 2))); 1397 centeredX = window.screenX + (((window.outerWidth / 2) - (settings.width / 2))); 1398 } 1399 window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus(); 1400 } else if (settings.centerScreen) { 1401 centeredY = (screen.height - settings.height) / 2; 1402 centeredX = (screen.width - settings.width) / 2; 1403 window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus(); 1404 } else { 1405 window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + settings.left + ',top=' + settings.top).focus(); 1406 } 1407 return false;
1408 }); 1409 1410 }); 1411 }; 1412})(jQuery); 1413 1414 1415function CloseAndRefresh() { 1416 1417 window.opener.DoTheRefresh(); 1418 window.close(); 1419 //window.opener.reload(); 1420} 1421 1422function CloseandrefreshScheduler(cid, pid) { 1423 1424 $.ajax({ 1425 dataType: 'jsonp', 1426 url: '/scheduler.aspx?action=engagement&uid=' + cid + '&pid=' + pid, 1427 success: function () { 1428 1429 } 1430 1431 }); 1432 1433 $.ajax({ 1434 dataType: 'jsonp', 1435 url: '/scheduler.aspx?action=social&uid=' + cid + '&pid=' + pid, 1436 success: function () { 1437 1438 } 1439 1440 }); 1441 1442 window.opener.DoTheRefresh(); 1443 window.close(); 1444 //window.opener.reload(); 1445} 1446 1447 1448function GetEngagementSocialData(cid, pid) { 1449 1450 $.ajax({ 1451 dataType: 'jsonp', 1452 url: '/scheduler.aspx?action=engagement&uid=' + cid + '&pid='+ pid, 1453 success: function () { 1454 1455 } 1456 1457 }); 1458 1459 $.ajax({ 1460 dataType: 'jsonp', 1461 url: '/scheduler.aspx?action=social&uid=' + cid + '&pid=' + pid, 1462 success: function () { 1463 1464 } 1465 1466 }); 1467 1468} 1469 1470function SetCursorToTextEnd(textControlID) { 1471 var text = document.getElementById(textControlID); 1472 if (text != null && text.value.length > 0) { 1473 if (text.createTextRange) { 1474 var FieldRange = text.createTextRange(); 1475 FieldRange.moveStart('character', text.value.length); 1476 FieldRange.collapse(); 1477 FieldRange.select(); 1478 } 1479 } 1480}
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.