1jQuery(document).ready(function(){ 2 3 qs.widget.confirm = function (msg, callbackfn, callbackfnNo) { 4 5 options = { 6 "onClose": undefined, 7 "onConfirm": undefined, 8 "msg": "", 9 "title":"", 10 "labelYes": qs.trad.disp("Yes"), 11 "labelNo": qs.trad.disp("No") 12 }; 13 14 if(typeof(msg) == "object") 15 { 16 options.onClose = callbackfnNo; 17 options.onConfirm = callbackfn; 18 jQuery.extend(options, msg); 19 } 20 else 21 { 22 options.msg = msg; 23 options.onClose = callbackfnNo; 24 options.onConfirm = callbackfn; 25 } 26 27 html = '<div class="modal fade qs-alert-box-bootstrap" tabindex="-1" role="dialog">'; 28 html += '<div class="modal-dialog">'; 29 html += '<div class="modal-content">'; 30 html += ' <div class="modal-header">'; 31 html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'; 32 html += options.title; 33 html += ' </div>'; 34 html += ' <div class="modal-body">'; 35 html += options.msg; 36 html += ' </div>'; 37 html += ' <div class="modal-footer">'; 38 html += ' <button type="button" class="btn btn-default qs-button-no" data-dismiss="modal">' + options.labelNo + '</button>'; 39 html += ' <button type="button" class="btn btn-primary qs-button-yes" data-dismiss="modal">' + options.labelYes + '</button>'; 40 html += ' </div>'; 41 html += ' </div>'; 42 html += ' </div>'; 43 html += '</div>'; 44 45 $(document.body).append(html); 46 47 $('.qs-alert-box-bootstrap').modal(); 48 49 jQuery('.qs-alert-box-bootstrap button.qs-button-no').click(function () { 50 if(typeof(options.onClose) == "function") 51 options.onClose(); 52 53 }); 54 55 jQuery('.qs-alert-box-bootstrap button.qs-button-yes').click(function () { 56 if(typeof(options.onConfirm) == "function") 57 options.onConfirm(jQuery('.qs-alert-box-bootstrap')); 58 }); 59 60 $('.qs-alert-box-bootstrap').on('hidden.bs.modal', function (e) { 61 setTimeout(function(){jQuery('.qs-alert-box-bootstrap').remove();}, 1); 62 }) 63 64 65 } 66 67 qs.widget.alert = function (msg, callbackfn) { 68 69 qs.widget.fn.initCss(); 70 71 options = { 72 "boxTop": jQuery(window).scrollTop(), 73 "boxLeft": jQuery(window).scrollLeft(), 74 "onClose": undefined, 75 "msg": "", 76 "title":"" 77 }; 78 79 if(typeof(msg) == "object") 80 { 81 jQuery.extend(options, msg); 82 } 83 else 84 { 85 options.msg = msg; 86 options.onClose = callbackfn; 87 } 88 89 html = '<div class="modal fade qs-alert-box-bootstrap" tabindex="-1" role="dialog">'; 90 html += '<div class="modal-dialog">'; 91 html += '<div class="modal-content">'; 92 html += ' <div class="modal-header">'; 93 html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'; 94 html += options.title; 95 html += ' </div>'; 96 html += ' <div class="modal-body">'; 97 html += options.msg; 98 html += ' </div>'; 99 html += ' <div class="modal-footer">'; 100 html += ' <button type="button" class="btn btn-primary qs-button-ok" data-dismiss="modal">' + qs.trad.disp("Ok") + '</button>'; 101 html += ' </div>'; 102 html += ' </div>'; 103 html += ' </div>'; 104 html += '</div>'; 105 106 $(document.body).append(html); 107 108 $('.qs-alert-box-bootstrap').modal(); 109 110 jQuery('.qs-alert-box-bootstrap button.qs-button-ok').click(function () { 111 112 if(typeof(options.onClose) == "function") 113 options.onClose(); 114 115 if(typeof(options.onConfirm) == "function") 116 options.onConfirm(jQuery('.qs-alert-box-bootstrap')); 117 }); 118 119 $('.qs-alert-box-bootstrap').on('hidden.bs.modal', function (e) { 120 setTimeout(function(){jQuery('.qs-alert-box-bootstrap').remove();}, 1); 121 }) 122 123 } 124/* 125 qs.widget.pleaseWaitDiv = $('<div class="modal hide" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false"><div class="modal-header"><h1>Processing...</h1></div><div class="modal-body"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div></div>'); 126 127 qs.widget.wait = function (stop, callback) { 128 129 if (typeof (callback) != "function") { 130 callback = function () { }; 131 } 132 if (stop != false) { 133 qs.widget.pleaseWaitDiv.modal(); 134 setTimeout(callback, 1); 135 } else { 136 qs.widget.pleaseWaitDiv.modal('hide'); 137 } 138 } 139 140*/ 141 142});
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.