Add link home inbox

This commit is contained in:
Marco Antonio Nina Mena
2015-06-11 11:27:12 -04:00
parent 9d0b859741
commit 0c776497cc
8 changed files with 2199 additions and 2063 deletions

View File

@@ -54,8 +54,9 @@ $(document).ready(function() {
});
var bindTimeSeriesLists = function (presenter, elementsToConserve = []) {
var bindTimeSeriesLists = function (presenter, elementsToConserve) {
var conserveStates =[];
elementsToConserve =[];
$.each (elementsToConserve, function (i, elem){
conserveStates.push({id:elem, selValue: $('#' + elem).val()});
});

View File

@@ -376,6 +376,18 @@ $(document).ready(function() {
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
});
$('#indicatorsGridStack').on('click','.status-indicator-low', function() {
locationCases('OVERDUE');
});
$('#indicatorsGridStack').on('click','.status-indicator-medium', function() {
locationCases('AT_RISK');
});
$('#indicatorsGridStack').on('click','.status-indicator-high', function() {
locationCases('ON_TIME');
});
$('body').on('click','.bread-back-selector', function() {
var indicatorId = window.currentIndicator.id;
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
@@ -1001,6 +1013,28 @@ var animateProgress = function (indicatorItem, widget){
fpAnimationFrame(animacion);
};
var createCookie = function (name, value, time) {
if (time) {
var date = new Date();
date.setTime(date.getTime()+(time*24*60*60*1000));
var expires = "; expires="+date.toUTCString();
} else {
var expires = "";
}
document.cookie = name+"="+value+expires+"; path=/sys"+workspace;
};
var locationCases = function (type) {
createCookie("dashboardListInbox", type, 1);
var currentLocation = location.href;
var position = currentLocation.lastIndexOf('/', currentLocation.lastIndexOf('/') - 1);
currentLocation = currentLocation.substring(0, position+1);
currentLocation = currentLocation + 'cases/main';
parent.location.href = currentLocation;
};
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \