New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui patch agent show #1326
ui patch agent show #1326
Conversation
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<%= javascript_tag do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New code should go in agent-show-page.js.coffee. Can bind it at the top. Also see the jQuery toggle method.
`$( "#target" ).click(function() { | ||
$("#memorytoggle").toggleClass("hidden"); | ||
});` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not work here even though I tried both passing in a pure js and converted it to coffee. However it works in show.html.erb.
@cantino This is good too. Its working for me. |
@@ -1,5 +1,8 @@ | |||
class @AgentShowPage | |||
constructor: -> | |||
$('#target').click -> | |||
$('#memorytoggle').toggleClass 'hidden' | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return isn't needed here, it'll return automatically
@cantino I am good with another look. |
@@ -40,6 +41,12 @@ class @AgentShowPage | |||
$("#logs .spinner").stop(true, true).fadeOut -> | |||
$("#logs .refresh, #logs .clear").show() | |||
|
|||
toggleMemory: -> | |||
if $('#memorypanel').hasClass('hidden') | |||
$('#memorypanel').removeClass 'hidden' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the button text does not change anymore when you show the memory, is that intended?
@cantino I think I am good. I double checked. |
Thanks @Jngai! |
No description provided.