1riot.tag2('riot-solr-container', '<a class="modal-trigger" onclick="{triggerClicked}" if="{isTrigger()}">{opts.txt.trigger}</a>', '@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @-moz-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @-o-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } riot-solr-container,[riot-tag="riot-solr-container"],[data-is="riot-solr-container"]{ display: block; } riot-solr-container #dismiss-cta,[riot-tag="riot-solr-container"] #dismiss-cta,[data-is="riot-solr-container"] #dismiss-cta{ width: 100%; display: block; text-align: center; }', 'class="{opts.classes}"', function(opts) { 2 this.mixin('RiotTagsChildren'); 3 this.mixin('RiotSolrConnection'); 4 this.mixin('RiotSolrUtils'); 5 (function($, tag) { 6 var modalContent, $modal, $buttonWrapper, $dismissButton, modalTag, modalOpts = {}, mc = tag.mountChildren; 7 8 tag.getWrapperClasses = function() { 9 return [opts.classes, tag.isTrigger() ? 'trigger' : 'inline'].join(' '); 10 }; 11 12 tag.isTrigger = function() { 13 return opts.mode === 'trigger' || (opts.responsive_mode && $(window).width() <= parseInt(opts.responsive_bp)); 14 }; 15 16 tag.mountChildren = function() { 17 if(!tag.isTrigger()) { 18 tag.childrenMounted = true; 19 mc.apply(tag); 20 } 21 }; 22 23 tag.triggerClicked = function() { 24 RiotTagsModal.show($modal, undefined, modalOpts, modalTag); 25 RiotTagsDispatch.trigger('RiotSolrContainerModalContent', tag, $modal); 26 modalTag.trigger('updated'); 27 if ($dismissButton) { 28 $dismissButton.click(function () { 29 $modal.foundation('reveal', 'close'); 30 }); 31 } 32 }; 33 34 tag.showModalContent = function() { 35 modalContent = document.createElement('riot-solr-container'); 36 modalTag = riot.mount(modalContent, 'riot-solr-container', $.extend({}, opts, {mode: 'inline', responsive_mode: 0}))[0]; 37 $modal = $('<div>').append(modalContent); 38 39 if (opts.modal_close) { 40 modalOpts.close = opts.modal_close; 41 } 42 if (opts.modal_class) { 43 modalOpts.class = opts.modal_class; 44 } 45 if (opts.txt.dismiss_cta && opts.txt.dismiss_cta !== '') { 46 $buttonWrapper = $('<div>', { 47 id: "dismiss-cta" 48 }); 49 $dismissButton = $('<button />').text(opts.txt.dismiss_cta); 50 $buttonWrapper.append($dismissButton); 51 52 $modal.append($buttonWrapper); 53 } 54 }; 55 56 tag.hideModalContent = function() { 57 if($modal) { 58 $modal.foundation('reveal', 'close'); 59 } 60 }; 61 62 tag.showInlineContent = function() { 63 if(tag.childrenMounted) { 64 [].forEach.call(tag.root.querySelectorAll('*:not(.modal-trigger)'), function (el) { 65 el.style.display = null; 66 }); 67 } 68 else { 69 tag.mountChildren() 70 } 71 }; 72 73 tag.hideInlineContent = function() { 74 if(tag.childrenMounted) { 75 [].forEach.call(tag.root.querySelectorAll('*:not(.modal-trigger)'), function (el) { 76 el.style.display = 'none'; 77 }); 78 } 79 }; 80 81 tag.processBreakPoint = function() { 82 if(tag.isTrigger()) { 83 tag.hideInlineContent(); 84 tag.showModalContent(); 85 } 86 else { 87 tag.hideModalContent(); 88 tag.showInlineContent(); 89 } 90 }; 91 92 var checkBreakPoint = tag.RiotSolrUtils.debounce(function() { 93 tag.processBreakPoint(); 94 tag.update() 95 }, 100); 96 97 if(opts.responsive_mode) { 98 window.addEventListener('resize', checkBreakPoint) 99 } 100 101 tag.one('update', tag.processBreakPoint); 102 103 })(jQuery, this); 104});
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.