<commit_before>KodingSwitch = require 'app/commonviews/kodingswitch'
$ = require 'jquery'


module.exports = class PermissionSwitch extends KodingSwitch

  constructor: (options={}, data)->
    super options, data

  setDomElement:(cssClass)->
    @domElement = $ "<div class='switcher' style='width: #{@options.widthForRows}px'> <div class='kdinput koding-on-off off #{cssClass}'><a href='#' class='knob' title='turn on'></a></div></div>"

  setOff :->
    kdSwitch = @domElement.children(".koding-on-off")

    kdSwitch.removeClass "on"
    kdSwitch.addClass "off"

    super

  setOn :->
    kdSwitch = @domElement.children(".koding-on-off")

    kdSwitch.removeClass "off"
    kdSwitch.addClass "on"

    super
<commit_msg>Admin: PermissionSwitch: Removed computed width.<commit_after>KodingSwitch = require 'app/commonviews/kodingswitch'
$ = require 'jquery'


module.exports = class PermissionSwitch extends KodingSwitch

  constructor: (options={}, data)->
    super options, data

  setDomElement:(cssClass)->
    @domElement = $ "<div class='switcher'> <div class='kdinput koding-on-off off #{cssClass}'><a href='#' class='knob' title='turn on'></a></div></div>"

  setOff :->
    kdSwitch = @domElement.children(".koding-on-off")

    kdSwitch.removeClass "on"
    kdSwitch.addClass "off"

    super

  setOn :->
    kdSwitch = @domElement.children(".koding-on-off")

    kdSwitch.removeClass "off"
    kdSwitch.addClass "on"

    super

{'fraction_non_alphanumeric': 0.1575673807878369, 'fraction_numerical': 0.0, 'mean_word_length': 4.11660777385159, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4660931', 'n_tokens_mistral': 490, 'n_tokens_neox': 470, 'n_words': 96}