Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. <script>
  2. $('.module-actions').html('<input placeholder="tag" style="color: black; font-size: 9pt;float: left; width: 100px; margin-right: 5px;" type="text" id="tagInput"><button id="addTag" style="color: black; float: left;">Add tag</button><a class="show-more square-button tooltip-theme-arrows tooltip-target tooltip-element-attached-bottom tooltip-element-attached-right tooltip-target-attached-top tooltip-target-attached-right" data-tooltip="More" data-tooltip-position="top right">More</a><a class="pin-view square-button tooltip-theme-arrows tooltip-target tooltip-element-attached-bottom tooltip-element-attached-right tooltip-target-attached-top tooltip-target-attached-right" href="#" data-tooltip="Pin Module to Grid" data-tooltip-position="top right">Pin</a><a class="remove square-button tooltip-theme-arrows tooltip-target tooltip-element-attached-bottom tooltip-element-attached-right tooltip-target-attached-top tooltip-target-attached-right" href="#" data-tooltip="Close" data-tooltip-position="top right">Close</a>');
  3.  
  4.  
  5. </script>
  6.  
  7. <div class="chat-time">
  8. <time class="time-standard">{{timestamp ingestionDate "hh:mm:ss a"}}</time>
  9. <time class="time-twentyfour">{{timestamp ingestionDate "HH:mm:ss"}}</time>
  10. {{#if showReadReceipt}}
  11. {{parseReadReceipts this}}
  12. {{/if}}
  13.  
  14. </div>
  15. <input type="checkbox" name="assignCheckbox" class="assignCheckbox" value="tag" style="display: inline !important; float:left;">
  16. <!--<div class="tagg tag" id="testTag">testTag</div>-->
  17. {{#if showName}}
  18. {{#if showPresence}}
  19. {{#unless oneToOneUserId}}
  20. <!--add an &nbsp; so that if user copy the whole message, there will be a space between timestamp and username-->
  21. <span class="has-presence presence-indicator presence-unknown" data-userid="{{from.id}}">&nbsp;</span>
  22. {{/unless}}
  23. {{/if}}
  24. {{/if}}
  25. <div {{#unless oneToOneUserId}} class="chat-not-time" {{else}} class="chat-not-time no-presence" {{/unless}}>
  26. <p>
  27. {{#if isChime}}
  28. <p class="chat-text"><span class="msg-entity person has-hover-profile" data-userid="{{from.id}}" data-usertype="{{from.userType}}">{{from.prettyName}}</span> sent a chime.</p>
  29. {{else}}
  30. {{#if showName}}
  31. <span class="chat-username has-hover-profile" data-userid="{{from.id}}">
  32. <span class="display-id hidden">{{from.screenName}}</span>
  33. {{#if isSender}}
  34. <span class="display-name sender-name">You</span>
  35. {{else}}
  36. <span class="display-name colorable aliasable" data-userid="{{from.id}}">{{from.prettyName}}</span>
  37. {{/if}}
  38. </span>:
  39. {{/if}}
  40. <span class="chat-text">{{parseMessageText text entities media}}</span>
  41. {{#if attachments}}
  42. {{#each attachments}}
  43. <span class="file-download">
  44. <a href="{{../apiUrl}}/attachment/download?fileid={{fileId}}&messageid={{urlEncoded ../messageId}}" class="attachment{{ifPreviewContent name}}" download="{{name}}">{{name}} ({{friendlyFileSize sizeInBytes}})</a>
  45. </span>
  46. {{/each}}
  47. {{/if}}
  48. {{/if}}
  49. </p>
  50.  
  51. </div>
  52.  
  53. <script>
  54.  
  55. //sessionStorage.setItem('test', ['df', 123]);
  56. //alert(typeof sessionStorage.test);
  57.  
  58. //$('.assignCheckbox').attr('id', $("button").closest("div").attr("id"););
  59.  
  60. $('.tagg').click(function(){
  61. //alert('test');
  62. var mesId = $(this).parent().attr('data-message-id');
  63. alert(mesId);
  64. //$(this).text('hiKen');
  65. //tagArray.append({messageId: mesId, tagName: 'hiKen'});
  66. //console.log(tagArray);
  67. //alert(tagArray);
  68. });
  69.  
  70.  
  71. $('#addTag').on('click', function(){
  72. if($('#tagInput').val() == null || $('#tagInput').val() == "")
  73. {
  74. alert("Please input a tag value.");
  75. }
  76. else
  77. {
  78. $('input[name=assignCheckbox]:checked').each(function(){
  79. alert($(this).val());
  80. //alert($(this).find('.chat-not-time').children().find('.chat-text').val());
  81. });
  82. //alert($("input[name=assignCheckbox]:checked").val());
  83. }
  84. });
  85. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement