projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34b04b8
)
src/JsRender/Node.vala
author
Alan Knowles
<alan@roojs.com>
Tue, 17 Feb 2015 07:44:30 +0000
(15:44 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 17 Feb 2015 07:44:30 +0000
(15:44 +0800)
src/JsRender/Node.vala
patch
|
blob
|
history
diff --git
a/src/JsRender/Node.vala
b/src/JsRender/Node.vala
index
5328abb
..
aeb8d84
100644
(file)
--- a/
src/JsRender/Node.vala
+++ b/
src/JsRender/Node.vala
@@
-382,7
+382,7
@@
public class JsRender.Node : Object {
if (Node.gen == null) {
Node.gen = new Json.Generator();
gen.pretty = true;
if (Node.gen == null) {
Node.gen = new Json.Generator();
gen.pretty = true;
- gen.indent =
4
;
+ gen.indent =
1
;
}
var n = new Json.Node(Json.NodeType.OBJECT);
n.set_object(this.toJsonObject () );
}
var n = new Json.Node(Json.NodeType.OBJECT);
n.set_object(this.toJsonObject () );
@@
-506,7
+506,14
@@
public class JsRender.Node : Object {
if (this.has("layout")) { txt += ("<i>" + GLib.Markup.escape_text(this.get("layout")) + "</i>"); }
if (this.has("title")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("title")) + "</b>"); }
if (this.has("layout")) { txt += ("<i>" + GLib.Markup.escape_text(this.get("layout")) + "</i>"); }
if (this.has("title")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("title")) + "</b>"); }
- if (this.has("html")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("html")) + "</b>"); }
+ if (this.has("html") && this.get("html").length > 0) {
+ var ht = this.get("html").split("\n");
+ if (ht.length > 1) {
+ txt += ("<b>" + GLib.Markup.escape_text(ht[0]) + "...</b>");
+ } else {
+ txt += ("<b>" + GLib.Markup.escape_text(this.get("html")) + "</b>");
+ }
+ }
if (this.has("label")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("label"))+ "</b>"); }
if (this.has("header")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("header")) + "</b>"); }
if (this.has("legend")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("legend")) + "</b>"); }
if (this.has("label")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("label"))+ "</b>"); }
if (this.has("header")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("header")) + "</b>"); }
if (this.has("legend")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("legend")) + "</b>"); }