construct : function(){
this.base(arguments);
this.setLayout(new qx.ui.layout.VBox());
- this.passedStatus = "<div align=\"center\"><img src=\"resource/slc/dialog-ok.png\" height=\"16\" width=\"16\"></div>";
- this.failedStatus = "<div align=\"center\"><img src=\"resource/slc/flag.png\" height=\"16\" width=\"16\"></div>";
+ //this.passedStatus = "<div align=\"center\"><img src=\"resource/slc/dialog-ok.png\" height=\"16\" width=\"16\"></div>";
+ //this.failedStatus = "<div align=\"center\"><img src=\"resource/slc/flag.png\" height=\"16\" width=\"16\"></div>";
+ this.passedStatus = "PASSED";
+ this.failedStatus = "FAILED";
},
properties :
}
this.tree = new qx.ui.treevirtual.TreeVirtual(["Test", "State", "Message", "Id"]);
this.tree.getTableColumnModel().setDataCellRenderer(0, new org.argeo.ria.util.TreeDataCellRenderer());
+ this.tree.getDataRowRenderer().setHighlightFocusRow(false); // Default row renderer
this.tree.setRowHeight(18);
this.tree.setStatusBarVisible(false);
this.tree.setDecorator(new qx.ui.decoration.Background("#fff"));
}else{
label = crtPath;
}
+ var simpleResults = org.argeo.ria.util.Element.selectNodes(node, "slc:part-sub-list/slc:parts/slc:simple-result-part", NSMap);
+
var newId;
newId = model.addBranch(currentParentId, label, false);
// Test Leaf Node
- var simpleResults = org.argeo.ria.util.Element.selectNodes(node, "slc:part-sub-list/slc:parts/slc:simple-result-part", NSMap);
if(!simpleResults || !simpleResults.length){
addedPaths[crtPath] = newId;
currentParentId = newId;
var columnModel = this.tree.getTableColumnModel();
var resize = columnModel.getBehavior();
resize.set(0, {width:250, minWidth:250});
- resize.set(1, {width:40});
+ resize.set(1, {width:55});
resize.set(2, {width:"1*"});
- resize.set(3, {width:100});
- columnModel.setDataCellRenderer(1, new qx.ui.table.cellrenderer.Html());
+ resize.set(3, {width:150});
+ columnModel.setDataCellRenderer(1, new org.argeo.slc.web.StatusCellRenderer());
this.tree.getSelectionManager().getSelectionModel().addListener("changeSelection", function(e){
var viewSelection = this.getView().getViewSelection();
--- /dev/null
+/* ************************************************************************
+
+ qooxdoo - the new era of web development
+
+ http://qooxdoo.org
+
+ Copyright:
+ 2007 OpenHex SPRL, http://www.openhex.org
+
+ License:
+ LGPL: http://www.gnu.org/licenses/lgpl.html
+ EPL: http://www.eclipse.org/org/documents/epl-v10.php
+ See the LICENSE file in the project's top-level directory for details.
+
+ Authors:
+ * Dirk Wellmann (dw(at)piponline.net)
+
+************************************************************************ */
+
+/**
+ * This Cellrender is for test status use. It create green or red background
+ * cells depending on the status value (PASSED or FAILED).
+ */
+qx.Class.define("org.argeo.slc.web.StatusCellRenderer",
+{
+ extend : qx.ui.table.cellrenderer.Html,
+
+ construct : function(){
+ this.base(arguments);
+ var style =
+ [
+ ".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;}",
+ ".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;}"
+ ];
+ // Include stylesheet
+ qx.bom.Stylesheet.createElement(style.join(""));
+ },
+
+ /*
+ *****************************************************************************
+ MEMBERS
+ *****************************************************************************
+ */
+
+ members :
+ {
+ // overridden
+ _getContentHtml : function(cellInfo) {
+ return (cellInfo.value || "");
+ },
+
+ // overridden
+ _getCellClass : function(cellInfo) {
+ if(cellInfo.value == "PASSED"){
+ return "qooxdoo-table-cell slc-status-passed";
+ }else if(cellInfo.value == "FAILED"){
+ return "qooxdoo-table-cell slc-status-failed";
+ }else{
+ return "qooxdoo-table-cell";
+ }
+ }
+ }
+});