Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.217.14.208
Current Path : /var/www/oasis/js/ |
| Current File : /var/www/oasis/js/viewNotifications.js |
function callenableNotification() {
$('#page_main_div').load(
'../html_modules/viewNotifications.html',
function () {
document.getElementById('display_module_name').innerHTML =
'Exam Notifications'
document.getElementById('module_name_for_save').value =
'Notifications'
getDefaultHeadFooterLinks('View Notifications')
getNotifications()
loaddeggrp()
}
)
}
function loaddeggrp() {
$.ajax({
type: 'POST',
url: $host_url + 'loaddeggrp',
success: loaddeggrpResponse,
})
}
function loaddeggrpResponse($responce) {
$responce = eval('(' + $responce + ')')
if ($responce.error_code == -1) {
alert($responce.data)
return
} else {
var deggrp = $responce.data
$op = new Option('All', '')
document.getElementById('deggrp').options.add($op)
for ($i = 0; $i < deggrp.length; $i++) {
$op = new Option(deggrp[$i]['value'], deggrp[$i]['code'])
$op.id = deggrp[$i]['code']
document.getElementById('deggrp').options.add($op)
}
}
}
function getNotifications() {
let deggrp = document.getElementById('deggrp').value
$.ajax({
type: 'GET',
url: $host_url + 'getNotifications' + '°grp=' + deggrp,
success: function (res) {
let response = JSON.parse(res)
console.log(response)
var table = `<table align="center" width="100%" cellspacing="0" cellpadding="1" border="0" style="border-radius:0px">
<thead>
<tr>
<th align="left" colspan="7" class="ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper"
style="font-size:12px; padding-left:6px; height:24px;">Exam Notifications</th>
</tr>
<tr class="ui-state-default ui-jqgrid-hdiv">
<td align="center" style="width:5%; font-size:12px;
border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;">Sl. No.</td>
<td align="center" style="width:8%; font-size:12px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Degree Group</td>
<td align="center" style="width:10%; font-size:12px; padding:5px 5px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Notification ID</td>
<td align="center" style="width:10%; font-size:12px; padding:5px 5px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Notification Date</td>
<td align="center" style="width:27%; font-size:12px; padding:5px 5px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Notification No.</td>
<td align="center" style="width:30%; font-size:12px; padding:5px 5px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Notification Description</td>
<td align="center" style="width:10%; font-size:12px; padding:5px 5px;
border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Action</td>
</tr>
</thead> <tbody>`
if (response.data.length > 0) {
for (var i = 0; i < response.data.length; i++) {
table += `<tr class="ui-widget-content jqgrow">
<td class="tbl_row_new" style="border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">${
i + 1
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">${
response.data[i].fdeggrp
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">${
response.data[i].fnotifid
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">${
response.data[i].fnotifdate
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">${
response.data[i].fnotifno
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;">${
response.data[i].fnotifname
}</td>
<td class="tbl_row_new" style="text-align:initial;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;">
<span style="background-color: #008cba;
color: white;
padding: 5px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
cursor: pointer;
border-radius: 2px;" onclick="getReport('${
response.data[i].funivcode
}','${response.data[i].fnotifid}', '${
response.data[i].fdeggrp
}')">Report</span>
</td></tr>`
}
} else {
table += `<tr class="ui-widget-content jqgrow">
<td colspan="7" class="tbl_row_new" style="border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:5px; font-size:12px;text-align:center;">
Exam Notifications not available!
</td></tr>`
}
table += `</tbody></table>`
$('#tabledata').html(table)
},
})
}
function getReport(univcode, id, deggrp) {
let url =
'https://universitysolutions.in/univadmin/app.php?a=getIaMarksReport&univcode=' +
univcode +
'&fnotifid=' +
id +
'°grp=' +
deggrp
window.open(url)
}
|