Spaces:
Running
Running
AI-in-Healthcare
/
Developer Meetup in Boston Generative AI Use Cases in Healthcare _files
/js__oVecLbEK4Ta-Qbs_m72LumJ-Nr844wIPkrHE6Vq3qsI__jAX8ucy5wQQi.js
(function ($) { | |
Drupal.behaviors.radioactivity = { | |
config: '', | |
attached: false, | |
activeIncidents: [], | |
attach: function (context, settings) { | |
// Skip if radioactivity is not set | |
if (typeof settings.radioactivity == 'undefined') { | |
return; | |
} | |
var config = settings.radioactivity.config; | |
var emitters = settings.radioactivity.emitters; | |
// Clear used emitters | |
settings.radioactivity.emitters = []; | |
this.config = config; | |
$.each(emitters, function(callback, incidents) { | |
// Accuracy and flood filtering | |
$.each(incidents, function(index, incident) { | |
var config = Drupal.behaviors.radioactivity.config; | |
var key = 'radioactivity_' + incident['checksum']; | |
// Flood protection (cookie based) | |
if (config.fpEnabled) { | |
if (Drupal.behaviors.radioactivity.fetch(key)) { | |
// Filter | |
return; | |
} else { | |
var exp = new Date(); | |
exp.setTime(exp.getTime() + (config.fpTimeout * 60 * 1000)); | |
Drupal.behaviors.radioactivity.store(key, true, exp); | |
} | |
} else { | |
// clear the possible cookie | |
Drupal.behaviors.radioactivity.store(key, null, new Date()); | |
//$.cookie(key, null); | |
} | |
// Accuracy filtering | |
var rnd = Math.random() * 100; | |
if (rnd >= incident.accuracy) { | |
return; | |
} | |
Drupal.behaviors.radioactivity.activeIncidents.push(incident); | |
}); | |
// Call the emitter callback | |
if (Drupal.behaviors.radioactivity.activeIncidents.length > 0) { | |
Drupal.behaviors.radioactivity[callback](Drupal.behaviors.radioactivity.activeIncidents); | |
// Clear incidents | |
Drupal.behaviors.radioactivity.activeIncidents = []; | |
} | |
}); | |
}, | |
hardStore: function (key, value, exp) { | |
try { | |
if (typeof(Storage) !== "undefined") { | |
localStorage.setItem(key, JSON.stringify({ | |
value: value, | |
expire: exp.getTime() | |
})); | |
sessionStorage.setItem(key, JSON.stringify({ | |
value: value, | |
expire: exp.getTime() | |
})); | |
} | |
} catch(e){ | |
$.cookie(key, value, { expires: exp }); | |
} | |
$.cookie(key, value, { expires: exp }); | |
}, | |
hardFetch: function (key) { | |
var data = null; | |
if (typeof(Storage) !== "undefined") { | |
try{ | |
data = localStorage.getItem(key) | |
if (!data) { | |
data = sessionStorage.getItem(key); | |
} | |
} catch(e){ | |
} | |
} | |
if (!data) { | |
data = $.cookie(key); | |
} | |
return data; | |
}, | |
store: function (key, value, exp) { | |
//return this.hardStore(key, value, exp); | |
if (typeof(Storage) !== "undefined") { | |
// Fall back to using cookies if this fails | |
try { | |
localStorage.setItem(key, JSON.stringify({ | |
value: value, | |
expire: exp.getTime() | |
})); | |
} catch(e) { | |
$.cookie(key, value, { expires: exp }); | |
} | |
} else { | |
$.cookie(key, value, { expires: exp }); | |
} | |
}, | |
fetch: function (key) { | |
var now = new Date(); | |
if (typeof(Storage) !== "undefined") { | |
// Fall back to using cookies if this fails | |
try { | |
var data = localStorage.getItem(key); | |
if (data) { | |
data = JSON.parse(data); | |
if (now.getTime() < data.expire) { | |
return data.value; | |
} | |
} | |
return null; | |
} catch(e) { | |
return $.cookie(key); | |
} | |
} | |
return $.cookie(key); | |
}, | |
emitDefault: function (incidents) { | |
$.ajax({ | |
url: this.config.emitPath, | |
data: {'incidents': incidents}, | |
type: 'POST', | |
cache: false, | |
dataType: "html" | |
}); | |
} | |
}; | |
})(jQuery); | |
;/*})'"*/ | |
;/*})'"*/ | |
jQuery(document).ready(function ($) { | |
var $element = $('.nf_prev_list'); | |
var intsys_nf_page_top=0; | |
var counter_nftop = 0; | |
var intsys_nf_time_top=new Date().getTime()/ 1000; | |
$('.nf_menu div').once().on('click', function() { | |
$('.nf_menu div').removeClass('selected'); | |
$(this).addClass('selected'); | |
counter_nftop=0; | |
var settings = {url : "/ajax/notification/pagetop/"+counter_nftop+"?filter="+$(this).attr('filter'),submit : {async:false}}; | |
var ajax = new Drupal.ajax(false, false, settings); | |
ajax.eventResponse(ajax, {}); | |
}); | |
$element.scroll(function() { | |
let scroll = $element.scrollTop(); | |
let offset = $element[0].scrollHeight-460; | |
if (scroll > offset && intsys_nf_page_top!=1000000 && (new Date().getTime()/ 1000-intsys_nf_time_top)>1) { | |
counter_nftop++; | |
intsys_nf_time_top=new Date().getTime()/ 1000; | |
var settings = {url : "/ajax/notification/pagetop/"+counter_nftop+"?filter="+$("#nf_menu .selected").attr('filter'),submit : {async:false}}; | |
var ajax = new Drupal.ajax(false, false, settings); | |
ajax.eventResponse(ajax, {}); | |
} | |
}); | |
$(document).on('click',".icon-nfdesktop", function() { | |
$(".nf_prev").show(); | |
}); | |
$(document).on('click',function(e){if (!jQuery(e.target).closest('.nf_prev,.icon-nfdesktop').length){$('.nf_prev').hide();}e.stopPropagation();}); | |
$(document).on('click',".notification_view", function(ev) { | |
var $this = $(this); | |
var id = $this.attr('nfid'); | |
//$.ajax("/ajax/notification/mark/"+id); | |
ev.preventDefault(); | |
var $self=$(this); | |
$.ajax({ | |
url: "/ajax/notification/mark/"+id, | |
method: 'post', | |
dataType: 'html', | |
data: {}, | |
success: function(data){ | |
document.location = $self.attr('href'); | |
}}); | |
$('[nfid="'+id+'"] .member .active').remove(); | |
}); | |
if(document.location.pathname=='/notifications'){ | |
var intsys_nf_page=0; | |
var intsys_nf_time=new Date().getTime()/ 1000; | |
const params = new Proxy(new URLSearchParams(window.location.search), {get: (searchParams, prop) => searchParams.get(prop),}); | |
var intsys_nf_query = params.filter; | |
$(window).scroll(function() { | |
var ISfooter=50; | |
if ($(window).width() <= '768') ISfooter=300; | |
if ($(window).height() + $(window).scrollTop() >= $(document).height()-ISfooter) { | |
window.limitos+=5; | |
IntsysNFLoadPage(); | |
} | |
}); | |
} | |
function IntsysNFLoadPage() | |
{ | |
if(intsys_nf_page!=1000000 && (new Date().getTime()/ 1000-intsys_nf_time)>1) { | |
intsys_nf_page++; | |
intsys_nf_time=new Date().getTime()/ 1000; | |
var settings = {url : "/ajax/notification/page/"+intsys_nf_page+"?filter="+intsys_nf_query,submit : {async:false}}; | |
var ajax = new Drupal.ajax(false, false, settings); | |
ajax.eventResponse(ajax, {}); | |
}} | |
$.fn.IntsysNFPage = function(page) { | |
intsys_nf_page=page; | |
}; | |
$.fn.IntsysNFPageTop = function(page) { | |
intsys_nf_page_top=page; | |
}; | |
$.fn.IntsysNFScrollTop = function(page) { | |
$(".nf_prev_list").scrollTop(page); | |
}; | |
$.fn.IntsysNFAddClass = function(select,cssclass) { | |
$(select).addClass(cssclass); | |
}; | |
}); | |
const containernf = document.getElementById("nf_menu"); | |
if(containernf) | |
{ | |
containernf.addEventListener("wheel", function (e) { | |
if (e.deltaY > 0) { | |
containernf.scrollLeft += 10; | |
e.preventDefault(); | |
} | |
else if(e.deltaY < 0) { | |
containernf.scrollLeft -= 10; | |
e.preventDefault(); | |
} | |
});} | |
;/*})'"*/ | |
;/*})'"*/ | |
(function ($) { | |
Drupal.behaviors.mentionsTextcomplete = { | |
attach: function () { | |
var settings = Drupal.settings.mentions.textcomplete; | |
var matchExp = new RegExp('\\B' + settings.prefix_regex + '(\\w*)$'); | |
$.each(settings.forms, function (index, form) { | |
$('textarea[id^="' + form + '-value"]').textcomplete([ | |
{ | |
form: form, | |
match: matchExp, | |
search: function (term, callback) { | |
var format_id = $('select[id^="' + this.form + '-format"]').val(); | |
if ($.inArray(format_id, settings.formats) != -1) { | |
$.getJSON(Drupal.settings.basePath + 'mentions/autocomplete/' + format_id + '/' + term, function (resp) { | |
callback(resp); | |
}); | |
} | |
else { | |
callback([]); | |
} | |
}, | |
replace: function (mention) { | |
return settings.prefix + mention + settings.suffix + ' '; | |
}, | |
index: 1 | |
} | |
]); | |
}); | |
} | |
} | |
})(jQuery); | |
;/*})'"*/ | |
;/*})'"*/ | |
var intsyscalendarjoin = jQuery('#drop-intsyscalendar'),intsyscalendarjoinclass = jQuery('.intsyscalendar-drop'), | |
intsyscalendarjoinLink = jQuery('.intsyscalendar-title'), | |
intsyscalendarindexClick = 0; | |
jQuery( function() { | |
intsyscalendarjoinLink.click( function(event) { | |
intsyscalendarjoinclass.fadeOut(100); | |
if (intsyscalendarindexClick === 0) { | |
jQuery('#drop-'+event.target.id).fadeIn(300); | |
intsyscalendarindexClick = 1; | |
} | |
else { | |
intsyscalendarjoin.fadeOut(300); | |
intsyscalendarindexClick = 0; | |
} | |
event.stopPropagation(); | |
});}); | |
jQuery(document).click(function(event) { | |
if (jQuery(event.target).closest(intsyscalendarjoinclass).length) return; | |
intsyscalendarjoinclass.fadeOut(300); | |
intsyscalendarindexClick = 0; | |
event.stopPropagation(); | |
}); | |
;/*})'"*/ | |
;/*})'"*/ | |
window.CKEDITOR_BASEPATH = '/sites/all/libraries/ckeditor/'; | |
;/*})'"*/ | |
;/*})'"*/ | |