Blame view

public/js/dist/moderators.5287fdac697f8eb8b785.js 4.56 KB
e77200db5   nologostudio.ru   Initial commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  (window.webpackJsonp=window.webpackJsonp||[]).push([["0bd3"],{"34XA":function(n,t){angular.module("footyroom").component("banWizard",{template:'
          <div fr-litelay="$ctrl.isSaving || $ctrl.isLoading">
              <div class="modal-body">
                  <div ng-if="!$ctrl.isLoading">
                      <div ng-if="!$ctrl.isRequestingPermaban">
                          <div ng-if="$ctrl.warning" ng-bind-html="$ctrl.warning"></div>
                          
                          <span>Ban this user from commenting for </span>
                          <select class="ban-duration" ng-model="$ctrl.duration" ng-change="onDurationChange()">
                              <option value="600">10 minutes</option>
                              <option value="3600">1 hour</option>
                              <option value="36000">10 hours</option>
                              <option value="86400">1 day</option>
                              <option value="172800">2 days</option>
                              <option value="604800">1 week</option>
                              <option value="2592000">1 month</option>
                          </select>
                      </div>
  
                      <div ng-if="$ctrl.isRequestingPermaban">
                          <textarea ng-model="$ctrl.explanation" class="form-control" rows="10" placeholder="Please give some explanation why you think this user deserves a permanent ban"></textarea>
                      </div>
                  </div>
              </div>
              <div class="modal-footer">
                  <div class="pull-left">
                      <button ng-click="$ctrl.isRequestingPermaban = true" ng-if="!$ctrl.isRequestingPermaban" class="btn btn-default">Request Permaban</button>
                      <button ng-click="$ctrl.isRequestingPermaban = false" ng-if="$ctrl.isRequestingPermaban" class="btn btn-default">Ban Temporarily</button>
                  </div>
                  <div class="pull-right">
                      <button class="btn btn-default" ng-click="$ctrl.dismiss()">Cancel</button>
                      <button class="btn btn-primary" ng-click="$ctrl.ban()" ng-if="!$ctrl.isRequestingPermaban">Ban</button>
                      <button class="btn btn-primary" ng-click="$ctrl.permaban()" ng-if="$ctrl.isRequestingPermaban">Send Request</button>
                  </div>
              </div>
          </div>
      ',bindings:{userId:"<",dismiss:"&"},controller:["$http","$sce",function(n,t){var o=this;function e(t,e){return o.isSaving=!0,n.post(t,e).then(function(){return o.dismiss()}).catch(function(n){alert(n.data.errors)}).finally(function(){o.isSaving=!1})}o.ban=function(){e("/bans",{entity:"user_id",value:o.userId,type:"comment",duration:o.duration})},o.permaban=function(){e("/bans/request-permaban",{userId:o.userId,explanation:o.explanation})},o.duration="600",o.isLoading=!0,n.get("/bans/active-pagelet",{params:{userId:o.userId,type:"comment"}}).then(function(n){o.warning=t.trustAsHtml(n.data)}).finally(function(){o.isLoading=!1})}]})},LY9d:function(n,t){angular.module("footyroom").controller("PuppetsController",["$http",function(n){var t=this,o=0;function e(){n.get("/puppets.json",{params:{offset:o,username:t.username}}).success(function(n){t.accounts=o>0?t.accounts.concat(n):n})}t.loadMore=function(){o+=20,e()},t.searchAccounts=function(){o=0,e()},t.getAccounts=e,e()}])},bMx2:function(n,t){angular.module("footyroom").controller("BansOverviewController",["$http","$uibModal",function(n,t){var o=this,e=0;function a(){n.get("/bans/summaries.json",{params:{sortBy:o.sortBy,offset:e,username:o.username}}).success(function(n){o.summaries=e>0?o.summaries.concat(n.data):n.data})}o.sortBy="latestBan",o.setSort=function(n){if(o.sortBy===n)return;e=0,o.sortBy=n,a()},o.loadMore=function(){e+=20,a()},o.getBans=function(o){t.open({templateUrl:"/views/ng/modal/userBanList.html",controllerAs:"ctrl",bindToController:!0,controller:function(){var t=this;n.get("/bans.json",{params:{userId:o}}).success(function(n){t.bans=n.data})}})},o.searchUser=function(){e=0,a()},o.getSummaries=a,a()}])},zfoX:function(n,t,o){"use strict";o.r(t);o("bMx2"),o("LY9d");var e=o("hh57");angular.module("footyroom").controller("FlagsReportController",["$scope","$element","$http","$window",function(n,t,o,a){var i=this;i.clear=function(){t.find(".comment-action-errors").html("").hide(),o.post("/flags/clear",{commentId:i.commentId}).then(function(n){t.remove(),a.location.reload()}).catch(function(n){Object(e.a)(n.data.errors,".comment-action-errors","#comment"+i.commentId)})},i.$onInit=void(i.commentId=t.data("commentId"))}]);o("34XA")}},[["zfoX","d41d","91fe"]]]);