Skip to content

Commit

Permalink
script file for project list view
Browse files Browse the repository at this point in the history
  • Loading branch information
swetalina-orangescrum committed Oct 18, 2022
1 parent 0f219f1 commit 456f856
Showing 1 changed file with 57 additions and 5 deletions.
62 changes: 57 additions & 5 deletions app/webroot/js/script_v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,12 @@ $(document).ready(function() {
localStorage.setItem('plannedVsactual_type', nxtprev);
localStorage.setItem('plannedVsactual_page', '');
localStorage.setItem('plannedVsactual_date', cur_date);
globalTimeoutProj = setTimeout(function() {
fetchPlannedVsActualReportView(localStorage.getItem('plannedVsactual_filter'));
}, 1000);
}
});
globalTimeoutProj = setTimeout(function() {
fetchPlannedVsActualReportView(localStorage.getItem('plannedVsactual_filter'));
ajaxGridViewLoad(localStorage.getItem("PROJECTVIEW_TYPE"), srch, page, filtype, '', '', '');
}, 1000);
}
});
$("#caseViewSpan").on('keyup', '#inner-search-backlog', function(e) {
var unicode = e.charCode ? e.charCode : e.keyCode;
if (unicode != 13 && unicode != 40 && unicode != 38) {
Expand Down Expand Up @@ -16256,6 +16257,57 @@ function setDefaultProjectView(type) {
resetProjectFilterItem();
window.location = HTTP_ROOT + 'projects/manage/' + value;
}

function resetProjectFilterItem() {
localStorage.removeItem('PROJECTMANAGETYPE');
localStorage.removeItem('PROJECTMANAGETYPEVAL');
localStorage.removeItem('PROJECTCLIENTSVAL');
localStorage.removeItem('PROJECTMANAGECLIENTS');
localStorage.removeItem('PROJECTMANAGEMANAGER');
localStorage.removeItem('PROJECTMANAGEMANAGERVAL');
localStorage.removeItem('PROJECTMANAGESTATUS');
localStorage.removeItem('PROJECTMANAGESTATUSVAL');
};
function ajaxGridViewLoad(type, srch = null, page = null, filtype = null, order = null, sortby = null, tcls = null) {
var value = '';
switch (type) {
case 'inactive':
value = 'inactive';
break;
case 'active-grid':
value = 'active-grid';
break;
case 'inactive-grid':
value = 'inactive-grid';
break;
default:
break;
}
var cookie_value = SES_ID + "_" + value;
remember_filters('PROJECTVIEW_TYPE', value);
remember_filters('PROJECTLISTVIEW_PAGE', page);
remember_filters('PROJECTLISTVIEW_FILTYPE', filtype);
str_url = HTTP_ROOT + 'projects/ajaXGridView';
$('#caseLoader').show();
$.post(str_url, {
'projtype': value,
'srch': srch,
'page': page,
'filtype': filtype,
'order': order,
'sortby': sortby
}, function(data) {
if (data) {
$('#ajax_list_view_tmp_load').html(tmpl('ajax_list_view_tmpl', data));
$('[rel=tooltip]').tipsy({
gravity: 's',
fade: true
});

}
$('#caseLoader').hide();
}, "json");
}
function resetProjectFilterItem() {
localStorage.removeItem('PROJECTMANAGETYPE');
localStorage.removeItem('PROJECTMANAGETYPEVAL');
Expand Down

0 comments on commit 456f856

Please sign in to comment.