             @setElement @template
                 label: @model.get('alt_name') or @model.get('name')
                 help: @model.get 'description'
-
-            super
-
-        setup: ->
-            super
-            @loadValues()
-
-
-        loadValues: ->
+            super
+
+        loadOperators: =>
+            NEGATION_OPERATORS['-in'] = 'in'
+            for [operator, text] in (operators = @model.get 'operators')
+                if operator is 'in'
+                    @$operator.append "<option value=#{ operator }>#{ text }</option>"
+                    break
+            @$operator.hide()
+
+        loadValues: =>
             @$el.addClass 'loading'
 
             Backbone.ajax
                 url: environ.absolutePath @model.get('links').values.href
+                data:
+                    context: null
                 success: (resp) =>
                     for obj in resp
                         @$value.append "<option value=#{obj.value}>#{obj.name} (#{obj.count})</option>"
-                    #@$value.select2()
+                    #@$value.select2().css 'width', 'auto'
                     @$el.removeClass 'loading'
 
 


        preventDefault: (event) ->
            event.preventDefault()

        getValue: (options) ->
            @$value.val()


        submitInclude: (event) ->
            event.preventDefault()
            @submit @get()

        submitExclude: (event) ->
            event.preventDefault()
            @submit @get negated: true

        submit: (data) ->
            if @node
                @node.set data
            else
                mediator.publish 'datacontext/add', data
            @clear()

        clear: ->
            delete @node
            @setValue()
            @setOperator()



    class StringControl extends Control
