1/* vim: set ts=2 sw=2 sts=2 et: */ 2 3$(function () { 4 5 $(ajax.messages).bind( 6 'productAdded', 7 function(e, data) { 8 9 $('.ui-dialog-content').dialog('close').dialog('destroy').remove(); 10 11 var dialog = $(data.content).not('script'); 12 var dialogScripts = $(data.content).filter('script'); 13 var is_mobile = ($(window).width() < 768); 14 15 if (is_mobile) { 16 // Do not display when in mobile mode 17 return true; 18 } 19 20 21 dialog.dialog({ 22 23 autoOpen: false, 24 dialogClass: "product-added", 25 modal: true, 26 title: data.title, 27 width: 575, 28 draggable: false, 29 resizable: false, 30 position: {my : 'center center', at : 'center center'}, 31 closeOnEscape: true, 32 33 close: function() { 34 dialogScripts.remove(); 35 }, 36 37 open: function () { 38 $(".product-added .view-cart").button(); 39 $(".product-added .continue-shopping").button().click(function () { 40 dialog.dialog('close'); 41 return false; 42 }); 43 $(".product-added .proceed-to-checkout").button().click(function () { 44 dialog.dialog('close'); 45 }); 46 $('.ui-widget-overlay').click(function () { 47 dialog.dialog('close'); 48 }); 49 } 50 51 }); 52 53 dialogScripts.appendTo('body'); 54 dialog.dialog('open'); 55 56 ajax.widgets.products(); 57 } 58 ); 59 60});
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.