]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/slc/ria/StatusCellRenderer.js
move "source" to "argeo-ria-src"
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / argeo-ria-src / class / org / argeo / slc / ria / StatusCellRenderer.js
1 /* ************************************************************************
2
3 qooxdoo - the new era of web development
4
5 http://qooxdoo.org
6
7 Copyright:
8 2007 OpenHex SPRL, http://www.openhex.org
9
10 License:
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.
14
15 Authors:
16 * Dirk Wellmann (dw(at)piponline.net)
17
18 ************************************************************************ */
19
20 /**
21 * This Cellrender is for test status use. It create green or red background
22 * cells depending on the status value (PASSED or FAILED).
23 */
24 qx.Class.define("org.argeo.slc.ria.StatusCellRenderer",
25 {
26 extend : qx.ui.table.cellrenderer.Html,
27
28 construct : function(){
29 this.base(arguments);
30 var style =
31 [
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;}"
34 ];
35 // Include stylesheet
36 qx.bom.Stylesheet.createElement(style.join(""));
37 },
38
39 /*
40 *****************************************************************************
41 MEMBERS
42 *****************************************************************************
43 */
44
45 members :
46 {
47 // overridden
48 _getContentHtml : function(cellInfo) {
49 return (cellInfo.value || "");
50 },
51
52 // overridden
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";
58 }else{
59 return "qooxdoo-table-cell";
60 }
61 }
62 }
63 });