1/* $Id:*/ 2 3Drupal.behaviors.GacFunctions = function (context) { 4 var Jumper = false; 5 setToggleColor(); 6 if (Drupal.settings.gacLinkCA == 2 || Drupal.settings.gacLinkCB == 2) { 7 collapse('hide'); 8 ToggleFunc(); 9 } 10 if (Drupal.settings.gacLinkCA == 3 || Drupal.settings.gacLinkCB == 3) { 11 collapse('show'); 12 ToggleFunc(); 13 } 14 if (Drupal.settings.gacLinkCA == 1 || Drupal.settings.gacLinkCB == 1) { 15 $('#ga-comment-area-form-above').show(); 16 $('#ga-comment-area-form-below').show(); 17 } 18 if (Drupal.settings.gacPopSA == 1 || Drupal.settings.gacPopSB == 1) { 19 collapse('hide'); 20 setPopColor(); 21 ToggleFunc(); 22 if (Drupal.settings.gacPopSAUP == 1 && Jumper == false) { 23 $( "#ga-comment-area-form-above" ).click(function() { 24 newPos('above'); 25 }); 26 $( "#ga-comment-area-form-below" ).click(function() { 27 newPos('below'); 28 }); 29 } 30 } 31 if (Drupal.settings.gacCCA && Drupal.settings.gacCCB) { 32 $("#edit-comment-body").counter({ count: Drupal.settings.gacCountA, goal: Drupal.settings.gacGoalA }); 33 $("#edit-comment-body-1").counter({ count: Drupal.settings.gacCountB, goal: Drupal.settings.gacGoalB }); 34 } 35 if (Drupal.settings.gacCCA && !Drupal.settings.gacCCB) { 36 $("#edit-comment-body").counter({ count: Drupal.settings.gacCountA, goal: Drupal.settings.gacGoalA }); 37 } 38 if (!Drupal.settings.gacCCA && Drupal.settings.gacCCB) { 39 $("#edit-comment-body").counter({ count: Drupal.settings.gacCountB, goal: Drupal.settings.gacGoalB }); 40 } 41 $('#move-top-above').click(function() { 42 goToJump('#move-top-below'); 43 }); 44 $('#move-top-below').click(function() { 45 goToJump('#ga-comments-container'); 46 }); 47 function newPos(arg) { 48 var newH = $('#ga-comment-area-form-' + arg).height(); 49 newH = newH + 70; 50 if (arg == 'above' && Jumper == false) { 51 $('#ga-comment-area-form-wrapper-' + arg + ' .gac-context-link-box').css({ top: '-' + newH + 'px' }); 52 } 53 if (arg == 'below') { 54 $('#ga-comment-area-form-wrapper-' + arg + ' .gac-context-link-box').css({ top: '-' + newH + 'px' }); 55 } 56 } 57 function collapse(arg) { 58 if (arg == 'show') { 59 $('#ga-comment-area-form-above').show(); 60 $('#ga-comment-area-form-below').show(); 61 } 62 if (arg == 'hide') { 63 $('#ga-comment-area-form-above').hide(); 64 $('#ga-comment-area-form-below').hide(); 65 } 66 } 67 function setToggleColor() { 68 var aColor = $('.get-link-color a').css('color'); 69 var aColorJ = $('.get-link-color-jump a').css('color'); 70 if (Drupal.settings.gacLinkCA > 1) { 71 $('#ga-comment-form-toggle-above').addClass('toggle-pointer'); 72 $('#ga-comment-form-toggle-below').addClass('toggle-pointer'); 73 } 74 $('.toggle-pointer').css({color: aColor}); 75 $('.jump-pointer').css({color: aColorJ}); 76 } 77 function ToggleFunc() { 78 $('#ga-comment-form-toggle-above').click(function() { 79 if (Drupal.settings.gacPopSAUP == 1 && Jumper == false) { 80 newPos('above'); 81 } 82 $('#ga-comment-area-form-above').toggle(); 83 if (Drupal.settings.gacPopType == 'simple') { 84 $(this).toggle(); 85 $('#ga-comment-cancel-toggle-above').toggle(); 86 } 87 }); 88 $('#ga-comment-cancel-toggle-above').click(function() { 89 $('#ga-comment-area-form-above').toggle(); 90 if (Drupal.settings.gacPopType == 'simple') { 91 $(this).toggle(); 92 $('#ga-comment-form-toggle-above').toggle(); 93 } 94 }); 95 $('#ga-comment-form-toggle-below').click(function() { 96 if (Drupal.settings.gacPopSAUP == 1) { 97 newPos('below'); 98 } 99 $('#ga-comment-area-form-below').toggle(); 100 if (Drupal.settings.gacPopType == 'simple') { 101 $(this).toggle(); 102 $('#ga-comment-cancel-toggle-below').toggle(); 103 } 104 }); 105 $('#ga-comment-cancel-toggle-below').click(function() { 106 $('#ga-comment-area-form-below').toggle(); 107 if (Drupal.settings.gacPopType == 'simple') { 108 $(this).toggle(); 109 $('#ga-comment-form-toggle-below').toggle(); 110 } 111 }); 112 } 113 function setPopColor() { 114 var bgColor = $('body').css('background-color'); 115 $('.gac-context-link-box').css({background: bgColor}); 116 } 117 function goToJump(id){ 118 $('html, body').animate({scrollTop: $(id).offset().top}, 'slow'); 119 Jumper = true; 120 $('#ga-comment-area-form-wrapper-above .gac-context-link-box').css({ top: '0px' }); 121 } 122};
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.