v1.2.4.1
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item .sax-label
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover .sax-label
|
||||
@@ -251,8 +251,8 @@
|
||||
.sax-alpha .sax-panel-item
|
||||
{
|
||||
background-color: #fff;
|
||||
border-radius: 0;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"use strict";
|
||||
sax.segIdPrefix = 'Seg_';
|
||||
sax.classFileDrag = 'sax-file-drag';
|
||||
let am = sax.articleMgt = { data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
let am = sax.articleMgt = { ajax: {}, data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
let $pnl = am.$pnl, $frm = am.$frm, $dlg = am.$dlg;
|
||||
let ac = sax.articleContent = sax.articleContent || {};
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
$('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Article/Ajax/GetList', formId: 'frmArticleFilter', callbackFn: am.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
am.ajax.refreshResults = am.ajax.refreshResults || { url: sax.url.base + 'Article/Ajax/GetList', formId: 'frmArticleFilter', callbackFn: am.doRefreshResults };
|
||||
sax.doAjaxRequest(am.ajax.refreshResults, delay || 50);
|
||||
am.awaitingRefreshResponse = true;
|
||||
}
|
||||
am.doRefreshResults = function (response)
|
||||
@@ -53,6 +53,8 @@
|
||||
{
|
||||
if (!item) return;
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
if (!$('#ifFilterOrganisationId', $frm.filter).val())
|
||||
$('.OrganisationName', $item).text(item.organisationName);
|
||||
$('.ArticleHeadline', $item).text(item.headline);
|
||||
$('.ArticleSummary', $item).text(item.summary);
|
||||
$('.ArticleRegionCaption', $item).text(item.regionCaptionPrimary);
|
||||
@@ -173,8 +175,8 @@
|
||||
am.clearItem();
|
||||
am.data.item = item; am.data.$item = $item;
|
||||
$('.ArticleId', $frm.articleId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Article/Ajax/GetItem', formId: 'frmArticleId', callbackFn: am.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
am.ajax.updateItem = am.ajax.updateItem || { url: sax.url.base + 'Article/Ajax/GetItem', formId: 'frmArticleId', callbackFn: am.onUpdateItem };
|
||||
sax.doAjaxRequest(am.ajax.updateItem, 50);
|
||||
}
|
||||
am.onUpdateItem = function (response)
|
||||
{
|
||||
@@ -419,12 +421,12 @@
|
||||
sax.clearControlError();
|
||||
sax.data.contactImageUploadContext = context;
|
||||
|
||||
sax.ajax.uploadArticleImage = sax.ajax.uploadArticleImage || { url: sax.url.base + 'Article/Ajax/UploadImage', callbackFn: am.handleArticleImageUploadResponse, noWaitIcon: true };
|
||||
sax.ajax.uploadArticleImage.formData = new FormData();
|
||||
sax.ajax.uploadArticleImage.formData.append("__RequestVerificationToken", $('#frmNavigate input[name="__RequestVerificationToken"]').val());
|
||||
sax.ajax.uploadArticleImage.formData.append("ArticleId", $('#ifArticleId', $frm.article).val());
|
||||
sax.ajax.uploadArticleImage.formData.append("ArticleImage", file);
|
||||
sax.doAjaxRequest(sax.ajax.uploadArticleImage, 50);
|
||||
am.ajax.uploadArticleImage = am.ajax.uploadArticleImage || { url: sax.url.base + 'Article/Ajax/UploadImage', callbackFn: am.handleArticleImageUploadResponse, noWaitIcon: true };
|
||||
am.ajax.uploadArticleImage.formData = new FormData();
|
||||
am.ajax.uploadArticleImage.formData.append("__RequestVerificationToken", $('#frmNavigate input[name="__RequestVerificationToken"]').val());
|
||||
am.ajax.uploadArticleImage.formData.append("ArticleId", $('#ifArticleId', $frm.article).val());
|
||||
am.ajax.uploadArticleImage.formData.append("ArticleImage", file);
|
||||
sax.doAjaxRequest(am.ajax.uploadArticleImage, 50);
|
||||
}
|
||||
am.handleArticleImageUploadResponse = function (response)
|
||||
{
|
||||
@@ -445,8 +447,8 @@
|
||||
//--------------------------------------------------------------
|
||||
am.storeItem = function ()
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Article/Ajax/StoreItem', formId: 'frmArticle', callbackFn: am.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
am.ajax.storeItem = am.ajax.storeItem || { url: sax.url.base + 'Article/Ajax/StoreItem', formId: 'frmArticle', callbackFn: am.onStoreItem };
|
||||
sax.doAjaxRequest(am.ajax.storeItem, 50);
|
||||
}
|
||||
am.onStoreItem = function (response)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let cs = sax.codeSelect = sax.codeSelect || { fn: {}, $dlg: {}, codeIdPrefix: 'Code_' };
|
||||
let cs = sax.codeSelect = sax.codeSelect || { fn: {}, $dlg: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
@@ -39,23 +39,23 @@
|
||||
let code = codes[codeIdx];
|
||||
let selected = cs.selectedCodes.indexOf(code.code) >= 0;
|
||||
let $code = $codeTmpl.clone();
|
||||
$($code).prop('id', cs.codeIdPrefix + code.code).attr('aria-code', code.code).on('click', function () { cs.fn.onClickCode(code.code); }).on('dblclick', function () { cs.fn.onDblClickCode(code.code); }).find('.CodeDesc').text(code.desc).end();
|
||||
$($code).attr('aria-code', code.code).on('click', function () { cs.fn.onClickCode(code.code, $code); }).on('dblclick', function () { cs.fn.onDblClickCode(code.code, $code); }).find('.CodeDesc').text(code.desc).end();
|
||||
if (selected) $codesSelec.append($code);
|
||||
else $codesAvail.append($code);
|
||||
}
|
||||
}
|
||||
cs.fn.onClickCode = function (code)
|
||||
cs.fn.onClickCode = function (code, $code)
|
||||
{
|
||||
$('.sax-panel-item.Code').removeClass('sel');
|
||||
$('.sax-panel-item.Code[aria-code="' + code + '"]').addClass('sel');
|
||||
$code.addClass('sel');
|
||||
}
|
||||
cs.fn.onDblClickCode = function (code)
|
||||
cs.fn.onDblClickCode = function (code, $code)
|
||||
{
|
||||
let codeIdx = cs.selectedCodes.indexOf(code);
|
||||
//sax.debug('onDblClickCode', code, codeIdx);
|
||||
if (codeIdx >= 0) cs.selectedCodes.splice(codeIdx, 1); else cs.selectedCodes.push(code)
|
||||
cs.fn.displayCodes(cs.cfg.codes)
|
||||
$('.sax-panel-item.Code[aria-code="' + code + '"]').addClass('sel');
|
||||
$code.addClass('sel');
|
||||
}
|
||||
cs.fn.onClickSelect = function ()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let se = sax.sportExperience = { fn: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
let se = sax.sportExperience = { fn: {}, ajax: {}, data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.showSportExperience = function (usrSpt)
|
||||
@@ -19,11 +19,11 @@
|
||||
$('.UserSportId', se.$frm.sportExp).val(usrSpt.id);
|
||||
se.fn.refreshResults();
|
||||
}
|
||||
se.fn.refreshResults = function()
|
||||
se.fn.refreshResults = function ()
|
||||
{
|
||||
let frm = $('#frmProfileSportId');
|
||||
sax.ajax.sportExperiences = sax.ajax.sportExperiences || { url: sax.url.base + 'UserSport/Ajax/GetExperienceList', formId: frm.prop('id'), callbackFn: se.fn.handleSportExperiencesResponse };
|
||||
sax.doAjaxRequest(sax.ajax.sportExperiences, 50);
|
||||
se.ajax.sportExperiences = se.ajax.sportExperiences || { url: sax.url.base + 'UserSport/Ajax/GetExperienceList', formId: frm.prop('id'), callbackFn: se.fn.handleSportExperiencesResponse };
|
||||
sax.doAjaxRequest(se.ajax.sportExperiences, 50);
|
||||
}
|
||||
se.fn.handleSportExperiencesResponse = function (response)
|
||||
{
|
||||
@@ -41,8 +41,7 @@
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
item.idx = ++se.idx;
|
||||
let $item = se.fn.getItemTemplate(item.idx);
|
||||
//sax.debug(item, $item);
|
||||
let $item = se.fn.getItemTemplate();
|
||||
$('.ExperiencePeriod', $item).text(item.period);
|
||||
$('.ExperienceSummary', $item).text(item.summary);
|
||||
$('.ExperienceTeam', $item).text(item.team);
|
||||
@@ -58,17 +57,13 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
se.fn.getItemId = function (idx)
|
||||
{
|
||||
return 'SptExp_' + idx;
|
||||
}
|
||||
se.fn.getItemActionTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template ul.sax-dropdown-menu.SportExperience li', se.$pnl.results).clone();
|
||||
}
|
||||
se.fn.getItemTemplate = function (idx)
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.SportExperience', se.$pnl.results).clone().prop('id', se.fn.getItemId(idx));
|
||||
return $('.sax-panel-item-template .sax-panel-item.SportExperience', se.$pnl.results).clone();
|
||||
}
|
||||
se.fn.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
@@ -92,8 +87,8 @@
|
||||
//sax.debug('updateSportExperience', item);
|
||||
let frm = se.$frm.sportExpId;
|
||||
$('.UserSportExperienceId', se.$frm.sportExpId).val(item.id);
|
||||
sax.ajax.sportExp = sax.ajax.sportExp || { url: sax.url.base + 'UserSport/Ajax/GetExperience', formId: frm.prop('id'), callbackFn: se.fn.doUpdateSportExperience };
|
||||
sax.doAjaxRequest(sax.ajax.sportExp, 50);
|
||||
se.ajax.sportExp = se.ajax.sportExp || { url: sax.url.base + 'UserSport/Ajax/GetExperience', formId: frm.prop('id'), callbackFn: se.fn.doUpdateSportExperience };
|
||||
sax.doAjaxRequest(se.ajax.sportExp, 50);
|
||||
}
|
||||
se.fn.doUpdateSportExperience = function (response)
|
||||
{
|
||||
@@ -118,8 +113,8 @@
|
||||
{
|
||||
//sax.debug('storeSportExperience');
|
||||
let frm = se.$frm.sportExp;
|
||||
sax.ajax.storeSportExp = sax.ajax.storeSportExp || { url: sax.url.base + 'UserSport/Ajax/StoreExperience', formId: frm.prop('id'), callbackFn: se.fn.onStoreSportExperience };
|
||||
sax.doAjaxRequest(sax.ajax.storeSportExp, 50);
|
||||
se.ajax.storeSportExp = se.ajax.storeSportExp || { url: sax.url.base + 'UserSport/Ajax/StoreExperience', formId: frm.prop('id'), callbackFn: se.fn.onStoreSportExperience };
|
||||
sax.doAjaxRequest(se.ajax.storeSportExp, 50);
|
||||
}
|
||||
se.fn.onStoreSportExperience = function (response)
|
||||
{
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let ps = sax.mdl.profileSports = sax.mdl.profileSports || {};
|
||||
let $pnl = ps.$pnl = {}, $dlg = ps.$dlg = {}, $frm = ps.$frm = {};
|
||||
ps.data = { };
|
||||
let ps = sax.mdl.profileSports = { ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
||||
let $pnl = ps.$pnl, $dlg = ps.$dlg, $frm = ps.$frm;
|
||||
ps.data = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshProfileSportsInfo = function (delay)
|
||||
@@ -21,9 +21,9 @@
|
||||
{
|
||||
//sax.debug('refreshProfileSports');
|
||||
delete sax.page.profileSportsChanged;
|
||||
sax.ajax.profileSports = sax.ajax.profileSports || { url: sax.url.base + 'Account/Ajax/GetProfileSports', formId: 'frmNavigate', noWaitIcon: true };
|
||||
sax.ajax.profileSports.callbackFn = callbackFn;
|
||||
sax.doAjaxRequest(sax.ajax.profileSports, 50);
|
||||
ps.ajax.profileSports = ps.ajax.profileSports || { url: sax.url.base + 'Account/Ajax/GetProfileSports', formId: 'frmNavigate', noWaitIcon: true };
|
||||
ps.ajax.profileSports.callbackFn = callbackFn;
|
||||
sax.doAjaxRequest(ps.ajax.profileSports, 50);
|
||||
}
|
||||
ps.onRefreshProfileSportsInfo = function (response)
|
||||
{
|
||||
@@ -39,9 +39,9 @@
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
sax.profile.sports.Ids.push(item.sportId);
|
||||
let $item = $tmpl.clone().prop('id', 'ProSpt_' + item.id);
|
||||
$('.sax-header .sax-action.sax-edit', $item).on('click', function (evt) { ps.updateProfileSport(item.id); });
|
||||
$('.sax-content', $item).on('dblclick', function (evt) { ps.updateProfileSport(item.id); });
|
||||
let $item = $tmpl.clone();
|
||||
$('.sax-header .sax-action.sax-edit', $item).on('click', function (evt) { ps.updateProfileSport(item); });
|
||||
$('.sax-content', $item).on('dblclick', function (evt) { ps.updateProfileSport(item); });
|
||||
$('.sax-header .sax-action.sax-experience', $item).on('click', function (evt) { sax.showSportExperience(item); });
|
||||
$('.SportName', $item).text(item.sportName);
|
||||
$('.SportParticipationValue', $item).text(item.sportParticipation);
|
||||
@@ -63,12 +63,12 @@
|
||||
dlg.dialog('option', 'title', sax.dlg.title.addUserSport);
|
||||
sax.openDialog(dlg, 640, 480);
|
||||
}
|
||||
ps.updateProfileSport = function (id)
|
||||
ps.updateProfileSport = function (item)
|
||||
{
|
||||
//sax.debug('updateProfileSport', id);
|
||||
$('#frmProfileSportId .UserSportId').val(id);
|
||||
sax.ajax.profileSport = sax.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: 'frmProfileSportId', callbackFn: ps.doUpdateProfileSport };
|
||||
sax.doAjaxRequest(sax.ajax.profileSport, 50);
|
||||
//sax.debug('updateProfileSport', item);
|
||||
$('#frmProfileSportId .UserSportId').val(item.id);
|
||||
ps.ajax.profileSport = ps.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: 'frmProfileSportId', callbackFn: ps.doUpdateProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.profileSport, 50);
|
||||
}
|
||||
ps.doUpdateProfileSport = function (response)
|
||||
{
|
||||
@@ -101,8 +101,8 @@
|
||||
{
|
||||
//sax.debug('storeProfileSport');
|
||||
sax.clearControlErrors();
|
||||
sax.ajax.storeProfileSport = sax.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: 'frmProfileSport', callbackFn: ps.onStoreProfileSport };
|
||||
sax.doAjaxRequest(sax.ajax.storeProfileSport, 50);
|
||||
ps.ajax.storeProfileSport = ps.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: 'frmProfileSport', callbackFn: ps.onStoreProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.storeProfileSport, 50);
|
||||
}
|
||||
ps.onStoreProfileSport = function (response)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user