{"action":"opened","issue":{"url":"https://api.github.com/repos/hikalkan/jtable/issues/1951","repository_url":"https://api.github.com/repos/hikalkan/jtable","labels_url":"https://api.github.com/repos/hikalkan/jtable/issues/1951/labels{/name}","comments_url":"https://api.github.com/repos/hikalkan/jtable/issues/1951/comments","events_url":"https://api.github.com/repos/hikalkan/jtable/issues/1951/events","html_url":"https://github.com/hikalkan/jtable/issues/1951","id":161394071,"number":1951,"title":"Using HashTag in jtable","user":{"login":"dasguptahirak","id":7932509,"avatar_url":"https://avatars.githubusercontent.com/u/7932509?v=3","gravatar_id":"","url":"https://api.github.com/users/dasguptahirak","html_url":"https://github.com/dasguptahirak","followers_url":"https://api.github.com/users/dasguptahirak/followers","following_url":"https://api.github.com/users/dasguptahirak/following{/other_user}","gists_url":"https://api.github.com/users/dasguptahirak/gists{/gist_id}","starred_url":"https://api.github.com/users/dasguptahirak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasguptahirak/subscriptions","organizations_url":"https://api.github.com/users/dasguptahirak/orgs","repos_url":"https://api.github.com/users/dasguptahirak/repos","events_url":"https://api.github.com/users/dasguptahirak/events{/privacy}","received_events_url":"https://api.github.com/users/dasguptahirak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T09:52:50Z","updated_at":"2016-06-21T09:52:50Z","closed_at":null,"body":"I have a requirement where my application user will have to categorise Loco Failure by using HashTag. For example if a loco failed due to crank shaft failure then user will have to write #crankshaft in the \"Reason\" textarea. I am using jquery.tagmate.js (https://github.com/bitdrift/tagmate/blob/master/example.html) for this purpose. I am able to capture all the tokens starting with # but its autosuggestion is not working.\r\n\r\nIn the below page I am able to capture #crankshaft and #rainy \r\n![image](https://cloud.githubusercontent.com/assets/7932509/16225190/0e51248a-37c3-11e6-8b4e-62f29627dcc6.png)\r\n\r\nCode Snippet \r\n`<script src=\"<%=cp %>/js/jquery-2.1.4.min.js\" type=\"text/javascript\"></script>\r\n<script src=\"<%=cp %>/js/jquery-ui-1.11.4.custom/jquery-ui.js\" type=\"text/javascript\"></script>\r\n<!-- /js/jquery-ui-1.10.3.custom.js\"  -->\r\n<script src=\"<%=cp %>/js/jquery.jtable.js\" type=\"text/javascript\"></script>\r\n<script src=\"<%=cp %>/js/moment.js\" type=\"text/javascript\"></script>\r\n\r\n<link href=\"<%=cp %>/js/datetimepicker-master/jquery.datetimepicker.css\" rel=\"stylesheet\" type=\"text/css\" /> \r\n<!-- js for datetime picker -->\r\n<script src=\"<%=cp %>/js/datetimepicker-master/build/jquery.datetimepicker.full.js\" type=\"text/javascript\"></script>\r\n\r\n\r\n<!-- js for USING JQUERY HASHTAG -->\r\n<script src=\"<%=cp %>/js/tagmate-master/jquery.fieldselection.js\" type=\"text/javascript\"></script>\r\n<script src=\"<%=cp %>/js/tagmate-master/jquery.scrollTo.js\" type=\"text/javascript\"></script>\r\n<script src=\"<%=cp %>/js/tagmate-master/jquery.tagmate.js\" type=\"text/javascript\"></script>\r\n\r\n\r\n\r\n<link rel=\"stylesheet\" href=\"<%=cp %>/js/validationEngine/validationEngine.jquery.css\" type=\"text/css\"/>\r\n<script src=\"<%=cp %>/js/validationEngine/jquery.validationEngine-en.js\" type=\"text/javascript\"></script>\r\n<script src=\"<%=cp %>/js/validationEngine/jquery.validationEngine.js\" type=\"text/javascript\"></script>\r\n\r\n\r\n<!-- for USING JQUERY HASHTAG -->\r\n <script type=\"text/javascript\">\r\n      $(function() {\r\n          var options = [\r\n        \t  {label: \"George Washington\",         value: \"george\"},\r\n              {label: \"Abraham Lincoln\",           value: \"abe\"},\r\n              {label: \"Andrew Jackson\",            value: \"andy\"},\r\n              {label: \"Thomas Jefferson\",          value: \"tj\"},\r\n              {label: \"Alexander Hamilton\",        value: \"alex\"},\r\n              {label: \"John F. Kennedy\",           value: \"jfk\"},\r\n              {label: \"Teddy Roosevelt\",           value: \"teddy\"},\r\n              {label: \"Franklin Delano Roosevelt\", value: \"fdr\"}\r\n          ];\r\n\r\n          $('[name=IFailureReason]').tagmate({\r\n              exprs: {\r\n                  \"@\": Tagmate.NAME_TAG_EXPR,\r\n                  \"#\": Tagmate.HASH_TAG_EXPR,\r\n                  \"$\": Tagmate.PRICE_TAG_EXPR,\r\n                  \"Â£\": Tagmate.PRICE_TAG_EXPR\r\n              },\r\n              sources: {\r\n                  \"@\": function(request, response) {\r\n                      // use convenience filter function \r\n                      alert(\"Inside term\");\r\n                      var filtered = Tagmate.filterOptions(options, request.term);\r\n                      response(filtered);\r\n                  }\r\n              },\r\n              capture_tag: function(tag) {\r\n            \t  alert(\"Inside capture_tag\");\r\n                  console.log(\"Got tag: \" + tag);\r\n              },\r\n              replace_tag: function(tag, value) {\r\n                  console.log(\"Replaced tag: \" + tag + \" with: \" + value);\r\n              },\r\n              highlight_tags: true,\r\n              highlight_class: \"hilite\",\r\n              menu_class: \"menu\",\r\n              menu_option_class: \"option\",\r\n              menu_option_active_class: \"active\"\r\n          });\r\n\r\n          $(\"#get_all_tags\").click(function() {\r\n              alert($(\"textarea\").getTags());\r\n          });\r\n\r\n          $(\"#get_name_tags\").click(function() {\r\n              alert($(\"textarea\").getTags({\r\n                  \"@\": Tagmate.NAME_TAG_EXPR\r\n              }));\r\n          });\r\n\r\n          $(\"#get_hash_tags\").click(function() {\r\n        \t alert($(\"textarea\").getTags({\r\n                  \"#\": Tagmate.HASH_TAG_EXPR\r\n              }));\r\n          });\r\n\r\n          $(\"#get_price_tags\").click(function() {\r\n              alert($(\"textarea\").getTags({\r\n                  \"$\": Tagmate.MONEY_TAG_EXPR\r\n              }));\r\n          });\r\n      });\r\n    </script>\r\n    <style type=\"text/css\">\r\n    textarea\r\n       {\r\n          height: 150px;\r\n          width: 400px;\r\n      }\r\n      .menu {\r\n          overflow: auto;\r\n          max-height: 54px;\r\n          width: 400px;\r\n          background: #EEE;\r\n      }\r\n      .option {\r\n          background: #EEE;\r\n          padding: 3px;\r\n      }\r\n      .option:hover, .active {\r\n          background: lightblue;\r\n      }\r\n      .hilite {\r\n          background: lightblue;\r\n      }\r\n    </style>\r\n`\r\n\r\n**But the suggestion for @ is not working. Can anybody help me to fix this issue?**"}}
{"actor":{"display_login":"dasguptahirak"}}