 
   createFieldRow: (id, type, label, options) ->
     row = document.createElement("tr")
-    row.classList.add("native-key-bindings") # workaround Atom bug
+    # row.classList.add("native-key-bindings") # workaround Atom bug
     row.appendChild @createLabel(id, label)
     row.appendChild @createField(id, type, null, options)
     row.appendChild @createProgressLabel(id) if type == "progress"

      field.setAttribute "value", 0
      field.setAttribute "max", 100

    td.appendChild field
    # console.log "Created field", field, field.id
    return td



  reset: ->
    @fields.forEach (x) ->
      if x.getAttribute
        type = x.getAttribute("type")
      else
        type = "text"
      x.value = "" if type in ["password", "text"] #passwords and directory pickers
      if type == "text" && x.setText #mini editors as text fields
        x.setText("")

      x.checked = false if type == "checkbox"

  setValues: (data) ->
    @reset()
    Object.keys(data).forEach (k) =>
      field = @fields.find (x) -> x.id == k
      field?.value = data[k] if field?.getAttribute && field?.getAttribute("type") in ["password","select"]
      field?.setText = data[k] if field? instanceof TextEditor
      field?.checked = data[k] if field?.getAttribute && field?.getAttribute("type") == "checkbox"

  getValues: () ->
    values = {}
    @fields.forEach (x) ->
      if x.getAttribute
        type = x.getAttribute("type")
      else
        type = "text"
      values[x.id] = x.value if type in ["text","password","select"]
      values[x.id] = (x.checked == true) if type == "checkbox"
      values[x.id] = x.getText if x instanceof TextEditor
    # console.log values
    return values

