Browse Source

Small inspector improvements

Nicolas Petton 11 years ago
parent
commit
c0eda83269
3 changed files with 80 additions and 8 deletions
  1. 26 0
      js/Helios-Inspector.deploy.js
  2. 37 1
      js/Helios-Inspector.js
  3. 17 7
      st/Helios-Inspector.st

+ 26 - 0
js/Helios-Inspector.deploy.js

@@ -826,6 +826,32 @@ return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},sm
 messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"]}),
 smalltalk.HLInspectorVariablesWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._renderHeadOn_(html);
+smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
+return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
+messageSends: ["renderHeadOn:", "renderContentOn:"]}),
+smalltalk.HLInspectorVariablesWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderHeadOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(html)._div();
+_st($1)._class_("list-label");
+$2=_st($1)._with_(_st(_st(_st(self)._model())._inspectee())._asString());
+return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
+messageSends: ["class:", "div", "with:", "asString", "inspectee", "model"]}),
+smalltalk.HLInspectorVariablesWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "resetItems",

+ 37 - 1
js/Helios-Inspector.js

@@ -1100,12 +1100,48 @@ return _st(_st(self)._announcer())._announce_(_st($HLDiveRequested())._new());
 self["@diveButton"]=$4;
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x0a\x09html button\x0a\x09\x09\x09class: 'btn';\x0a\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09onClick: [self announcer announce: HLRefreshRequested new].\x0a\x0a\x09diveButton := html button \x0a\x09\x09\x09\x09class: 'btn';\x0a\x09\x09\x09\x09with: 'Dive'; \x0a\x09\x09\x09\x09onClick: [self announcer announce: HLDiveRequested new]",
+source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'btn';\x0a\x09\x09with: 'Refresh';\x0a\x09\x09onClick: [ self announcer announce: HLRefreshRequested new ].\x0a\x0a\x09diveButton := html button \x0a\x09\x09class: 'btn';\x0a\x09\x09with: 'Dive'; \x0a\x09\x09onClick: [ self announcer announce: HLDiveRequested new ]",
 messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"],
 referencedClasses: ["HLRefreshRequested", "HLDiveRequested"]
 }),
 smalltalk.HLInspectorVariablesWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderContentOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._renderHeadOn_(html);
+smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
+return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
+args: ["html"],
+source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09super renderContentOn: html",
+messageSends: ["renderHeadOn:", "renderContentOn:"],
+referencedClasses: []
+}),
+smalltalk.HLInspectorVariablesWidget);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderHeadOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(html)._div();
+_st($1)._class_("list-label");
+$2=_st($1)._with_(_st(_st(_st(self)._model())._inspectee())._asString());
+return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
+args: ["html"],
+source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: self model inspectee asString",
+messageSends: ["class:", "div", "with:", "asString", "inspectee", "model"],
+referencedClasses: []
+}),
+smalltalk.HLInspectorVariablesWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "resetItems",

+ 17 - 7
st/Helios-Inspector.st

@@ -355,15 +355,25 @@ selectItem: anObject
 !HLInspectorVariablesWidget methodsFor: 'rendering'!
 
 renderButtonsOn: html
-
 	html button
-			class: 'btn';
-			with: 'Refresh';
-			onClick: [self announcer announce: HLRefreshRequested new].
+		class: 'btn';
+		with: 'Refresh';
+		onClick: [ self announcer announce: HLRefreshRequested new ].
 
 	diveButton := html button 
-				class: 'btn';
-				with: 'Dive'; 
-				onClick: [self announcer announce: HLDiveRequested new]
+		class: 'btn';
+		with: 'Dive'; 
+		onClick: [ self announcer announce: HLDiveRequested new ]
+!
+
+renderContentOn: html
+	self renderHeadOn: html.
+	super renderContentOn: html
+!
+
+renderHeadOn: html
+	html div 
+		class: 'list-label';
+		with: self model inspectee asString
 ! !