1/* $Id: advancedactivity-linkedinse.js 2012-26-01 00:00:00Z SocialEngineAddOns Copyright 2011-2012 BigStep 2Technologies Pvt. Ltd. $ 3 */ 4 5//JAVA SCRIPT FOR USER FACEBOOK FRIENDS SHOWING ADDING TO LIST. 6 7var url_param_time_until = 0; 8var url_param_time_since = 0; 9var feed_viewmore_linkedin, feed_no_more_linkedin, feed_loading_linkedin, feed_view_more_linkedin_link, activityUpdateHandler_Linkedin, view_morefeed, firstfeedid_linkedin, update_freq_linkedin, redirect_childwindow, subject_linkedin, message_linkedin, last_linkedin_timestemp, view_moreconnection_linkedin; 10var linkedin_loginURL = ''; 11var linkedin_loginURL_temp = ''; 12var action_logout_taken_linkedin = 0; 13var current_linkedin_timestemp = 0; 14 15 16var AdvancedActivityUpdateHandler_Linkedin = new Class({ 17 18 Implements : [Events, Options], 19 options : { 20 debug : false, 21 baseUrl : '/', 22 identity : false, 23 delay : 5000, 24 admin : false, 25 idleTimeout : 600000, 26 last_id : 0, 27 subject_guid : null, 28 showloading:true, 29 30 feedContentURL: en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed' 31 }, 32 33 state : true, 34 35 activestate : 1, 36 37 fresh : true, 38 39 lastEventTime : false, 40 41 title: document.title, 42 43 initialize : function(options) { 44 this.setOptions(options); 45 }, 46 47 start : function() { 48 this.state = true; 49 50 // Do idle checking 51 this.idleWatcher = new IdleWatcher(this, { 52 timeout : this.options.idleTimeout 53 }); 54 this.idleWatcher.register(); 55 this.addEvents({ 56 'onStateActive' : function() { 57 this.activestate = 1; 58 this.state= true; 59 }.bind(this), 60 'onStateIdle' : function() { 61 this.activestate = 0; 62 this.state = false; 63 }.bind(this) 64 }); 65 this.loop(); 66 }, 67 68 stop : function() { 69 this.state = false; 70 }, 71 72 checkFeedUpdate_Linkedin : function(){ 73 74 if (action_logout_taken_linkedin == 1) return; 75 if( en4.core.request.isRequestActive() ) return; 76 77 en4.core.request.send(new Request.HTML({ 78 url : en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed', 79 method: 'get', 80 data : { 81 'format' : 'html', 82 'minid' : current_linkedin_timestemp, 83 'feedOnly' : true, 84 'nolayout' : true, 85 'subject' : this.options.subject_guid, 86 'checkUpdate' : true, 87 'is_ajax': 1 88 }, 89 onSuccess : function(responseTree, responseElements, responseHTML, responseJavaScript) { 90 if (activity_type == 5) { 91 if (typeof feedUpdate_linkedin != 'undefined') { 92 feedUpdate_linkedin.innerHTML = responseHTML; 93 feedUpdate_linkedin.style.display = 'block'; 94 } 95 } 96 } 97 })); 98 }, 99 100 getFeedUpdate : function(last_id){ 101 102 //if( en4.core.request.isRequestActive() ) return; 103 var feednomore_linkedin = 0; 104 if (feed_no_more_linkedin.style.display == 'none') { 105 feednomore_linkedin = 1; 106 } 107 if($('update_advfeed_linkedinblink')) 108 $('update_advfeed_linkedinblink').style.display ='none'; 109 //if (this.options.showloading) { 110 feedUpdate_linkedin.style.display = 'block'; 111 feedUpdate_linkedin.innerHTML = "<div class='aaf_feed_loading'><img src='application/modules/Seaocore/externals/images/core/loading.gif' alt='Loading' /></div>"; 112 var id = new Date().getTime(); 113 en4.core.request.send(new Request.HTML({ 114 url : en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed?id=' + id, 115 method:'get', 116 data : { 117 'format' : 'html', 118 'minid' : current_linkedin_timestemp, 119 'feedOnly' : true, 120 'nolayout' : true, 121 'getUpdate' : true, 122 'subject' : this.options.subject_guid, 123 'is_ajax' : 1, 124 'id': id 125 //'currentaction':currentaction 126 }, 127 onSuccess : function(responseTree, responseElements, responseHTML, responseJavaScript) { 128 if (activity_type == 5) { 129 var htmlBody; 130 if($('update_advfeed_linkedinblink')) 131 $('update_advfeed_linkedinblink').style.display = 'none'; 132 var newUl = document.createElement('ul',{ 133 'class':'feed' 134 }); 135 Elements.from(responseHTML).reverse().inject(newUl, 'top'); 136 newUl.inject(activityFeed_linkedin, 'top'); 137 var feedSlide = new Fx.Slide(newUl, { 138 resetHeight:true 139 }).hide(); 140 feedSlide.slideIn(); 141 (function(){ 142 feedSlide.wrapper.destroy(); 143 htmlBody = responseHTML; 144 if( htmlBody ) htmlBody.stripScripts(true); 145 Elements.from(htmlBody).reverse().inject(activityFeed_linkedin, 'top'); 146 }).delay(450); 147 148 feedUpdate_linkedin.innerHTML = ''; 149 feedUpdate_linkedin.style.display = 'none'; 150 if (feednomore_linkedin == 1) { 151 feed_no_more_linkedin.style.display = 'none'; 152 } 153 154 } 155 } 156 }), {'force':true}); 157 }, 158 159 loop : function() { 160 if (this.options.delay == 0) return; 161 if( !this.state) { 162 this.loop.delay(this.options.delay, this); 163 return; 164 } 165 166 try { 167 this.checkFeedUpdate_Linkedin().addEvent('complete', function() { 168 this.loop.delay(this.options.delay, this); 169 }.bind(this)); 170 } catch( e ) { 171 this.loop.delay(this.options.delay, this); 172 this._log(e); 173 } 174 }, 175 // Utility 176 177 _log : function(object) { 178 if( !this.options.debug ) { 179 return; 180 } 181 182 // Firefox is dumb and causes problems sometimes with console 183 try { 184 //if( typeof(console) && $type(console) ) { 185 //console.log(object); 186 //} 187 } catch( e ) { 188 // Silence 189 } 190 } 191}); 192 193window.addEvent('load', function () { 194 getCommonLinkedinElements(); 195 196}); 197function getCommonLinkedinElements() { 198 199 if ($('feed_viewmore_linkedin')) { 200 feed_viewmore_linkedin = $('feed_viewmore_linkedin'); 201 feed_loading_linkedin = $('feed_loading_linkedin'); 202 feed_no_more_linkedin = $('feed_no_more_linkedin'); 203 feed_view_more_linkedin_link = $('feed_viewmore_linkedin_link'); 204 feedUpdate_linkedin = $('feed-update-linkedin'); 205 } 206 activityFeed_linkedin = $('Linkedin_activity-feed'); 207 208} 209 210 211 212var Call_linkedincheckUpdate = function () { 213 214 en4.core.runonce.add(function() { 215 try { 216 activityUpdateHandler_Linkedin = new AdvancedActivityUpdateHandler_Linkedin({ 217 'baseUrl' : en4.core.baseUrl, 218 'basePath' : en4.core.basePath, 219 'identity' : 4, 220 'delay' : update_freq_linkedin, 221 'feedContentURL': en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed' 222 223 }); 224 225 setTimeout("activityUpdateHandler_Linkedin.start('linkedin')",update_freq_linkedin); 226 227 window._activityUpdateHandler_Linkedin = activityUpdateHandler_Linkedin; 228 229 } catch( e ) { 230 //if( $type(console) ) console.log(e); 231 } 232 }); 233 234} 235 236function AAF_showText_More_linkedin (type_text, thisobj) { 237 if (type_text == '1') { 238 thisobj.getNext('.linkedinmessage_text_full').style.display = 'block'; 239 thisobj.style.display = 'none'; 240 } 241 else if (type_text == '2') { 242 thisobj.getNext('.linkedindescript_text_full').style.display = 'block'; 243 thisobj.style.display = 'none'; 244 } 245 246} 247 248//SHOW MORE TWITTER FEED ON SCROLLING..... 249var last_oldlinkedin_id = 0; 250var enter_linkedincount = 0;
251var linkedin_ActivityViewMore = function () { 252 253 if (last_linkedin_timestemp == '') { 254 feed_viewmore_linkedin.style.display = 'none'; 255 //lastOldFB = 0; 256 feed_loading_linkedin.style.display = 'none'; 257 feed_no_more_linkedin.style.display = ''; 258 return; 259 } 260 if (activity_type == 5 && enter_linkedincount == 0) { 261 feed_view_more_linkedin_link.removeEvents('click').addEvent('click', function(event){ 262 event.stop(); 263 enter_linkedincount = 1; 264 linkedin_ActivityViewMore(); 265 }); 266 } 267 268 enter_linkedincount = 0; 269 if( en4.core.request.isRequestActive() ) return; 270 if (activity_type != 5) { 271 return; 272 } 273 feed_viewmore_linkedin.style.display = 'none'; 274 //lastOldFB = 0; 275 feed_loading_linkedin.style.display = 'block'; 276 277 278 279 280 281 userfeed_url = en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed'; 282 en4.core.request.send(new Request.HTML({ 283 'url' : userfeed_url, 284 'method':'get', 285 'data' : { 286 'format' : 'html', 287 'next_prev' : 'next', 288 'duration' : last_linkedin_timestemp, 289 'is_ajax' : '1' 290 291 }, 292 evalScripts : true, 293 onSuccess : function(responseTree, responseElements, responseHTML, responseJavaScript) { 294 if (activity_type == 5) { 295 countScrollAAFLinkedin++; 296 297 Elements.from(responseHTML).inject(activityFeed_linkedin); 298 en4.core.runonce.trigger(); 299 Smoothbox.bind($('activity-feed')); 300 } 301 } 302 303 })); 304 305} 306 307 308//POST LIKE TO A POST ON FACEBOOK................// 309var linkedin_like_temp = 1; 310var linkedin_like_id_temp = ''; 311//var linkedin_likes = array(); 312var linkedin_like = function (thisobj, action_id, action, linkedinlike_count) { 313 if (linkedin_like_id_temp == '') { 314 linkedin_like_id_temp = action_id; 315 } 316 if (linkedin_like_temp == 1 || action_id != linkedin_like_id_temp) { 317 linkedin_like_temp = 2; 318 linkedin_like_id_temp = action_id; 319 //linkedin_likes[action_id] = thisobject; 320 } 321 322 else { 323 324 return; 325 } 326 327 userfeed_url = en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed'; 328 329 var request = new Request.JSON({ 330 'url' : userfeed_url, 331 'method':'get', 332 'data' : { 333 334 'is_ajax' : '3', 335 'post_id' : action_id, 336 'Linkedin_action': action, 337 'like_count': linkedinlike_count 338 339 340 }, 341 342 343 onSuccess : function(responseJSON) { 344 345 linkedin_like_temp = 1; 346 var selfparent = thisobj.getParent('.aaf_feed_item_stats'); 347 348 if (selfparent.getNext ('.aaf_feed_comment_commentbox')) 349 selfparent.getNext ('.aaf_feed_comment_commentbox').style.display = 'block'; 350 if (selfparent.getNext ('.CommentonPost_linkedin')) 351 selfparent.getNext ('.CommentonPost_linkedin').style.display = 'block'; 352 if(selfparent.getNext ('.Linkedin_activity-comment-submit')) { 353 selfparent.getNext ('.Linkedin_activity-comment-submit').blur(); 354 if (selfparent.getNext ('.Linkedin_activity-comment-submit').value == en4.core.language.translate('Write a comment...')) 355 selfparent.getNext ('.Linkedin_activity-comment-submit').setStyle('height', '19px'); 356 357 } 358 if (responseJSON && responseJSON.success) { 359 360 //if (responseJSON.body) { 361 362 if (action == 'like') { 363 var current_likecount = parseInt(linkedinlike_count) + parseInt(1); 364 365 if (current_likecount == 1) 366 367 Elements.from(responseJSON.body).inject(selfparent.getNext('.aaf_feed_comment_commentbox').getFirst('.postcomment_linkedin'), 'top') ; 368 369 else { 370 371 selfparent.getNext('.aaf_feed_comment_commentbox').getElement('.Linkedin_LikesCount').innerHTML = responseJSON.body; 372 } 373 374 375 thisobj.innerHTML = '<a href="javascript:void(0);" onclick="linkedin_like(this, \'' + action_id + '\', \'unlike\', \'' + current_likecount + '\')" title="' + en4.core.language.translate('Click to unlike this update') + '">' + en4.core.language.translate('Like') + '<span class="count_linkedinlike"> ('+ current_likecount +')</span></a>'; 376 377 } 378 else if (action == 'unlike') 379 { 380 var current_likecount = parseInt(linkedinlike_count) - parseInt(1); 381 if (current_likecount == 0 || responseJSON.body == '') { 382 var currentdiv = selfparent.getNext('.aaf_feed_comment_commentbox').getElement('.Linkedin_LikesCount').getParent('.aaf_feed_comment_likes_count'); 383 currentdiv.destroy(); 384 385 thisobj.innerHTML = '<a href="javascript:void(0);" onclick="linkedin_like(this, \'' + action_id + '\', \'like\', \'' + current_likecount + '\')" title="' + en4.core.language.translate('Click to like this update') + '">' + en4.core.language.translate('Like') + '</a>'; 386 } 387 else { 388 selfparent.getNext('.aaf_feed_comment_commentbox').getElement('.Linkedin_LikesCount').innerHTML = responseJSON.body; 389 390 thisobj.innerHTML = '<a href="javascript:void(0);" onclick="linkedin_like(this, \'' + action_id + '\', \'like\', \'' + current_likecount + '\')" title="' + en4.core.language.translate('Click to like this update') + '">' + en4.core.language.translate('Like') + '<span class="count_linkedinlike"> ('+ current_likecount +')</span></a>'; 391 } 392 393 394 395 396 } 397 398 } 399 else { 400 en4.core.showError('<div class="aaf_show_popup"><p>' + en4.core.language.translate("An error has occurred processing the request. The target may
400no longer exist.") + '</p><button onclick="Smoothbox.close()">' + en4.core.language.translate("Close") + '</button></div>'); 401 return; 402 } 403 } 404 }); 405 en4.core.request.send(request); 406} 407 408var parent_post_id, parent_action, parent_post_url; 409var post_comment_onlinkedintemp = 1; 410var post_comment_onlinkedin = function (thisobj, post_id, action) { 411 412 413 if (post_comment_onlinkedintemp == 1) { 414 post_comment_onlinkedintemp = 2; 415 } 416 else { 417 return; 418 } 419 var closesmoothbox = 0; 420 if (!post_id) { 421 var closesmoothbox = 1; 422 post_id = parent_post_id; 423 action=parent_action; 424 thisobj=$('comments_info_linkedin-' + post_id); 425 } 426 427 var comment_content = ''; 428 if (thisobj.getPrevious('.LinkedinCommentonPost_submit') && thisobj.getPrevious('.LinkedinCommentonPost_submit').value != '') { 429 comment_content = thisobj.getPrevious('.LinkedinCommentonPost_submit').value; 430 431 } 432 else { 433 return; 434 } 435 436 userfeed_url = en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed'; 437 var request = new Request.JSON({ 438 'url' : userfeed_url, 439 'method':'get', 440 'data' : { 441 'format' : 'json', 442 'is_ajax' : '4', 443 'post_id' : post_id, 444 'Linkedin_action': action, 445 'content': comment_content 446 447 448 }, 449 450 onSuccess : function(responseJSON) { 451 post_comment_onlinkedintemp = 1; 452 if (closesmoothbox ==1) { 453 parent.Smoothbox.close(); 454 } 455 if (action == 'post' && responseJSON && responseJSON.body) { 456 Elements.from(responseJSON.body).inject(thisobj.getParent('.aaf_fb_comment').getPrevious('.postcomment_linkedin')); 457 if (thisobj.getPrevious('.LinkedinCommentonPost_submit')) { 458 thisobj.getPrevious('.LinkedinCommentonPost_submit').focus(); 459 thisobj.getPrevious('.LinkedinCommentonPost_submit').value = ''; 460 thisobj.getPrevious('.LinkedinCommentonPost_submit').setStyle('height', '19px'); 461 } 462 } 463 else if (responseJSON && responseJSON.success == 1) { 464 var parentnode = $('latestcomment-' + post_id).destroy(); 465 466 } 467 else { 468 469 en4.core.showError('<div class="aaf_show_popup"><p>' + en4.core.language.translate("An error has occurred processing the request. The target may no longer exist.") + '</p><button onclick="Smoothbox.close()">' + en4.core.language.translate("Close") + '</button></div>'); 470 return; 471 } 472 473 } 474 }); 475 request.send(); 476} 477 478var Linkedin_doOnScrollLoadActivity = function () { 479 if( typeof( feed_viewmore_linkedin.offsetParent ) != 'undefined' ) { 480 var elementPostionY = feed_viewmore_linkedin.offsetTop; 481 }else{ 482 var elementPostionY = feed_viewmore_linkedin.y; 483 } 484 if((maxAutoScrollAAF == 0 || countScrollAAFLinkedin < maxAutoScrollAAF) && autoScrollFeedAAFEnable && elementPostionY <= window.getScrollTop()+(window.getSize().y -40) ){ 485 linkedin_ActivityViewMore(); 486 487 } 488 else { 489 if ($('feed_viewmore_linkedin')) { 490 feed_viewmore_linkedin.style.display = 'block'; 491 feed_loading_linkedin.style.display = 'none'; 492 feed_view_more_linkedin_link.removeEvents('click').addEvent('click', function(event){ 493 event.stop(); 494 linkedin_ActivityViewMore(); 495 }); 496 } 497 if (!autoScrollFeedAAFEnable) { 498 window.onscroll = ""; 499 } 500 } 501 502} 503 504 505var linkedin_toggle_likecommentbox = function (thisobj) { 506 if (thisobj.style.display == 'block') 507 thisobj.style.display = 'none'; 508 else 509 thisobj.style.display = 'block'; 510 thisobj.getElement('.CommentonPost_linkedin').style.display = 'block'; 511} 512 513var showHideCommentbox_linkedin = function (thisobj, event) { 514 515 if (event == 1) { 516 var defalutcontent = thisobj.value.trim(); 517 if (defalutcontent == 'Write a comment...') { 518 thisobj.value = ''; 519 520// $('fbcomments_author_photo-' + post_id).setStyle('display', 'block'); 521// $('fbuser_picture-' + post_id).style.display = 'block'; 522 thisobj.removeClass('aaf_color_light'); 523 thisobj.focus(); 524 thisobj.autogrow(); 525 if(typeof is_enter_submitothersocial != 'undefined' && is_enter_submitothersocial == 1) { 526 thisobj.addEvent((Browser.Engine.trident || Browser.Engine.webkit) ? 'keydown':'keypress',function (event) { 527 if (event.shift && event.key == 'enter') { 528 } else if(event.key == 'enter') { 529 event.stop(); 530 post_comment_onlinkedin(thisobj.getParent('.comments_info').getElement('.Linkedin_activity-comment-submit'), thisobj.getParent('.comments_info').getElementById('post_commentonfeed').value, 'post'); 531 } 532 });
533 // add blur event 534 } 535 else { 536 thisobj.getNext('.Linkedin_activity-comment-submit').style.display = 'block'; 537 } 538 } 539 } 540 else if (event == 2 && thisobj.value == '') { 541 542 (function() { 543 thisobj.value = 'Write a comment...'; 544 thisobj.addClass('aaf_color_light'); 545 thisobj.getNext('.Linkedin_activity-comment-submit').style.display = 'none'; 546 //$('fbcomments_author_photo-' + post_id).setStyle('display', 'none'); 547 }).delay(50); 548 } 549 550} 551 552var AAF_ShowFeedDialogue_Linkedin = function (feedurl) { 553 aaf_feed_type_tmp = 5; 554 // resetAAFTextarea (composeInstance.plugins); 555 if (linkedin_loginURL_temp == '') { 556 linkedin_loginURL_temp = feedurl; 557 } 558 activityfeedtype = 'linkedin'; 559 if (typeof current_window_url != 'undefined' && current_window_url != ''){ 560 linkedin_loginURL_temp = en4.core.baseUrl + 'seaocore/auth/linkedin?redirect_urimain=' + current_window_url + '?redirect_linkedin=1'; 561 } 562 if (history.pushState) 563 history.pushState( {}, document.title, current_window_url+"?activityfeedtype="+ activityfeedtype ); 564 var child_window = window.open (linkedin_loginURL_temp ,'mywindow','width=800,height=700'); 565 566} 567 568var checkLinkedin = function () { 569 if (linkedin_loginURL != '') { 570 if ($type($('compose-linkedin-form-input'))) { 571 $('compose-linkedin-form-input').disabled = 'disabled'; 572 $('composer_linkedin_toggle').addEvent('click', function(event) { 573 if (linkedin_loginURL != '') { 574 $('compose-linkedin-form-input').checked = false; 575 576 var child_window = window.open (linkedin_loginURL ,'mywindow','width=800,height=700'); 577 event.stop(); 578 } 579 } ); 580 } 581 582 } 583 else { 584 if ($type($('compose-linkedin-form-input'))) { 585 $('compose-linkedin-form-input').disabled = ''; 586 } 587 } 588 589} 590 591 592var logout_aaflinkedin = function () { 593 594 var request = new Request.JSON({ 595 'url' : en4.core.baseUrl + 'seaocore/auth/logout/', 596 'method':'get', 597 'data' : { 598 'is_ajax' : '1', 599 'logout_service' : 'linkedin' 600 601 602 }, 603 604 onComplete : function(responseJSON) { 605 action_logout_taken_linkedin = 1; 606 linkedin_loginURL = linkedin_loginURL_temp; 607 if ($('compose-linkedin-form-input')) { 608 $('compose-linkedin-form-input').set('checked', !$('compose-linkedin-form-input').get('checked')); 609 if($('composer_linkedin_toggle').hasClass('composer_linkedin_toggle_active') ) 610 $('composer_linkedin_toggle').removeClass('composer_linkedin_toggle_active'); 611 //$('composer_linkedin_toggle').toggleClass('composer_linkedin_toggle_active'); 612 } 613 $('aaf_main_tab_logout').style.display = 'none'; 614 $('aaf_main_tab_refresh').style.display = 'none'; 615 if ($('activity-post-container')) 616 $('activity-post-container').style.display = 'none'; 617 $('aaf_main_contener_feed_5').innerHTML = '<div class="aaf_feed_tip"><span>' + en4.core.language.translate('You need to be logged into LinkedIn to see your LinkedIn Connections Feed.') + ' <a href="javascript:void(0);" onclick= "AAF_ShowFeedDialogue_Linkedin()" >' + en4.core.language.translate('Click here') + '</a>.</span></div> <br />'; 618 619 } 620 }); 621 request.send(); 622} 623 624 625 626var linkedin_memberid; 627//sending the message of the users whose feeds are displaying in the activity feed area. 628var sendLinkedinMessage = function (thisobj, method, connecter_name, connected_name, connecter_id) { 629 630 if (method == 'get') { 631 linkedin_memberid = connecter_id; 632 $('to-elementlinkedin').innerHTML = connecter_name; 633 $('toValueslinkedin').value = connecter_id; 634 if (connected_name != '') 635 $('subject_linkedin').innerHTML = "Your new connection: " + connected_name; 636 var messagehtml = $('linkedinmessage_html').innerHTML; 637 $('subject_linkedin').innerHTML = '<br />'; 638 $('toValueslinkedin').value = ''; 639 Smoothbox.open('<div>' + messagehtml + '</div>'); 640 } 641 else { 642 if (thisobj.getParent('.global_form').getElement('.compose-content').innerHTML == '' || thisobj.getParent('.global_form').getElement('.compose-textarea').value == '') { 643 644 thisobj.getParent('.global_form').getElement('.show_errormessage').innerHTML = '<ul class="form-errors" style="margin:0px;"><li>Please fill the subject and message fields</li></ul>'; 645 646 return false; 647 648 } 649 thisobj.getParent('.global_form').getElement('.show_errormessage').setStyle('display', 'none'); 650 $('titlelinkedin').value = thisobj.getParent('.global_form').getElement('.compose-content').innerHTML; 651 652 $('linkedin_message_textarea').value = thisobj.getParent('.global_form').getElement('.compose-textarea').value; 653 currentSearchParams = $('post_linkedin_message').toQueryString(); 654 thisobj.getPrevious().style.display = 'inline-block'; 655 thisobj.getPrevious().innerHTML = "<img src='application/modules/Seaocore/externals/images/core/loading.gif' alt='Loading' />"; 656 thisobj.setStyle ('display', 'none'); 657 currentSearchParams = currentSearchParams + '&is_ajax=2&memberid='
657+ linkedin_memberid ; 658// 659 userfeed_url = en4.core.baseUrl + 'widget/index/mod/advancedactivity/name/advancedactivitylinkedin-userfeed'; 660 var request = new Request.JSON({ 661 url: userfeed_url, 662 method:'get', 663 data : currentSearchParams, 664 onFailure: function (xhr) { //XMLHTTPREQUEST 665 en4.core.showError("<div class='aaf_show_popup'><p>" + en4.core.language.translate("An error occured. Please try again after some time.") + '</p><button onclick="Smoothbox.close()">Close</button></div>'); 666 active_submitrequest = 1; 667 }, 668 onSuccess: function(responseJSON) { 669 if (responseJSON && responseJSON.response.success == 1) { 670 671 thisobj.getParent('.form-elements').innerHTML = en4.core.language.translate('Your message was successfully sent.'); 672 } 673 else { 674 thisobj.getParent('.form-elements').innerHTML = en4.core.language.translate('An error occured. Please try again after some time.'); 675 } 676 setTimeout("Smoothbox.close();", 1000); 677 } 678 }); 679 request.send(); 680 681 } 682 683 return false; 684} 685 686var linkedin_comment = function (thisobj) { 687 var self1 = thisobj.getParent('.aaf_feed_item_stats'); 688 var commentform = self1.getNext('.aaf_feed_comment_commentbox').getElement('.CommentonPost_linkedin'); 689 self1.getNext('.aaf_feed_comment_commentbox').style.display = 'block'; 690 commentform.setStyle('display', 'block'); 691 692 (function() { 693 showHideCommentbox_linkedin (commentform.getElement('.LinkedinCommentonPost_submit'), 1) 694 }).delay(60); 695 696 697} 698 699var showAllComments = function (thisobj, classname) { 700 701 thisobj.setStyle('display', 'none'); 702 703 $$('.feedcomment-' + classname).each (function (element) { 704 705 element.setStyle('display', 'block'); 706 707 708 709 }); 710 711 712 713}
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.