42 lines
1.4 KiB
JavaScript
42 lines
1.4 KiB
JavaScript
/*
|
|
* Sport contacts.
|
|
*/
|
|
(function (win, doc, undef)
|
|
{
|
|
//--------------------------------------------------------------
|
|
"use strict";
|
|
let sc = sax.mdl.sportContact = { fn: {}, ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
|
//--------------------------------------------------------------
|
|
/*
|
|
* Sport Contact config:
|
|
* - caption - dialog title.
|
|
* - contact:
|
|
* - type
|
|
* - name
|
|
* - email
|
|
* - phone
|
|
* - typesUsed
|
|
* - fnCallback - method to call on completion to store details.
|
|
*/
|
|
sc.showSportContact = function (cfg)
|
|
{
|
|
sc.data.cfg = cfg;
|
|
sax.openDialog(sc.$dlg.sptCnt.dialog('option', { title: sc.data.cfg.caption || 'Sport Contact' }), sc.data.cfg.width || 400, sc.data.cfg.height || 800);
|
|
}
|
|
//--------------------------------------------------------------
|
|
sc.fn.displayContact = function ()
|
|
{
|
|
}
|
|
//--------------------------------------------------------------
|
|
$(function ()
|
|
{
|
|
var opt = sax.dlgOpts();
|
|
opt.open = function (evt, ui) { sc.fn.onDlgSize(); };
|
|
opt.resize = function (evt, ui) { sc.fn.onDlgSize(); };
|
|
opt.buttons[sax.dlg.btn.ok] = function () { sc.fn.storeSelectSport(); };
|
|
opt.buttons[sax.dlg.btn.cancel] = function () { sc.fn.cleanUp(); $(this).dialog('close'); };
|
|
sc.$dlg.sptCnt = $('#dlgSportContact').dialog(opt);
|
|
});
|
|
//--------------------------------------------------------------
|
|
}(window, window.document));
|
|
/* The End */ |