PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/indico/MaKaC/plugins/InstantMessaging/tpls/ConfModifChat.tpl

https://github.com/davidmorrison/indico
Smarty Template | 106 lines | 83 code | 23 blank | 0 comment | 0 complexity | 6ab03a41745985ba663f71098bdd0d43 MD5 | raw file
  1. <table>
  2. <tr>
  3. <td colspan="2" style="padding-top: 20px"></td>
  4. </tr>
  5. <tr>
  6. <td class="titleCellNoBorderTD" style="white-space: nowrap;vertical-align: middle;">
  7. <span class="titleCellFormat createBookingText">
  8. ${ _("Create chat room")}
  9. </span>
  10. </td>
  11. <td style="padding-left: 15px;">
  12. <div id="createChatroomDiv" style="display: inline;">
  13. <input type="button" value="${ _("Create")}">
  14. </div>
  15. </td>
  16. </tr>
  17. </table>
  18. <table>
  19. <tr>
  20. <td class="groupTitle" style="white-space: nowrap;padding-top: 1em;" colspan="2">
  21. ${ _("Current chat rooms")}
  22. </td>
  23. </tr>
  24. <tr>
  25. <td colspan="2" style="padding-top: 20px;">
  26. <table style="border-collapse: collapse;">
  27. <thead>
  28. <tr id="tableHeadRow" style="margin-bottom: 5px;">
  29. <td></td>
  30. </tr>
  31. </thead>
  32. <tbody id="chatroomsTableBody">
  33. <tr><td></td></tr>
  34. </tbody>
  35. </table>
  36. </td>
  37. </tr>
  38. </table>
  39. <div id="iframes" style="display: none;">
  40. </div>
  41. <script type="text/javascript">
  42. /* ------------------------------ GLOBAL VARIABLES ------------------------------- */
  43. var chatrooms = $L(${ jsonEncode(Chatrooms) });
  44. var links = $O(${ jsonEncode(links) });
  45. var showLogsLink = ${ jsonEncode(ShowLogsLink) };
  46. var defaultHost = ${ jsonEncode(DefaultServer) };
  47. var customHost = "";
  48. var createButton;
  49. var timeZone = ${ jsonEncode(tz) };
  50. var conferenceName = ${ jsonEncode(Conference.getTitle()) };
  51. var conferenceID = ${ jsonEncode(Conference.getId()) };
  52. var eventDate = '${ EventDate[0:10].replace('/','_') }';
  53. var user = ${ jsonEncode(User.fossilize()) };
  54. var materialUrl = ${ jsonEncode(MaterialUrl) };
  55. /* ------------------------------ FUNCTIONS TO BE CALLED WHEN USER EVENTS HAPPEN -------------------------------*/
  56. // Will call in turn 'createChatroom' in InstantMessaging.js
  57. var create = function() {
  58. createChatroom('${ Conference.getId() }');
  59. }
  60. //Will call in turn 'removeChatroom' in InstantMessaging.js
  61. var remove = function(chatroom) {
  62. removeChatroom(chatroom, '${ Conference.getId() }');
  63. };
  64. // Will call in turn 'editChatroom' in InstantMessaging.js
  65. var edit = function(chatroom) {
  66. editChatroom(chatroom, '${ Conference.getId() }');
  67. };
  68. //Will call in turn 'checkCRStatus' in InstantMessaging.js when a user wants to refresh the chat room data
  69. var checkStatus = function(chatroom) {
  70. checkCRStatus(chatroom, '${ Conference.getId() }');
  71. }
  72. /* ------------------------------ STUFF THAT HAPPENS WHEN PAGE IS LOADED -------------------------------*/
  73. IndicoUI.executeOnLoad(function(){
  74. // This is strictly necessary in this page because the progress dialog touches the body element of the page,
  75. // and IE doesn't like when this is done at page load by a script that is not inside the body element.
  76. // We configure the "create" button and the list of plugins.
  77. createButton = Html.input("button", {disabled:false, style:{marginLeft: '6px'}}, $T("Create") );
  78. createButton.observeClick(function(){ create() });
  79. $E('createChatroomDiv').set(createButton);
  80. // We display the chat rooms
  81. displayChatrooms();
  82. });
  83. </script>