]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/slc/ria/StatusCellRenderer.js
1 /* ************************************************************************
3 qooxdoo - the new era of web development
8 2007 OpenHex SPRL, http://www.openhex.org
11 LGPL: http://www.gnu.org/licenses/lgpl.html
12 EPL: http://www.eclipse.org/org/documents/epl-v10.php
13 See the LICENSE file in the project's top-level directory for details.
16 * Dirk Wellmann (dw(at)piponline.net)
18 ************************************************************************ */
21 * This Cellrender is for test status use. It create green or red background
22 * cells depending on the status value (PASSED or FAILED).
24 qx
.Class
.define("org.argeo.slc.ria.StatusCellRenderer",
26 extend
: qx
.ui
.table
.cellrenderer
.Html
,
28 construct : function(){
32 ".slc-status-passed{background-color:#8fc98f;color:#008300;border-bottom:1px solid #cccccc;text-align:center;filter:alpha(opacity=80);opacity: 0.8;-moz-opacity:0.8;}",
33 ".slc-status-failed{background-color:#cb8f8f;color:#830000;border-bottom:1px solid #cccccc;text-align:center;filter:alpha(opacity=80);opacity: 0.8;-moz-opacity:0.8;}"
36 qx
.bom
.Stylesheet
.createElement(style
.join(""));
40 *****************************************************************************
42 *****************************************************************************
48 _getContentHtml : function(cellInfo
) {
49 return (cellInfo
.value
|| "");
53 _getCellClass : function(cellInfo
) {
54 if(cellInfo
.value
== "PASSED"){
55 return "qooxdoo-table-cell slc-status-passed";
56 }else if(cellInfo
.value
== "FAILED"){
57 return "qooxdoo-table-cell slc-status-failed";
59 return "qooxdoo-table-cell";