         name = $(this).children('input[_name="name"]').val()
         object = $(this).children('input[_name="object"]').val()
         configurations.push({type: 'delete_object', name: name, object: object})
+      when 'custom_command_value'
+        command = $(this).children('input[_name="command"]').val().trim()
+        value = $(this).children('input[_name="value"]').val().trim()
+        configurations.push({type: 'custom_command_value', command: command, value: value})
+      when 'custom_command_age'
+        command = $(this).children('input[_name="command"]').val()
+        age = $(this).children('input[_name="age"]').val()
+        configurations.push({type: 'custom_command_age', command: command, age: age})
   )
   $("##{id} > input[name=configurations]").attr('value', JSON.stringify(configurations))

        addAddObjectConfiguration(container_selector, c['name'], c['object'], false)
      when 'delete_object'
        addRemoveObjectConfiguration(container_selector, c['name'], c['object'], false)

  popup = """
    <a href="#" class="action">&nbsp;+&nbsp;</a>

  html = """<div configurationType="age">
      Refresh
      <input type="text" _name="name" value="#{name}" />
      every
      <input type="text" _name="age" value="#{age}" />
      seconds
      <a href="#" class="action" onclick="fadeOutAndRemove($(this).parent());return false;">&nbsp;x&nbsp;</a>
    </div>"""

  el = $(html)
  $(container).append(el)
  el.hide().fadeIn(300) if fade


window.addCustomCommandValueConfiguration = (container, command = '', value = '', fade = true) ->
  html = """<div configurationType="custom_command_value">
      Command
      <input type="text" _name="command" value="#{command}" />
      Assert value
      <input type="text" _name="value" value="#{value}" />
      <a href="#" class="action" onclick="fadeOutAndRemove($(this).parent());return false;">&nbsp;x&nbsp;</a>
    </div>"""

  el = $(html)
  $(container).append(el)
  el.hide().fadeIn(300) if fade


window.addCustomCommandAgeConfiguration = (container, command = '', age = '', fade = true) ->
  html = """<div configurationType="custom_command_age">
      Execute
      <input type="text" _name="command" value="#{command}" />
      every
      <input type="text" _name="age" value="#{age}" />
      seconds
