fb_wall.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. (function (global, factory) {
  2. if (typeof define === "function" && define.amd) {
  3. define("/pages/fb_wall", ["jquery", "Site"], factory);
  4. } else if (typeof exports !== "undefined") {
  5. factory(require("jquery"), require("Site"));
  6. } else {
  7. var mod = {
  8. exports: {}
  9. };
  10. factory(global.jQuery, global.Site);
  11. global.pagesFb_wall = mod.exports;
  12. }
  13. })(this, function (_jquery, _Site) {
  14. "use strict";
  15. _jquery = babelHelpers.interopRequireDefault(_jquery);
  16. (0, _jquery.default)(document).ready(function ($$$1) {
  17. (0, _Site.run)();
  18. }); // Example Popup Gallery
  19. // ---------------------
  20. var galleryNum = (0, _jquery.default)('.imgs-gallery').length;
  21. for (var i = 0; i < galleryNum; i++) {
  22. (0, _jquery.default)((0, _jquery.default)('.imgs-gallery')[i]).magnificPopup({
  23. delegate: 'a',
  24. type: 'image',
  25. tLoading: 'Loading image #%curr%...',
  26. mainClass: 'mfp-img-mobile',
  27. gallery: {
  28. enabled: true,
  29. navigateByImgClick: true,
  30. preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
  31. },
  32. image: {
  33. tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
  34. titleSrc: function titleSrc(item) {
  35. return item.el.attr('title') + '<small>by amazingSurge</small>';
  36. }
  37. }
  38. });
  39. } //bind input focus
  40. (0, _jquery.default)('.wall-comment-reply .form-control').on('focus', function (event) {
  41. var $this = (0, _jquery.default)(this);
  42. $operation = $this.closest('form').find('.reply-opration');
  43. if (!$operation.hasClass('is-show')) {
  44. $operation.addClass('is-show');
  45. }
  46. event.stopPropagation();
  47. });
  48. });