Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -1,8 +1,8 @@
|
||||
;(function($,_,undefined){"use strict";ips.controller.register('core.front.profile.followers',{_feedID:null,initialize:function(){this.on(document,'followingItem',this.followUser);this.on('menuItemSelected',"[data-role='followOption']",this.toggleFollowOption);this.setup();},setup:function(){this._feedID=this.scope.attr('data-feedID');},followUser:function(e,data){if(data.feedID!=this._feedID){return;}
|
||||
var self=this;var memberID=data.feedID.replace('member-','');ips.getAjax()(ips.getSetting('baseURL')+'index.php?app=core&module=members&controller=profile&do=followers&id='+parseInt(memberID)).done(function(response){self.scope.html(response);}).fail(function(){Debug.log('Error fetching follower HTML');});},toggleFollowOption:function(e,data){data.originalEvent.preventDefault();var url=data.menuElem.find('[data-ipsMenuValue="'+data.selectedItemID+'"] a').attr('href');ips.getAjax()(url).done(function(response){ips.ui.flashMsg.show(ips.getString('followerSettingToggled'));}).fail(function(){window.location=url;});}});}(jQuery,_));;
|
||||
var self=this;var memberID=data.feedID.replace('member-','');ips.getAjax()(ips.getSetting('baseURL')+'index.php?app=core&module=members&controller=profile&do=followers&id='+parseInt(memberID)).done(function(response){self.scope.html(response);}).fail(function(){Debug.log('Error fetching follower HTML');});},toggleFollowOption:function(e,data=e.detail){data.originalEvent.preventDefault();var url=$(data.menuElem).find('[data-ipsMenuValue="'+data.selectedItemID+'"]').attr('href');ips.getAjax()(url).done(function(response){ips.ui.flashMsg.show(ips.getString('followerSettingToggled'));}).fail(function(){window.location=url;});}});}(jQuery,_));;
|
||||
;(function($,_,undefined){"use strict";ips.controller.register('core.front.profile.toggleBlock',{initialize:function(){this.on('click','[data-action="disable"]',this.toggleBlock);this.on('click','[data-action="enable"]',this.toggleBlock);},toggleBlock:function(e){e.preventDefault();var self=this;this.scope.css({opacity:"0.6"});ips.getAjax()($(e.currentTarget).attr('href'),{showLoading:true}).done(function(response){self.scope.html(response);$(document).trigger('contentChange',[self.scope]);}).fail(function(){window.location=$(e.currentTarget).attr('href');}).always(function(){self.scope.css({opacity:"1"});});}});}(jQuery,_));;
|
||||
;(function($,_){"use strict";ips.controller.register('core.front.profile.main',{contentArea:null,lastType:null,initialize(){this.on('click','[data-action="goToProfile"]',this.changeType);this.on('click','[data-action="browseContent"]',this.changeType);this.on('click','[data-action="repLog"]',this.changeType);this.on('click','[data-action="badgeLog"]',this.changeType);this.on('click','[data-action="solutionLog"]',this.changeType);this.on(window,'historychange',this.stateChange);this.setup();},_getHistoryStateFromPage(){const elem=this.scope.get(0)
|
||||
const selectorMap={browseContent:'#elUserContent',repLog:'#elUserReputation',badgeLog:'.cProfileBadgeGrid'}
|
||||
const selectorMap={browseContent:'#elUserContent',repLog:'#elUserReputation',badgeLog:'.cProfileBadgeGrid',solutionLog:'#elUserSolutions'}
|
||||
for(const state in selectorMap){if(elem.querySelector(selectorMap[state])){return state}}
|
||||
return"goToProfile"},setup(){this.contentArea=this.scope.find('[data-role="profileContent"]');this.contentHeader=this.scope.find('[data-role="profileHeader"]');if(!ips.utils.history.getState('profile')?.section){ips.utils.history.replaceState({section:this._getHistoryStateFromPage()},'profile',window.location.href);}},stateChange(e){if(e.detail?.type==='load'||e.detail?.type==='replace'){return}
|
||||
const url=window.location.href
|
||||
|
||||
Reference in new issue
Block a user