| @@ -1,136 +1,137 @@ | |||
| //= require rails-ujs | |||
| //= require activestorage | |||
| //= require turbolinks | |||
| //= require jquery3 | |||
| //= require popper | |||
| //= require bootstrap-sprockets | |||
| //= require jquery.validate.min | |||
| //= require additional-methods.min | |||
| //= require bootstrap-notify | |||
| //= require jquery.cookie.min | |||
| //= require select2 | |||
| //= require moment.min | |||
| //= require jquery.cxselect | |||
| //= require bootstrap-datepicker | |||
| //= require bootstrap-datetimepicker | |||
| //= require bootstrap.viewer | |||
| //= require jquery.mloading | |||
| //= require jquery-confirm.min | |||
| //= require common | |||
| //= require echarts | |||
| //= require codemirror/lib/codemirror | |||
| //= require codemirror/mode/shell/shell | |||
| //= require editormd/editormd | |||
| //= require editormd/languages/zh-tw | |||
| //= require dragula/dragula | |||
| //= require_tree ./i18n | |||
| //= require_tree ./admins | |||
| $.ajaxSetup({ | |||
| beforeSend: function(xhr) { | |||
| xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')); | |||
| } | |||
| }); | |||
| // ******** select2 global config ******** | |||
| $.fn.select2.defaults.set('theme', 'bootstrap4'); | |||
| $.fn.select2.defaults.set('language', 'zh-CN'); | |||
| Turbolinks.setProgressBarDelay(200); | |||
| $.notifyDefaults({ | |||
| type: 'success', | |||
| z_index: 9999, | |||
| delay: 2000 | |||
| }); | |||
| function show_success_flash(){ | |||
| $.notify({ | |||
| message: '操作成功' | |||
| },{ | |||
| type: 'success' | |||
| }); | |||
| } | |||
| $(document).on('turbolinks:load', function(){ | |||
| $('[data-toggle="tooltip"]').tooltip({ trigger : 'hover' }); | |||
| $('[data-toggle="popover"]').popover(); | |||
| // 图片查看大图 | |||
| $('img.preview-image').bootstrapViewer(); | |||
| // flash alert提示框自动关闭 | |||
| if($('.admin-alert-container .alert').length > 0){ | |||
| setTimeout(function(){ | |||
| $('.admin-alert-container .alert:not(.alert-danger)').alert('close'); | |||
| }, 2000); | |||
| setTimeout(function(){ | |||
| $('.admin-alert-container .alert.alert-danger').alert('close'); | |||
| }, 5000); | |||
| } | |||
| }); | |||
| $(document).on("turbolinks:before-cache", function () { | |||
| $('[data-toggle="tooltip"]').tooltip('hide'); | |||
| $('[data-toggle="popover"]').popover('hide'); | |||
| }); | |||
| // var progressBar = new Turbolinks.ProgressBar(); | |||
| // $(document).on('ajax:send', function(event){ | |||
| // console.log('ajax send', event); | |||
| // progressBar.setValue(0) | |||
| // progressBar.show() | |||
| // }); | |||
| // | |||
| // $(document).on('ajax:complete', function(event){ | |||
| // console.log('ajax complete', event); | |||
| // progressBar.setValue(1) | |||
| // progressBar.hide() // 分页时不触发,奇怪 | |||
| // }); | |||
| // $(document).on('ajax:success', function(event){ | |||
| // console.log('ajax success', event); | |||
| // }); | |||
| // $(document).on('ajax:error', function(event){ | |||
| // console.log('ajax error', event); | |||
| // }); | |||
| $(function () { | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| $('.logo-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| $('.attachment-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| //= require rails-ujs | |||
| //= require activestorage | |||
| //= require turbolinks | |||
| //= require jquery3 | |||
| //= require popper | |||
| //= require bootstrap-sprockets | |||
| //= require jquery.validate.min | |||
| //= require additional-methods.min | |||
| //= require bootstrap-notify | |||
| //= require jquery.cookie.min | |||
| //= require select2 | |||
| //= require moment.min | |||
| //= require jquery.cxselect | |||
| //= require bootstrap-datepicker | |||
| //= require bootstrap-datetimepicker | |||
| //= require bootstrap.viewer | |||
| //= require bootstrap/bootstrap-toggle | |||
| //= require jquery.mloading | |||
| //= require jquery-confirm.min | |||
| //= require common | |||
| //= require echarts | |||
| //= require codemirror/lib/codemirror | |||
| //= require codemirror/mode/shell/shell | |||
| //= require editormd/editormd | |||
| //= require editormd/languages/zh-tw | |||
| //= require dragula/dragula | |||
| //= require_tree ./i18n | |||
| //= require_tree ./admins | |||
| $.ajaxSetup({ | |||
| beforeSend: function(xhr) { | |||
| xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')); | |||
| } | |||
| }); | |||
| // ******** select2 global config ******** | |||
| $.fn.select2.defaults.set('theme', 'bootstrap4'); | |||
| $.fn.select2.defaults.set('language', 'zh-CN'); | |||
| Turbolinks.setProgressBarDelay(200); | |||
| $.notifyDefaults({ | |||
| type: 'success', | |||
| z_index: 9999, | |||
| delay: 2000 | |||
| }); | |||
| function show_success_flash(){ | |||
| $.notify({ | |||
| message: '操作成功' | |||
| },{ | |||
| type: 'success' | |||
| }); | |||
| } | |||
| $(document).on('turbolinks:load', function(){ | |||
| $('[data-toggle="tooltip"]').tooltip({ trigger : 'hover' }); | |||
| $('[data-toggle="popover"]').popover(); | |||
| // 图片查看大图 | |||
| $('img.preview-image').bootstrapViewer(); | |||
| // flash alert提示框自动关闭 | |||
| if($('.admin-alert-container .alert').length > 0){ | |||
| setTimeout(function(){ | |||
| $('.admin-alert-container .alert:not(.alert-danger)').alert('close'); | |||
| }, 2000); | |||
| setTimeout(function(){ | |||
| $('.admin-alert-container .alert.alert-danger').alert('close'); | |||
| }, 5000); | |||
| } | |||
| }); | |||
| $(document).on("turbolinks:before-cache", function () { | |||
| $('[data-toggle="tooltip"]').tooltip('hide'); | |||
| $('[data-toggle="popover"]').popover('hide'); | |||
| }); | |||
| // var progressBar = new Turbolinks.ProgressBar(); | |||
| // $(document).on('ajax:send', function(event){ | |||
| // console.log('ajax send', event); | |||
| // progressBar.setValue(0) | |||
| // progressBar.show() | |||
| // }); | |||
| // | |||
| // $(document).on('ajax:complete', function(event){ | |||
| // console.log('ajax complete', event); | |||
| // progressBar.setValue(1) | |||
| // progressBar.hide() // 分页时不触发,奇怪 | |||
| // }); | |||
| // $(document).on('ajax:success', function(event){ | |||
| // console.log('ajax success', event); | |||
| // }); | |||
| // $(document).on('ajax:error', function(event){ | |||
| // console.log('ajax error', event); | |||
| // }); | |||
| $(function () { | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| $('.logo-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| $('.attachment-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| }) | |||
| @@ -0,0 +1,180 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap-toggle.js v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| +function ($) { | |||
| 'use strict'; | |||
| // TOGGLE PUBLIC CLASS DEFINITION | |||
| // ============================== | |||
| var Toggle = function (element, options) { | |||
| this.$element = $(element) | |||
| this.options = $.extend({}, this.defaults(), options) | |||
| this.render() | |||
| } | |||
| Toggle.VERSION = '2.2.0' | |||
| Toggle.DEFAULTS = { | |||
| on: 'On', | |||
| off: 'Off', | |||
| onstyle: 'primary', | |||
| offstyle: 'default', | |||
| size: 'normal', | |||
| style: '', | |||
| width: null, | |||
| height: null | |||
| } | |||
| Toggle.prototype.defaults = function() { | |||
| return { | |||
| on: this.$element.attr('data-on') || Toggle.DEFAULTS.on, | |||
| off: this.$element.attr('data-off') || Toggle.DEFAULTS.off, | |||
| onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle, | |||
| offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle, | |||
| size: this.$element.attr('data-size') || Toggle.DEFAULTS.size, | |||
| style: this.$element.attr('data-style') || Toggle.DEFAULTS.style, | |||
| width: this.$element.attr('data-width') || Toggle.DEFAULTS.width, | |||
| height: this.$element.attr('data-height') || Toggle.DEFAULTS.height | |||
| } | |||
| } | |||
| Toggle.prototype.render = function () { | |||
| this._onstyle = 'btn-' + this.options.onstyle | |||
| this._offstyle = 'btn-' + this.options.offstyle | |||
| var size = this.options.size === 'large' ? 'btn-lg' | |||
| : this.options.size === 'small' ? 'btn-sm' | |||
| : this.options.size === 'mini' ? 'btn-xs' | |||
| : '' | |||
| var $toggleOn = $('<label class="btn">').html(this.options.on) | |||
| .addClass(this._onstyle + ' ' + size) | |||
| var $toggleOff = $('<label class="btn">').html(this.options.off) | |||
| .addClass(this._offstyle + ' ' + size + ' active') | |||
| var $toggleHandle = $('<span class="toggle-handle btn btn-default">') | |||
| .addClass(size) | |||
| var $toggleGroup = $('<div class="toggle-group">') | |||
| .append($toggleOn, $toggleOff, $toggleHandle) | |||
| var $toggle = $('<div class="toggle btn" data-toggle="toggle">') | |||
| .addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' ) | |||
| .addClass(size).addClass(this.options.style) | |||
| this.$element.wrap($toggle) | |||
| $.extend(this, { | |||
| $toggle: this.$element.parent(), | |||
| $toggleOn: $toggleOn, | |||
| $toggleOff: $toggleOff, | |||
| $toggleGroup: $toggleGroup | |||
| }) | |||
| this.$toggle.append($toggleGroup) | |||
| var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2) | |||
| var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight()) | |||
| $toggleOn.addClass('toggle-on') | |||
| $toggleOff.addClass('toggle-off') | |||
| this.$toggle.css({ width: width, height: height }) | |||
| if (this.options.height) { | |||
| $toggleOn.css('line-height', $toggleOn.height() + 'px') | |||
| $toggleOff.css('line-height', $toggleOff.height() + 'px') | |||
| } | |||
| this.update(true) | |||
| this.trigger(true) | |||
| } | |||
| Toggle.prototype.toggle = function () { | |||
| if (this.$element.prop('checked')) this.off() | |||
| else this.on() | |||
| } | |||
| Toggle.prototype.on = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle) | |||
| this.$element.prop('checked', true) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.off = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off') | |||
| this.$element.prop('checked', false) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.enable = function () { | |||
| this.$toggle.removeAttr('disabled') | |||
| this.$element.prop('disabled', false) | |||
| } | |||
| Toggle.prototype.disable = function () { | |||
| this.$toggle.attr('disabled', 'disabled') | |||
| this.$element.prop('disabled', true) | |||
| } | |||
| Toggle.prototype.update = function (silent) { | |||
| if (this.$element.prop('disabled')) this.disable() | |||
| else this.enable() | |||
| if (this.$element.prop('checked')) this.on(silent) | |||
| else this.off(silent) | |||
| } | |||
| Toggle.prototype.trigger = function (silent) { | |||
| this.$element.off('change.bs.toggle') | |||
| if (!silent) this.$element.change() | |||
| this.$element.on('change.bs.toggle', $.proxy(function() { | |||
| this.update() | |||
| }, this)) | |||
| } | |||
| Toggle.prototype.destroy = function() { | |||
| this.$element.off('change.bs.toggle') | |||
| this.$toggleGroup.remove() | |||
| this.$element.removeData('bs.toggle') | |||
| this.$element.unwrap() | |||
| } | |||
| // TOGGLE PLUGIN DEFINITION | |||
| // ======================== | |||
| function Plugin(option) { | |||
| return this.each(function () { | |||
| var $this = $(this) | |||
| var data = $this.data('bs.toggle') | |||
| var options = typeof option == 'object' && option | |||
| if (!data) $this.data('bs.toggle', (data = new Toggle(this, options))) | |||
| if (typeof option == 'string' && data[option]) data[option]() | |||
| }) | |||
| } | |||
| var old = $.fn.bootstrapToggle | |||
| $.fn.bootstrapToggle = Plugin | |||
| $.fn.bootstrapToggle.Constructor = Toggle | |||
| // TOGGLE NO CONFLICT | |||
| // ================== | |||
| $.fn.toggle.noConflict = function () { | |||
| $.fn.bootstrapToggle = old | |||
| return this | |||
| } | |||
| // TOGGLE DATA-API | |||
| // =============== | |||
| $(function() { | |||
| $('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle() | |||
| }) | |||
| $(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) { | |||
| var $checkbox = $(this).find('input[type=checkbox]') | |||
| $checkbox.bootstrapToggle('toggle') | |||
| e.preventDefault() | |||
| }) | |||
| }(jQuery); | |||
| @@ -0,0 +1,9 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap-toggle.js v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| +function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-lg":"small"===this.options.size?"btn-sm":"mini"===this.options.size?"btn-xs":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.outerWidth(),d.outerWidth())+e.outerWidth()/2,i=this.options.height||Math.max(c.outerHeight(),d.outerHeight());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery); | |||
| //# sourceMappingURL=bootstrap-toggle.min.js.map | |||
| @@ -0,0 +1 @@ | |||
| {"version":3,"file":"bootstrap-toggle.min.js","sources":["bootstrap-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","outerHeight","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDef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D,GAAGC,gBAAkBF,EAChBvD,MAMRH,EAAE,WACDA,EAAE,6CAA6C4D,oBAGhD5D,EAAE+D,UAAU/C,GAAG,kBAAmB,2BAA4B,SAASgD,GACtE,GAAIC,GAAYjE,EAAEG,MAAM+D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"} | |||
| @@ -0,0 +1,180 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap2-toggle.js v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| +function ($) { | |||
| 'use strict'; | |||
| // TOGGLE PUBLIC CLASS DEFINITION | |||
| // ============================== | |||
| var Toggle = function (element, options) { | |||
| this.$element = $(element) | |||
| this.options = $.extend({}, this.defaults(), options) | |||
| this.render() | |||
| } | |||
| Toggle.VERSION = '2.2.0' | |||
| Toggle.DEFAULTS = { | |||
| on: 'On', | |||
| off: 'Off', | |||
| onstyle: 'primary', | |||
| offstyle: 'default', | |||
| size: 'normal', | |||
| style: '', | |||
| width: null, | |||
| height: null | |||
| } | |||
| Toggle.prototype.defaults = function() { | |||
| return { | |||
| on: this.$element.attr('data-on') || Toggle.DEFAULTS.on, | |||
| off: this.$element.attr('data-off') || Toggle.DEFAULTS.off, | |||
| onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle, | |||
| offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle, | |||
| size: this.$element.attr('data-size') || Toggle.DEFAULTS.size, | |||
| style: this.$element.attr('data-style') || Toggle.DEFAULTS.style, | |||
| width: this.$element.attr('data-width') || Toggle.DEFAULTS.width, | |||
| height: this.$element.attr('data-height') || Toggle.DEFAULTS.height | |||
| } | |||
| } | |||
| Toggle.prototype.render = function () { | |||
| this._onstyle = 'btn-' + this.options.onstyle | |||
| this._offstyle = 'btn-' + this.options.offstyle | |||
| var size = this.options.size === 'large' ? 'btn-large' | |||
| : this.options.size === 'small' ? 'btn-small' | |||
| : this.options.size === 'mini' ? 'btn-mini' | |||
| : '' | |||
| var $toggleOn = $('<label class="btn">').html(this.options.on) | |||
| .addClass(this._onstyle + ' ' + size) | |||
| var $toggleOff = $('<label class="btn">').html(this.options.off) | |||
| .addClass(this._offstyle + ' ' + size + ' active') | |||
| var $toggleHandle = $('<span class="toggle-handle btn btn-default">') | |||
| .addClass(size) | |||
| var $toggleGroup = $('<div class="toggle-group">') | |||
| .append($toggleOn, $toggleOff, $toggleHandle) | |||
| var $toggle = $('<div class="toggle btn" data-toggle="toggle">') | |||
| .addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' ) | |||
| .addClass(size).addClass(this.options.style) | |||
| this.$element.wrap($toggle) | |||
| $.extend(this, { | |||
| $toggle: this.$element.parent(), | |||
| $toggleOn: $toggleOn, | |||
| $toggleOff: $toggleOff, | |||
| $toggleGroup: $toggleGroup | |||
| }) | |||
| this.$toggle.append($toggleGroup) | |||
| var width = this.options.width || Math.max($toggleOn.width(), $toggleOff.width())+($toggleHandle.outerWidth()/2) | |||
| var height = this.options.height || Math.max($toggleOn.height(), $toggleOff.height()) | |||
| $toggleOn.addClass('toggle-on') | |||
| $toggleOff.addClass('toggle-off') | |||
| this.$toggle.css({ width: width, height: height }) | |||
| if (this.options.height) { | |||
| $toggleOn.css('line-height', $toggleOn.height() + 'px') | |||
| $toggleOff.css('line-height', $toggleOff.height() + 'px') | |||
| } | |||
| this.update(true) | |||
| this.trigger(true) | |||
| } | |||
| Toggle.prototype.toggle = function () { | |||
| if (this.$element.prop('checked')) this.off() | |||
| else this.on() | |||
| } | |||
| Toggle.prototype.on = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle) | |||
| this.$element.prop('checked', true) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.off = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off') | |||
| this.$element.prop('checked', false) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.enable = function () { | |||
| this.$toggle.removeAttr('disabled') | |||
| this.$element.prop('disabled', false) | |||
| } | |||
| Toggle.prototype.disable = function () { | |||
| this.$toggle.attr('disabled', 'disabled') | |||
| this.$element.prop('disabled', true) | |||
| } | |||
| Toggle.prototype.update = function (silent) { | |||
| if (this.$element.prop('disabled')) this.disable() | |||
| else this.enable() | |||
| if (this.$element.prop('checked')) this.on(silent) | |||
| else this.off(silent) | |||
| } | |||
| Toggle.prototype.trigger = function (silent) { | |||
| this.$element.off('change.bs.toggle') | |||
| if (!silent) this.$element.change() | |||
| this.$element.on('change.bs.toggle', $.proxy(function() { | |||
| this.update() | |||
| }, this)) | |||
| } | |||
| Toggle.prototype.destroy = function() { | |||
| this.$element.off('change.bs.toggle') | |||
| this.$toggleGroup.remove() | |||
| this.$element.removeData('bs.toggle') | |||
| this.$element.unwrap() | |||
| } | |||
| // TOGGLE PLUGIN DEFINITION | |||
| // ======================== | |||
| function Plugin(option) { | |||
| return this.each(function () { | |||
| var $this = $(this) | |||
| var data = $this.data('bs.toggle') | |||
| var options = typeof option == 'object' && option | |||
| if (!data) $this.data('bs.toggle', (data = new Toggle(this, options))) | |||
| if (typeof option == 'string' && data[option]) data[option]() | |||
| }) | |||
| } | |||
| var old = $.fn.bootstrapToggle | |||
| $.fn.bootstrapToggle = Plugin | |||
| $.fn.bootstrapToggle.Constructor = Toggle | |||
| // TOGGLE NO CONFLICT | |||
| // ================== | |||
| $.fn.toggle.noConflict = function () { | |||
| $.fn.bootstrapToggle = old | |||
| return this | |||
| } | |||
| // TOGGLE DATA-API | |||
| // =============== | |||
| $(function() { | |||
| $('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle() | |||
| }) | |||
| $(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) { | |||
| var $checkbox = $(this).find('input[type=checkbox]') | |||
| $checkbox.bootstrapToggle('toggle') | |||
| e.preventDefault() | |||
| }) | |||
| }(jQuery); | |||
| @@ -0,0 +1,9 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap2-toggle.js v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| +function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-large":"small"===this.options.size?"btn-small":"mini"===this.options.size?"btn-mini":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.width(),d.width())+e.outerWidth()/2,i=this.options.height||Math.max(c.height(),d.height());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery); | |||
| //# sourceMappingURL=bootstrap2-toggle.min.js.map | |||
| @@ -0,0 +1 @@ | |||
| {"version":3,"file":"bootstrap2-toggle.min.js","sources":["bootstrap2-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAAOO,UACNC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,UACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGTf,EAAOgB,UAAUZ,SAAW,WAC3B,OACCI,GAAIb,KAAKO,SAASe,KAAK,YAAcjB,EAAOO,SAASC,GACrDC,IAAKd,KAAKO,SAASe,KAAK,aAAejB,EAAOO,SAASE,IACvDC,QAASf,KAAKO,SAASe,KAAK,iBAAmBjB,EAAOO,SAASG,QAC/DC,SAAUhB,KAAKO,SAASe,KAAK,kBAAoBjB,EAAOO,SAASI,SACjEC,KAAMjB,KAAKO,SAASe,KAAK,cAAgBjB,EAAOO,SAASK,KACzDC,MAAOlB,KAAKO,SAASe,K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M,WAC5CjD,KAAKwC,UACHxC,QAGJK,EAAOgB,UAAU6B,QAAU,WAC1BlD,KAAKO,SAASO,IAAI,oBAClBd,KAAK8B,aAAaqB,SAClBnD,KAAKO,SAAS6C,WAAW,aACzBpD,KAAKO,SAAS8C,SAiBf,IAAIC,GAAMzD,EAAE0D,GAAGC,eAEf3D,GAAE0D,GAAGC,gBAA8B1D,EACnCD,EAAE0D,GAAGC,gBAAgBC,YAAcpD,EAKnCR,EAAE0D,GAAGb,OAAOgB,WAAa,WAExB,MADA7D,GAAE0D,GAAGC,gBAAkBF,EAChBtD,MAMRH,EAAE,WACDA,EAAE,6CAA6C2D,oBAGhD3D,EAAE8D,UAAU9C,GAAG,kBAAmB,2BAA4B,SAAS+C,GACtE,GAAIC,GAAYhE,EAAEG,MAAM8D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"} | |||
| @@ -8,6 +8,7 @@ | |||
| @import "jquery.mloading"; | |||
| @import "jquery-confirm.min"; | |||
| @import "bootstrap-datetimepicker.min"; | |||
| @import "bootstrap/bootstrap-toggle.min"; | |||
| @import "codemirror/lib/codemirror"; | |||
| @import "editormd/css/editormd.min"; | |||
| @@ -0,0 +1,83 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap-toggle.css v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| .checkbox label .toggle, | |||
| .checkbox-inline .toggle { | |||
| margin-left: -20px; | |||
| margin-right: 5px; | |||
| } | |||
| .toggle { | |||
| position: relative; | |||
| overflow: hidden; | |||
| } | |||
| .toggle input[type="checkbox"] { | |||
| display: none; | |||
| } | |||
| .toggle-group { | |||
| position: absolute; | |||
| width: 200%; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 0; | |||
| transition: left 0.35s; | |||
| -webkit-transition: left 0.35s; | |||
| -moz-user-select: none; | |||
| -webkit-user-select: none; | |||
| } | |||
| .toggle.off .toggle-group { | |||
| left: -100%; | |||
| } | |||
| .toggle-on { | |||
| position: absolute; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 0; | |||
| right: 50%; | |||
| margin: 0; | |||
| border: 0; | |||
| border-radius: 0; | |||
| } | |||
| .toggle-off { | |||
| position: absolute; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 50%; | |||
| right: 0; | |||
| margin: 0; | |||
| border: 0; | |||
| border-radius: 0; | |||
| } | |||
| .toggle-handle { | |||
| position: relative; | |||
| margin: 0 auto; | |||
| padding-top: 0px; | |||
| padding-bottom: 0px; | |||
| height: 100%; | |||
| width: 0px; | |||
| border-width: 0 1px; | |||
| } | |||
| .toggle.btn { min-width: 59px; min-height: 34px; } | |||
| .toggle-on.btn { padding-right: 24px; } | |||
| .toggle-off.btn { padding-left: 24px; } | |||
| .toggle.btn-lg { min-width: 79px; min-height: 45px; } | |||
| .toggle-on.btn-lg { padding-right: 31px; } | |||
| .toggle-off.btn-lg { padding-left: 31px; } | |||
| .toggle-handle.btn-lg { width: 40px; } | |||
| .toggle.btn-sm { min-width: 50px; min-height: 30px;} | |||
| .toggle-on.btn-sm { padding-right: 20px; } | |||
| .toggle-off.btn-sm { padding-left: 20px; } | |||
| .toggle.btn-xs { min-width: 35px; min-height: 22px;} | |||
| .toggle-on.btn-xs { padding-right: 12px; } | |||
| .toggle-off.btn-xs { padding-left: 12px; } | |||
| @@ -0,0 +1,28 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap-toggle.css v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| .checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px} | |||
| .toggle{position:relative;overflow:hidden} | |||
| .toggle input[type=checkbox]{display:none} | |||
| .toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none} | |||
| .toggle.off .toggle-group{left:-100%} | |||
| .toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0} | |||
| .toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0} | |||
| .toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px} | |||
| .toggle.btn{min-width:59px;min-height:34px} | |||
| .toggle-on.btn{padding-right:24px} | |||
| .toggle-off.btn{padding-left:24px} | |||
| .toggle.btn-lg{min-width:79px;min-height:45px} | |||
| .toggle-on.btn-lg{padding-right:31px} | |||
| .toggle-off.btn-lg{padding-left:31px} | |||
| .toggle-handle.btn-lg{width:40px} | |||
| .toggle.btn-sm{min-width:50px;min-height:30px} | |||
| .toggle-on.btn-sm{padding-right:20px} | |||
| .toggle-off.btn-sm{padding-left:20px} | |||
| .toggle.btn-xs{min-width:35px;min-height:22px} | |||
| .toggle-on.btn-xs{padding-right:12px} | |||
| .toggle-off.btn-xs{padding-left:12px} | |||
| @@ -0,0 +1,85 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap2-toggle.css v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| label.checkbox .toggle, | |||
| label.checkbox.inline .toggle { | |||
| margin-left: -20px; | |||
| margin-right: 5px; | |||
| } | |||
| .toggle { | |||
| min-width: 40px; | |||
| height: 20px; | |||
| position: relative; | |||
| overflow: hidden; | |||
| } | |||
| .toggle input[type="checkbox"] { | |||
| display: none; | |||
| } | |||
| .toggle-group { | |||
| position: absolute; | |||
| width: 200%; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 0; | |||
| transition: left 0.35s; | |||
| -webkit-transition: left 0.35s; | |||
| -moz-user-select: none; | |||
| -webkit-user-select: none; | |||
| } | |||
| .toggle.off .toggle-group { | |||
| left: -100%; | |||
| } | |||
| .toggle-on { | |||
| position: absolute; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 0; | |||
| right: 50%; | |||
| margin: 0; | |||
| border: 0; | |||
| border-radius: 0; | |||
| } | |||
| .toggle-off { | |||
| position: absolute; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 50%; | |||
| right: 0; | |||
| margin: 0; | |||
| border: 0; | |||
| border-radius: 0; | |||
| } | |||
| .toggle-handle { | |||
| position: relative; | |||
| margin: 0 auto; | |||
| padding-top: 0px; | |||
| padding-bottom: 0px; | |||
| height: 100%; | |||
| width: 0px; | |||
| border-width: 0 1px; | |||
| } | |||
| .toggle-handle.btn-mini { | |||
| top: -1px; | |||
| } | |||
| .toggle.btn { min-width: 30px; } | |||
| .toggle-on.btn { padding-right: 24px; } | |||
| .toggle-off.btn { padding-left: 24px; } | |||
| .toggle.btn-large { min-width: 40px; } | |||
| .toggle-on.btn-large { padding-right: 35px; } | |||
| .toggle-off.btn-large { padding-left: 35px; } | |||
| .toggle.btn-small { min-width: 25px; } | |||
| .toggle-on.btn-small { padding-right: 20px; } | |||
| .toggle-off.btn-small { padding-left: 20px; } | |||
| .toggle.btn-mini { min-width: 20px; } | |||
| .toggle-on.btn-mini { padding-right: 12px; } | |||
| .toggle-off.btn-mini { padding-left: 12px; } | |||
| @@ -0,0 +1,28 @@ | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap2-toggle.css v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| label.checkbox .toggle,label.checkbox.inline .toggle{margin-left:-20px;margin-right:5px} | |||
| .toggle{min-width:40px;height:20px;position:relative;overflow:hidden} | |||
| .toggle input[type=checkbox]{display:none} | |||
| .toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none} | |||
| .toggle.off .toggle-group{left:-100%} | |||
| .toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0} | |||
| .toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0} | |||
| .toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px} | |||
| .toggle-handle.btn-mini{top:-1px} | |||
| .toggle.btn{min-width:30px} | |||
| .toggle-on.btn{padding-right:24px} | |||
| .toggle-off.btn{padding-left:24px} | |||
| .toggle.btn-large{min-width:40px} | |||
| .toggle-on.btn-large{padding-right:35px} | |||
| .toggle-off.btn-large{padding-left:35px} | |||
| .toggle.btn-small{min-width:25px} | |||
| .toggle-on.btn-small{padding-right:20px} | |||
| .toggle-off.btn-small{padding-left:20px} | |||
| .toggle.btn-mini{min-width:20px} | |||
| .toggle-on.btn-mini{padding-right:12px} | |||
| .toggle-off.btn-mini{padding-left:12px} | |||
| @@ -0,0 +1,22 @@ | |||
| class Admins::NpsController < Admins::BaseController | |||
| def index | |||
| @on_off_switch = EduSetting.get("nps-on-off-switch").to_s == 'true' | |||
| @user_nps = UserNp.joins(:user).order(created_at: :desc) | |||
| keyword = params[:keyword].to_s.strip.presence | |||
| if keyword | |||
| sql = 'CONCAT(users.lastname, users.firstname) LIKE :keyword OR users.nickname LIKE :keyword OR users.login LIKE :keyword OR users.mail LIKE :keyword OR users.phone LIKE :keyword' | |||
| @user_nps = @user_nps.where(sql, keyword: "%#{keyword}%") | |||
| end | |||
| @user_nps = paginate @user_nps.includes(:user) | |||
| end | |||
| def switch_change | |||
| edu_setting = EduSetting.find_by(name: "nps-on-off-switch") | |||
| if edu_setting.blank? | |||
| edu_setting = EduSetting.new(name: "nps-on-off-switch") | |||
| end | |||
| edu_setting.value = params[:switch].to_s | |||
| edu_setting.save | |||
| render_ok | |||
| end | |||
| end | |||
| @@ -277,11 +277,11 @@ class ApplicationController < ActionController::Base | |||
| end | |||
| end | |||
| # if !User.current.logged? && Rails.env.development? | |||
| # user = User.find 1 | |||
| # User.current = user | |||
| # start_user_session(user) | |||
| # end | |||
| if !User.current.logged? && Rails.env.development? | |||
| user = User.find 1 | |||
| User.current = user | |||
| start_user_session(user) | |||
| end | |||
| # 测试版前端需求 | |||
| @@ -0,0 +1,17 @@ | |||
| class NpsController < ApplicationController | |||
| before_action :require_login | |||
| # close,关闭 | |||
| # createIssue,创建issue | |||
| # createPullRequest,创建PR | |||
| # auditPullRequest,审核PR | |||
| # indexProject,项目主页 | |||
| # createProject,创建项目 | |||
| # createOrganization,创建组织 | |||
| def create | |||
| tip_exception "缺少参数" if params[:action_id].blank? || params[:action_type].blank? | |||
| UserNp.create(:action_id => params[:action_id].to_i, :action_type => params[:action_type], :user_id => User.current.id, :score => params[:score].to_f, memo: params[:memo]) | |||
| render_ok | |||
| end | |||
| end | |||
| @@ -21,6 +21,17 @@ class Organizations::TeamProjectsController < Organizations::BaseController | |||
| tip_exception(e.message) | |||
| end | |||
| def create_all | |||
| tip_exception("该组织团队项目包括组织所有项目,不允许更改") if @team.includes_all_project | |||
| ActiveRecord::Base.transaction do | |||
| @organization.projects.each do |project| | |||
| TeamProject.build(@organization.id, @team.id, project.id) | |||
| end | |||
| Gitea::Organization::TeamProject::CreateAllService.call(@organization.gitea_token, @team.gtid, @organization.login) | |||
| render_ok | |||
| end | |||
| end | |||
| def destroy | |||
| tip_exception("该组织团队项目包括组织所有项目,不允许更改") if @team.includes_all_project | |||
| ActiveRecord::Base.transaction do | |||
| @@ -33,6 +44,17 @@ class Organizations::TeamProjectsController < Organizations::BaseController | |||
| tip_exception(e.message) | |||
| end | |||
| def destroy_all | |||
| tip_exception("该组织团队项目包括组织所有项目,不允许更改") if @team.includes_all_project | |||
| ActiveRecord::Base.transaction do | |||
| @team.team_projects.each do |project| | |||
| project.destroy! | |||
| end | |||
| Gitea::Organization::TeamProject::DeleteAllService.call(@organization.gitea_token, @team.gtid, @organization.login) | |||
| render_ok | |||
| end | |||
| end | |||
| private | |||
| def load_organization | |||
| @organization = Organization.find_by(login: params[:organization_id]) || Organization.find_by(id: params[:organization_id]) | |||
| @@ -47,7 +69,7 @@ class Organizations::TeamProjectsController < Organizations::BaseController | |||
| end | |||
| def load_operate_project | |||
| @operate_project = Project.find_by(id: project_mark) || Project.find_by(identifier: project_mark) | |||
| @operate_project = @organization.projects.where(id: project_mark).take || @organization.projects.where(identifier: project_mark).take | |||
| tip_exception("项目不存在") if @operate_project.nil? | |||
| end | |||
| @@ -0,0 +1,78 @@ | |||
| # Teams | |||
| ## 团队下新增所有的项目 | |||
| 团队下新增所有的项目 | |||
| > 示例: | |||
| ```shell | |||
| curl -X POST \ | |||
| http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/create_all | |||
| ``` | |||
| ```javascript | |||
| await octokit.request('POST /api/organizations/ceshi_org/teams/28/team_projects/create_all.json') | |||
| ``` | |||
| ### HTTP 请求 | |||
| `POST /api/organizations/:organization/teams/:id/team_projects/create_all.json` | |||
| ### 请求参数: | |||
| 参数 | 必选 | 默认 | 类型 | 字段说明 | |||
| --------- | ------- | ------- | -------- | ---------- | |||
| |organization |是| | string |组织标识 | | |||
| |id |是| | integer|团队 ID| | |||
| ### 返回字段说明: | |||
| > 返回的JSON示例: | |||
| ```json | |||
| { | |||
| "status": 0, | |||
| "message": "success" | |||
| } | |||
| ``` | |||
| <aside class="success"> | |||
| Success Data. | |||
| </aside> | |||
| ## 团队下删除所有的项目 | |||
| 团队下删除所有的项目 | |||
| > 示例: | |||
| ```shell | |||
| curl -X DELETE \ | |||
| http://localhost:3000/api/organizations/ceshi_org/teams/28/team_projects/destroy_all | |||
| ``` | |||
| ```javascript | |||
| await octokit.request('DELETE /api/organizations/ceshi_org/teams/28/team_projects/destroy_all.json') | |||
| ``` | |||
| ### HTTP 请求 | |||
| `DELETE /api/organizations/:organization/teams/:id/team_projects/destroy_all.json` | |||
| ### 请求参数: | |||
| 参数 | 必选 | 默认 | 类型 | 字段说明 | |||
| --------- | ------- | ------- | -------- | ---------- | |||
| |organization |是| | string |组织标识 | | |||
| |id |是| | integer|团队 ID| | |||
| ### 返回字段说明: | |||
| > 返回的JSON示例: | |||
| ```json | |||
| { | |||
| "status": 0, | |||
| "message": "success" | |||
| } | |||
| ``` | |||
| <aside class="success"> | |||
| Success Data. | |||
| </aside> | |||
| @@ -0,0 +1,2 @@ | |||
| module Admins::NpsHelper | |||
| end | |||
| @@ -0,0 +1,21 @@ | |||
| # == Schema Information | |||
| # | |||
| # Table name: user_nps | |||
| # | |||
| # id :integer not null, primary key | |||
| # user_id :integer | |||
| # action_type :string(255) | |||
| # action_id :integer | |||
| # score :float(24) | |||
| # memo :text(65535) | |||
| # created_at :datetime not null | |||
| # updated_at :datetime not null | |||
| # | |||
| # Indexes | |||
| # | |||
| # index_user_nps_on_user_id (user_id) | |||
| # | |||
| class UserNp < ApplicationRecord | |||
| belongs_to :user, optional: true | |||
| end | |||
| @@ -19,6 +19,9 @@ class Admins::UserQuery < ApplicationQuery | |||
| status = params[:status] | |||
| users = users.where(status: status) if status.present? | |||
| # 是否管理员 | |||
| users = users.where(admin: params[:admin]) if params[:admin].present? | |||
| # 职业 | |||
| users = users.joins(:user_extension).where(user_extensions: { identity: params[:identity] }) if params[:identity].present? | |||
| @@ -0,0 +1,23 @@ | |||
| class Gitea::Organization::TeamProject::CreateAllService < Gitea::ClientService | |||
| attr_reader :token, :gtid, :org_name | |||
| def initialize(token, gtid, org_name) | |||
| @token = token | |||
| @gtid = gtid | |||
| @org_name = org_name | |||
| end | |||
| def call | |||
| response = put(url, request_params) | |||
| render_status(response) | |||
| end | |||
| private | |||
| def request_params | |||
| Hash.new.merge(token: token) | |||
| end | |||
| def url | |||
| "/teams/#{gtid}/repos/#{org_name}".freeze | |||
| end | |||
| end | |||
| @@ -0,0 +1,23 @@ | |||
| class Gitea::Organization::TeamProject::DeleteAllService < Gitea::ClientService | |||
| attr_reader :token, :gtid, :org_name | |||
| def initialize(token, gtid, org_name) | |||
| @token = token | |||
| @gtid = gtid | |||
| @org_name = org_name | |||
| end | |||
| def call | |||
| response = delete(url, params) | |||
| render_status(response) | |||
| end | |||
| private | |||
| def params | |||
| Hash.new.merge(token: token) | |||
| end | |||
| def url | |||
| "/teams/#{gtid}/repos/#{org_name}".freeze | |||
| end | |||
| end | |||
| @@ -0,0 +1,34 @@ | |||
| <table class="table table-hover users-list-table"> | |||
| <thead class="thead-light"> | |||
| <tr> | |||
| <th width="5%">序号</th> | |||
| <th width="10%" class="text-left">真实姓名</th> | |||
| <th width="15%">提交时间</th> | |||
| <th width="15%"><%= sort_tag('最后登录', name: 'last_login_on', path: admins_users_path) %></th> | |||
| <th width="10%">评分</th> | |||
| <th width="45%">意见反馈</th> | |||
| </tr> | |||
| </thead> | |||
| <tbody> | |||
| <% if user_nps.present? %> | |||
| <% user_nps.each_with_index do |nps, index| %> | |||
| <tr class="user-item-<%= nps.user.id %>"> | |||
| <td><%= list_index_no((params[:page] || 1).to_i, index) %></td> | |||
| <td class="text-left"> | |||
| <%= link_to "/#{nps.user.login}", target: '_blank' do %> | |||
| <%= overflow_hidden_span nps.user.real_name, width: 100 %> | |||
| <% end %> | |||
| </td> | |||
| <td><%= display_text(nps.created_at&.strftime('%Y-%m-%d %H:%M')) %></td> | |||
| <td><%= display_text(nps.user.last_login_on&.strftime('%Y-%m-%d %H:%M')) %></td> | |||
| <td><%= nps.score %></td> | |||
| <td><%= nps.memo %></td> | |||
| </tr> | |||
| <% end %> | |||
| <% else %> | |||
| <%= render 'admins/shared/no_data_for_table' %> | |||
| <% end %> | |||
| </tbody> | |||
| </table> | |||
| <%= render partial: 'admins/shared/paginate', locals: { objects: user_nps } %> | |||
| @@ -0,0 +1,45 @@ | |||
| <% define_admin_breadcrumbs do %> | |||
| <% add_admin_breadcrumb('NPS用户调研', admins_nps_path) %> | |||
| <% end %> | |||
| <div class="box search-form-container user-list-form"> | |||
| <%= form_tag(admins_nps_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %> | |||
| <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: 'ID/姓名/邮箱/手机号检索') %> | |||
| <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> | |||
| <span style="margin-left: 50px;margin-right: 10px;">NPS系统开关</span> | |||
| <input type="checkbox" <% if @on_off_switch %>checked<%end %> data-toggle="toggle" data-onstyle="primary" id="nps_toggle" data-on="开" data-off="关" data-size="small"> | |||
| <% end %> | |||
| </div> | |||
| <div class="box admin-list-container users-list-container"> | |||
| <%= render partial: 'admins/nps/user_np_list', locals: { user_nps: @user_nps } %> | |||
| </div> | |||
| <script> | |||
| $(function () { | |||
| $('#nps_toggle').bootstrapToggle({ | |||
| on: '开', | |||
| off: '关' | |||
| }); | |||
| $('#nps_toggle').change(function () { | |||
| var switch_value = $(this).prop('checked'); | |||
| var url = "/admins/nps/switch_change.json" | |||
| $.ajax({ | |||
| method: 'POST', | |||
| dataType: 'json', | |||
| url: url, | |||
| data: {'switch': switch_value}, | |||
| success: function () { | |||
| $.notify({message: '操作成功'}); | |||
| }, | |||
| error: function (res) { | |||
| } | |||
| }); | |||
| }) | |||
| }) | |||
| </script> | |||
| @@ -0,0 +1 @@ | |||
| $('.users-list-container').html("<%= j( render partial: 'admins/nps/user_np_list', locals: { user_nps: @user_nps } ) %>"); | |||
| @@ -55,6 +55,7 @@ | |||
| <li> | |||
| <%= sidebar_item_group('#setting-submenu', '网站建设', icon: 'cogs') do %> | |||
| <li><%= sidebar_item(admins_faqs_path, 'FAQ', icon: 'question-circle', controller: 'admins-faqs') %></li> | |||
| <li><%= sidebar_item(admins_nps_path, 'NPS用户调研', icon: 'question-circle', controller: 'admins-nps') %></li> | |||
| <% end %> | |||
| </li> | |||
| <li> | |||
| @@ -16,18 +16,15 @@ | |||
| <%= select_tag(:identity, options_for_select(identity_options), class: 'form-control') %> | |||
| </div> | |||
| <div class="form-group mr-2"> | |||
| <label for="identity">授权类型:</label> | |||
| <% auto_trial_options = [['全部', ''], ['自动授权', 1], ['手动授权', 0]] %> | |||
| <%= select_tag(:auto_trial, options_for_select(auto_trial_options), class: 'form-control') %> | |||
| </div> | |||
| <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: 'ID/姓名/邮箱/手机号检索') %> | |||
| <% | |||
| =begin%> | |||
| <%= text_field_tag(:school_name, params[:school_name], class: 'form-control col-sm-2', placeholder: '学校/单位检索') %> | |||
| <% | |||
| =end%> | |||
| <label for="user_admin"> | |||
| 是否管理员 | |||
| </label> | |||
| <%= check_box_tag("admin", true, false, id: "user_admin", style: 'margin-left: 2px;') %> | |||
| <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> | |||
| <% end %> | |||
| @@ -26,4 +26,5 @@ json.super_description @user.super_description | |||
| json.(@user, :show_email, :show_department, :show_location, :show_super_description) | |||
| json.message_unread_total @message_unread_total | |||
| json.has_trace_user @user.trace_user.present? | |||
| json.is_new @user.login.present? && params[:login].to_s.include?("#{@user.login}") | |||
| json.is_new @user.login.present? && params[:login].to_s.include?("#{@user.login}") | |||
| json.nps EduSetting.get("nps-on-off-switch").to_s == 'true' && UserNp.where(user_id: current_user.id).where("created_at >= ?", (Time.now - 30.days).beginning_of_day ).blank? | |||
| @@ -86,6 +86,7 @@ Rails.application.routes.draw do | |||
| resources :project_rank, only: [:index] | |||
| resources :user_rank, only: [:index] | |||
| resources :nps, only: [:create] | |||
| resources :statistic, only: [:index] do | |||
| collection do | |||
| @@ -139,7 +140,12 @@ Rails.application.routes.draw do | |||
| delete :quit | |||
| end | |||
| end | |||
| resources :team_projects, only: [:index, :create, :destroy] do ;end | |||
| resources :team_projects, only: [:index, :create, :destroy] do | |||
| collection do | |||
| post :create_all | |||
| delete :destroy_all | |||
| end | |||
| end | |||
| end | |||
| resources :projects, only: [:index] do | |||
| collection do | |||
| @@ -932,6 +938,9 @@ Rails.application.routes.draw do | |||
| post :replace_image_url, on: :member | |||
| end | |||
| resources :faqs | |||
| resources :nps do | |||
| post :switch_change, on: :collection | |||
| end | |||
| resources :laboratories, only: [:index, :create, :destroy, :update] do | |||
| member do | |||
| get :shixuns_for_select | |||
| @@ -0,0 +1,12 @@ | |||
| class CreateUserNps < ActiveRecord::Migration[5.2] | |||
| def change | |||
| create_table :user_nps do |t| | |||
| t.references :user | |||
| t.string :action_type | |||
| t.integer :action_id | |||
| t.float :score | |||
| t.text :memo | |||
| t.timestamps | |||
| end | |||
| end | |||
| end | |||
| @@ -28030,6 +28030,187 @@ $.fn.bootstrapViewer.defaults = { | |||
| src: 'src' | |||
| } | |||
| ; | |||
| /*! ======================================================================== | |||
| * Bootstrap Toggle: bootstrap-toggle.js v2.2.0 | |||
| * http://www.bootstraptoggle.com | |||
| * ======================================================================== | |||
| * Copyright 2014 Min Hur, The New York Times Company | |||
| * Licensed under MIT | |||
| * ======================================================================== */ | |||
| +function ($) { | |||
| 'use strict'; | |||
| // TOGGLE PUBLIC CLASS DEFINITION | |||
| // ============================== | |||
| var Toggle = function (element, options) { | |||
| this.$element = $(element) | |||
| this.options = $.extend({}, this.defaults(), options) | |||
| this.render() | |||
| } | |||
| Toggle.VERSION = '2.2.0' | |||
| Toggle.DEFAULTS = { | |||
| on: 'On', | |||
| off: 'Off', | |||
| onstyle: 'primary', | |||
| offstyle: 'default', | |||
| size: 'normal', | |||
| style: '', | |||
| width: null, | |||
| height: null | |||
| } | |||
| Toggle.prototype.defaults = function() { | |||
| return { | |||
| on: this.$element.attr('data-on') || Toggle.DEFAULTS.on, | |||
| off: this.$element.attr('data-off') || Toggle.DEFAULTS.off, | |||
| onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle, | |||
| offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle, | |||
| size: this.$element.attr('data-size') || Toggle.DEFAULTS.size, | |||
| style: this.$element.attr('data-style') || Toggle.DEFAULTS.style, | |||
| width: this.$element.attr('data-width') || Toggle.DEFAULTS.width, | |||
| height: this.$element.attr('data-height') || Toggle.DEFAULTS.height | |||
| } | |||
| } | |||
| Toggle.prototype.render = function () { | |||
| this._onstyle = 'btn-' + this.options.onstyle | |||
| this._offstyle = 'btn-' + this.options.offstyle | |||
| var size = this.options.size === 'large' ? 'btn-lg' | |||
| : this.options.size === 'small' ? 'btn-sm' | |||
| : this.options.size === 'mini' ? 'btn-xs' | |||
| : '' | |||
| var $toggleOn = $('<label class="btn">').html(this.options.on) | |||
| .addClass(this._onstyle + ' ' + size) | |||
| var $toggleOff = $('<label class="btn">').html(this.options.off) | |||
| .addClass(this._offstyle + ' ' + size + ' active') | |||
| var $toggleHandle = $('<span class="toggle-handle btn btn-default">') | |||
| .addClass(size) | |||
| var $toggleGroup = $('<div class="toggle-group">') | |||
| .append($toggleOn, $toggleOff, $toggleHandle) | |||
| var $toggle = $('<div class="toggle btn" data-toggle="toggle">') | |||
| .addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' ) | |||
| .addClass(size).addClass(this.options.style) | |||
| this.$element.wrap($toggle) | |||
| $.extend(this, { | |||
| $toggle: this.$element.parent(), | |||
| $toggleOn: $toggleOn, | |||
| $toggleOff: $toggleOff, | |||
| $toggleGroup: $toggleGroup | |||
| }) | |||
| this.$toggle.append($toggleGroup) | |||
| var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2) | |||
| var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight()) | |||
| $toggleOn.addClass('toggle-on') | |||
| $toggleOff.addClass('toggle-off') | |||
| this.$toggle.css({ width: width, height: height }) | |||
| if (this.options.height) { | |||
| $toggleOn.css('line-height', $toggleOn.height() + 'px') | |||
| $toggleOff.css('line-height', $toggleOff.height() + 'px') | |||
| } | |||
| this.update(true) | |||
| this.trigger(true) | |||
| } | |||
| Toggle.prototype.toggle = function () { | |||
| if (this.$element.prop('checked')) this.off() | |||
| else this.on() | |||
| } | |||
| Toggle.prototype.on = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle) | |||
| this.$element.prop('checked', true) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.off = function (silent) { | |||
| if (this.$element.prop('disabled')) return false | |||
| this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off') | |||
| this.$element.prop('checked', false) | |||
| if (!silent) this.trigger() | |||
| } | |||
| Toggle.prototype.enable = function () { | |||
| this.$toggle.removeAttr('disabled') | |||
| this.$element.prop('disabled', false) | |||
| } | |||
| Toggle.prototype.disable = function () { | |||
| this.$toggle.attr('disabled', 'disabled') | |||
| this.$element.prop('disabled', true) | |||
| } | |||
| Toggle.prototype.update = function (silent) { | |||
| if (this.$element.prop('disabled')) this.disable() | |||
| else this.enable() | |||
| if (this.$element.prop('checked')) this.on(silent) | |||
| else this.off(silent) | |||
| } | |||
| Toggle.prototype.trigger = function (silent) { | |||
| this.$element.off('change.bs.toggle') | |||
| if (!silent) this.$element.change() | |||
| this.$element.on('change.bs.toggle', $.proxy(function() { | |||
| this.update() | |||
| }, this)) | |||
| } | |||
| Toggle.prototype.destroy = function() { | |||
| this.$element.off('change.bs.toggle') | |||
| this.$toggleGroup.remove() | |||
| this.$element.removeData('bs.toggle') | |||
| this.$element.unwrap() | |||
| } | |||
| // TOGGLE PLUGIN DEFINITION | |||
| // ======================== | |||
| function Plugin(option) { | |||
| return this.each(function () { | |||
| var $this = $(this) | |||
| var data = $this.data('bs.toggle') | |||
| var options = typeof option == 'object' && option | |||
| if (!data) $this.data('bs.toggle', (data = new Toggle(this, options))) | |||
| if (typeof option == 'string' && data[option]) data[option]() | |||
| }) | |||
| } | |||
| var old = $.fn.bootstrapToggle | |||
| $.fn.bootstrapToggle = Plugin | |||
| $.fn.bootstrapToggle.Constructor = Toggle | |||
| // TOGGLE NO CONFLICT | |||
| // ================== | |||
| $.fn.toggle.noConflict = function () { | |||
| $.fn.bootstrapToggle = old | |||
| return this | |||
| } | |||
| // TOGGLE DATA-API | |||
| // =============== | |||
| $(function() { | |||
| $('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle() | |||
| }) | |||
| $(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) { | |||
| var $checkbox = $(this).find('input[type=checkbox]') | |||
| $checkbox.bootstrapToggle('toggle') | |||
| e.preventDefault() | |||
| }) | |||
| }(jQuery); | |||
| /* Author:mingyuhisoft@163.com | |||
| * Github:https://github.com/imingyu/jquery.mloading | |||
| * Npm:npm install jquery.mloading.js | |||
| @@ -135541,8 +135722,8 @@ $(document).on('turbolinks:load', function() { | |||
| ; | |||
| $(document).on('turbolinks:load', function() { | |||
| if ($('body.admins-courses-index-page').length > 0) { | |||
| let searchContainer = $(".course-list-form"); | |||
| let searchForm = $("form.search-form",searchContainer); | |||
| var searchContainer = $(".course-list-form"); | |||
| var searchForm = $("form.search-form",searchContainer); | |||
| searchContainer.on('change', '.course-homepage-show', function(){ | |||
| searchForm.find('input[type="submit"]').trigger('click'); | |||
| @@ -135979,6 +136160,20 @@ $(document).on('turbolinks:load', function() { | |||
| }); | |||
| } | |||
| }); | |||
| // ------------ 上移/下移 ------------- | |||
| $('.discipline-list-container').on('click', ".move-action", function () { | |||
| var $doAction = $(this); | |||
| var disciplineId = $doAction.data('id'); | |||
| var opr = $doAction.data('opr'); | |||
| $.ajax({ | |||
| url: '/admins/disciplines/' + disciplineId + '/adjust_position', | |||
| method: 'POST', | |||
| dataType: 'script', | |||
| data: {opr: opr} | |||
| }); | |||
| }); | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| @@ -136082,6 +136277,9 @@ $(document).on('turbolinks:load', function() { | |||
| }); | |||
| } | |||
| }); | |||
| // Place all the behaviors and hooks related to the matching controller here. | |||
| // All this logic will automatically be available in application.js. | |||
| ; | |||
| $(document).on('turbolinks:load', function() { | |||
| if($(".admins-graduation-standards-index-page").length > 0){ | |||
| $(".admin-body-container").on("click", ".standard-create-modal", function () { | |||
| @@ -137754,17 +137952,149 @@ $(document).on('turbolinks:load', function() { | |||
| } | |||
| }) | |||
| ; | |||
| $(document).on('turbolinks:load', function () { | |||
| if ($('body.admins-projects-index-page').length > 0) { | |||
| var $form = $('.search-form'); | |||
| /* | |||
| * @Description: Do not edit | |||
| * @Date: 2021-08-31 11:16:45 | |||
| * @LastEditors: viletyy | |||
| * @Author: viletyy | |||
| * @LastEditTime: 2021-08-31 14:19:46 | |||
| * @FilePath: /forgeplus/app/assets/javascripts/admins/system_notifications/index.js | |||
| */ | |||
| // 清空 | |||
| $form.on('click', '.clear-btn', function () { | |||
| $form.find('input[name="search"]').val(''); | |||
| $form.find('input[type="submit"]').trigger('click'); | |||
| }); | |||
| $(document).on('turbolinks:load', function(){ | |||
| var showSuccessNotify = function() { | |||
| $.notify({ | |||
| message: '操作成功' | |||
| },{ | |||
| type: 'success' | |||
| }); | |||
| } | |||
| }); | |||
| // close user | |||
| $('.project-list-container').on('click', '.recommend-action', function(){ | |||
| var $closeAction = $(this); | |||
| var $uncloseAction = $closeAction.siblings('.unrecommend-action'); | |||
| var $editAction = $closeAction.siblings('.edit-recommend-action'); | |||
| var keywordID = $closeAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认将该项目设置为推荐项目吗?', | |||
| ok: function(){ | |||
| $.ajax({ | |||
| url: '/admins/projects/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| project: { | |||
| recommend: true, | |||
| recommend_index: 1 | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.hide(); | |||
| $uncloseAction.show(); | |||
| $editAction.show(); | |||
| $(".project-item-"+keywordID).children('td').eq(5).text("√") | |||
| } | |||
| }); | |||
| } | |||
| }); | |||
| }); | |||
| // unclose user | |||
| $('.project-list-container').on('click', '.unrecommend-action', function(){ | |||
| var $uncloseAction = $(this); | |||
| var $closeAction = $uncloseAction.siblings('.recommend-action'); | |||
| var $editAction = $closeAction.siblings('.edit-recommend-action'); | |||
| var keywordID = $uncloseAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认取消该推荐项目吗?', | |||
| ok: function () { | |||
| $.ajax({ | |||
| url: '/admins/projects/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| project: { | |||
| recommend: false, | |||
| recommend_index: 0 | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.show(); | |||
| $uncloseAction.hide(); | |||
| $editAction.hide(); | |||
| $(".project-item-"+keywordID).children('td').eq(5).text("") | |||
| } | |||
| }); | |||
| } | |||
| }) | |||
| }); | |||
| // close user | |||
| $('.project-list-container').on('click', '.pinned-action', function(){ | |||
| var $closeAction = $(this); | |||
| var $uncloseAction = $closeAction.siblings('.unpinned-action'); | |||
| var keywordID = $closeAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认将该项目设置为精选项目吗?', | |||
| ok: function(){ | |||
| $.ajax({ | |||
| url: '/admins/projects/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| project: { | |||
| is_pinned: true, | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.hide(); | |||
| $uncloseAction.show(); | |||
| $(".project-item-"+keywordID).children('td').eq(4).text("√") | |||
| } | |||
| }); | |||
| } | |||
| }); | |||
| }); | |||
| // unclose user | |||
| $('.project-list-container').on('click', '.unpinned-action', function(){ | |||
| var $uncloseAction = $(this); | |||
| var $closeAction = $uncloseAction.siblings('.pinned-action'); | |||
| var keywordID = $uncloseAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认取消该精选项目吗?', | |||
| ok: function () { | |||
| $.ajax({ | |||
| url: '/admins/projects/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| project: { | |||
| is_pinned: false, | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.show(); | |||
| $uncloseAction.hide(); | |||
| $(".project-item-"+keywordID).children('td').eq(4).text("") | |||
| } | |||
| }); | |||
| } | |||
| }) | |||
| }); | |||
| }) | |||
| ; | |||
| $(document).on('turbolinks:load', function() { | |||
| if ($('body.admins-repertoires-index-page').length > 0) { | |||
| @@ -137830,6 +138160,84 @@ $(document).on('turbolinks:load', function() { | |||
| }); | |||
| } | |||
| }); | |||
| /* | |||
| * @Description: Do not edit | |||
| * @Date: 2021-08-31 11:16:45 | |||
| * @LastEditors: viletyy | |||
| * @Author: viletyy | |||
| * @LastEditTime: 2021-08-31 14:19:46 | |||
| * @FilePath: /forgeplus/app/assets/javascripts/admins/reversed_keywords/index.js | |||
| */ | |||
| $(document).on('turbolinks:load', function(){ | |||
| var showSuccessNotify = function() { | |||
| $.notify({ | |||
| message: '操作成功' | |||
| },{ | |||
| type: 'success' | |||
| }); | |||
| } | |||
| // close user | |||
| $('.reversed-keyword-list-container').on('click', '.close-action', function(){ | |||
| var $closeAction = $(this); | |||
| var $uncloseAction = $closeAction.siblings('.unclose-action'); | |||
| var keywordID = $closeAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认关闭限制吗?', | |||
| ok: function(){ | |||
| $.ajax({ | |||
| url: '/admins/reversed_keywords/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| reversed_keyword: { | |||
| closed: true | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.hide(); | |||
| $uncloseAction.show(); | |||
| $(".reversed-keyword-item-"+keywordID).children('td').eq(3).text("") | |||
| } | |||
| }); | |||
| } | |||
| }); | |||
| }); | |||
| // unclose user | |||
| $('.reversed-keyword-list-container').on('click', '.unclose-action', function(){ | |||
| var $uncloseAction = $(this); | |||
| var $closeAction = $uncloseAction.siblings('.close-action'); | |||
| var keywordID = $uncloseAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认开启限制吗?', | |||
| ok: function () { | |||
| $.ajax({ | |||
| url: '/admins/reversed_keywords/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| reversed_keyword: { | |||
| closed: false | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.show(); | |||
| $uncloseAction.hide(); | |||
| $(".reversed-keyword-item-"+keywordID).children('td').eq(3).text("√") | |||
| } | |||
| }); | |||
| } | |||
| }) | |||
| }); | |||
| }) | |||
| ; | |||
| $(document).on('turbolinks:load', function() { | |||
| if ($('body.admins-salesman-channels-index-page').length > 0) { | |||
| @@ -137837,13 +138245,13 @@ $(document).on('turbolinks:load', function() { | |||
| var $addMemberModal = $('.admin-add-salesman-channel-user-modal'); | |||
| var $addMemberForm = $addMemberModal.find('.admin-add-salesman-channel-user-form'); | |||
| var $memberSelect = $addMemberModal.find('.salesman-channel-user-select'); | |||
| var $salesmanIdInput = $('.salesman-channel-list-form').find(".btn-primary"); | |||
| var $form = $addMemberModal.find('form.admin-add-salesman-user-form'); | |||
| $addMemberModal.on('show.bs.modal', function(event){ | |||
| var $link = $(event.relatedTarget); | |||
| // var salesmanId = $link.data('salesman_id'); | |||
| // $salesmanIdInput.val(salesmanId); | |||
| // 搜索 | |||
| var searchscForm = $(".saleman-channel-list-form .search-form"); | |||
| $addMemberModal.on('show.bs.modal', function(event){ | |||
| $memberSelect.select2('val', ' '); | |||
| }); | |||
| @@ -137880,28 +138288,73 @@ $(document).on('turbolinks:load', function() { | |||
| // var salesmanId = $salesmanIdInput.val(); | |||
| var memberIds = $memberSelect.val(); | |||
| if (memberIds && memberIds.length > 0) { | |||
| var url = $form.data('url'); | |||
| $.ajax({ | |||
| method: 'POST', | |||
| dataType: 'json', | |||
| url: '/admins/salesman_channels/batch_add', | |||
| data: { salesman_id: $salesmanIdInput.data("salesman-id"), school_ids: memberIds }, | |||
| url: url, | |||
| data: $form.serialize(), | |||
| success: function(){ | |||
| $.notify({ message: '创建成功' }); | |||
| $addMemberModal.modal('hide'); | |||
| searchscForm.find('input[name="keyword"]').val(''); | |||
| setTimeout(function(){ | |||
| window.location.reload(); | |||
| submitForm(); | |||
| }, 500); | |||
| }, | |||
| error: function(res){ | |||
| var data = res.responseJSON; | |||
| $form.find('.error').html(data.message); | |||
| $addMemberForm.find('.error').html(data.message); | |||
| } | |||
| }); | |||
| } else { | |||
| $addMemberModal.modal('hide'); | |||
| } | |||
| }); | |||
| // 清空 | |||
| searchscForm.on('click', '.clear-btn', function () { | |||
| searchscForm.find('.start_date').val(''); | |||
| searchscForm.find('.end_date').val('').trigger('change'); | |||
| searchscForm.find('input[name="keyword"]').val(''); | |||
| }); | |||
| // 时间跨度 | |||
| var baseOptions = { | |||
| autoclose: true, | |||
| language: 'zh-CN', | |||
| format: 'yyyy-mm-dd', | |||
| startDate: '2017-04-01' | |||
| }; | |||
| var defineDateRangeSelect = function(element){ | |||
| var options = $.extend({inputs: $(element).find('.start-date, .end-date')}, baseOptions); | |||
| $(element).datepicker(options); | |||
| $(element).find('.start-date').datepicker().on('changeDate', function(e){ | |||
| $(element).find('.end-date').datepicker('setStartDate', e.date); | |||
| }); | |||
| }; | |||
| defineDateRangeSelect('.grow-date-input-daterange'); | |||
| // 区间搜索 | |||
| searchscForm.on('click', ".search-btn", function(){ | |||
| submitForm(); | |||
| }); | |||
| var submitForm = function(){ | |||
| var url = searchscForm.data('search-form-url'); | |||
| var form = searchscForm; | |||
| $.ajax({ | |||
| url: url, | |||
| data: form.serialize(), | |||
| dataType: "script" | |||
| }) | |||
| }; | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| @@ -137964,7 +138417,7 @@ $(document).on('turbolinks:load', function() { | |||
| $addMemberModal.modal('hide'); | |||
| setTimeout(function(){ | |||
| window.location.reload(); | |||
| listForm(); | |||
| }, 500); | |||
| }, | |||
| error: function(res){ | |||
| @@ -137976,6 +138429,14 @@ $(document).on('turbolinks:load', function() { | |||
| $addMemberModal.modal('hide'); | |||
| } | |||
| }); | |||
| var listForm = function(){ | |||
| $.ajax({ | |||
| url: '/admins/salesman_customers?salesman_id='+ $salesmanIdInput.data("salesman-id"), | |||
| dataType: "script" | |||
| }); | |||
| }; | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| @@ -138272,22 +138733,19 @@ $(document).on('turbolinks:load', function(){ | |||
| defineDateRangeSelect('.grow-date-input-daterange'); | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function () { | |||
| if ($('body.admins-shixun-modify-records-index-page').length > 0) { | |||
| var $form = $('.search-form'); | |||
| /* | |||
| * @Description: Do not edit | |||
| * @Date: 2021-07-16 11:58:16 | |||
| * @LastEditors: viletyy | |||
| * @Author: viletyy | |||
| * @LastEditTime: 2021-08-31 14:48:59 | |||
| * @FilePath: /forgeplus/app/assets/javascripts/admins/shixun_settings/index.js | |||
| */ | |||
| // 清空 | |||
| $form.on('click', '.clear-btn', function () { | |||
| $form.find('select[name="date"]').val('weekly'); | |||
| $form.find('input[name="user_name"]').val(''); | |||
| $form.find('input[type="submit"]').trigger('click'); | |||
| }); | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| if ($('body.admins-shixun-settings-index-page').length > 0) { | |||
| let searchContainer = $(".shixun-settings-list-form"); | |||
| let searchForm = $("form.search-form",searchContainer); | |||
| var searchContainer = $(".shixun-settings-list-form"); | |||
| var searchForm = $("form.search-form",searchContainer); | |||
| searchContainer.on('change', '.shixun-settings-select', function(){ | |||
| searchForm.find('input[type="submit"]').trigger('click'); | |||
| @@ -138458,6 +138916,19 @@ $(document).on('turbolinks:load', function () { | |||
| data: json | |||
| }); | |||
| }); | |||
| // ------------ 上移/下移 ------------- | |||
| $('.sub-discipline-list-container').on('click', ".move-action", function () { | |||
| var $doAction = $(this); | |||
| var objectId = $doAction.data('id'); | |||
| var opr = $doAction.data('opr'); | |||
| $.ajax({ | |||
| url: '/admins/sub_disciplines/' + objectId + '/adjust_position', | |||
| method: 'POST', | |||
| dataType: 'script', | |||
| data: {opr: opr} | |||
| }); | |||
| }); | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| @@ -138577,6 +139048,7 @@ $(document).on('turbolinks:load', function () { | |||
| } | |||
| }); | |||
| $(".subject-setting-list-container").on("change", '.subject-setting-form', function () { | |||
| var s_id = $(this).attr("data-id"); | |||
| var s_value = $(this).val(); | |||
| @@ -138716,6 +139188,84 @@ $(document).on('turbolinks:load', function () { | |||
| defineStatusChangeFunc('.cancel-excellent-action', '.excellent-action', '/cancel_excellent', excellentCallback); | |||
| } | |||
| }); | |||
| /* | |||
| * @Description: Do not edit | |||
| * @Date: 2021-08-31 11:16:45 | |||
| * @LastEditors: viletyy | |||
| * @Author: viletyy | |||
| * @LastEditTime: 2021-08-31 14:19:46 | |||
| * @FilePath: /forgeplus/app/assets/javascripts/admins/system_notifications/index.js | |||
| */ | |||
| $(document).on('turbolinks:load', function(){ | |||
| var showSuccessNotify = function() { | |||
| $.notify({ | |||
| message: '操作成功' | |||
| },{ | |||
| type: 'success' | |||
| }); | |||
| } | |||
| // close user | |||
| $('.system-notification-list-container').on('click', '.close-action', function(){ | |||
| var $closeAction = $(this); | |||
| var $uncloseAction = $closeAction.siblings('.unclose-action'); | |||
| var keywordID = $closeAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认取消置顶吗?', | |||
| ok: function(){ | |||
| $.ajax({ | |||
| url: '/admins/system_notifications/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| system_notification: { | |||
| is_top: false | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.hide(); | |||
| $uncloseAction.show(); | |||
| $(".system-notification-item-"+keywordID).children('td').eq(3).text("") | |||
| } | |||
| }); | |||
| } | |||
| }); | |||
| }); | |||
| // unclose user | |||
| $('.system-notification-list-container').on('click', '.unclose-action', function(){ | |||
| var $uncloseAction = $(this); | |||
| var $closeAction = $uncloseAction.siblings('.close-action'); | |||
| var keywordID = $uncloseAction.data('id'); | |||
| customConfirm({ | |||
| content: '确认置顶吗?', | |||
| ok: function () { | |||
| $.ajax({ | |||
| url: '/admins/system_notifications/' + keywordID, | |||
| method: 'PUT', | |||
| dataType: 'json', | |||
| data: { | |||
| system_notification: { | |||
| is_top: true | |||
| } | |||
| }, | |||
| success: function() { | |||
| showSuccessNotify(); | |||
| $closeAction.show(); | |||
| $uncloseAction.hide(); | |||
| $(".system-notification-item-"+keywordID).children('td').eq(3).text("√") | |||
| } | |||
| }); | |||
| } | |||
| }) | |||
| }); | |||
| }) | |||
| ; | |||
| $(document).on('turbolinks:load', function () { | |||
| if ($('body.admins-tag-disciplines-index-page').length > 0) { | |||
| @@ -138790,6 +139340,20 @@ $(document).on('turbolinks:load', function () { | |||
| data: json | |||
| }); | |||
| }); | |||
| // ------------ 上移/下移 ------------- | |||
| $('.tag-discipline-list-container').on('click', ".move-action", function () { | |||
| var $doAction = $(this); | |||
| var objectId = $doAction.data('id'); | |||
| var opr = $doAction.data('opr'); | |||
| $.ajax({ | |||
| url: '/admins/tag_disciplines/' + objectId + '/adjust_position', | |||
| method: 'POST', | |||
| dataType: 'script', | |||
| data: {opr: opr} | |||
| }); | |||
| }); | |||
| } | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| @@ -139603,6 +140167,7 @@ $(document).on('turbolinks:load', function() { | |||
| $.ajaxSetup({ | |||
| @@ -139675,3 +140240,39 @@ $(document).on("turbolinks:before-cache", function () { | |||
| $(function () { | |||
| }); | |||
| $(document).on('turbolinks:load', function() { | |||
| $('.logo-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| $('.attachment-item-left').on("change", 'input[type="file"]', function () { | |||
| var $fileInput = $(this); | |||
| var file = this.files[0]; | |||
| var imageType = /image.*/; | |||
| if (file && file.type.match(imageType)) { | |||
| var reader = new FileReader(); | |||
| reader.onload = function () { | |||
| var $box = $fileInput.parent(); | |||
| $box.find('img').attr('src', reader.result).css('display', 'block'); | |||
| $box.addClass('has-img'); | |||
| }; | |||
| reader.readAsDataURL(file); | |||
| } else { | |||
| } | |||
| }); | |||
| }) | |||
| ; | |||
| @@ -0,0 +1 @@ | |||
| {"version":3,"file":"bootstrap-toggle.min.js","sources":["bootstrap-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","outerHeight","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAA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B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAU2B,QAAU,WAC1BhD,KAAKgC,QAAQV,KAAK,WAAY,YAC9BtB,KAAKO,SAAS0B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAUoB,OAAS,SAAUG,GAC/B5C,KAAKO,SAAS0B,KAAK,YAAajC,KAAKgD,UACpChD,KAAK8C,SACN9C,KAAKO,SAAS0B,KAAK,WAAYjC,KAAKa,GAAG+B,GACtC5C,KAAKc,IAAI8B,IAGfvC,EAAOgB,UAAUqB,QAAU,SAAUE,GACpC5C,KAAKO,SAASO,IAAI,oBACb8B,GAAQ5C,KAAKO,SAAS0C,SAC3BjD,KAAKO,SAASM,GAAG,mBAAoBhB,EAAEqD,MAAM,WAC5ClD,KAAKyC,UACHzC,QAGJK,EAAOgB,UAAU8B,QAAU,WAC1BnD,KAAKO,SAASO,IAAI,oBAClBd,KAAK8B,aAAasB,SAClBpD,KAAKO,SAAS8C,WAAW,aACzBrD,KAAKO,SAAS+C,SAiBf,IAAIC,GAAM1D,EAAE2D,GAAGC,eAEf5D,GAAE2D,GAAGC,gBAA8B3D,EACnCD,EAAE2D,GAAGC,gBAAgBC,YAAcrD,EAKnCR,EAAE2D,GAAGb,OAAOgB,WAAa,WAExB,MADA9D,GAAE2D,GAAGC,gBAAkBF,EAChBvD,MAMRH,EAAE,WACDA,EAAE,6CAA6C4D,oBAGhD5D,EAAE+D,UAAU/C,GAAG,kBAAmB,2BAA4B,SAASgD,GACtE,GAAIC,GAAYjE,EAAEG,MAAM+D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"} | |||
| @@ -0,0 +1 @@ | |||
| {"version":3,"file":"bootstrap2-toggle.min.js","sources":["bootstrap2-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAAOO,UACNC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,UACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGTf,EAAOgB,UAAUZ,SAAW,WAC3B,OACCI,GAAIb,KAAKO,SAASe,KAAK,YAAcjB,EAAOO,SAASC,GACrDC,IAAKd,KAAKO,SAASe,KAAK,aAAejB,EAAOO,SAASE,IACvDC,QAASf,KAAKO,SAASe,KAAK,iBAAmBjB,EAAOO,SAASG,QAC/DC,SAAUhB,KAAKO,SAASe,KAAK,kBAAoBjB,EAAOO,SAASI,SACjEC,KAAMjB,KAAKO,SAASe,KAAK,cAAgBjB,EAAOO,SAASK,KACzDC,MAAOlB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASM,MAC3DC,MAAOnB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASO,MAC3DC,OAAQpB,KAAKO,SAASe,KAAK,gBAAkBjB,EAAOO,SAASQ,SAI/Df,EAAOgB,UAAUX,OAAS,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