Commit 661e0da7c1c6d1b9c1736fe5ae285a0c6923af14
1 parent
e523c967
点播详情页、评论列表页、评论详情页添加
Showing
6 changed files
with
1923 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
| ... | ... | @@ -9,10 +9,7 @@ import com.cnlive.shenhe.utils.AuditPass; |
| 9 | 9 | import com.cnlive.shenhe.utils.CommonUtils; |
| 10 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 11 | 11 | import org.springframework.stereotype.Controller; |
| 12 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | -import org.springframework.web.bind.annotation.ResponseBody; | |
| 12 | +import org.springframework.web.bind.annotation.*; | |
| 16 | 13 | |
| 17 | 14 | import javax.servlet.http.HttpSession; |
| 18 | 15 | |
| ... | ... | @@ -85,4 +82,14 @@ public class CommentsController { |
| 85 | 82 | public Object getDetailsComments(Integer id) { |
| 86 | 83 | return commentsService.getDetailsComment(id); |
| 87 | 84 | } |
| 85 | + | |
| 86 | + @GetMapping("/detail") | |
| 87 | + public String detail() { | |
| 88 | + return "page/commentDetail.html"; | |
| 89 | + } | |
| 90 | + @GetMapping("/list") | |
| 91 | + public String list() { | |
| 92 | + return "page/comment.html"; | |
| 93 | + } | |
| 94 | + | |
| 88 | 95 | } | ... | ... |
src/main/resources/static/css/select2.min.css
0 → 100644
| 1 | +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none;}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px;}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none;}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap;}.select2-container .select2-search--inline{float:left;}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051;}.select2-results{display:block;}.select2-results__options{list-style:none;margin:0;padding:0;}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none;}.select2-results__option[aria-selected]{cursor:pointer;}.select2-container--open .select2-dropdown{left:0;}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}.select2-search--dropdown{display:block;padding:4px;}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box;}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}.select2-search--dropdown.select2-search--hide{display:none;}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0);}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px;}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px;}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto;}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default;}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none;}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%;}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left;}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px;}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder{float:right;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto;}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0;}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default;}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none;}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0;}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa;}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto;}.select2-container--default .select2-results__option[role=group]{padding:0;}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999;}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd;}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em;}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white;}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;}.select2-container--classic .select2-selection--single{background-color:#f6f6f6;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #ffffff 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, #ffffff 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, #ffffff 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px;}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999;}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0);}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto;}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb;}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none;}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #ffffff 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, #ffffff 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #ffffff 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #ffffff 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #ffffff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto;}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;}.select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}.select2-container--classic .select2-dropdown--above{border-bottom:none;}.select2-container--classic .select2-dropdown--below{border-top:none;}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto;}.select2-container--classic .select2-results__option[role=group]{padding:0;}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey;}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:white;}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;} | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/main/resources/static/js/select2.full.min.js
0 → 100644
| 1 | +/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){return n.apply(b,v.call(arguments,0).concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),this.$results.append(d)},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";{a(h)}this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b){var c=this,d=b.id+"-results";this.$results.attr("id",d),b.on("results:all",function(a){c.clear(),c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("results:append",function(a){c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("query",function(a){c.showLoading(a)}),b.on("select",function(){b.isOpen()&&c.setClasses()}),b.on("unselect",function(){b.isOpen()&&c.setClasses()}),b.on("open",function(){c.$results.attr("aria-expanded","true"),c.$results.attr("aria-hidden","false"),c.setClasses(),c.ensureHighlightVisible()}),b.on("close",function(){c.$results.attr("aria-expanded","false"),c.$results.attr("aria-hidden","true"),c.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=c.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=c.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?c.trigger("close"):c.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a);if(0!==d){var e=d-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top,h=f.offset().top,i=c.$results.scrollTop()+(h-g);0===e?c.$results.scrollTop(0):0>h-g&&c.$results.scrollTop(i)}}),b.on("results:next",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a),e=d+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top+c.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=c.$results.scrollTop()+h-g;0===e?c.$results.scrollTop(0):h>g&&c.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){c.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=c.$results.scrollTop(),d=c.$results.get(0).scrollHeight-c.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&d<=c.$results.height();e?(c.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(c.$results.scrollTop(c.$results.get(0).scrollHeight-c.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var d=a(this),e=d.data("data");return"true"===d.attr("aria-selected")?void(c.options.get("multiple")?c.trigger("unselect",{originalEvent:b,data:e}):c.trigger("close")):void c.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var b=a(this).data("data");c.getHighlightedResults().removeClass("select2-results__option--highlighted"),c.trigger("results:focus",{data:b,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a){var b=this,d=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){b.trigger("focus",a)}),this.$selection.on("blur",function(a){b.trigger("blur",a)}),this.$selection.on("keydown",function(a){b.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){b.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){b.update(a.data)}),a.on("open",function(){b.$selection.attr("aria-expanded","true"),b.$selection.attr("aria-owns",d),b._attachCloseHandler(a)}),a.on("close",function(){b.$selection.attr("aria-expanded","false"),b.$selection.removeAttr("aria-activedescendant"),b.$selection.removeAttr("aria-owns"),b.$selection.focus(),b._detachCloseHandler(a)}),a.on("enable",function(){b.$selection.attr("tabindex",b._tabindex)}),a.on("disable",function(){b.$selection.attr("tabindex","-1")})},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},d.prototype.bind=function(a){var b=this;d.__super__.bind.apply(this,arguments);var c=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",c),this.$selection.attr("aria-labelledby",c),this.$selection.on("mousedown",function(a){1===a.which&&b.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),a.on("selection:update",function(a){b.update(a.data)})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){return a("<span></span>")},d.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.display(b),d=this.$selection.find(".select2-selection__rendered");d.empty().append(c),d.prop("title",b.title||b.text)},d}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(){var b=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){b.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(c){var d=a(this),e=d.parent(),f=e.data("data");b.trigger("unselect",{originalEvent:c,data:f})})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.display(e),g=this.selectionContainer();g.append(f),g.prop("title",e.title||e.text),g.data("data",e),b.push(g)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(){function a(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},a.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},a}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle")}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus()}),b.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.focus()}),b.on("enable",function(){e.$search.prop("disabled",!1)}),b.on("disable",function(){e.$search.prop("disabled",!0)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e.trigger("blur",a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}}),this.$selection.on("input",".select2-search--inline",function(){e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input",".select2-search--inline",function(a){e.handleSearch(a)})},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.trigger("open"),this.$search.val(b.text+" ")},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a){var b=this;this.container=a,a.on("select",function(a){b.select(a.data)}),a.on("unselect",function(a){b.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={}; | |
| 2 | +if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=(c.extend(!0,{},l,j),this.option(l));k.replaceWith(m)}else{var n=this.option(j);if(j.children){var o=this.convertToOptions(j.children);b.appendMany(n,o)}h.push(n)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(b,c){this.ajaxOptions=this._applyDefaults(c.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),a.__super__.constructor.call(this,b,c)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return{q:a.term}},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url(a)),"function"==typeof f.data&&(f.data=f.data(a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(){var b=(this._lastTag,this.$element.find("option[data-select2-tag]"));b.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.select(a)}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);e(m),g=g.substr(h+1)||"",h=0}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.position=function(){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a){function b(){}return b.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},b.prototype.handleSearch=function(){if(!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},b.prototype.showSearch=function(){return!0},b}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="option load-more" role="treeitem"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(a,b,c){this.$dropdownParent=c.get("dropdownParent")||document.body,a.call(this,b,c)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c){var d=this,e="scroll.select2."+c.id,f="resize.select2."+c.id,g="orientationchange.select2."+c.id,h=this.$container.parents().filter(b.hasScroll);h.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),h.on(e,function(){var b=a(this).data("select2-scroll-position");a(this).scrollTop(b.y)}),a(window).on(e+" "+f+" "+g,function(){d._positionDropdown(),d._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c){var d="scroll.select2."+c.id,e="resize.select2."+c.id,f="orientationchange.select2."+c.id,g=this.$container.parents().filter(b.hasScroll);g.off(d),a(window).off(d+" "+e+" "+f)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){this.$dropdownContainer.width();var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();a.length<1||this.trigger("select",{data:a.data("data")})},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close")},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(l.dataAdapter=null!=l.ajax?o:null!=l.data?n:m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.selectionAdapter=l.multiple?e:d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=a.prop("dir")?a.prop("dir"):a.closest("[dir]").prop("dir")?a.closest("[dir]").prop("dir"):"ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("focus",function(){a.$container.addClass("select2-container--focus")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open"),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ENTER?(a.trigger("results:select"),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle"),b.preventDefault()):c===d.UP?(a.trigger("results:previous"),b.preventDefault()):c===d.DOWN?(a.trigger("results:next"),b.preventDefault()):(c===d.ESC||c===d.TAB)&&(a.close(),b.preventDefault()):(c===d.ENTER||c===d.SPACE||(c===d.DOWN||c===d.UP)&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable")):this.trigger("enable")},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||(this.trigger("query",{}),this.trigger("open"))},e.prototype.close=function(){this.isOpen()&&this.trigger("close")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e]; | |
| 3 | +b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(a,b,c,d){if(b("jquery.mousewheel"),null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){{var d=a.extend({},b,!0);new c(a(this),d)}}),this;if("string"==typeof b){var d=this.data("select2");null==d&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var f=Array.prototype.slice.call(arguments,1),g=d[b](f);return a.inArray(b,e)>-1?this:g}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery.mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}); | |
| 0 | 4 | \ No newline at end of file | ... | ... |
src/main/resources/templates/page/comment.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<!-- saved from url=(0033)http://shenhe.cnlive.com/comments --> | |
| 3 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 4 | +<head th:replace="../templates/common/head::head"></head> | |
| 5 | + | |
| 6 | +<body class="skin-blue sidebar-mini"> | |
| 7 | + | |
| 8 | +<div class="wrapper"> | |
| 9 | + | |
| 10 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 11 | + | |
| 12 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 13 | + <section class="content-header"> | |
| 14 | + <h1> | |
| 15 | + 评论审核 | |
| 16 | + | |
| 17 | + </h1> | |
| 18 | + <ol class="breadcrumb"> | |
| 19 | + <li><a href="http://shenhe.cnlive.com/index"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 20 | + <li class="active">评论审核</li> | |
| 21 | + </ol> | |
| 22 | + </section> | |
| 23 | + <section class="content"> | |
| 24 | + <div class="row"> | |
| 25 | + <div class="col-md-12"> | |
| 26 | + <div class="box box-info"> | |
| 27 | + <div class="box-body"> | |
| 28 | + <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 29 | + <div class="modal-dialog"> | |
| 30 | + <div class="modal-content"> | |
| 31 | + <div class="modal-header"> | |
| 32 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> ×</button> | |
| 33 | + <h4 class="modal-title">温馨提示</h4> | |
| 34 | + </div> | |
| 35 | + <div class="modal-body" id="msg">您确认删除该条信息吗?</div> | |
| 36 | + <div class="modal-footer"> | |
| 37 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 38 | + <button type="button" class="btn btn-primary" id="modal_remove">确认</button> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + </div> | |
| 42 | + </div> <div class="clearfix"> | |
| 43 | + <div class="btn-group margin-bottom pull-left"> | |
| 44 | + <input type="hidden" name="state" id="state" value="2"> | |
| 45 | + <div class="btn-group margin-bottom" id="hide_select_area_2" style="display: none;"> | |
| 46 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim" id="claim" data-toggle="modal" data-target="#modal">认领 | |
| 47 | + </button> | |
| 48 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim100" id="claim100" data-toggle="modal" data-target="#modal">认领100条 | |
| 49 | + </button> | |
| 50 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim1000" id="claim1000" data-toggle="modal" data-target="#modal">认领1000条 | |
| 51 | + </button> | |
| 52 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim10000" id="claim10000" data-toggle="modal" data-target="#modal">认领10000条 | |
| 53 | + </button> | |
| 54 | + </div> | |
| 55 | + | |
| 56 | + <div class="btn-group margin-bottom" id="hide_select_area" style=""> | |
| 57 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom" value="2" data="claim" data-toggle="modal" data-target="#modal" id="more_pass">批量通过 | |
| 58 | + </button> | |
| 59 | + <button type="button" class="btn btn-danger btn-sm margin-r-5 action_bottom" value="2" data="claim" data-toggle="modal" data-target="#modal" id="more_reject">批量拒绝 | |
| 60 | + </button> | |
| 61 | + </div> | |
| 62 | + | |
| 63 | + </div> | |
| 64 | + | |
| 65 | + <div class="btn-group margin-bottom pull-right"> | |
| 66 | + <button type="button" class="btn btn-sm margin-r-5 filter" id="" value="0"> | |
| 67 | + 全部 | |
| 68 | + </button> | |
| 69 | + <button type="button" class="btn btn-sm margin-r-5 filter" value="1">全部待领 | |
| 70 | + </button> | |
| 71 | + <button type="button" class="btn btn-sm margin-r-5 filter btn-info" value="2">我的待审 | |
| 72 | + </button> | |
| 73 | + <!-- <button type="button" class="btn btn-sm margin-r-5 filter" | |
| 74 | + value="3">我的已审核 | |
| 75 | + </button> | |
| 76 | + <button type="button" class="btn btn-sm margin-r-5 filter" | |
| 77 | + value="4">我的未通过 | |
| 78 | + </button> --> | |
| 79 | + <button type="button" class="btn btn-sm margin-r-5 filter" value="7">我的已审 | |
| 80 | + </button> | |
| 81 | + | |
| 82 | + <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" onclick="openOrClose('forms')">查询 | |
| 83 | + <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | |
| 84 | + </button> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + | |
| 88 | + | |
| 89 | + <div class="form-horizontal form-group-sm" id="forms" style="display: none;"> | |
| 90 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;"> | |
| 91 | + <div class="col-md-5" style="padding: 0"> | |
| 92 | + <label for="activity_id" class="control-label cb-toolbar">活动id:</label> | |
| 93 | + <div class="col-sm-9" style="padding: 0;"> | |
| 94 | + <input class="form-control" name="activity_id" type="text" id="activity_id"> | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + <div class="col-md-4" style="padding: 0"> | |
| 98 | + <label for="content" class="control-label cb-toolbar">内容:</label> | |
| 99 | + <div class="col-sm-9" style="padding: 0;"> | |
| 100 | + <input class="form-control" name="content" type="text" id="content"> | |
| 101 | + </div> | |
| 102 | + </div> | |
| 103 | + <div class="col-md-3" style="padding: 0"> | |
| 104 | + <label for="is_hot" class="control-label cb-toolbar">是否热点:</label> | |
| 105 | + <div class="col-sm-7" style="padding: 0;"> | |
| 106 | + <select class="form-control col-sm-2" id="is_hot" name="is_hot"><option value="0">全部</option><option value="2">是</option><option value="1">否</option></select> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + | |
| 110 | + | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + <div class="btn-group margin-bottom col-md-6 pull-right" style="padding: 0"> | |
| 114 | + <div class="col-md-11" style="width: 88%;padding: 0;"> | |
| 115 | + <div class="col-md-6" style="padding: 0"> | |
| 116 | + <label for="start_date" class="control-label cb-toolbar">时间:</label> | |
| 117 | + <div class="input-group col-md-9 date"> | |
| 118 | + <input class="form-control date" name="start_date" type="text" id="start_date"> | |
| 119 | + <span class="input-group-addon"> | |
| 120 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 121 | + </span> | |
| 122 | + </div> | |
| 123 | + </div> | |
| 124 | + <div class="col-md-6" style="padding: 0"> | |
| 125 | + <label for="start_date" class="control-label cb-toolbar">至</label> | |
| 126 | + <div class="input-group col-md-9 date"> | |
| 127 | + <input class="form-control date" name="end_date" type="text"> | |
| 128 | + <span class="input-group-addon"> | |
| 129 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 130 | + </span> | |
| 131 | + </div> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + | |
| 135 | + </div> | |
| 136 | + | |
| 137 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;"> | |
| 138 | + | |
| 139 | + <div class="col-md-4" style="padding: 0"> | |
| 140 | + <label for="auditor" class="control-label cb-toolbar">审核员:</label> | |
| 141 | + <div class="col-sm-7" style="padding: 0;"> | |
| 142 | + <input class="form-control" name="auditor" type="text" id="auditor"> | |
| 143 | + </div> | |
| 144 | + </div> | |
| 145 | + <div class="col-md-1 text-center" style="width: 12%;padding: 0"> | |
| 146 | + <button type="button" class="btn btn-info btn-sm" id="comments_query">查 询</button> | |
| 147 | + </div> | |
| 148 | + </div> | |
| 149 | + </div> | |
| 150 | + | |
| 151 | + <script> | |
| 152 | + | |
| 153 | + //定义一个存储状态 | |
| 154 | + var form_state = | |
| 155 | + | |
| 156 | + $(function () { | |
| 157 | +// $(this).addClass('btn-info'); | |
| 158 | +// $(this).siblings().removeClass('btn-info'); | |
| 159 | + | |
| 160 | + }); | |
| 161 | + /*批量操作 --认领*/ | |
| 162 | + var claim_open = false; | |
| 163 | + var remove_open = false; | |
| 164 | + $("#modal_remove").delegate(this, "click", function () { | |
| 165 | + | |
| 166 | + var flag = $(this).attr('claim'); | |
| 167 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 168 | + | |
| 169 | + if (flag == 'more_pass') { //批量通过 | |
| 170 | + var ids = []; | |
| 171 | + for (var i = 0; i < rows.length; i++) { | |
| 172 | + ids[ids.length] = rows[i].id; | |
| 173 | + } | |
| 174 | +// var state = 7; | |
| 175 | + $.ajax({ | |
| 176 | + url: '/comments/morepassreject', | |
| 177 | + type: 'POST', | |
| 178 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'ids': ids, 'flag': flag}, | |
| 179 | + success: function () { | |
| 180 | + window.location.reload(); | |
| 181 | +// window.location.href = '/comments'+ '?state=' + state; | |
| 182 | + } | |
| 183 | + }); | |
| 184 | + } else if (flag == 'more_reject') { //批量拒绝 | |
| 185 | + // alert('more_reject');return false; | |
| 186 | + var ids = []; | |
| 187 | + for (var i = 0; i < rows.length; i++) { | |
| 188 | + ids[ids.length] = rows[i].id; | |
| 189 | + } | |
| 190 | +// var state = 7; | |
| 191 | + $.ajax({ | |
| 192 | + url: '/comments/morepassreject', | |
| 193 | + type: 'POST', | |
| 194 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'ids': ids, 'flag': flag}, | |
| 195 | + success: function () { | |
| 196 | + window.location.reload(); | |
| 197 | +// window.location.href = '/comments'+ '?state=' + state; | |
| 198 | + } | |
| 199 | + }); | |
| 200 | + } else { | |
| 201 | + // alert('claim');return false; | |
| 202 | + if (claim_open == true) { | |
| 203 | + return false; | |
| 204 | + } | |
| 205 | + if (remove_open == true) { //这样的话是true,就是单个操作 | |
| 206 | + return false; | |
| 207 | + } | |
| 208 | + var status = $('.action').val(); | |
| 209 | + | |
| 210 | + | |
| 211 | + if (flag == 'claim') { | |
| 212 | + var ids = []; | |
| 213 | + for (var i = 0; i < rows.length; i++) { | |
| 214 | + ids[ids.length] = rows[i].id; | |
| 215 | + } | |
| 216 | + } else { | |
| 217 | + $ids = ''; | |
| 218 | + } | |
| 219 | + var state =2; | |
| 220 | + | |
| 221 | + $.ajax({ | |
| 222 | + url: '/comments/status/' + status, | |
| 223 | + type: 'POST', | |
| 224 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'ids': ids, 'flag': flag}, | |
| 225 | + success: function () { | |
| 226 | + window.location.href = '/comments'+ '?state=' + state; | |
| 227 | + } | |
| 228 | + }); | |
| 229 | + } | |
| 230 | + | |
| 231 | + }); | |
| 232 | + | |
| 233 | + | |
| 234 | + /* 筛选 状态 */ | |
| 235 | + $('.filter').click(function () { | |
| 236 | + var object = $('#forms input').serializeObject(); | |
| 237 | + object['state'] = $(this).val(); | |
| 238 | + switch ($(this).val()) { | |
| 239 | + case "1": | |
| 240 | + $(this).addClass('btn-info'); | |
| 241 | + $(this).siblings().removeClass('btn-info'); | |
| 242 | + $('#hide_select_area').hide(); | |
| 243 | + $('#hide_select_area_2').show(); | |
| 244 | + form_state = 1; //待领 | |
| 245 | + break; | |
| 246 | + case "2": | |
| 247 | + $(this).addClass('btn-info'); | |
| 248 | + $(this).siblings().removeClass('btn-info'); | |
| 249 | + $('#hide_select_area').show(); | |
| 250 | + $('#hide_select_area_2').hide(); | |
| 251 | + form_state = 2; //待审 | |
| 252 | + break; | |
| 253 | + case "7": | |
| 254 | + $(this).addClass('btn-info'); | |
| 255 | + $(this).siblings().removeClass('btn-info'); | |
| 256 | + $('#hide_select_area_2').hide(); | |
| 257 | + $('#hide_select_area').hide(); | |
| 258 | + form_state = 7; //我的已审 | |
| 259 | + break; | |
| 260 | + default: | |
| 261 | + $(this).addClass('btn-info'); | |
| 262 | + $(this).siblings().removeClass('btn-info'); | |
| 263 | + $('#hide_select_area').hide(); | |
| 264 | + $('#hide_select_area_2').hide(); | |
| 265 | + form_state = 0; //全部 | |
| 266 | + break; | |
| 267 | + } | |
| 268 | + object['_token'] = 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8'; | |
| 269 | + $('#state').val(object['state']); | |
| 270 | + $('#table').bootstrapTable('selectPage', 1); | |
| 271 | + $('#table').bootstrapTable('refresh', {query: object}); | |
| 272 | + }); | |
| 273 | + | |
| 274 | + $('#a_down').hide(); | |
| 275 | + /*查询*/ | |
| 276 | + function openOrClose(id_name_str) { | |
| 277 | + var id_name = '#' + id_name_str; | |
| 278 | + if ($(id_name).css('display') == 'block') { | |
| 279 | + $(id_name).slideUp(350); | |
| 280 | + $('#a_up').show(); | |
| 281 | + $('#a_down').hide(); | |
| 282 | + } else { | |
| 283 | + $(id_name).slideDown(350); | |
| 284 | + $('#a_up').hide(); | |
| 285 | + $('#a_down').show(); | |
| 286 | + } | |
| 287 | + } | |
| 288 | + | |
| 289 | + /*时间插件*/ | |
| 290 | + $('.date').datetimepicker({ | |
| 291 | + format: 'YYYY-MM-DD HH:mm', | |
| 292 | + locale: "zh-CN", | |
| 293 | + toolbarPlacement: 'bottom', | |
| 294 | + showClear: true, | |
| 295 | + }); | |
| 296 | + | |
| 297 | + /*认领弹框操作*/ | |
| 298 | + $('.action').click(function () { | |
| 299 | + claim_open = false; | |
| 300 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 301 | + | |
| 302 | + var flag = $(this).attr('data'); | |
| 303 | + if (flag == 'claim') { | |
| 304 | + if (rows.length > 0) { | |
| 305 | + $('#msg').html('您确认认领这<strong><span class="text-danger">' + rows.length + '</span></strong>条信息吗?'); | |
| 306 | + $('#modal_remove').show(); | |
| 307 | + $('#modal_remove').attr('claim', 'claim'); | |
| 308 | + } else { | |
| 309 | + $('#msg').html('请选择要认领的数据!'); | |
| 310 | + $('#modal_remove').hide(); | |
| 311 | + } | |
| 312 | + } else if (flag == 'claim100') { | |
| 313 | + $('#msg').html('您确认认领这前<strong><span class="text-danger">' + '100' + '</span></strong>条信息吗?'); | |
| 314 | +// $('#claim100').show(); | |
| 315 | + $('#modal_remove').show(); | |
| 316 | + $('#modal_remove').attr('claim', 'claim100'); | |
| 317 | + } else if (flag == 'claim1000') { | |
| 318 | + $('#msg').html('您确认认领这前<strong><span class="text-danger">' + '1000' + '</span></strong>条信息吗?'); | |
| 319 | + $('#modal_remove').show(); | |
| 320 | + $('#modal_remove').attr('claim', 'claim1000'); | |
| 321 | + } else { | |
| 322 | + $('#msg').html('您确认认领这前<strong><span class="text-danger">' + '10000' + '</span></strong>条信息吗?'); | |
| 323 | + $('#modal_remove').show(); | |
| 324 | + $('#modal_remove').attr('claim', 'claim10000'); | |
| 325 | + } | |
| 326 | + }); | |
| 327 | + | |
| 328 | + </script> <div class="modal fade common" id="modal_comment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 329 | + <div class="modal-dialog"> | |
| 330 | + <div class="modal-content"> | |
| 331 | + <div class="modal-header"> | |
| 332 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> ×</button> | |
| 333 | + <h4 class="modal-title" id="modal_title"></h4> | |
| 334 | + </div> | |
| 335 | + <div class="modal-body"> | |
| 336 | + <div class="alert alert-danger" id="window_msg" style="display: none;"> | |
| 337 | + <p></p> | |
| 338 | + </div> | |
| 339 | + <div id="contents"> | |
| 340 | + </div> | |
| 341 | + </div> | |
| 342 | + </div> | |
| 343 | + </div> | |
| 344 | + </div> <div class="bootstrap-table"><div class="fixed-table-toolbar"></div><div class="fixed-table-container" style="padding-bottom: 0px;"><div class="fixed-table-header" style="display: none;"><table></table></div><div class="fixed-table-body"><div class="fixed-table-loading" style="top: 41px; display: none;">正在努力地加载数据中,请稍候……</div><table id="table" data-toggle="table" class="table table-hover coma-base-table fixed_headers table-striped" style="word-break:break-all;"> | |
| 345 | + <thead><tr><th class="bs-checkbox " style="width: 3%; " data-field="state" tabindex="0"><div class="th-inner "><input name="btSelectAll" type="checkbox"></div><div class="fht-cell"></div></th><th style="text-align: center; width: 5%; " data-field="sp_id_brief" tabindex="0"><div class="th-inner ">sp简称</div><div class="fht-cell"></div></th><th style="text-align: center; width: 5%; " data-field="comment_user_name" tabindex="0"><div class="th-inner ">用户昵称</div><div class="fht-cell"></div></th><th style="text-align: center; width: 6%; " data-field="comment_user_avatar" tabindex="0"><div class="th-inner ">用户头像 | |
| 346 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 6%; " data-field="comment_user_ip" tabindex="0"><div class="th-inner ">用户IP</div><div class="fht-cell"></div></th><th style="text-align: center; width: 22%; " data-field="content" tabindex="0"><div class="th-inner ">评论内容 | |
| 347 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 15%; " data-field="comment_title" tabindex="0"><div class="th-inner ">原文标题 | |
| 348 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 6%; " data-field="auditor" tabindex="0"><div class="th-inner ">审核员</div><div class="fht-cell"></div></th><th style="text-align: center; width: 4%; " data-field="mark_name" tabindex="0"><div class="th-inner ">白名单</div><div class="fht-cell"></div></th><th style="text-align: center; width: 4%; " data-field="is_hot_name" tabindex="0"><div class="th-inner ">热点</div><div class="fht-cell"></div></th><th style="text-align: center; width: 5%; " data-field="state_name_short" tabindex="0"><div class="th-inner ">状态 | |
| 349 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 8%; " data-field="comment_time" tabindex="0"><div class="th-inner ">评论上传时间</div><div class="fht-cell"></div></th><th style="text-align: center; width: 22%; " data-field="action" tabindex="0"><div class="th-inner ">操作 | |
| 350 | + </div><div class="fht-cell"></div></th></tr></thead><tbody><tr data-index="0"><td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 5%; ">网加加</td><td style="text-align: center; width: 5%; ">鱼</td><td style="text-align: center; width: 6%; "><div width="60px" height="60px"><img src="./审核云平台内容管理系统pl_files/1532077438500.jpg" width="60px" alt="用户头像"></div></td><td style="text-align: center; width: 6%; ">114.242.177.100</td><td style="text-align: center; width: 22%; "><a title="哈哈哈" style="font-weight:bold;font-size:16px;" data-toggle="tooltip" data-placement="right">哈哈哈</a></td><td style="text-align: center; width: 15%; "><a href="http://shenhe.cnlive.com/comments" target="_blank"></a></td><td style="text-align: center; width: 6%; ">发布 | |
| 351 | + openadmin9@cnlive.com</td><td style="text-align: center; width: 4%; ">否</td><td style="text-align: center; width: 4%; ">否</td><td style="text-align: center; width: 5%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 8%; ">2018-11-28 16:08:00</td><td style="text-align: center; width: 22%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal">退领</button></a><br><br><span style="margin-right:50px;"> </span><a class="pass_one" href="javascript:void(0)"><button class="btn btn-success btn-sm">通过</button></a><span> </span><a class="failed_one" href="javascript:void(0)"><button class="btn btn-danger btn-sm">拒绝</button></a></td></tr><tr data-index="1"><td class="bs-checkbox "><input data-index="1" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 5%; ">网加加</td><td style="text-align: center; width: 5%; ">178xxxx3068</td><td style="text-align: center; width: 6%; "><div width="60px" height="60px"><img src="./审核云平台内容管理系统pl_files/head_c.png" width="60px" alt="用户头像"></div></td><td style="text-align: center; width: 6%; ">120.253.57.223</td><td style="text-align: center; width: 22%; "><a title="不错" style="font-weight:bold;font-size:16px;" data-toggle="tooltip" data-placement="right">不错</a></td><td style="text-align: center; width: 15%; "><a href="http://shenhe.cnlive.com/comments" target="_blank"></a></td><td style="text-align: center; width: 6%; ">发布 | |
| 352 | + openadmin9@cnlive.com</td><td style="text-align: center; width: 4%; ">否</td><td style="text-align: center; width: 4%; ">否</td><td style="text-align: center; width: 5%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 8%; ">2018-11-28 14:25:00</td><td style="text-align: center; width: 22%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal">退领</button></a><br><br><span style="margin-right:50px;"> </span><a class="pass_one" href="javascript:void(0)"><button class="btn btn-success btn-sm">通过</button></a><span> </span><a class="failed_one" href="javascript:void(0)"><button class="btn btn-danger btn-sm">拒绝</button></a></td></tr></tbody></table></div><div class="fixed-table-footer" style="display: none;"><table><tbody><tr></tr></tbody></table></div><div class="fixed-table-pagination" style="display: block;"><div class="pull-left pagination-detail"><span class="pagination-info">显示第 1 到第 2 条记录,总共 2 条记录</span><span class="page-list" style="display: none;">每页显示 <span class="btn-group dropup"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="page-size">20</span> <span class="caret"></span></button><ul class="dropdown-menu" role="menu"><li><a href="javascript:void(0)">10</a></li></ul></span> 条记录</span></div><div class="pull-right pagination" style="display: none;"><ul class="pagination"><li class="page-pre"><a href="javascript:void(0)">‹</a></li><li class="page-number active"><a href="javascript:void(0)">1</a></li><li class="page-next"><a href="javascript:void(0)">›</a></li></ul></div></div></div></div><div class="clearfix"></div> | |
| 353 | + | |
| 354 | + </div> | |
| 355 | + </div> | |
| 356 | + </div> | |
| 357 | + </div> | |
| 358 | + <!-- <div class="btn-group margin-bottom" id="hide_select_area"> --> | |
| 359 | + | |
| 360 | + <!-- <button type="button" class="btn btn-sm margin-r-5" | |
| 361 | + id="select_all">全选 | |
| 362 | + </button> | |
| 363 | + | |
| 364 | + <button type="button" class="btn btn-sm margin-r-5" | |
| 365 | + id="no_select_all">反选 | |
| 366 | + </button> | |
| 367 | + <button type="button" class="btn btn-sm margin-r-5" | |
| 368 | + id="delete_all">清除 | |
| 369 | + </button> --> | |
| 370 | + | |
| 371 | + | |
| 372 | + <!-- </div> --> | |
| 373 | + </section><!-- /.content --> | |
| 374 | + </div> | |
| 375 | + <!-- /.content-wrapper --> | |
| 376 | + | |
| 377 | + <!-- 确认弹出框 --> | |
| 378 | + <div class="modal" id="action_note" role="dialog" aria-labelledby="myModalLabel"> | |
| 379 | + <div class="modal-dialog"> | |
| 380 | + <div class="modal-content"> | |
| 381 | + <div class="modal-header"> | |
| 382 | + <button type="button" class="close" data-dismiss="modal" id="close"> ×</button> | |
| 383 | + <h4 class="modal-title">温馨提示</h4> | |
| 384 | + </div> | |
| 385 | + <div class="modal-body" id="msg2"></div> | |
| 386 | + <div class="modal-footer"> | |
| 387 | + <button type="button" class="btn btn-default " data-dismiss="modal" id="action_note_no">取消</button> | |
| 388 | + <button type="button" class="btn btn-primary" id="action_note_yes">确认</button> | |
| 389 | + <input type="hidden" name="action_note_type" id="action_note_type" value=""> | |
| 390 | + <input type="hidden" name="action_note_id" id="action_note_id" value=""> | |
| 391 | + </div> | |
| 392 | + </div> | |
| 393 | + </div> | |
| 394 | + </div> | |
| 395 | + | |
| 396 | + | |
| 397 | + <script> | |
| 398 | + // $('#hide_select_area').hide(); | |
| 399 | + | |
| 400 | + /*查询字段效果*/ | |
| 401 | + $('#comments_query').click(function () { | |
| 402 | + $('#table').bootstrapTable('selectPage', 1); | |
| 403 | + }); | |
| 404 | + /*查询按钮操作*/ | |
| 405 | + $('#table').bootstrapTable({ | |
| 406 | + method: 'get', | |
| 407 | + url: '/comments/table', | |
| 408 | + pagination: true, | |
| 409 | + pageNumber: 1, | |
| 410 | + pageSize: 20, | |
| 411 | + pageList: [10, 25, 50, 100], | |
| 412 | + sidePagination: 'server', | |
| 413 | + clickToSelect: true, | |
| 414 | + striped: true, | |
| 415 | + queryParams: function (params) { | |
| 416 | + var object = $('#forms input').serializeObject(); | |
| 417 | + object['is_hot'] = $('#is_hot').val(); | |
| 418 | + object['state'] = $('#state').val(); | |
| 419 | + object['_token'] = 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8'; | |
| 420 | + object['offset'] = params.offset; | |
| 421 | + object['limit'] = params.limit; | |
| 422 | + return object; | |
| 423 | + }, | |
| 424 | + }); | |
| 425 | + | |
| 426 | + | |
| 427 | + /*认领---操作中按钮控制*/ | |
| 428 | + function actionFormatter(value, row, index) { | |
| 429 | + var disabled_claim = ''; | |
| 430 | + var disabled_passed = ''; | |
| 431 | + var disabled_nopass = ''; | |
| 432 | + var disabled_fail = ''; | |
| 433 | + | |
| 434 | + if (row.state_name == '未认领') { //如果是认领,查看和退领按钮不能用 | |
| 435 | + switch (row.state_name) { | |
| 436 | + case '未认领': | |
| 437 | + disabled_claim = 'disabled="disabled"'; | |
| 438 | + break; | |
| 439 | + } | |
| 440 | + return [ | |
| 441 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm" >认领</button></a>', | |
| 442 | + '<span> </span>', | |
| 443 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claim + '>查看</button></a>', | |
| 444 | + '<span> </span>', | |
| 445 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claim + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 446 | + | |
| 447 | + ].join(''); | |
| 448 | + | |
| 449 | + } | |
| 450 | + else if (row.state_name == '已认领,未审核') { //如果是未审核和已审核,则认领不能用 | |
| 451 | + switch (row.state_name) { | |
| 452 | + case '已认领,未审核': | |
| 453 | + disabled_passed = 'disabled="disabled"'; | |
| 454 | + break; | |
| 455 | + } | |
| 456 | + return [ | |
| 457 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_passed + '>认领</button></a>', | |
| 458 | + '<span> </span>', | |
| 459 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 460 | + '<span> </span>', | |
| 461 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 462 | + '<br/>', | |
| 463 | + '<br/>', | |
| 464 | + '<span style="margin-right:50px;"> </span>', | |
| 465 | + '<a class="pass_one" href="javascript:void(0)" ><button class="btn btn-success btn-sm" >通过</button></a>', | |
| 466 | + '<span> </span>', | |
| 467 | + '<a class="failed_one" href="javascript:void(0)"><button class="btn btn-danger btn-sm" >拒绝</button></a>', | |
| 468 | + ].join(''); | |
| 469 | + | |
| 470 | + } else if (row.state_name == '我的已审核') { | |
| 471 | + switch (row.state_name) { | |
| 472 | + case '我的已审核': | |
| 473 | + disabled_nopass = 'disabled="disabled"'; | |
| 474 | + break; | |
| 475 | + } | |
| 476 | + return [ | |
| 477 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_nopass + '>认领</button></a>', | |
| 478 | + '<span style="margin-right:50px;"> </span>', | |
| 479 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 480 | + '<br/>', | |
| 481 | + '<span> </span>', | |
| 482 | + '<br/>', | |
| 483 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_nopass + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 484 | + '<span style="margin-right:50px;"> </span>', | |
| 485 | + '<a class="log" href="javascript:void(0)"><button class="btn btn-primary btn-sm" >日志</button></a>', | |
| 486 | + ].join(''); | |
| 487 | + } else { | |
| 488 | + switch (row.state_name) { | |
| 489 | + case '我的未通过': | |
| 490 | + disabled_fail = 'disabled="disabled"'; | |
| 491 | + break; | |
| 492 | + } | |
| 493 | + return [ | |
| 494 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_fail + '>认领</button></a>', | |
| 495 | + '<span style="margin-right:50px;"> </span>', | |
| 496 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 497 | + '<br/>', | |
| 498 | + '<span> </span>', | |
| 499 | + '<br/>', | |
| 500 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_fail + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 501 | + '<span style="margin-right:50px;"> </span>', | |
| 502 | + '<a class="log" href="javascript:void(0)"><button class="btn btn-primary btn-sm" >日志</button></a>', | |
| 503 | + | |
| 504 | + ].join(''); | |
| 505 | + } | |
| 506 | + } | |
| 507 | + | |
| 508 | + $("#modal_remove").click(function () { | |
| 509 | + var row_id = $(this).data('id'); | |
| 510 | + | |
| 511 | + if (typeof(row_id) == "undefined") { | |
| 512 | + return false; | |
| 513 | + } | |
| 514 | +// $(".back").each(function(){ | |
| 515 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 516 | + if (rows[0].state_name == '已审核') { | |
| 517 | + $(this).attr('disabled', 'disabled'); | |
| 518 | + alert('未审核的不能退领!'); | |
| 519 | + return false; | |
| 520 | + } | |
| 521 | +// }); | |
| 522 | + | |
| 523 | + $.ajax({ | |
| 524 | + type: 'get', | |
| 525 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8'}, | |
| 526 | + url: '/comments/back/' + row_id, | |
| 527 | + success: function (data) { | |
| 528 | + window.location.href = '/comments'; | |
| 529 | + } | |
| 530 | + }); | |
| 531 | + }); | |
| 532 | + | |
| 533 | + | |
| 534 | + // $('#modal').modal('hide'); | |
| 535 | + $('#modal').on('hide.bs.modal', function (event) { | |
| 536 | + | |
| 537 | + }); | |
| 538 | + | |
| 539 | + /*操作按钮的点击事件*/ | |
| 540 | + window.actionEvents = { | |
| 541 | + 'click .claim': function (e, value, row, index) { | |
| 542 | + var state = 2; | |
| 543 | + $.ajax({ | |
| 544 | + type: 'get', | |
| 545 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8'}, | |
| 546 | + url: '/comments/claim/' + row.id, | |
| 547 | + success: function (data) { | |
| 548 | + if (data['status_code'] == 403) { | |
| 549 | + window.location.href = '/comments' + '?state=' + 1; | |
| 550 | + } else { | |
| 551 | + window.location.href = '/comments' + '?state=' + state; | |
| 552 | + } | |
| 553 | + } | |
| 554 | + }); | |
| 555 | + }, | |
| 556 | + 'click .detail': function (e, value, row, index) { | |
| 557 | + var state = form_state; | |
| 558 | + window.location.href = '/comments/detail/' + row.id + '?state=' + state; | |
| 559 | + }, | |
| 560 | + | |
| 561 | + 'click .back': function (e, value, row, index) { | |
| 562 | + remove_open = true; | |
| 563 | + $('#msg').html('您确认要退领该条评论信息吗?'); | |
| 564 | + $('#modal_remove').show(); | |
| 565 | + $('#modal_remove').data('id', row.id); | |
| 566 | + }, | |
| 567 | + 'click .log': function (e, value, row, index) { | |
| 568 | + var act_id = row.activity_id; | |
| 569 | + $.ajax({ | |
| 570 | + type: 'get', | |
| 571 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'act_id': act_id}, | |
| 572 | + url: '/comments/get_msg/', | |
| 573 | + success: function (data) { | |
| 574 | + if (data['status_code'] == 200) { | |
| 575 | + var msg = eval("(" + data['data'] + ")") | |
| 576 | + console.log(msg) | |
| 577 | + if (msg == '') { | |
| 578 | + alert('没有审核记录'); | |
| 579 | + return false; | |
| 580 | + } else { | |
| 581 | + alert(msg); | |
| 582 | + } | |
| 583 | + } | |
| 584 | + } | |
| 585 | + }); | |
| 586 | + // $('#msg').html('操作日志:'+ act_id ); | |
| 587 | + // $('#modal_remove').show(); | |
| 588 | + // $('#modal_remove').data('id', row.id); | |
| 589 | + }, | |
| 590 | + | |
| 591 | + 'click .pass_one': function (e, value, row, index) { | |
| 592 | + //var row_id = $("#comment_id").val(); | |
| 593 | + var attr_tags = '';//获取标签属性信息 | |
| 594 | + var msg = '首页-单条通过-操作'; //获取审核msg | |
| 595 | + | |
| 596 | + var state = form_state; | |
| 597 | + $.ajax({ | |
| 598 | + type: 'get', | |
| 599 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'attr_tags': attr_tags, 'msg': msg}, | |
| 600 | + url: '/comments/pass/' + row.id, | |
| 601 | + success: function (data) { | |
| 602 | + window.location.href = '/comments' + '?state=' + form_state; | |
| 603 | + } | |
| 604 | + }); | |
| 605 | + }, | |
| 606 | + 'click .failed_one': function (e, value, row, index) { | |
| 607 | + //拒绝弹出框 | |
| 608 | + $('#msg2').html('您确认要拒绝该条评论信息吗?'); | |
| 609 | + $('#action_note').show(); | |
| 610 | + $("#action_note_type").val('failed_one'); | |
| 611 | + $("#action_note_id").val(row.id); | |
| 612 | + | |
| 613 | + }, | |
| 614 | + | |
| 615 | + }; | |
| 616 | + //弹出框取消 | |
| 617 | + $("#action_note_no").click(function () { | |
| 618 | + $("#action_note").hide(); | |
| 619 | + }); | |
| 620 | + //弹出框确认 | |
| 621 | + $("#action_note_yes").click(function () { | |
| 622 | + var action_note_type = $("#action_note_type").val(); | |
| 623 | + var id = $("#action_note_id").val(); | |
| 624 | + if (action_note_type == 'failed_one') { | |
| 625 | + //var row_id = $("#comment_id").val(); | |
| 626 | + var attr_tags = '';//获取标签属性信息 | |
| 627 | + var msg = '首页-单条拒绝-操作'; //获取审核msg | |
| 628 | + var state = form_state; | |
| 629 | + $.ajax({ | |
| 630 | + type: 'get', | |
| 631 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'attr_tags': attr_tags, 'msg': msg}, | |
| 632 | + url: '/comments/reject/' + id, | |
| 633 | + success: function (data) { | |
| 634 | + window.location.href = '/comments' + '?state=' + form_state; | |
| 635 | + } | |
| 636 | + }); | |
| 637 | + } | |
| 638 | + | |
| 639 | + }); | |
| 640 | + //关闭 | |
| 641 | + $('#close').click(function () { | |
| 642 | + $('.action_note').attr('display', 'none'); | |
| 643 | + }); | |
| 644 | + | |
| 645 | + | |
| 646 | + /** | |
| 647 | + * 审核按钮的显示--已认领就是未审核的 | |
| 648 | + * @param value | |
| 649 | + * @param row | |
| 650 | + * @param index | |
| 651 | + * @returns {string} | |
| 652 | + */ | |
| 653 | + function stateFormatter(value, row, index) { | |
| 654 | + var style = 'btn-sm btn-primary'; | |
| 655 | + switch (row.state_name) { | |
| 656 | + case '未认领': | |
| 657 | + case '已认领,未审核': | |
| 658 | + style = 'btn-sm btn-warning'; | |
| 659 | + break; | |
| 660 | + case '我的已审核': | |
| 661 | + style = 'btn-sm btn-success'; | |
| 662 | + break; | |
| 663 | + case '我的未通过': | |
| 664 | + style = 'btn-sm btn-danger'; | |
| 665 | + break; | |
| 666 | + } | |
| 667 | + return [ | |
| 668 | + '<span class="btn ' + style + '">' + row.state_name_short + '</span>', | |
| 669 | + ].join(''); | |
| 670 | + } | |
| 671 | + | |
| 672 | + function originalFormatter(value, row, index) { | |
| 673 | + var original = row.original_url; | |
| 674 | + var commentTitle = row.comment_title; | |
| 675 | + return [ | |
| 676 | + '<a href="' + original + '" target="_blank">' + commentTitle + '</a>', | |
| 677 | +// '<a href="http://'+original+'/" target="_blank">' + commentTitle + '</a>', | |
| 678 | + ] | |
| 679 | + } | |
| 680 | + | |
| 681 | + | |
| 682 | + /** | |
| 683 | + * js截取字符串,中英文都能用 | |
| 684 | + * @param str:需要截取的字符串 | |
| 685 | + * @param len: 需要截取的长度 | |
| 686 | + */ | |
| 687 | + function cutstr(str, len) { | |
| 688 | + var str_length = 0; | |
| 689 | + var str_len = 0; | |
| 690 | + str_cut = new String(); | |
| 691 | + str_len = str.length; | |
| 692 | + for (var i = 0; i < str_len; i++) { | |
| 693 | + a = str.charAt(i); | |
| 694 | + str_length++; | |
| 695 | + if (escape(a).length > 4) { | |
| 696 | + //中文字符的长度经编码之后大于4 | |
| 697 | + str_length++; | |
| 698 | + } | |
| 699 | + str_cut = str_cut.concat(a); | |
| 700 | + if (str_length >= len) { | |
| 701 | + str_cut = str_cut.concat("..."); | |
| 702 | + return str_cut; | |
| 703 | + } | |
| 704 | + } | |
| 705 | + //如果给定字符串小于指定长度,则返回源字符串; | |
| 706 | + if (str_length < len) { | |
| 707 | + return str; | |
| 708 | + } | |
| 709 | + } | |
| 710 | + | |
| 711 | + function contentFormatter(value, row, index) { | |
| 712 | + var shot_content = cutstr(row.content, 100); | |
| 713 | +// console.log(shot_content.length); | |
| 714 | +// return false; | |
| 715 | + var full_content = row.content; | |
| 716 | +// console.log(full_content); | |
| 717 | + var f_str = s_str = ''; | |
| 718 | + for (var i = 0; i < full_content.length; i++) { | |
| 719 | + f_str += full_content.charAt(i); | |
| 720 | + if(i % 10 == 0 && i > 0){ | |
| 721 | + f_str += " "; | |
| 722 | + } | |
| 723 | + | |
| 724 | + s_str += shot_content.charAt(i); | |
| 725 | + if(i % 10 == 0 && i > 0){ | |
| 726 | + s_str += " "; | |
| 727 | + } | |
| 728 | + | |
| 729 | + } | |
| 730 | + return [ | |
| 731 | + '<a title="' + f_str + '" style="font-weight:bold;font-size:16px;" data-toggle="tooltip" data-placement="right" >' + s_str + '</a>', | |
| 732 | + ] | |
| 733 | + } | |
| 734 | + | |
| 735 | + //全选 | |
| 736 | + // $("#select_all").click(function(){ | |
| 737 | + | |
| 738 | + // //$("input[name='btSelectItem']").attr("checked","true"); | |
| 739 | + // // $("[name=btSelectItem]:checkbox").each(function(){ //遍历每一个复选框 | |
| 740 | + // // //$(this).attr("checked",!$(this).attr("checked")); //jQuery方法取复选框的反向值 | |
| 741 | + // // this.checked=true; //js方法 | |
| 742 | + // // }); | |
| 743 | + // $("#select_all_button").trigger("click"); | |
| 744 | + | |
| 745 | + | |
| 746 | + // }); | |
| 747 | + /*全选的操作*/ | |
| 748 | + $('#select_all').click(function () { | |
| 749 | + | |
| 750 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 751 | + $(this).prop('checked', true); | |
| 752 | + //$(this).addClass('checked_input'); | |
| 753 | + | |
| 754 | + }); | |
| 755 | + //$("#select_all_button").trigger('click'); | |
| 756 | + | |
| 757 | + | |
| 758 | + }); | |
| 759 | + //反选 | |
| 760 | + $("#no_select_all").click(function () { | |
| 761 | + $("[name=btSelectItem]:checkbox").each(function () { //遍历每一个复选框 | |
| 762 | + //$(this).attr("checked",!$(this).attr("checked")); //jQuery方法取复选框的反向值 | |
| 763 | + // if(!this.checked){ | |
| 764 | + // $(this).addClass('checked_input'); | |
| 765 | + // }else{ | |
| 766 | + // $(this).removeClass('checked_input'); | |
| 767 | + // } | |
| 768 | + this.checked = !this.checked; //js方法 | |
| 769 | + | |
| 770 | + | |
| 771 | + }); | |
| 772 | + }); | |
| 773 | + //清除 | |
| 774 | + $("#delete_all").click(function () { | |
| 775 | + $("input[name='btSelectItem']").removeAttr("checked"); | |
| 776 | + // $("[name=btSelectItem]:checkbox").each(function () { | |
| 777 | + | |
| 778 | + // $(this).removeClass('checked_input'); | |
| 779 | + | |
| 780 | + // }); | |
| 781 | + }); | |
| 782 | + | |
| 783 | + // $("#select_all_button").click(function(){ | |
| 784 | + | |
| 785 | + // }); | |
| 786 | + | |
| 787 | + // $("input[name='btSelectItem']").click(function(){ | |
| 788 | + // alert('od');return false; | |
| 789 | + // if($(this).prop('checked')){ | |
| 790 | + // $(this).addClass('checked_input'); | |
| 791 | + // }else{ | |
| 792 | + // $(this).removeClass('checked_input'); | |
| 793 | + // } | |
| 794 | + // }); | |
| 795 | + | |
| 796 | + $("#select_all_button").click(function () { | |
| 797 | + | |
| 798 | + //$(":checkbox").prop("checked",true); | |
| 799 | + alert("ok"); | |
| 800 | + | |
| 801 | + }); | |
| 802 | + // $("#delete_all").click(function(){ | |
| 803 | + // $(":checkbox").prop("checked",false); | |
| 804 | + // }); | |
| 805 | + // $("#no_select_all").click(function(){ | |
| 806 | + // $(":checkbox").each(function(){ | |
| 807 | + // $(this).prop("checked",!$(this).prop("checked")); | |
| 808 | + // }) | |
| 809 | + // }); | |
| 810 | + | |
| 811 | + $('#more_pass').click(function () { | |
| 812 | + | |
| 813 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 814 | + | |
| 815 | + if (rows.length > 0) { | |
| 816 | + $('#msg').html('您确认通过这<strong><span class="text-danger">' + rows.length + '</span></strong>条信息吗?'); | |
| 817 | + $('#modal_remove').show(); | |
| 818 | + $('#modal_remove').attr('claim', 'more_pass'); | |
| 819 | + } else { | |
| 820 | + $('#msg').html('请选择要通过的数据!'); | |
| 821 | + $('#modal_remove').hide(); | |
| 822 | + } | |
| 823 | + | |
| 824 | + }); | |
| 825 | + | |
| 826 | + $('#more_reject').click(function () { | |
| 827 | + | |
| 828 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 829 | + | |
| 830 | + if (rows.length > 0) { | |
| 831 | + $('#msg').html('<span style="color:red;">您确认批量拒绝这<strong><span class="text-danger">' + rows.length + '</span></strong>条信息吗?</span>'); | |
| 832 | + $('#modal_remove').show(); | |
| 833 | + $('#modal_remove').attr('claim', 'more_reject'); | |
| 834 | + } else { | |
| 835 | + $('#msg').html('请选择要拒绝的数据!'); | |
| 836 | + $('#modal_remove').hide(); | |
| 837 | + } | |
| 838 | + | |
| 839 | + }); | |
| 840 | + | |
| 841 | + function faceFormatter(value, row, index) { | |
| 842 | + var face = row.comment_user_avatar; //头像 | |
| 843 | + if (face) { | |
| 844 | + return [ | |
| 845 | + '<div width="60px" height="60px">' + | |
| 846 | + '<img src="' + face + '" width="60px" alt="用户头像">' + '</div>', | |
| 847 | + // '<span src="+ row.face +">' + row.state_name + '</span>', | |
| 848 | + ].join(''); | |
| 849 | + } else { | |
| 850 | + return [ | |
| 851 | + '<div width="60px" height="60px">' + | |
| 852 | + '<img src="/uploads/images/default.jpg" width="60px" alt="用户头像">' + '</div>', | |
| 853 | + // '<span src="+ row.face +">' + row.state_name + '</span>', | |
| 854 | + ].join(''); | |
| 855 | + } | |
| 856 | + | |
| 857 | + } | |
| 858 | + | |
| 859 | + | |
| 860 | + </script> | |
| 861 | + <script> | |
| 862 | + $(function () { | |
| 863 | + $("[data-toggle='tooltip']").tooltip(); | |
| 864 | + }); | |
| 865 | + </script> | |
| 866 | + | |
| 867 | + <footer th:replace="../templates/common/foot::foot" ></footer> | |
| 868 | + | |
| 869 | + <!-- Add the sidebar's background. This div must be placed | |
| 870 | + immediately after the control sidebar --> | |
| 871 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 872 | + | |
| 873 | +</div><!-- ./wrapper --> | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 878 | +<script type="text/javascript"> | |
| 879 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 880 | +</script> | |
| 881 | + | |
| 882 | +<!-- AdminLTE App --> | |
| 883 | +<script src="../../static/js/app.min.js"></script> | |
| 884 | +<!-- AdminLTE for demo purposes --> | |
| 885 | +<script src="../../static/js/sidebar.js"></script> | |
| 886 | + | |
| 887 | + | |
| 888 | +</body></html> | |
| 0 | 889 | \ No newline at end of file | ... | ... |
src/main/resources/templates/page/commentDetail.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<!-- saved from url=(0054)http://shenhe.cnlive.com/comments/detail/13097?state=2 --> | |
| 3 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 4 | +<head th:replace="../templates/common/head::head"></head> | |
| 5 | + | |
| 6 | +<body class="skin-blue sidebar-mini"> | |
| 7 | + | |
| 8 | +<div class="wrapper"> | |
| 9 | + | |
| 10 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 11 | + | |
| 12 | + | |
| 13 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 14 | + <section class="content-header"> | |
| 15 | + <h1> | |
| 16 | + 评论详情 | |
| 17 | + </h1> | |
| 18 | + <ol class="breadcrumb"> | |
| 19 | + <li><a href="http://shenhe.cnlive.com/index"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 20 | + <li class="active"><a href="http://shenhe.cnlive.com/comments">评论审核</a></li> | |
| 21 | + </ol> | |
| 22 | + </section> | |
| 23 | + | |
| 24 | + <section class="content"> | |
| 25 | + <div class="row"> | |
| 26 | + <div class="col-xs-12"> | |
| 27 | + <div class="box box-info"> | |
| 28 | + <div class="box-body form-horizontal"> | |
| 29 | + <div id="tabContents" class="tab-content"> | |
| 30 | + | |
| 31 | + <div id="tabHome" class="tab-pane fade in active padding-t-15 "> | |
| 32 | + <div class="col-sm-6"> | |
| 33 | + | |
| 34 | + | |
| 35 | + <div class="form-group"> | |
| 36 | + <label for="comment_title" class="control-label col-sm-2">评论标题:</label> | |
| 37 | + <div class="col-sm-10"> | |
| 38 | + <h5 style="font-size:1.5em; font-weight: bold;"></h5> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + <div class="form-group"> | |
| 42 | + | |
| 43 | + <label for="content" class="control-label col-sm-2">评论内容:</label> | |
| 44 | + <div class="col-sm-8"> | |
| 45 | + <textarea class="form-control" name="content" cols="50" rows="10" id="content">哈哈哈</textarea> | |
| 46 | + </div> | |
| 47 | + | |
| 48 | + </div> | |
| 49 | + <div class="form-group "> | |
| 50 | + <label for="username" class="control-label col-sm-2">状态:</label> | |
| 51 | + <div class="col-sm-10 "> | |
| 52 | + <h5 class="status">待审</h5> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <div class="form-group"> | |
| 56 | + <label for="cate_tags" class="control-label col-sm-2">分类标签:</label> | |
| 57 | + <div class="col-sm-10"> | |
| 58 | + <h5></h5> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + | |
| 62 | + <hr> | |
| 63 | + | |
| 64 | + <div class="form-group"> | |
| 65 | + <label class="control-label col-sm-2" for="attr_tags">常用审核意见:</label> | |
| 66 | + <div class="col-sm-8"> | |
| 67 | + <select class="form-control select2 select2-hidden-accessible" multiple="" data-placeholder="选择常用审核意见,可多选" name="attr_tags[]" id="attr_tags" style="width: 100%;" tabindex="-1" aria-hidden="true"> | |
| 68 | + </select><span class="select2 select2-container select2-container--default" dir="ltr" style="width: 100%;"><span class="selection"><span class="select2-selection select2-selection--multiple" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0"><ul class="select2-selection__rendered"><li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" placeholder="选择常用审核意见,可多选" style="width: 509px;"></li></ul></span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span> | |
| 69 | + </div> | |
| 70 | + </div><!-- /.form-group --> | |
| 71 | + | |
| 72 | + | |
| 73 | + <div class="form-group"> | |
| 74 | + <label for="msg" class="control-label col-sm-2">审核备注:</label> | |
| 75 | + <div class="col-sm-8"> | |
| 76 | + <textarea class="form-control" name="msg" cols="50" rows="10" id="msg"></textarea> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + </div> | |
| 80 | + <div class="col-sm-6"> | |
| 81 | + <div class="form-group"> | |
| 82 | + <label for="program_id" class="control-label col-sm-2">节目id:</label> | |
| 83 | + <div class="col-sm-10"> | |
| 84 | + <h5>604</h5> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + <div class="form-group"> | |
| 88 | + <label for="comment_user_id" class="control-label col-sm-2">评论用户id:</label> | |
| 89 | + <div class="col-sm-10"> | |
| 90 | + <h5>821403</h5> | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + | |
| 94 | + | |
| 95 | + <div class="form-group"> | |
| 96 | + <label for="activity_id" class="control-label col-sm-2">评论活动id:</label> | |
| 97 | + <div class="col-sm-10"> | |
| 98 | + <h5>769:video:comets:604_902dce9848ac482eb433f15c2cb0c401#3025</h5> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + | |
| 102 | + <div class="form-group"> | |
| 103 | + <label for="comment_user_name" class="control-label col-sm-2">用户昵称:</label> | |
| 104 | + <div class="col-sm-10"> | |
| 105 | + <h5>鱼</h5> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + | |
| 109 | + <div class="form-group"> | |
| 110 | + <label for="comment_user_avatar" class="control-label col-sm-2">用户头像:</label> | |
| 111 | + <div class="col-sm-10"> | |
| 112 | + <h5><img width="160px" src="./222111_files/1532077438500.jpg" alt="用户头像"></h5> | |
| 113 | + | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + | |
| 117 | + <div class="form-group"> | |
| 118 | + <label for="comment_user_ip" class="control-label col-sm-2">用户来源IP地址:</label> | |
| 119 | + <div class="col-sm-10"> | |
| 120 | + <h5>114.242.177.100</h5> | |
| 121 | + </div> | |
| 122 | + </div> | |
| 123 | + | |
| 124 | + <div class="form-group"> | |
| 125 | + <label for="app_id" class="control-label col-sm-2">appId:</label> | |
| 126 | + <div class="col-sm-10"> | |
| 127 | + <h5>769_jetj7bq525</h5> | |
| 128 | + </div> | |
| 129 | + </div> | |
| 130 | + | |
| 131 | + <div class="form-group"> | |
| 132 | + <label for="platform" class="control-label col-sm-2">平台:</label> | |
| 133 | + <div class="col-sm-10"> | |
| 134 | + <h5>苹果</h5> | |
| 135 | + </div> | |
| 136 | + </div> | |
| 137 | + | |
| 138 | + | |
| 139 | + <div class="form-group "> | |
| 140 | + <label for="mark" class="control-label col-sm-2">是否免审:</label> | |
| 141 | + <div class="col-sm-10 "> | |
| 142 | + <h5>否</h5> | |
| 143 | + </div> | |
| 144 | + </div> | |
| 145 | + | |
| 146 | + <div class="form-group "> | |
| 147 | + <label for="mark" class="control-label col-sm-2">是否过滤:</label> | |
| 148 | + <div class="col-sm-10 "> | |
| 149 | + <h5>否</h5> | |
| 150 | + </div> | |
| 151 | + </div> | |
| 152 | + | |
| 153 | + <div class="form-group "> | |
| 154 | + <label for="state" class="control-label col-sm-2">审核日志:</label> | |
| 155 | + <div class="col-sm-10 "> | |
| 156 | + <h5 id="state"></h5> | |
| 157 | + </div> | |
| 158 | + </div> | |
| 159 | + | |
| 160 | + <div class="form-group"> | |
| 161 | + <label for="auditor" class="control-label col-sm-2">审核员:</label> | |
| 162 | + <div class="col-sm-10"> | |
| 163 | + <h5>发布 | |
| 164 | + openadmin9@cnlive.com</h5> | |
| 165 | + </div> | |
| 166 | + </div> | |
| 167 | + | |
| 168 | + <div class="form-group"> | |
| 169 | + <label for="claimed_at" class="control-label col-sm-2">领审时间:</label> | |
| 170 | + <div class="col-sm-10"> | |
| 171 | + <h5>2018-11-29 10:04:35</h5> | |
| 172 | + </div> | |
| 173 | + </div> | |
| 174 | + </div> | |
| 175 | + | |
| 176 | + </div> | |
| 177 | + | |
| 178 | + <hr> | |
| 179 | + | |
| 180 | + | |
| 181 | + </div> | |
| 182 | + | |
| 183 | + <div class="form-group"> | |
| 184 | + <input type="text" hidden="hidden" id="comment_id" value="13097"> | |
| 185 | + </div> | |
| 186 | + | |
| 187 | + | |
| 188 | + <div class="box-footer"> | |
| 189 | + <div class="col-sm-5"> | |
| 190 | + <button type="button" class="btn btn-danger pull-right" id="reject">拒 绝</button> | |
| 191 | + </div> | |
| 192 | + | |
| 193 | + <div class="col-sm-1" style="margin-right:26px;"> | |
| 194 | + <button type="button" class="btn btn-primary pull-right" id="pass">通 过</button> | |
| 195 | + </div> | |
| 196 | + | |
| 197 | + <div class="col-sm-1"> | |
| 198 | + <button type="button" class="btn btn-info pull-right" id="back">返回列表</button> | |
| 199 | + </div> | |
| 200 | + </div> | |
| 201 | + | |
| 202 | + | |
| 203 | + <!-- 确认弹出框 --> | |
| 204 | + <div class="modal" id="action_note" role="dialog" aria-labelledby="myModalLabel"> | |
| 205 | + <div class="modal-dialog"> | |
| 206 | + <div class="modal-content"> | |
| 207 | + <div class="modal-header"> | |
| 208 | + <button type="button" class="close" data-dismiss="modal"> ×</button> | |
| 209 | + <h4 class="modal-title">温馨提示</h4> | |
| 210 | + </div> | |
| 211 | + <div class="modal-body" id="msg2"></div> | |
| 212 | + <div class="modal-footer"> | |
| 213 | + <button type="button" class="btn btn-default " data-dismiss="modal" id="action_note_no">取消</button> | |
| 214 | + <button type="button" class="btn btn-primary" id="action_note_yes">确认</button> | |
| 215 | + <input type="hidden" name="action_note_type" id="action_note_type" value=""> | |
| 216 | + <input type="hidden" name="action_note_id" id="action_note_id" value=""> | |
| 217 | + </div> | |
| 218 | + </div> | |
| 219 | + </div> | |
| 220 | + </div> | |
| 221 | + <script> | |
| 222 | + $(function () { | |
| 223 | + $('#begin_date').datetimepicker({ | |
| 224 | + format: 'YYYY/MM/DD HH:mm', | |
| 225 | + locale: 'zh-cn' | |
| 226 | + }); | |
| 227 | + $('#end_date').datetimepicker({ | |
| 228 | + format: 'YYYY/MM/DD HH:mm', | |
| 229 | + locale: 'zh-cn' | |
| 230 | + }); | |
| 231 | + }); | |
| 232 | + | |
| 233 | + //上传图片 | |
| 234 | + var image_url = $('#image_url').val(); | |
| 235 | + var images = []; | |
| 236 | + | |
| 237 | + if (image_url == null || image_url.length > 0) { | |
| 238 | + images = ['<img height="240" src="' + $('#image_url').val() + '">']; | |
| 239 | + } | |
| 240 | + | |
| 241 | + $('#image_file').fileinput({ | |
| 242 | + language: 'zh', | |
| 243 | + uploadExtraData: {_token: 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8'}, | |
| 244 | + allowedFileExtensions: ['jpg', 'gif', 'png'], | |
| 245 | + initialPreview: images, | |
| 246 | + maxFileSize: 10240, | |
| 247 | + resizeImage: true, | |
| 248 | + maxImageWidth: 640, | |
| 249 | + maxImageHeight: 960, | |
| 250 | + }); | |
| 251 | + | |
| 252 | + $('#image_file').on('fileuploaded', function (event, data) { | |
| 253 | + $('#image_url').val(data.response.data); | |
| 254 | + }); | |
| 255 | + | |
| 256 | + /*拒绝*/ | |
| 257 | + $("#reject").click(function () { | |
| 258 | + var row_id = $("#comment_id").val(); | |
| 259 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 260 | + var msg = $('#msg').val(); //获取审核msg | |
| 261 | + if(attr_tags ==null && msg ==''){ //两个都为空 不行 | |
| 262 | + alert('请输入审核备注或者常用审核意见!'); | |
| 263 | + return false; | |
| 264 | + } | |
| 265 | + if (typeof(row_id) == "undefined") { | |
| 266 | + return false; | |
| 267 | + } | |
| 268 | + //拒绝弹出框 | |
| 269 | + $('#msg2').html('您确认要拒绝该条评论吗?'); | |
| 270 | + $('#action_note').show(); | |
| 271 | + $("#action_note_type").val('reject'); | |
| 272 | + $("#action_note_id").val(''); | |
| 273 | + // $.ajax({ | |
| 274 | + // type: 'get', | |
| 275 | + // data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'attr_tags': attr_tags, 'msg': msg}, | |
| 276 | + // url: '/comments/reject/' + row_id, | |
| 277 | + // success: function (data) { | |
| 278 | + // window.location.href = '/comments'; | |
| 279 | + // } | |
| 280 | + // }); | |
| 281 | + }); | |
| 282 | + | |
| 283 | + //弹出框取消 | |
| 284 | + $("#action_note_no").click(function () { | |
| 285 | + $("#action_note").hide(); | |
| 286 | + }); | |
| 287 | + //弹出框确认 | |
| 288 | + $("#action_note_yes").click(function () { | |
| 289 | + var row_id = $("#comment_id").val(); | |
| 290 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 291 | + var msg = $('#msg').val(); //获取审核msg | |
| 292 | + if(attr_tags ==null && msg ==''){ //两个都为空 不行 | |
| 293 | + alert('请输入审核备注或者常用审核意见!'); | |
| 294 | + return false; | |
| 295 | + } | |
| 296 | + if (typeof(row_id) == "undefined") { | |
| 297 | + return false; | |
| 298 | + } | |
| 299 | + var state = 7 | |
| 300 | + $.ajax({ | |
| 301 | + type: 'get', | |
| 302 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'attr_tags': attr_tags, 'msg': msg}, | |
| 303 | + url: '/comments/reject/' + row_id, | |
| 304 | + success: function (data) { | |
| 305 | + window.location.href = '/comments'+ '?state=' + state; | |
| 306 | + } | |
| 307 | + }); | |
| 308 | + }); | |
| 309 | + | |
| 310 | + | |
| 311 | + /*通过*/ | |
| 312 | + $("#pass").click(function () { | |
| 313 | + | |
| 314 | + var row_id = $("#comment_id").val(); | |
| 315 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 316 | + var msg = $('#msg').val(); //获取审核msg | |
| 317 | + if (typeof(row_id) == "undefined") { | |
| 318 | + return false; | |
| 319 | + } | |
| 320 | + var state = 7 | |
| 321 | + $.ajax({ | |
| 322 | + type: 'get', | |
| 323 | + data: {'_token': 'YnS6uzLnUDRQyeB4E2tTFbRCDmYio9gvdqwsGiu8', 'attr_tags': attr_tags, 'msg': msg}, | |
| 324 | + url: '/comments/pass/' + row_id, | |
| 325 | + success: function (data) { | |
| 326 | + window.location.href = '/comments'+ '?state=' + state; | |
| 327 | + } | |
| 328 | + }); | |
| 329 | + }); | |
| 330 | + | |
| 331 | + /*返回列表*/ | |
| 332 | + $("#back").click(function () { | |
| 333 | +// window.history.back(-1); | |
| 334 | + var state = 2; | |
| 335 | + window.location.href = '/comments'+'?state=' + state; | |
| 336 | + }); | |
| 337 | + | |
| 338 | + </script> | |
| 339 | + | |
| 340 | + | |
| 341 | + <!-- Select2 todo xiaohu --> | |
| 342 | + <script src="../../static/js/select2.full.min.js"></script> | |
| 343 | + <!-- Select2 todo xiaohu --> | |
| 344 | + <link rel="stylesheet" href="../../static/css/select2.min.css"> | |
| 345 | + <link rel="stylesheet" href="../../static/css/AdminLTE.min.css"> | |
| 346 | + | |
| 347 | + <script> | |
| 348 | + $(function () { | |
| 349 | + //Initialize Select2 Elements | |
| 350 | + $(".select2").select2(); | |
| 351 | + }); | |
| 352 | + </script> | |
| 353 | + | |
| 354 | + | |
| 355 | + </div> | |
| 356 | + </div> | |
| 357 | + </div> | |
| 358 | + </div> | |
| 359 | + | |
| 360 | + </section> | |
| 361 | + </div> | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + <footer th:replace="../templates/common/foot::foot" ></footer> | |
| 366 | + | |
| 367 | + | |
| 368 | + <!-- Add the sidebar's background. This div must be placed | |
| 369 | + immediately after the control sidebar --> | |
| 370 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 371 | + | |
| 372 | +</div><!-- ./wrapper --> | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 377 | +<script type="text/javascript"> | |
| 378 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 379 | +</script> | |
| 380 | + | |
| 381 | +<!-- AdminLTE App --> | |
| 382 | +<script src="../../static/js/app.min.js"></script> | |
| 383 | +<!-- AdminLTE for demo purposes --> | |
| 384 | +<script src="../../static/js/sidebar.js"></script> | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | +</body></html> | |
| 0 | 393 | \ No newline at end of file | ... | ... |
src/main/resources/templates/page/videoDetail.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<!-- saved from url=(0031)http://shenhe.cnlive.com/videos --> | |
| 3 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 4 | +<head th:replace="../templates/common/head::head"></head> | |
| 5 | + | |
| 6 | +<body class="skin-blue sidebar-mini"> | |
| 7 | + | |
| 8 | +<div class="wrapper"> | |
| 9 | + | |
| 10 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 11 | + | |
| 12 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 13 | + <section class="content-header"> | |
| 14 | + <h1> | |
| 15 | + 点播审核 | |
| 16 | + </h1> | |
| 17 | + <ol class="breadcrumb"> | |
| 18 | + <li><a href="http://shenhe.cnlive.com/index"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 19 | + <li class="active">点播审核</li> | |
| 20 | + </ol> | |
| 21 | + </section> | |
| 22 | + <section class="content"> | |
| 23 | + <div class="row"> | |
| 24 | + <div class="col-md-12"> | |
| 25 | + <div class="box box-info"> | |
| 26 | + <div class="box-body"> | |
| 27 | + <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 28 | + <div class="modal-dialog"> | |
| 29 | + <div class="modal-content"> | |
| 30 | + <div class="modal-header"> | |
| 31 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> ×</button> | |
| 32 | + <h4 class="modal-title">温馨提示</h4> | |
| 33 | + </div> | |
| 34 | + <div class="modal-body" id="msg">您确认删除该条信息吗?</div> | |
| 35 | + <div class="modal-footer"> | |
| 36 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 37 | + <button type="button" class="btn btn-primary" id="modal_remove">确认</button> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + </div> <div class="clearfix"> | |
| 42 | + <div class="btn-group margin-bottom pull-left"> | |
| 43 | + <input type="hidden" name="state" id="state" value=""> | |
| 44 | + <div class="btn-group margin-bottom" id="hide_select_area_2" style=""> | |
| 45 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim" id="claim" data-toggle="modal" data-target="#modal">认领 | |
| 46 | + </button> | |
| 47 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim100" id="claim100" data-toggle="modal" data-target="#modal">认领100条 | |
| 48 | + </button> | |
| 49 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" value="2" data="claim1000" id="claim1000" data-toggle="modal" data-target="#modal">认领1000条 | |
| 50 | + </button> | |
| 51 | + </div> | |
| 52 | + | |
| 53 | + </div> | |
| 54 | + | |
| 55 | + <div class="btn-group margin-bottom pull-right"> | |
| 56 | + <button type="button" class="btn btn-sm margin-r-5 filter " id="" value="0"> | |
| 57 | + 全部 | |
| 58 | + </button> | |
| 59 | + <button type="button" class="btn btn-sm margin-r-5 filter btn-info" value="1">全部待领 | |
| 60 | + </button> | |
| 61 | + <button type="button" class="btn btn-sm margin-r-5 filter " value="2">我的待审 | |
| 62 | + </button> | |
| 63 | + <!-- <button type="button" class="btn btn-sm margin-r-5 filter" | |
| 64 | + value="3">我的已审核 | |
| 65 | + </button> | |
| 66 | + <button type="button" class="btn btn-sm margin-r-5 filter" | |
| 67 | + value="4">我的未通过 | |
| 68 | + </button> --> | |
| 69 | + <button type="button" class="btn btn-sm margin-r-5 filter " value="7">我的已审 | |
| 70 | + </button> | |
| 71 | + <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" onclick="openOrClose('forms')">查询 | |
| 72 | + <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | |
| 73 | + </button> | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + | |
| 77 | + | |
| 78 | + <div class="form-horizontal form-group-sm" id="forms" style="display: none;"> | |
| 79 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;"> | |
| 80 | + <div class="col-md-5" style="padding: 0"> | |
| 81 | + <label for="video_title" class="control-label cb-toolbar">标题:</label> | |
| 82 | + <div class="col-sm-9" style="padding: 0;"> | |
| 83 | + <input class="form-control" name="video_title" type="text" id="video_title"> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + <div class="col-md-4" style="padding: 0"> | |
| 87 | + <label for="activity_id" class="control-label cb-toolbar">sp简称:</label> | |
| 88 | + <div class="col-sm-9" style="padding: 0;"> | |
| 89 | + <input class="form-control" name="activity_id" type="text" id="activity_id"> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + <div class="col-md-3" style="padding: 0"> | |
| 93 | + <label for="is_hot" class="control-label cb-toolbar">是否热点:</label> | |
| 94 | + <div class="col-sm-7" style="padding: 0;"> | |
| 95 | + <select class="form-control col-sm-2" id="is_hot" name="is_hot"><option value="0">全部</option><option value="2">是</option><option value="1">否</option></select> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | + | |
| 99 | + | |
| 100 | + </div> | |
| 101 | + | |
| 102 | + <div class="btn-group margin-bottom col-md-6 pull-right" style="padding: 0"> | |
| 103 | + <div class="col-md-11" style="width: 88%;padding: 0;"> | |
| 104 | + <div class="col-md-6" style="padding: 0"> | |
| 105 | + <label for="start_date" class="control-label cb-toolbar">时间:</label> | |
| 106 | + <div class="input-group col-md-9 date"> | |
| 107 | + <input class="form-control date" name="start_date" type="text" id="start_date"> | |
| 108 | + <span class="input-group-addon"> | |
| 109 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 110 | + </span> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <div class="col-md-6" style="padding: 0"> | |
| 114 | + <label for="start_date" class="control-label cb-toolbar">至</label> | |
| 115 | + <div class="input-group col-md-9 date"> | |
| 116 | + <input class="form-control date" name="end_date" type="text"> | |
| 117 | + <span class="input-group-addon"> | |
| 118 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 119 | + </span> | |
| 120 | + </div> | |
| 121 | + </div> | |
| 122 | + </div> | |
| 123 | + | |
| 124 | + </div> | |
| 125 | + | |
| 126 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;"> | |
| 127 | + | |
| 128 | + <div class="col-md-4" style="padding: 0"> | |
| 129 | + <label for="video_auditor" class="control-label cb-toolbar">审核员:</label> | |
| 130 | + <div class="col-sm-7" style="padding: 0;"> | |
| 131 | + <input class="form-control" name="video_auditor" type="text" id="video_auditor"> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + <div class="col-md-1 text-center" style="width: 12%;padding: 0"> | |
| 135 | + <button type="button" class="btn btn-primary btn-sm" id="videos_query">查 询</button> | |
| 136 | + </div> | |
| 137 | + </div> | |
| 138 | + </div> | |
| 139 | + <script> | |
| 140 | + //定义一个存储状态 | |
| 141 | + var form_state = | |
| 142 | + | |
| 143 | + $(function () { | |
| 144 | +// $(this).addClass('btn-info'); | |
| 145 | +// $(this).siblings().removeClass('btn-info'); | |
| 146 | + | |
| 147 | + }); | |
| 148 | + /*批量操作 --认领*/ | |
| 149 | + var claim_open = false; | |
| 150 | + var remove_open = false; | |
| 151 | + $("#modal_remove").delegate(this, "click", function () { | |
| 152 | + if (claim_open == true) { | |
| 153 | + return false; | |
| 154 | + } | |
| 155 | + if (remove_open == true) { //这样的话是true,就是单个操作 | |
| 156 | + return false; | |
| 157 | + } | |
| 158 | + var status = $('.action').val(); | |
| 159 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 160 | + | |
| 161 | + var flag = $(this).attr('claim'); | |
| 162 | + if (flag == 'claim') { | |
| 163 | + var ids = []; | |
| 164 | + for (var i = 0; i < rows.length; i++) { | |
| 165 | + ids[ids.length] = rows[i].id; | |
| 166 | + } | |
| 167 | + } else { | |
| 168 | + $ids = ''; | |
| 169 | + } | |
| 170 | + var state = 2; | |
| 171 | + $.ajax({ | |
| 172 | + url: '/videos/status/' + status, | |
| 173 | + type: 'POST', | |
| 174 | + data: {'_token': 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40', 'ids': ids, 'flag': flag}, | |
| 175 | + success: function () { | |
| 176 | +// window.location.reload(); | |
| 177 | + window.location.href = '/videos'+ '?state=' + state; | |
| 178 | + } | |
| 179 | + }); | |
| 180 | + }); | |
| 181 | + | |
| 182 | + | |
| 183 | + /* 筛选 状态 按钮之间的切换 todo */ | |
| 184 | + $('.filter').click(function () { | |
| 185 | + var object = $('#forms input').serializeObject(); | |
| 186 | + object['state'] = $(this).val(); | |
| 187 | + switch ($(this).val()) { | |
| 188 | + case "1": | |
| 189 | + $(this).addClass('btn-info'); | |
| 190 | + $(this).siblings().removeClass('btn-info'); | |
| 191 | + $('#hide_select_area_2').show(); | |
| 192 | + form_state = 1; //待领 | |
| 193 | + break; | |
| 194 | + case "2": | |
| 195 | + $(this).addClass('btn-info'); | |
| 196 | + $(this).siblings().removeClass('btn-info'); | |
| 197 | + $('#hide_select_area_2').hide(); | |
| 198 | + form_state = 2; //待审 | |
| 199 | + break; | |
| 200 | + case "3": | |
| 201 | + $(this).addClass('btn-info'); | |
| 202 | + $(this).siblings().removeClass('btn-info'); | |
| 203 | + $('#hide_select_area_2').hide(); | |
| 204 | + break; | |
| 205 | + case "4": | |
| 206 | + $(this).addClass('btn-info'); | |
| 207 | + $(this).siblings().removeClass('btn-info'); | |
| 208 | + $('#hide_select_area_2').hide(); | |
| 209 | + break; | |
| 210 | + case "7": | |
| 211 | + $(this).addClass('btn-info'); | |
| 212 | + $(this).siblings().removeClass('btn-info'); | |
| 213 | + $('#hide_select_area_2').hide(); | |
| 214 | + form_state = 7; //我的已审 | |
| 215 | + break; | |
| 216 | + default: | |
| 217 | + $(this).addClass('btn-info'); | |
| 218 | + $(this).siblings().removeClass('btn-info'); | |
| 219 | + $('#hide_select_area_2').hide(); | |
| 220 | + form_state = 0; //全部 | |
| 221 | + break; | |
| 222 | + } | |
| 223 | + object['_token'] = 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40'; | |
| 224 | + $('#state').val(object['state']); | |
| 225 | + $('#table').bootstrapTable('selectPage', 1); | |
| 226 | + $('#table').bootstrapTable('refresh', {query: object}); | |
| 227 | + }); | |
| 228 | + $('#a_down').hide(); | |
| 229 | + /*查询*/ | |
| 230 | + function openOrClose(id_name_str) { | |
| 231 | + var id_name = '#' + id_name_str; | |
| 232 | + if ($(id_name).css('display') == 'block') { | |
| 233 | + $(id_name).slideUp(350); | |
| 234 | + $('#a_up').show(); | |
| 235 | + $('#a_down').hide(); | |
| 236 | + } else { | |
| 237 | + $(id_name).slideDown(350); | |
| 238 | + | |
| 239 | + | |
| 240 | + $('#a_up').hide(); | |
| 241 | + $('#a_down').show(); | |
| 242 | + } | |
| 243 | + } | |
| 244 | + | |
| 245 | + /*时间插件*/ | |
| 246 | + $('.date').datetimepicker({ | |
| 247 | + format: 'YYYY-MM-DD HH:mm', | |
| 248 | + locale: "zh-CN", | |
| 249 | + toolbarPlacement: 'bottom', | |
| 250 | + showClear: true, | |
| 251 | + }); | |
| 252 | + | |
| 253 | + /*认领弹框操作*/ | |
| 254 | + $('.action').click(function () { | |
| 255 | + claim_open = false; | |
| 256 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 257 | + var flag = $(this).attr('data'); | |
| 258 | + if (flag == 'claim') { | |
| 259 | + if (rows.length > 0) { | |
| 260 | + $('#msg').html('您确认认领这<strong><span class="text-danger">' + rows.length + '</span></strong>条信息吗?'); | |
| 261 | + $('#modal_remove').show(); | |
| 262 | + $('#modal_remove').attr('claim', 'claim'); | |
| 263 | + } else { | |
| 264 | + $('#msg').html('请选择要认领的数据!'); | |
| 265 | + $('#modal_remove').hide(); | |
| 266 | + } | |
| 267 | + } else if (flag == 'claim100') { | |
| 268 | + $('#msg').html('您确认认领这前<strong><span class="text-danger">' + '100' + '</span></strong>条信息吗?'); | |
| 269 | + $('#modal_remove').show(); | |
| 270 | + $('#modal_remove').attr('claim', 'claim100'); | |
| 271 | + } else { | |
| 272 | + $('#msg').html('您确认认领这前<strong><span class="text-danger">' + '1000' + '</span></strong>条信息吗?'); | |
| 273 | + $('#modal_remove').show(); | |
| 274 | + $('#modal_remove').attr('claim', 'claim1000'); | |
| 275 | + } | |
| 276 | + }) | |
| 277 | + | |
| 278 | + $('#big').click(function () { | |
| 279 | + window.location.href = '/videos/big_list'; | |
| 280 | + }) | |
| 281 | + $('#list').click(function () { | |
| 282 | + window.location.href = '/videos'; | |
| 283 | + }) | |
| 284 | + | |
| 285 | + | |
| 286 | + </script> <div class="modal fade common" id="modal_comment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 287 | + <div class="modal-dialog"> | |
| 288 | + <div class="modal-content"> | |
| 289 | + <div class="modal-header"> | |
| 290 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> ×</button> | |
| 291 | + <h4 class="modal-title" id="modal_title"></h4> | |
| 292 | + </div> | |
| 293 | + <div class="modal-body"> | |
| 294 | + <div class="alert alert-danger" id="window_msg" style="display: none;"> | |
| 295 | + <p></p> | |
| 296 | + </div> | |
| 297 | + <div id="contents"> | |
| 298 | + </div> | |
| 299 | + </div> | |
| 300 | + </div> | |
| 301 | + </div> | |
| 302 | + </div> <div class="bootstrap-table"><div class="fixed-table-toolbar"></div><div class="fixed-table-container" style="padding-bottom: 0px;"><div class="fixed-table-header" style="display: none;"><table></table></div><div class="fixed-table-body"><div class="fixed-table-loading" style="top: 41px; display: none;">正在努力地加载数据中,请稍候……</div><table id="table" data-toggle="table" class="table table-hover table-striped"> | |
| 303 | + <thead><tr><th class="bs-checkbox " style="text-align: center; width: 5%; " data-field="state" tabindex="0"><div class="th-inner "><input name="btSelectAll" type="checkbox"></div><div class="fht-cell"></div></th><th style="text-align: center; width: 6%; " data-field="sp_id_brief" tabindex="0"><div class="th-inner ">sp简称</div><div class="fht-cell"></div></th><th style="text-align: center; width: 20%; " data-field="video_title" tabindex="0"><div class="th-inner ">标题</div><div class="fht-cell"></div></th><th style="text-align: center; width: 10%; " data-field="video_cover_img" tabindex="0"><div class="th-inner ">点播封面图 | |
| 304 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 3%; " data-field="mark_name" tabindex="0"><div class="th-inner ">白名单</div><div class="fht-cell"></div></th><th style="text-align: center; width: 6%; " data-field="auditor" tabindex="0"><div class="th-inner ">审核员</div><div class="fht-cell"></div></th><th style="text-align: center; width: 3%; " data-field="is_hot_name" tabindex="0"><div class="th-inner ">热点</div><div class="fht-cell"></div></th><th style="text-align: center; width: 3%; " data-field="state_name" tabindex="0"><div class="th-inner ">审核状态 | |
| 305 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 10%; " data-field="upload_time" tabindex="0"><div class="th-inner ">视频上传时间 | |
| 306 | + </div><div class="fht-cell"></div></th><th style="text-align: center; width: 17%; " data-field="action" tabindex="0"><div class="th-inner ">操作 | |
| 307 | + </div><div class="fht-cell"></div></th></tr></thead> | |
| 308 | + <tbody><tr data-index="0"><td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">邓建国正面PK冯小刚 选喜剧演员饰演潘金莲</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/000002.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">是</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2018-03-07 16:56:20</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="1"><td class="bs-checkbox "><input data-index="1" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">邓建国正面PK冯小刚 选喜剧演员饰演潘金莲</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/000002.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">是</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2018-03-07 16:56:20</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="2"><td class="bs-checkbox "><input data-index="2" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">蓝精灵2</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/00002.jpg@base@tag=imgScale&w=224&h=126&m=2&c=1" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">是</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-04-18 18:13:22</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="3"><td class="bs-checkbox "><input data-index="3" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">11月22日 与高净值客户沟通的那些年</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1542596178088_4648.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2018-11-22 19:30:00</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="4"><td class="bs-checkbox "><input data-index="4" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">Granzon的直播</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2018-03-02 10:48:12</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="5"><td class="bs-checkbox "><input data-index="5" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">好吃</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/face_60X60.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-10-14 20:45:40</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="6"><td class="bs-checkbox "><input data-index="6" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">好吃</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/face_60X60.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-10-14 20:45:40</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="7"><td class="bs-checkbox "><input data-index="7" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">358</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1499414527478_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-21 15:03:59</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="8"><td class="bs-checkbox "><input data-index="8" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">666</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:40:12</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="9"><td class="bs-checkbox "><input data-index="9" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">666</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:40:12</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="10"><td class="bs-checkbox "><input data-index="10" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">跑跑跑跑跑</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:38:05</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="11"><td class="bs-checkbox "><input data-index="11" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">跑跑跑跑跑</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:38:05</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="12"><td class="bs-checkbox "><input data-index="12" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">000000</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:32:50</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="13"><td class="bs-checkbox "><input data-index="13" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">000000</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:31:21</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="14"><td class="bs-checkbox "><input data-index="14" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">q</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1499414527478_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:16:08</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="15"><td class="bs-checkbox "><input data-index="15" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">太丰富分</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1480134800235_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-09-15 15:15:50</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="16"><td class="bs-checkbox "><input data-index="16" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">testin</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1490251097087_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-06-06 16:39:24</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="17"><td class="bs-checkbox "><input data-index="17" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">Lynn的直播</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1483946763364_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-05-11 09:10:09</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="18"><td class="bs-checkbox "><input data-index="18" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">Lynn的直播</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1483946763364_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-05-11 09:05:06</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr><tr data-index="19"><td class="bs-checkbox "><input data-index="19" name="btSelectItem" type="checkbox"></td><td style="text-align: center; width: 6%; ">视讯中国</td><td style="text-align: center; width: 20%; ">Lynn的直播</td><td style="text-align: center; width: 10%; "><div width="160px" height="90px"><img src="./审核云平台内容管理系统_files/1483946763364_small.jpg" width="160px" alt="封面图"></div></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 6%; "></td><td style="text-align: center; width: 3%; ">否</td><td style="text-align: center; width: 3%; "><span class="btn btn-sm btn-warning">待审</span></td><td style="text-align: center; width: 10%; ">2017-05-11 08:53:14</td><td style="text-align: center; width: 17%; "><a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm">认领</button></a><span> </span><a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled">查看</button></a><span> </span><a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" disabled="disabled" data-toggle="modal" data-target="#modal">退领</button></a></td></tr></tbody></table></div><div class="fixed-table-footer" style="display: none;"><table><tbody><tr></tr></tbody></table></div><div class="fixed-table-pagination" style="display: block;"><div class="pull-left pagination-detail"><span class="pagination-info">显示第 1 到第 20 条记录,总共 350 条记录</span><span class="page-list">每页显示 <span class="btn-group dropup"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="page-size">20</span> <span class="caret"></span></button><ul class="dropdown-menu" role="menu"><li><a href="javascript:void(0)">10</a></li><li><a href="javascript:void(0)">25</a></li><li><a href="javascript:void(0)">50</a></li><li><a href="javascript:void(0)">100</a></li></ul></span> 条记录</span></div><div class="pull-right pagination"><ul class="pagination"><li class="page-pre"><a href="javascript:void(0)">‹</a></li><li class="page-number active"><a href="javascript:void(0)">1</a></li><li class="page-number"><a href="javascript:void(0)">2</a></li><li class="page-number"><a href="javascript:void(0)">3</a></li><li class="page-number"><a href="javascript:void(0)">4</a></li><li class="page-number"><a href="javascript:void(0)">5</a></li><li class="page-last-separator disabled"><a href="javascript:void(0)">...</a></li><li class="page-last"><a href="javascript:void(0)">18</a></li><li class="page-next"><a href="javascript:void(0)">›</a></li></ul></div></div></div></div><div class="clearfix"></div> | |
| 309 | + </div> | |
| 310 | + </div> | |
| 311 | + </div> | |
| 312 | + </div> | |
| 313 | + </section><!-- /.content --> | |
| 314 | + </div> | |
| 315 | + <!-- /.content-wrapper --> | |
| 316 | + <script> | |
| 317 | + | |
| 318 | + //定义一个全局变量-跟踪状态 | |
| 319 | + var global_state = 0; | |
| 320 | + /*查询字段效果*/ | |
| 321 | + $('#videos_query').click(function () { | |
| 322 | + $('#table').bootstrapTable('selectPage', 1); | |
| 323 | + }); | |
| 324 | + | |
| 325 | + /*查询按钮操作 页面中传递过来的参数需要走这个*/ | |
| 326 | + $('#table').bootstrapTable({ | |
| 327 | + method: 'get', | |
| 328 | + url: '/videos/table/', | |
| 329 | + pagination: true, | |
| 330 | + pageNumber: 1, | |
| 331 | + pageSize: 20, | |
| 332 | + pageList: [10, 25, 50, 100], | |
| 333 | + sidePagination: 'server', | |
| 334 | + clickToSelect: true, | |
| 335 | + striped: true, | |
| 336 | + queryParams: function (params) { | |
| 337 | + var object = $('#forms input').serializeObject(); | |
| 338 | + object['is_hot'] = $('#is_hot').val(); | |
| 339 | + object['state'] = $('#state').val(); | |
| 340 | + object['_token'] = 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40'; | |
| 341 | + object['offset'] = params.offset; | |
| 342 | + object['limit'] = params.limit; | |
| 343 | + | |
| 344 | + return object; | |
| 345 | + }, | |
| 346 | + }); | |
| 347 | + | |
| 348 | + /*认领---操作中按钮控制*/ | |
| 349 | + function actionFormatter(value, row, index) { | |
| 350 | + var disabled_claim = ''; | |
| 351 | + var disabled_passed = ''; | |
| 352 | + var disabled_nopass = ''; | |
| 353 | + var disabled_claimfail = ''; | |
| 354 | + | |
| 355 | + if (row.state_name == '未认领') { //如果是认领,查看和退领按钮不能用 | |
| 356 | + switch (row.state_name) { | |
| 357 | + case '未认领': | |
| 358 | + disabled_claim = 'disabled="disabled"'; | |
| 359 | + break; | |
| 360 | + } | |
| 361 | + return [ | |
| 362 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-success btn-sm" >认领</button></a>', | |
| 363 | + '<span> </span>', | |
| 364 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claim + '>查看</button></a>', | |
| 365 | + '<span> </span>', | |
| 366 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claim + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 367 | + ].join(''); | |
| 368 | + } | |
| 369 | + else if (row.state_name == '已认领,未审核' && row.user_id == 11) { //如果是未审核和已审核,则认领不能用 | |
| 370 | + switch (row.state_name) { | |
| 371 | + case '已认领,未审核': | |
| 372 | + disabled_passed = 'disabled="disabled"'; | |
| 373 | + break; | |
| 374 | + } | |
| 375 | + return [ | |
| 376 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_passed + '>认领</button></a>', | |
| 377 | + '<span> </span>', | |
| 378 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 379 | + '<span> </span>', | |
| 380 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 381 | + ].join(''); | |
| 382 | + | |
| 383 | + }else if (row.state_name == '已认领,未审核' && row.user_id !== 11) { //如果是未审核和已审核,则认领不能用 | |
| 384 | + switch (row.state_name) { | |
| 385 | + case '已认领,未审核': | |
| 386 | + disabled_passed = 'disabled="disabled"'; | |
| 387 | + break; | |
| 388 | + } | |
| 389 | + return [ | |
| 390 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_passed + '>认领</button></a>', | |
| 391 | + '<span> </span>', | |
| 392 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" ' + disabled_passed + '>查看</button></a>', | |
| 393 | + '<span> </span>', | |
| 394 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal" ' + disabled_passed + '>退领</button></a>', | |
| 395 | + ].join(''); | |
| 396 | + | |
| 397 | + } | |
| 398 | + else if (row.state_name == '我的已审核') { | |
| 399 | + switch (row.state_name) { | |
| 400 | + case '我的已审核': | |
| 401 | + disabled_nopass = 'disabled="disabled"'; | |
| 402 | + break; | |
| 403 | + } | |
| 404 | + return [ | |
| 405 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_nopass + '>认领</button></a>', | |
| 406 | + '<span style="margin-right:50px;"> </span>', | |
| 407 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 408 | + '<br/>', | |
| 409 | + '<span> </span>', | |
| 410 | + '<br/>', | |
| 411 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_nopass + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 412 | + '<span style="margin-right:50px;"> </span>', | |
| 413 | + '<a class="log" href="javascript:void(0)"><button class="btn btn-primary btn-sm" >日志</button></a>', | |
| 414 | + ].join(''); | |
| 415 | + | |
| 416 | + } else { | |
| 417 | + switch (row.state_name) { | |
| 418 | + case '我的未通过': | |
| 419 | + disabled_claimfail = 'disabled="disabled"'; | |
| 420 | + break; | |
| 421 | + } | |
| 422 | + return [ | |
| 423 | + '<a class="claim" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claimfail + '>认领</button></a>', | |
| 424 | + '<span style="margin-right:50px;"> </span>', | |
| 425 | + '<a class="detail" href="javascript:void(0)"><button class="btn btn-info btn-sm" >查看</button></a>', | |
| 426 | + '<br/>', | |
| 427 | + '<span> </span>', | |
| 428 | + '<br/>', | |
| 429 | + '<a class="back" href="javascript:void(0)"><button class="btn btn-default btn-sm" ' + disabled_claimfail + ' data-toggle="modal" data-target="#modal" >退领</button></a>', | |
| 430 | + '<span style="margin-right:50px;"> </span>', | |
| 431 | + '<a class="log" href="javascript:void(0)"><button class="btn btn-primary btn-sm" >日志</button></a>', | |
| 432 | + ].join(''); | |
| 433 | + } | |
| 434 | + } | |
| 435 | + | |
| 436 | + $("#modal_remove").click(function () { | |
| 437 | + var row_id = $(this).data('id'); | |
| 438 | + | |
| 439 | + if (typeof(row_id) == "undefined") { | |
| 440 | + return false; | |
| 441 | + } | |
| 442 | +// $(".back").each(function(){ | |
| 443 | + var rows = $('#table').bootstrapTable('getSelections'); | |
| 444 | + if (rows[0].state_name == '已审核') { | |
| 445 | + $(this).attr('disabled', 'disabled'); | |
| 446 | + alert('未审核的不能退领!'); | |
| 447 | + return false; | |
| 448 | + } | |
| 449 | +// }); | |
| 450 | + | |
| 451 | + $.ajax({ | |
| 452 | + type: 'get', | |
| 453 | + data: {'_token': 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40'}, | |
| 454 | + url: '/videos/back/' + row_id, | |
| 455 | + success: function (data) { | |
| 456 | + window.location.href = '/videos'; | |
| 457 | + } | |
| 458 | + }); | |
| 459 | + }); | |
| 460 | + | |
| 461 | + // $('#modal').modal('hide'); | |
| 462 | + $('#modal').on('hide.bs.modal', function (event) { | |
| 463 | + | |
| 464 | + }); | |
| 465 | + | |
| 466 | + /*操作按钮的点击事件*/ | |
| 467 | + window.actionEvents = { | |
| 468 | + 'click .claim': function (e, value, row, index) { | |
| 469 | + var state = 2; | |
| 470 | + $.ajax({ | |
| 471 | + type: 'get', | |
| 472 | + data: {'_token': 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40'}, | |
| 473 | + url: '/videos/claim/' + row.id, | |
| 474 | + success: function (data) { | |
| 475 | + if (data['status_code'] == 403) { | |
| 476 | + window.location.href = '/videos' + '?state=' + 1; | |
| 477 | + }else{ | |
| 478 | + window.location.href = '/videos' + '?state=' + state; | |
| 479 | + } | |
| 480 | + } | |
| 481 | + }); | |
| 482 | + }, | |
| 483 | + 'click .detail': function (e, value, row, index) { | |
| 484 | + var state =global_state; | |
| 485 | + window.location.href = '/videos/detail/' + row.id + '?state=' + state; | |
| 486 | + }, | |
| 487 | + | |
| 488 | + 'click .back': function (e, value, row, index) { | |
| 489 | + remove_open = true; | |
| 490 | + $('#msg').html('您确认退领该条信息吗?'); | |
| 491 | + $('#modal_remove').show(); | |
| 492 | + $('#modal_remove').data('id', row.id); | |
| 493 | + }, | |
| 494 | + | |
| 495 | + 'click .log': function (e, value, row, index) { | |
| 496 | + var act_id = row.activity_id; | |
| 497 | + $.ajax({ | |
| 498 | + type: 'get', | |
| 499 | + data: {'_token': 'MCgqTuvq2fL01T4VhkXj0shCeGYJU4l0X3loXu40', 'act_id': act_id}, | |
| 500 | + url: '/videos/get_msg/', | |
| 501 | + success: function (data) { | |
| 502 | + if (data['status_code'] == 200) { | |
| 503 | + var msg = eval("(" + data['data'] + ")") | |
| 504 | + console.log(msg) | |
| 505 | + if (msg == '') { | |
| 506 | + alert('没有审核记录'); | |
| 507 | + return false; | |
| 508 | + } else { | |
| 509 | + alert(msg); | |
| 510 | + } | |
| 511 | + } | |
| 512 | + } | |
| 513 | + }); | |
| 514 | + } | |
| 515 | + }; | |
| 516 | + | |
| 517 | + /** | |
| 518 | + * 审核按钮的显示--已认领就是未审核的 | |
| 519 | + * @param value | |
| 520 | + * @param row | |
| 521 | + * @param index | |
| 522 | + * @returns {string} | |
| 523 | + */ | |
| 524 | + function stateFormatter(value, row, index) { | |
| 525 | +// var style = 'label-primary'; | |
| 526 | + var style = 'btn-sm btn-primary'; | |
| 527 | + switch (row.state_name) { | |
| 528 | + case '未认领': | |
| 529 | + case '已认领,未审核': | |
| 530 | + style = 'btn-sm btn-warning'; | |
| 531 | + break; | |
| 532 | + case '我的已审核': | |
| 533 | + style = 'btn-sm btn-success'; | |
| 534 | + break; | |
| 535 | + case '我的未通过': | |
| 536 | + style = 'btn-sm btn-danger'; | |
| 537 | + break; | |
| 538 | + } | |
| 539 | + return [ | |
| 540 | + '<span class="btn ' + style + '">' + row.state_name_short + '</span>', | |
| 541 | + ].join(''); | |
| 542 | + } | |
| 543 | + | |
| 544 | + | |
| 545 | + function coverFormatter(value, row, index) { | |
| 546 | +// var face0 = row.video_cover_img; | |
| 547 | +// var arr = $.parseJSON(face); | |
| 548 | +// var arr = JSON.parse(face); | |
| 549 | +// var arr = face; | |
| 550 | +// var arr = eval("(" + face + ")"); | |
| 551 | + var face = ''; | |
| 552 | + var face1 = row.video_cover_img1; //点播云 | |
| 553 | + var face2 = row.video_cover_img2; //直播云 | |
| 554 | +// if (arr["224*126"]) { | |
| 555 | +// face = arr["224*126"]; | |
| 556 | +// } else { | |
| 557 | + if (face1 !=='' || face1 == null) { //点播云地址存在或'' | |
| 558 | + face = face1; | |
| 559 | + } | |
| 560 | + if (face2 !=='' || face2 == null ) { | |
| 561 | + face = face2; | |
| 562 | + } | |
| 563 | + if (face == '' || face.length ==0 || face == ' ') { | |
| 564 | + return [ | |
| 565 | + '<div width="160px" height="90px">' + | |
| 566 | + '<img src="/uploads/images/default.jpg" width="160px" alt="封面图">' + '</div>', | |
| 567 | + // '<span src="+ row.face +">' + row.state_name + '</span>', | |
| 568 | + ].join(''); | |
| 569 | + } else { | |
| 570 | + return [ | |
| 571 | + '<div width="160px" height="90px">' + | |
| 572 | + '<img src="' + face + '" width="160px" alt="封面图">' + '</div>', | |
| 573 | + // '<span src="+ row.face +">' + row.state_name + '</span>', | |
| 574 | + ].join(''); | |
| 575 | + } | |
| 576 | + } | |
| 577 | + | |
| 578 | + /*时间格式切换*/ | |
| 579 | + function uploadFormatter(value, row, index) { | |
| 580 | + var upload = row.upload_time; | |
| 581 | + if (upload) { | |
| 582 | + var uploadFormat = getDate(upload); | |
| 583 | + } | |
| 584 | + return uploadFormat; | |
| 585 | + } | |
| 586 | + function add0(m) { | |
| 587 | + return m < 10 ? '0' + m : m | |
| 588 | + }; | |
| 589 | + function getDate(upload) { | |
| 590 | + var time = new Date(parseInt(upload)); | |
| 591 | + var y = time.getFullYear(); | |
| 592 | + var m = time.getMonth() + 1; | |
| 593 | + var d = time.getDate(); | |
| 594 | + var h = time.getHours(); | |
| 595 | + var mm = time.getMinutes(); | |
| 596 | + var s = time.getSeconds(); | |
| 597 | + return y + '-' + add0(m) + '-' + add0(d) + ' ' + add0(h) + ':' + add0(mm) + ':' + add0(s); | |
| 598 | + }; | |
| 599 | + </script> | |
| 600 | + | |
| 601 | + | |
| 602 | + <footer th:replace="../templates/common/foot::foot" ></footer> | |
| 603 | + | |
| 604 | + <!-- Add the sidebar's background. This div must be placed | |
| 605 | + immediately after the control sidebar --> | |
| 606 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 607 | + | |
| 608 | +</div><!-- ./wrapper --> | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 613 | +<script type="text/javascript"> | |
| 614 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 615 | +</script> | |
| 616 | + | |
| 617 | +<!-- AdminLTE App --> | |
| 618 | +<script src="../../static/js/app.min.js"></script> | |
| 619 | +<!-- AdminLTE for demo purposes --> | |
| 620 | +<script src="../../static/js/sidebar.js"></script> | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | +</body></html> | |
| 0 | 629 | \ No newline at end of file | ... | ... |