1/* 2 * <codeheader> 3 * <name>AMPAE Qt LightBox</name> 4 * <version>1.0</version> 5 * <description>Qt LightBox</description> 6 * <base>https://ampae.com/</base> 7 * <author>AMPAE</author> 8 * <email>[email protected]</email> 9 * <copyright file="LICENSE.txt" company="AMPAE"> 10 * THIS CODE ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 11 * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR 12 * A PARTICULAR PURPOSE. 13 * </copyright> 14 * <date>2018-09-17</date> 15 * <summary> 16 * Script for Qt LightBox; 17 * </summary> 18 * </codeheader> 19*/ 20jQuery(document).on('click', '#qt_popup_close', function() {qt_popup_down();}); 21jQuery(document).on('click', '#qt_popup_lb .qt_popup_content', function() {qt_popup_down();}); 22 23jQuery(function($) { 24 $('.qt-lightbox').click( function(e) { 25 e.preventDefault(); 26 27 var tmp_href = $(this).attr('data-source'); 28 var tmp_title = $(this).attr('title'); 29 var tmp_desc = $(this).attr('desc'); 30 31$('#qt_popup_lb .qt_popup_body .qt_popup_content').css('background', 'url('+tmp_href+') center center no-repeat'); 32 33$('#qt_popup_lb .qt_popup_body .qt_popup_content').css('background-size', 'contain'); 34 35 36$('#qt_popup_lb .qt_popup_body .qt_popup_content').css('-webkit-background-size', 'contain'); 37$('#qt_popup_lb .qt_popup_body .qt_popup_content').css('-moz-background-size', 'contain'); 38$('#qt_popup_lb .qt_popup_body .qt_popup_content').css('-o-background-size', 'contain'); 39$('<span class=title>' + tmp_title + '</span>').appendTo('#qt_popup_lb .qt_popup_header'); 40$('<span class=desc>' + tmp_desc + '</span>').appendTo('#qt_popup_lb .qt_popup_footer'); 41 42qt_popup_up(); 43 44 }); 45}); 46 47function qt_popup_up(){ 48 jQuery('body').prepend('<div id="qt_popup_overlay"></div>'); 49 50 jQuery('#qt_popup_overlay').animate({opacity:0.9},500); 51 jQuery('#qt_popup_lb').fadeIn(500); 52} 53 54function qt_popup_down(){ 55 56 jQuery('#qt_popup_lb').fadeOut(500); 57 58 jQuery('#qt_popup_overlay').animate({opacity:0.0},500, function(){ 59 jQuery('#qt_popup_lb .qt_popup_header .title').remove(); 60 jQuery('#qt_popup_lb .qt_popup_footer .desc').remove(); 61 jQuery('#qt_popup_overlay').remove(); 62 }); 63}
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.