You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/08/23 03:19:46 UTC
[06/35] git commit: Visual improvements to the client console
Visual improvements to the client console
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b6852a61
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b6852a61
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b6852a61
Branch: refs/heads/master
Commit: b6852a61615a8f2a2c9b071766850b331ad310e4
Parents: 4ce5b49
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu Aug 22 15:28:18 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu Aug 22 15:28:18 2013 -0700
----------------------------------------------------------------------
.../META-INF/modules/t5/core/console.coffee | 21 ++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b6852a61/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
index 3e12c00..8c757b9 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
@@ -39,6 +39,13 @@ define ["./dom", "underscore", "./bootstrap"],
forceFloating = (dom.body.attribute "data-floating-console") == "true"
+ button = (action, icon, label, disabled = false) -> """
+ <button data-action="#{action}" class="btn btn-default btn-mini">
+ #{glyph icon} #{label}
+ </button>
+ """
+
+
try
# FireFox will throw an exception if you even access the console object and it does
# not exist. Wow!
@@ -57,12 +64,12 @@ define ["./dom", "underscore", "./bootstrap"],
"""
<div class="message-container"></div>
<div class="row">
- <div class="btn-group-sm col-lg-5">
- <button data-action="clear" class="btn btn-mini">#{glyph "remove"} Clear Console</button>
- <button data-action="enable" class="btn btn-mini" disabled="true">#{glyph "play"}</i> Enable Console</button>
- <button data-action="disable" class="btn btn-mini">#{glyph "pause"} Disable Console</button>
+ <div class="btn-group btn-group-sm col-md-4">
+ #{button "clear", "remove", "Clear Console"}
+ #{button "enable", "play", "Enable Console"}
+ #{button "disable", "pause", "Disable Console"}
</div>
- <div class="col-lg-6">
+ <div class="col-md-8">
<input class="form-control input-xlarge" size="40" placeholder="Filter console content">
</div>
</div>
@@ -72,6 +79,8 @@ define ["./dom", "underscore", "./bootstrap"],
messages = floatingConsole.findFirst ".message-container"
+ floatingConsole.findFirst("[data-action=enable]").attribute "disabled", true
+
floatingConsole.on "click", "[data-action=clear]", ->
floatingConsole.hide()
messages.update ""
@@ -94,7 +103,7 @@ define ["./dom", "underscore", "./bootstrap"],
return false
- floatingConsole.on "change keyup", ".search-query", ->
+ floatingConsole.on "change keyup", "input", ->
updateFilter @value()
for e in messages.children()