made button text dynamic with jquery text

Judy Ngai 8 年之前
父节点
当前提交
508fe28b93
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/assets/javascripts/pages/agent-show-page.js.coffee

+ 2 - 0
app/assets/javascripts/pages/agent-show-page.js.coffee

@@ -44,8 +44,10 @@ class @AgentShowPage
44 44
   toggleMemory: ->
45 45
     if $('#memorypanel').hasClass('hidden')
46 46
       $('#memorypanel').removeClass 'hidden'
47
+      $('#toggle-memory').text('Hide Memory')
47 48
     else
48 49
       $('#memorypanel').addClass 'hidden'
50
+      $('#toggle-memory').text('Show Memory')
49 51
 
50 52
   clearMemory: (e) ->
51 53
     if confirm("Are you sure you want to clear memory of this Agent?")