[WTF CVS] wtf/static general.css,1.10,1.11 tracking.js,1.8,1.9
Brought to you by:
gryphonshafer
|
From: Gryphon S. <gry...@us...> - 2006-12-02 00:09:13
|
Update of /cvsroot/wtf-tracker/wtf/static In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6361/static Modified Files: general.css tracking.js Log Message: Random bits of changes here and there, mostly code clean-up but a few bits of refactoring (globally) based on a code review in prep for v1.02 build and release Index: general.css =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/static/general.css,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** general.css 20 Nov 2006 02:53:07 -0000 1.10 --- general.css 2 Dec 2006 00:09:09 -0000 1.11 *************** *** 59,80 **** } - table.layout_only th, - table.layout_only td { - font-size: 10pt; - } - - span.login_as { - font-weight: normal; - font-size: 8pt; - } - - span.login_as a { - text-decoration: none; - } - - span.login_as a:hover { - text-decoration: underline; - } - /* Navigation Bar (and similar menues) */ --- 59,62 ---- *************** *** 99,102 **** --- 81,90 ---- } + /* required hack for Mozilla on Linux to make "Administrate Users" page */ + /* link menu's <sup> text fit */ + p.link_menu a { + padding-top: 5px; + } + div#nav_bar p.nav_bar a:hover, p.link_menu a:hover { *************** *** 106,122 **** div#nav_bar p.nav_bar a.current_page, ! p.link_menu a.current_page { ! background-color: #ffcccc; ! color: #000000; ! } ! div#nav_bar p.nav_bar a.current_page:hover, p.link_menu a.current_page:hover { background-color: #ffcccc; color: #000000; - } - - div#nav_bar p.nav_bar a.current_page, - p.link_menu a.current_page { cursor: default; } --- 94,102 ---- div#nav_bar p.nav_bar a.current_page, ! p.link_menu a.current_page, div#nav_bar p.nav_bar a.current_page:hover, p.link_menu a.current_page:hover { background-color: #ffcccc; color: #000000; cursor: default; } *************** *** 136,139 **** --- 116,134 ---- } + /* "Login As" Links */ + + span.login_as { + font-weight: normal; + font-size: 8pt; + } + + span.login_as a { + text-decoration: none; + } + + span.login_as a:hover { + text-decoration: underline; + } + /* Open Projects codeline headers */ *************** *** 339,347 **** } ! td.hours { ! width: 40px; ! text-align: right; ! } ! td.bugid { width: 40px; --- 334,338 ---- } ! td.hours, td.bugid { width: 40px; *************** *** 390,391 **** --- 381,387 ---- color: #000000; } + + table.layout_only th, + table.layout_only td { + font-size: 10pt; + } Index: tracking.js =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/static/tracking.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tracking.js 28 Nov 2006 18:47:50 -0000 1.8 --- tracking.js 2 Dec 2006 00:09:09 -0000 1.9 *************** *** 25,29 **** } else { ! calc_activity_total( document.tracking, true ); } } --- 25,29 ---- } else { ! calcActivityTotal( document.tracking, true ); } } *************** *** 35,41 **** var skipFormDoubleSubmit = false; function cloneObj(obj) { - // this function clones a simple data-housing object - for ( var i in obj ) { this[i] = obj[i]; --- 35,40 ---- var skipFormDoubleSubmit = false; + // this function clones a simple data-housing object function cloneObj(obj) { for ( var i in obj ) { this[i] = obj[i]; *************** *** 43,50 **** } function resizeIframesHeight() { - // for use only on the home page; used to resize the iframes automatically - // on page resize; different heights based on browser type - var myHeight = 0; if ( self.innerHeight ) { --- 42,48 ---- } + // for use only on the home page; used to resize the iframes automatically + // on page resize; different heights based on browser type function resizeIframesHeight() { var myHeight = 0; if ( self.innerHeight ) { *************** *** 72,80 **** } function tabularHoverInit() { - // "interactive table" hack for IE because IE doesn't handle :hover CSS - // properly; this function will look for tables with appropriate class - // names and force-add mouse over and mouse out activated changes to the CSS - var tables = document.getElementsByTagName("table"); for ( var t = 0; t < tables.length; t++ ) { --- 70,77 ---- } + // "interactive table" hack for IE because IE doesn't handle :hover CSS + // properly; this function will look for tables with appropriate class + // names and force-add mouse over and mouse out activated changes to the CSS function tabularHoverInit() { var tables = document.getElementsByTagName("table"); for ( var t = 0; t < tables.length; t++ ) { *************** *** 121,127 **** var trackingChange = false; function interactiveSelect( tableRow, id, name, bug, isProject ) { - // called when user clicks on a table row on the home page - var selectedObj = ( bug > 0 ) ? selectedProject : selectedTask; --- 118,123 ---- var trackingChange = false; + // called when user clicks on a table row on the home page function interactiveSelect( tableRow, id, name, bug, isProject ) { var selectedObj = ( bug > 0 ) ? selectedProject : selectedTask; *************** *** 131,134 **** --- 127,131 ---- if ( tableRow == selectedObj.tableRow ) { + // this should eventually become a "clear()" method or similar... selectedObj.tableRow = undefined; selectedObj.id = undefined; *************** *** 156,159 **** --- 153,157 ---- if ( objects[i].tableRow ) objects[i].tableRow.className = ( document.all ) ? "deselected" : ""; + // this should eventually become a "clear()" method or similar... objects[i].tableRow = undefined; objects[i].id = undefined; *************** *** 247,251 **** tdSummary.appendChild( document.createTextNode( ! ( taskObj.isProject == 1 ) ? projectObj.name + " (" + taskObj.name + ")" : taskObj.name + " (Non-Project Task)" ) ); tdBugId.appendChild( document.createTextNode( --- 245,251 ---- tdSummary.appendChild( document.createTextNode( ! ( taskObj.isProject == 1 ) ! ? projectObj.name + " (" + taskObj.name + ")" ! : taskObj.name + " (Non-Project Task)" ) ); tdBugId.appendChild( document.createTextNode( *************** *** 296,302 **** } function sumTrackingHours() { - // calculate and display the total hours tracked in the tracking table - var totalHours = 0; for ( var i in trackingItems ) totalHours += parseFloat( trackingItems[i].hours ); --- 296,301 ---- } + // calculate and display the total hours tracked in the tracking table function sumTrackingHours() { var totalHours = 0; for ( var i in trackingItems ) totalHours += parseFloat( trackingItems[i].hours ); *************** *** 383,390 **** } function createTrackingItems() { - // this function gets run on page load of the tracking table iframe; it - // populates the table with data previously stored in the database try { if ( ! tbcTrackingItems ) return; --- 382,391 ---- } + // this function gets run on page load of the tracking table iframe; it + // populates the table with data previously stored in the database function createTrackingItems() { + // check (without throwing any errors/warnings) to see if + // tbcTrackingItems exists and has some value try { if ( ! tbcTrackingItems ) return; *************** *** 448,455 **** } ! function calc_activity_total( theForm, skipTracking ) { var total = 0; for ( var i in theForm.elements ) { ! if ( theForm.elements[i].type == 'text' ) { var item = parseInt( theForm.elements[i].value ); if ( isNaN(item) || item < 0 ) item = 0; --- 449,461 ---- } ! // calculate and display in the appropriate total area on the tracking form ! // the total activity percentage ! function calcActivityTotal( theForm, skipTracking ) { var total = 0; + + // loop through the elements of the incoming form, and for each text input + // element, parse an integer value out of it, and add that to "total" for ( var i in theForm.elements ) { ! if ( theForm.elements[i].type == "text" ) { var item = parseInt( theForm.elements[i].value ); if ( isNaN(item) || item < 0 ) item = 0; *************** *** 468,472 **** document.getElementById("activity_total").firstChild.nodeValue = "0%"; ! if ( theBox.name == "vacation" && theBox.form.sick.checked ) theBox.form.sick.checked = false; if ( theBox.name == "sick" && theBox.form.vacation.checked ) theBox.form.vacation.checked = false; } --- 474,478 ---- document.getElementById("activity_total").firstChild.nodeValue = "0%"; ! if ( theBox.name == "vacation" && theBox.form.sick.checked ) theBox.form.sick.checked = false; if ( theBox.name == "sick" && theBox.form.vacation.checked ) theBox.form.vacation.checked = false; } *************** *** 474,478 **** // activate all the activity entry form inputs activityCheckboxInputDeactivation(false); ! calc_activity_total( theBox.form ); } trackingChange = true; --- 480,484 ---- // activate all the activity entry form inputs activityCheckboxInputDeactivation(false); ! calcActivityTotal( theBox.form ); } trackingChange = true; *************** *** 494,501 **** // to open a codeline... if (codelineStyle.display == "none") { ! document.getElementById(codeline_id_link).className = 'codeline_current'; // Internet Explorer requires display="block" whereas all good browsers understand "table" ! codelineStyle.display = ( window.ActiveXObject ) ? "block" : "table"; } --- 500,507 ---- // to open a codeline... if (codelineStyle.display == "none") { ! document.getElementById(codeline_id_link).className = "codeline_current"; // Internet Explorer requires display="block" whereas all good browsers understand "table" ! codelineStyle.display = ( document.all ) ? "block" : "table"; } *************** *** 509,512 **** --- 515,522 ---- var skipEditTableDataFunction = false; + // based on a click in a table or on a button on the "Administrate Table Data" + // page, provide a confirm()-based interface for the user to add/edit column + // data; do some very basic checking on the data, clean it, encode it, and + // ship it to the server application by way of GET URL function editTableData( url, table, id, name, ordering, parentId, description ) { if (skipEditTableDataFunction) { |