Created
February 22, 2017 11:33
-
-
Save danjdewhurst/2fc28e40a5b0f4f313de9ee5ec44f520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $status = $('.nav.status.color-status span'); | |
$status.each( function() { | |
var $element = $( this ); | |
if ( $element.prop( 'title' ) == 'In Progress' || $element.prop( 'title' ) == 'Paused' ) { | |
$element.parent().parent().css( 'background-color', '#ffd699' ); | |
} | |
if ( $element.prop( 'title' ) == 'AM for Feedback' || $element.prop( 'title' ) == 'AM for Review' ) { | |
$element.parent().parent().css( 'background-color', '#b3ffb3' ); | |
} | |
if ( $element.prop( 'title' ) == 'Closed' ) { | |
$element.parent().parent().css( 'background-color', '#D8D8D8' ); | |
} | |
} ); | |
$header_rows = $('tr.header-row'); | |
$header_rows.each(function() { | |
$(this).css('background-color', '#EFF8FB'); | |
}); | |
function add_zero(i) { | |
if (i < 10) { | |
i = "0" + i; | |
} | |
return i; | |
} | |
var $time = $('.time'); | |
var date = new Date(); | |
var hours = date.getHours(); | |
var minutes = date.getMinutes(); | |
var final_minutes = (minutes / 60 * 10).toFixed(0); | |
var working_since_row = '<tr class="rowHeader"><th class="right colHeaderLink" colspan="8">Should have logged hours total:</th><th colspan="1">' + (hours - 10) + '.' + final_minutes + '</th></tr>'; | |
$('#tempo-table tfoot').append(working_since_row); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment