Case counters are not working on Single Sign On Server

HOR-1055
Case counters are not working on Single Sign On Server

HOR-1055
Case counters are not working on Single Sign On Server
This commit is contained in:
Dheeyi William
2016-07-07 16:50:40 -04:00
parent 5e475952d3
commit 8850ecec43
3 changed files with 39 additions and 63 deletions

View File

@@ -566,51 +566,42 @@ function updateCasesView(viewList) {
}
function updateCasesTree() {
//treeMenuItems.root.reload();
document.getElementById('refreshNotifiers').src = '/images/ext/default/grid/loading.gif';
itemsTypes = Array('CASES_INBOX', 'CASES_DRAFT', 'CASES_CANCELLED', 'CASES_SENT', 'CASES_PAUSED', 'CASES_COMPLETED','CASES_SELFSERVICE');
if(currentSelectedTreeMenuItem){
ReloadTreeMenuItemDetail({item:currentSelectedTreeMenuItem});
itemsTypes = Array('CASES_INBOX', 'CASES_DRAFT', 'CASES_CANCELLED', 'CASES_SENT', 'CASES_PAUSED', 'CASES_COMPLETED', 'CASES_SELFSERVICE');
if (currentSelectedTreeMenuItem) {
ReloadTreeMenuItemDetail({item: currentSelectedTreeMenuItem});
}
Ext.Ajax.request({
url: urlProxy + Math.random(),
/*----------------------------------********---------------------------------*/
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + credentials.access_token
},
method: 'GET',
/*----------------------------------********---------------------------------*/
success: function(response){
success: function (response) {
result = Ext.util.JSON.decode(response.responseText);
for(i=0; i<result.length; i++){
if( document.getElementById('NOTIFIER_'+result[i].item ) ){
oldValue = document.getElementById('NOTIFIER_'+result[i].item).innerHTML;
for (i = 0; i < result.length; i++) {
if (document.getElementById('NOTIFIER_' + result[i].item)) {
oldValue = document.getElementById('NOTIFIER_' + result[i].item).innerHTML;
oldValue = oldValue.replace('<b>', '');
oldValue = oldValue.replace('</b>', '');
newValue = result[i].count;
if( oldValue != newValue && oldValue != 0 ){
document.getElementById('NOTIFIER_'+result[i].item).innerHTML = '<b>' + result[i].count + '</b>';
if (oldValue != newValue && oldValue != 0) {
document.getElementById('NOTIFIER_' + result[i].item).innerHTML = '<b>' + result[i].count + '</b>';
//NOTIFIER_FLAG = true;
} else {
//if(NOTIFIER_FLAG === false){
document.getElementById('NOTIFIER_'+result[i].item).innerHTML = result[i].count;
document.getElementById('NOTIFIER_' + result[i].item).innerHTML = result[i].count;
//}
}
}
else continue;
}
document.getElementById('refreshNotifiers').src = '/images/refresh.gif';
},
failure: function(){},
failure: function () {
},
params: {'updateCasesTree': true}
});
}
setFlag = function (val) {