Article added to library!
x
Pubchase is a service of protocols.io - free, open access, crowdsourced protocols repository. Explore protocols.
Sign in
Reset password
or connect with
Facebook
By signing in you are agreeing to our
Terms Of Service and Privacy Policy
  • See more
  • '); var ntfc_preview = ''; $.post('/api/v1/get_notifications', function(r) { var ntfc_read_pending = 0; var ntfc_pending = 0; $.each(r.notifications.pending, function(index, ntfc_object) { ntfc_read_pending++; ntfc_pending++; if (ntfc_read_pending
    ' + ntfc_object.full_name +'' + ntfc_object.time + '
    ' + ntfc_object.description +'
    '; }) if (ntfc_read_pending
    ' + ntfc_object.full_name +'' + ntfc_object.time + '
    ' + ntfc_object.description +'
    '; }) $('.notification-block .dropdown-menu').html(ntfc_preview); $('.notification-block .dropdown-menu').append('
  • See more
  • '); if (ntfc_pending > 0) { $('.notification-count').text(ntfc_pending).show(); } else { $('.notification-count').hide(); } } else { $('.notification-block .dropdown-menu').html(ntfc_preview); $('.notification-block .dropdown-menu').append('
  • See more
  • '); if (ntfc_pending > 0) { $('.notification-count').text(ntfc_pending).show(); } else { $('.notification-count').hide(); } } if (ntfc_read_pending == 0) { $('.notification-block .dropdown-menu').html('
  • You don\'t have any notifications
  • See more
  • '); $('.notification-count').hide(); } data = {'nid' : '', 'ntid' : 1}; $.post('/api/v1/notification_action', data, function(r) { if (r.request == 'OK') { $('.notification-count').hide(); } }); }, "json"); }); $('.search-save-box').on({ click : function(e) { e.preventDefault(); var search_attr = $(this).attr('rel').split(','); var p = search_attr[1]; var tf = search_attr[0]; window.location = '/search?tf='+tf+'&jc='+jc+'&keywords='+$(this).html()+'&s='+$('#sort_order').val()+'&p='+p; } }, '.search-name'); $( "#keywords_main, #keywords_mobile" ).focus(function(e) { show_saved_searches(e, $(this)); }); $(window).resize(function () { if ($('.search-save-box').is(':visible')) { if ($('#keywords_main').is(':visible')) var left_search_save = $('#keywords_main').offset().left; if ($('#keywords_mobile').is(':visible')) var left_search_save = $('#keywords_mobile').offset().left; $('.search-save-box').css('left',left_search_save); } }); $('.search-save-box').on({ click : function(e) { e.preventDefault(); delete_saved_search($(this)); } }, '.search-name-close'); $('.search-save-box, #keywords_main, #keywords_mobile').click(function(e) { e.stopPropagation(); }); $(document).click(function(e) { $('.search-save-box').hide(); }); $( "#keywords_main, #keywords_mobile" ).autocomplete({ source: function( request, response ) { // data contains the JSON object textStatus contains the status: success, error, etc $.post('/api/v1/searches', {'key' : request.term}, function(data, textStatus) { response(data); }, "json") }, select: function (event, ui) { var reportname = ui.item.value; var thelinks = '/search?tf='+$('#time_frame').val()+'&jc='+jc+'&keywords='+reportname+'&s='+$('#sort_order').val()+'&p='+$('#people_cluster').val(); } }); $('.search-go').click(function(e) { e.preventDefault(); window.location = get_search_url(); }); $('.logout').click(function(e) { e.preventDefault(); }); $('.header_keywords, .home_page_keywords').on('keydown', function(e) { if (e.keyCode == 13) { window.location = get_search_url(); } $('.search-save-box').hide(); }); $('.seemore').click(function(e){ e.stopImmediatePropagation(); }); });