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'); }
...
</html>