|
@@ -3453,13 +3453,14 @@ selector: "renderContentOn:",
|
|
protocol: "rendering",
|
|
protocol: "rendering",
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: ["html"],
|
|
args: ["html"],
|
|
-source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: self listCssClass;\x0a with: [ self renderListOn: html ];\x0a\x09\x09onClick: [ self focus ].\x0a html div class: self buttonsDivCssClass; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
|
|
|
|
|
|
+source: "renderContentOn: html\x0a\x0a\x09|ul|\x0a\x09\x0a\x09ul := html ul \x0a \x09\x09class: self listCssClass;\x0a \x09with: [ self renderListOn: html ];\x0a\x09\x09\x09onClick: [ self focus ].\x0a\x09\x09\x09\x0a\x09ul asJQuery contextmenu: [ self toggleCommandsMenu. false].\x0a\x09\x09\x0a html div class: self buttonsDivCssClass; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
|
|
|
|
|
|
+messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "contextmenu:", "asJQuery", "toggleCommandsMenu", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
|
|
}, function ($methodClass){ return function (html){
|
|
}, function ($methodClass){ return function (html){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
|
|
+var ul;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -3483,7 +3484,7 @@ return $self._renderListOn_(html);
|
|
,$ctx1.sendIdx["with:"]=1
|
|
,$ctx1.sendIdx["with:"]=1
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
][0];
|
|
][0];
|
|
-$recv($1)._onClick_((function(){
|
|
|
|
|
|
+ul=$recv($1)._onClick_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -3492,6 +3493,16 @@ return $self._focus();
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
|
|
+$recv($recv(ul)._asJQuery())._contextmenu_((function(){
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+$self._toggleCommandsMenu();
|
|
|
|
+return false;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+}));
|
|
$2=$recv(html)._div();
|
|
$2=$recv(html)._div();
|
|
$recv($2)._class_($self._buttonsDivCssClass());
|
|
$recv($2)._class_($self._buttonsDivCssClass());
|
|
$recv($2)._with_((function(){
|
|
$recv($2)._with_((function(){
|
|
@@ -3500,13 +3511,13 @@ return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
return $self._renderButtonsOn_(html);
|
|
return $self._renderButtonsOn_(html);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
$self._setupKeyBindings();
|
|
$self._setupKeyBindings();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,ul:ul})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}; }),
|
|
}; }),
|
|
$globals.HLListWidget);
|
|
$globals.HLListWidget);
|
|
@@ -3999,7 +4010,7 @@ $globals.HLNavigationListWidget);
|
|
|
|
|
|
|
|
|
|
$core.addClass("HLToolListWidget", $globals.HLNavigationListWidget, "Helios-Core");
|
|
$core.addClass("HLToolListWidget", $globals.HLNavigationListWidget, "Helios-Core");
|
|
-$core.setSlots($globals.HLToolListWidget, ["model"]);
|
|
|
|
|
|
+$core.setSlots($globals.HLToolListWidget, ["model", "commandsMenuElement"]);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "activateListItem:",
|
|
selector: "activateListItem:",
|
|
@@ -4423,7 +4434,7 @@ selector: "renderMenuOn:",
|
|
protocol: "rendering",
|
|
protocol: "rendering",
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: ["html"],
|
|
args: ["html"],
|
|
-source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands ifEmpty: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09\x09class: 'btn btn-default dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'glyphicon glyphicon-chevron-down' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09commands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
|
|
|
|
|
|
+source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands ifEmpty: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09commandsMenuElement := html a\x0a\x09\x09\x09\x09class: 'btn btn-default dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'glyphicon glyphicon-chevron-down' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09commands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
@@ -4463,7 +4474,7 @@ $2=[$recv(html)._a()
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
][0];
|
|
][0];
|
|
$recv($2)._at_put_("data-toggle","dropdown");
|
|
$recv($2)._at_put_("data-toggle","dropdown");
|
|
-[$recv($2)._with_((function(){
|
|
|
|
|
|
+$self.commandsMenuElement=[$recv($2)._with_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx3) {
|
|
return $core.withContext(function($ctx3) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -4575,6 +4586,30 @@ return self;
|
|
}; }),
|
|
}; }),
|
|
$globals.HLToolListWidget);
|
|
$globals.HLToolListWidget);
|
|
|
|
|
|
|
|
+$core.addMethod(
|
|
|
|
+$core.method({
|
|
|
|
+selector: "toggleCommandsMenu",
|
|
|
|
+protocol: "actions",
|
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
+args: [],
|
|
|
|
+source: "toggleCommandsMenu\x0a\x0a\x09commandsMenuElement asJQuery dropdown: 'toggle'",
|
|
|
|
+referencedClasses: [],
|
|
|
|
+//>>excludeEnd("ide");
|
|
|
|
+pragmas: [],
|
|
|
|
+messageSends: ["dropdown:", "asJQuery"]
|
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+$recv($recv($self.commandsMenuElement)._asJQuery())._dropdown_("toggle");
|
|
|
|
+return self;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"toggleCommandsMenu",{})});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+}; }),
|
|
|
|
+$globals.HLToolListWidget);
|
|
|
|
+
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "unregister",
|
|
selector: "unregister",
|