Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

BottomToolbar.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright @ 2015 Atlassian Pty Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. var PanelToggler = require("../side_pannels/SidePanelToggler");
  17. var buttonHandlers = {
  18. "bottom_toolbar_contact_list": function () {
  19. BottomToolbar.toggleContactList();
  20. },
  21. "bottom_toolbar_film_strip": function () {
  22. BottomToolbar.toggleFilmStrip();
  23. },
  24. "bottom_toolbar_chat": function () {
  25. BottomToolbar.toggleChat();
  26. }
  27. };
  28. var BottomToolbar = (function (my) {
  29. my.init = function () {
  30. for(var k in buttonHandlers)
  31. $("#" + k).click(buttonHandlers[k]);
  32. };
  33. my.toggleChat = function() {
  34. PanelToggler.toggleChat();
  35. };
  36. my.toggleContactList = function() {
  37. PanelToggler.toggleContactList();
  38. };
  39. my.toggleFilmStrip = function() {
  40. var filmstrip = $("#remoteVideos");
  41. filmstrip.toggleClass("hidden");
  42. };
  43. $(document).bind("remotevideo.resized", function (event, width, height) {
  44. var bottom = (height - $('#bottomToolbar').outerHeight())/2 + 18;
  45. $('#bottomToolbar').css({bottom: bottom + 'px'});
  46. });
  47. return my;
  48. }(BottomToolbar || {}));
  49. module.exports = BottomToolbar;