1var icms = icms || {}; 2 3icms.modal = (function ($) { 4 5 this.onDocumentReady = function() { 6 icms.modal.bind('a.ajax-modal'); 7 icms.modal.bind('.ajax-modal > a'); 8 }; 9 10 //====================================================================// 11 12 this.bind = function(selector) { 13 $(selector).nyroModal({anim: {def: 'show'}}); 14 }; 15 16 //====================================================================// 17 18 this.open = function(selector) { 19 $.nmManual(selector, {autoSizable: true, anim: {def: 'show'}}); 20 }; 21 22 //====================================================================// 23 24 this.openHtml = function(html, title) { 25 title = title || ''; 26 $.nmData(html, {autoSizable: true, anim: {def: 'show'}, callbacks: {initFilters : function (nm) { 27 if(title){ nm.opener.attr('title', title); nm.filters.push('title'); } 28 }}}); 29 }; 30 31 //====================================================================// 32 33 this.openAjax = function(url, data, open_callback, title){ 34 35 open_callback = open_callback || function(){}; 36 title = title || ''; 37 38 if (typeof(data)=='undefined'){ 39 $.nmManual(url, {autoSizable: true, anim: {def: 'show'}, callbacks: {afterShowCont: open_callback, initFilters : function (nm) { 40 if(title){ nm.opener.attr('title', title); nm.filters.push('title'); } 41 }}}); 42 return false; 43 } 44 45 $.nmManual(url+(data.is_iframe ? '?'+$.param(data) : ''), {autoSizable: true, anim: {def: 'show'}, callbacks: {afterShowCont: open_callback, initFilters : function (nm) { 46 if(title){ nm.opener.attr('title', title); nm.filters.push('title'); } 47 if(data.is_iframe){ nm.filters.push('link'); nm.filters.push('iframe'); } 48 }}, ajax:{data: data, type: "POST"}}); 49 return false; 50 51 }; 52 53 //====================================================================// 54 55 this.bindGallery = function(selector){ 56 $(selector).attr('rel', 'gal'); 57 $(selector).nyroModal({anim: {def: 'show'}}); 58 }; 59 60 //====================================================================// 61 62 this.close = function(){ 63 $.nmTop().close(); 64 }; 65 66 //====================================================================// 67 68 this.setCallback = function(event, callback){ 69 switch(event){ 70 case 'open': 71 $.nmTop().callbacks.afterShowCont = callback; break; 72 case 'close': 73 $.nmTop().callbacks.beforeClose = callback; break; 74 } 75 }; 76 77 //====================================================================// 78 79 this.resize = function(){ 80 $.nmTop().resize(true); 81 }; 82 83 this.setHeight = function(height){ 84 $('.nyroModalCont').css('height', height+'px'); 85 }; 86 87 this.alert = function(text, type) { 88 type = type || ''; 89 this.openHtml('<div id="alert_wrap"><div class="ui_message '+type+'">'+text+'</div></div>'); 90 }; 91 92 return this; 93 94}).call(icms.modal || {},jQuery);
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.