webpackJsonp([32],{ /***/ 1674: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = ImageLayerOfCommentHOC; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ImageLayer__ = __webpack_require__(359); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_educoder__ = __webpack_require__(5); var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};return function wrap(WrappedComponent){return function(_Component){_inherits(Wrapper,_Component);function Wrapper(props){_classCallCheck(this,Wrapper);var _this=_possibleConstructorReturn(this,(Wrapper.__proto__||Object.getPrototypeOf(Wrapper)).call(this,props));_this.onDelegateClick=function(event){var imageSrc=event.target.src||event.target.getAttribute('src')||event.target.getAttribute('href');// 判断imageSrc是否是图片 var fileName=event.target.innerHTML.trim();if(Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["Z" /* isImageExtension */])(imageSrc.trim())||Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["Z" /* isImageExtension */])(fileName)||event.target.tagName=='IMG'){// 非回复里的头像图片; 非emoticons if(imageSrc.indexOf('/images/avatars/User')===-1&&imageSrc.indexOf('kindeditor/plugins/emoticons')===-1){_this.setState({showImage:true,imageSrc:imageSrc});}event.stopPropagation();event.preventDefault&&event.preventDefault();event.originalEvent.preventDefault();// event.originalEvent.stopPropagation() // event.originalEvent.cancelBubble = true return false;}};_this.onImageLayerClose=function(){_this.setState({showImage:false,imageSrc:''});};_this.MdifHasAnchorJustScorll=function(){//mdhash滚动 var anchor=decodeURI(_this.props.location.hash).replace('#','');// 对应id的话, 滚动到相应位置 if(!!anchor){var anchorElement=document.getElementsByName(anchor);if(anchorElement){if(anchorElement.length!=0){anchorElement[anchorElement.length-1].scrollIntoView();}}}};_this.state={showImage:false,imageSrc:''};return _this;}_createClass(Wrapper,[{key:'componentDidMount',// jQuery._data( $('.newMain')[0], "events" ) value:function componentDidMount(){var _this2=this;this.props.wrappedComponentRef&&this.props.wrappedComponentRef(this.refs['wrappedComponentRef']);// commentsDelegateParent #game_left_contents #tab_con_4 setTimeout(function(){$(options.parentSelector||".commentsDelegateParent").delegate(options.imgSelector||".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click",_this2.onDelegateClick);},1200);}},{key:'componentWillUnmount',value:function componentWillUnmount(){$(options.parentSelector||".commentsDelegateParent",'click',this.onDelegateClick);}},{key:'render',value:function render(){this.MdifHasAnchorJustScorll();return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__ImageLayer__["a" /* default */],Object.assign({},this.state,{onImageLayerClose:this.onImageLayerClose})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent,Object.assign({},this.props,{ref:'wrappedComponentRef'})));}}]);return Wrapper;}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);};} /***/ }), /***/ 2441: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a