svn: /pear2/BugManager/trunk/www/pearworm/source/class/pearworm/model/ Issue.js
[email protected] (Greg Beaver) Tue, 07 Sep 2010 04:40:24 +0000
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
cellog Tue, 07 Sep 2010 04:40:24 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303128
Log:
begin work of making bug view look like it does now in the html table
Changed paths:
U pear2/BugManager/trunk/www/pearworm/source/class/pearworm/model/Issue.js
Modified: pear2/BugManager/trunk/www/pearworm/source/class/pearworm/model/Issue.js
===================================================================
--- pear2/BugManager/trunk/www/pearworm/source/class/pearworm/model/Issue.js 2010-09-07 04:05:13 UTC (rev 303127)
+++ pear2/BugManager/trunk/www/pearworm/source/class/pearworm/model/Issue.js 2010-09-07 04:40:24 UTC (rev 303128)
@@ -57,24 +57,54 @@
this.setType(data.type);
this.setSummary(data.summary);
this.setDescription(data.description);
+ this.setCreatetimestamp(data.createtimestamp);
+ this.setModifiedtimestamp(data.modifiedtimestamp);
},
+ getFancyType: function()
+ {
+ switch (this.getType()) {
+ case "Bug" : return "Bug";
+ case "Req" : return "Request";
+ case "Doc" : return "Documentation Bug";
+ }
+ return "Unknown";
+ },
getIssueForm: function()
{
var form = new qx.ui.form.Form();
var manager = form.getValidationManager();
var formcontroller = new qx.data.controller.Form(this);
- formcontroller.addBindingOptions("id", {converter:
- function(data) {
- if (data == null) {
- return null;
- }
- return String(data);
- }});
- var id = new qx.ui.form.TextField("");
- form.add(id, "ID", null, "id");
+ var summaryfield = new qx.ui.form.TextField("");
+ form.add(summaryfield, "Summary", null, "summary");
formcontroller.setTarget(form);
+ var content = new qx.ui.container.Composite(new qx.ui.layout.VBox(5));
var renderer = new qx.ui.form.renderer.Double(form);
- return renderer;
+ var nicegrid = new qx.ui.layout.Grid(12);
+ nicegrid.setColumnAlign(0, "right", "top");
+ nicegrid.setColumnMinWidth(0, 100);
+ nicegrid.setColumnAlign(2, "right", "top");
+ nicegrid.setColumnMinWidth(2, 100);
+ var header = new qx.ui.container.Composite(nicegrid);
+ content.add(new qx.ui.basic.Label().set({
+ value: "<span style=\"color: #000066;font-size:116%; font-weight: bold;\">" +
+ this.getFancyType() + "#" + this.getId() + "</span> <b>" +
+ this.getSummary().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">") +
+ "</b>",
+ rich: true
+ }));
+ header.add(new qx.ui.basic.Label().set({
+ value: "<span style=\"color: #666666;font-weight:bold;\">Submitted:</span>",
+ rich: true
+ }), {column: 0, row: 0});
+ header.add(new qx.ui.basic.Label(this.getCreatetimestamp()), {column: 1, row: 0});
+ header.add(new qx.ui.basic.Label().set({
+ value: "<span style=\"color: #666666;font-weight:bold\">Modified:</span>",
+ rich: true
+ }), {column: 2, row: 0});
+ header.add(new qx.ui.basic.Label(this.getCreatetimestamp()), {column: 3, row: 0});
+ content.add(header);
+ content.add(renderer, {flex: 5});
+ return content;
}
},
construct : function() {