');
$.each(data, function (index, k) {
if (News_last_day !== k.DT) {
News_last_day = k.DT;
divday = $('
');
dt = $('
' + moment(k.DT).format("DD MMMM") + '
');
divday.append(dt);
idiv.append(divday);
}
const press_root = $('
');
const row = $('
');
row.append($('
'));
const titleInfo = $('
');
row.append(titleInfo);
if (k.Important !== 0) {
row.append($('
'));
}
press_root.append(row);
if (k.MenuTitle !== null) {
press_root.append($('
' + k.MenuTitle.trim() + '
'));
}
divday.append(press_root);
});
}).fail(function (xhr, textStatus, errorThrown) {
idiv.append(IsNetworkErrMsg(xhr.statusText));
_PageLoadding = false;
});
}
function MakeEventRow(k, IsImportantRow) {
let dtm = moment(k.DT).format("DD MMMM YYYY");
if (moment(k.DT).format("DD.MM.YYYY") === moment().format("DD.MM.YYYY")) {
dtm = IsEng === 1 ? "Today" : "Сегодня";
}
let tpName = decodeType(k.TBLType, IsEng);
let _link;
if (k.TBLType === 'press') {
_link = '/press/pr/?file=' + k.doc_htm;
} else {
_link = '/press/event/?id=' + k.doc_htm;
}
_link = (IsEng ? '/eng' + _link : _link);
let press_root = $('
');
let bkgimg = '';
if (IsImportantRow) {
if (k.ImageId > 0) {
bkgimg = 'style="background-image:url(/legacy/PhotoStore/getimgid/' + k.ImageId + '.png);"';
} else {
bkgimg = 'style="background-image:url(/legacy/PhotoStore/getimgid/' + k.ImageCId + '.png);"';
}
}
const news_inner = $('
');
const rtp = $('
');
rtp.append($('
' + dtm + '
' + tpName + '
'));
rtp.append($('
'));
news_inner.append(rtp);
if (k.ImageCId > 0) {
news_inner.append('

');
} else {
// елси есть кроп то еего
if (k.ImageId > 0) {
news_inner.append('

');
}
}
press_root.append(news_inner);
return press_root;
}