This commit is contained in:
2021-11-01 18:14:21 +00:00
parent ea61d37840
commit 806ebb4024
34 changed files with 766 additions and 411 deletions
@@ -205,18 +205,19 @@
.sax-form .sax-form-control .sax-message
{
display: none;
margin-top: 8px;
margin-top: 4px;
padding-left: 24px;
font-size: 16px;
font-size: 1.00Rem;
background-position: left top;
background-repeat: no-repeat;
}
.sax-form .sax-form-control.sax-error .sax-message
{
min-height:16px;
display: block;
color: #e3120b;
background-image: url("../img/icon/error-18.png");
background-image: url("../img/icon/error-16.png");
}
/* Buttons */
Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

@@ -185,10 +185,6 @@
$('#ifOpportunityId,#ifOpportunityExists,#ifOpportunityRegionId,#ifOpportunitySportId,input[type="text"],textarea,select', $frm.opportunity).val('');
sax.clearControlErrors();
}
sax.doCreateItem = function ()
{
sax.storeItem();
}
//--------------------------------------------------------------
sax.updateItem = function (item)
@@ -219,10 +215,6 @@
$dlg.opportunity.dialog('option', 'title', sax.dlg.title.updateOpportunity);
sax.openDialog($dlg.opportunity, 600, 600);
}
sax.doUpdateItem = function ()
{
sax.storeItem();
}
//--------------------------------------------------------------
sax.storeItem = function ()
@@ -263,7 +255,7 @@
$('.sax-input', $frm.opportunity).on('input', function () { sax.clearControlError(this); });
var opt = sax.dlgOpts();
opt.buttons[sax.dlg.btn.ok] = function () { sax.doCreateItem(); };
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
$dlg.opportunity = $('#dlgOpportunity').dialog(opt);
+16 -14
View File
@@ -5,16 +5,16 @@
(function (win, doc, undef)
{
"use strict";
let $pnl = sax.$pnl, $dlg = sax.$dlg, $frm = sax.$frm;
let po = sax.mdl.profileOrganisations = sax.mdl.profileOrganisations || { $pnl: {}, $dlg: {}, $frm: {} };
let $pnl = po.$pnl, $dlg = po.$dlg, $frm = po.$frm;
//--------------------------------------------------------------
sax.refreshProfileOrganisationsInfo = function (delay)
{
var $section = $('.sax-panel-section.ProfileOrganisations');
$section.removeClass('sax-edit').addClass('sax-populating');
$('.sax-property', $section).hide();
sax.showDataRefreshingMsg($section);
sax.refreshProfileOrganisations(sax.onRefreshProfileOrganisationsInfo);
$pnl.section.removeClass('sax-edit').addClass('sax-populating');
$('.sax-property', $pnl.section).hide();
sax.showDataRefreshingMsg($pnl.section);
sax.refreshProfileOrganisations(po.onRefreshProfileOrganisationsInfo);
}
sax.refreshProfileOrganisations = function (callbackFn)
{
@@ -24,17 +24,16 @@
sax.ajax.profileOrganisations.callbackFn = callbackFn;
sax.doAjaxRequest(sax.ajax.profileOrganisations, 50);
}
sax.onRefreshProfileOrganisationsInfo = function (response)
po.onRefreshProfileOrganisationsInfo = function (response)
{
//sax.debug('onRefreshProfileOrganisationsInfo', response);
sax.debug('onRefreshProfileOrganisationsInfo', response);
if (!response || !response.success) return;
var $section = $('.sax-panel-section.ProfileOrganisations');
$('.sax-message', $section).stop(true, false).fadeOut(200).empty();
$('.sax-message', $pnl.section).stop(true, false).fadeOut(200).empty();
let items = response.organisations;
if (!items) return;
let $items = $('.sax-panel-results.Organisations', $section).empty();
let $tmpl = $('.sax-panel-item-template .sax-panel-item.Organisation', $section);
let $items = $('.sax-panel-results.Organisations', $pnl.section).empty();
let $tmpl = $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.section);
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
{
let item = items[itemIdx];
@@ -47,13 +46,16 @@
$items.append($item);
}
$items.show();
sax.showNoInfoMsg($section);
$section.removeClass('sax-populating');
sax.showNoInfoMsg($pnl.section);
$pnl.section.removeClass('sax-populating');
}
//--------------------------------------------------------------
//--------------------------------------------------------------
$(function ()
{
$pnl.section = $('.sax-panel-section.ProfileOrganisations');
});
//--------------------------------------------------------------