Skip to content
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

Merged
merged 17 commits into from Mar 12, 2016
Merged

ui patch agent show #1326

merged 17 commits into from Mar 12, 2016

Conversation

Jngai
Copy link
Contributor

@Jngai Jngai commented Mar 2, 2016

No description provided.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 2, 2016

@cantino let me know if this ui change is sufficient for #350 I tried it on the show page. @dsander Feel free to comment on this ui change. I am not totally sure if this is what you guys are looking for.

</div>
</div>
</div>
</div>
</div>


<%= javascript_tag do %>
Copy link
Member

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");
});`

Copy link
Contributor Author

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.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 3, 2016

@cantino This is good too. Its working for me.

@@ -1,5 +1,8 @@
class @AgentShowPage
constructor: ->
$('#target').click ->
$('#memorytoggle').toggleClass 'hidden'
return
Copy link
Member

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

@Jngai
Copy link
Contributor Author

Jngai commented Mar 4, 2016

@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'
Copy link
Collaborator

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?

@Jngai
Copy link
Contributor Author

Jngai commented Mar 7, 2016

@cantino I think I am good. I double checked.

@cantino
Copy link
Member

cantino commented Mar 12, 2016

Thanks @Jngai!

cantino added a commit that referenced this pull request Mar 12, 2016
@cantino cantino merged commit f0f6aa7 into huginn:master Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants