OX-77 Putting the space control to KeyboardNoLoop

--- app/assets/javascripts/controller.coffee
+++ app/assets/javascripts/controller.coffee
@@ -140,6 +140,12 @@
     #)

   initKeyboard : ->
+
+    # TODO: (from Georg) I do not get the difference between Keyboard
+    # and KeyboardNoLoop. KeyboardNoLoop implies that pressing the key
+    # longer will not trigger the callback several times, but this is
+    # false, apparently. I moved the space to KeyboardNoLoop, because
+    # it allows more accuracy.

     @input.keyboard = new Input.Keyboard(

@@ -160,8 +166,8 @@
       "s"             : => @moveY( @model.User.Configuration.moveValue)
       "a"             : => @moveX(-@model.User.Configuration.moveValue)
       "d"             : => @moveX( @model.User.Configuration.moveValue)
-      "space"         : => @moveZ( @model.User.Configuration.moveValue)
-      "shift + space" : => @moveZ(-@model.User.Configuration.moveValue)
+      #"space"         : => @moveZ( @model.User.Configuration.moveValue)
+      #"shift + space" : => @moveZ(-@model.User.Configuration.moveValue)

       #Rotate in distance
       "left"          : => @moveX(-@model.User.Configuration.moveValue)
@@ -195,6 +201,10 @@

       "n" : =>
         @createNewTree()
+
+      # Move
+      "space"         : => @moveZ( @model.User.Configuration.moveValue)
+      "shift + space" : => @moveZ(-@model.User.Configuration.moveValue)
     )

   # for more buttons look at Input.Gamepad


disable when continue is not enabled

disable when continue is not enabled

--- src/components/task-step/step-mixin.cjsx
+++ src/components/task-step/step-mixin.cjsx
@@ -20,7 +20,7 @@
       bsStyle='primary'
       className='-continue'
       onClick={@onContinue}
-      disabled={@isContinueEnabled()}
+      disabled={not @isContinueEnabled()}
       waitingText='Loading…'
       errorText='Error. Please refresh'
       isWaiting={isWaiting}


better runCodeChunk... good night

better runCodeChunk... good night

--- lib/markdown-preview-enhanced-view.coffee
+++ lib/markdown-preview-enhanced-view.coffee
@@ -520,6 +520,7 @@
       if idMatch and idMatch[1]
         id = idMatch[1]
         @codeChunksData[id] = codeChunk.getElementsByClassName('output-div')[0]
+        codeChunk.id = 'code_chunk_' + id

     for codeChunk in codeChunks
       setupCodeChunk(codeChunk)
@@ -551,12 +552,38 @@
       atom.notifications.addError('Invalid options', detail: dataArgs)
       return

-    codeChunk.classList.add('running')
+    codeChunk.classList.add('running') # TODO: handle running status in md.coffee as well...
+
+    # check id and save outputDiv to @codeChunksData
+    idMatch = dataArgs.match(/\s*id\s*:\s*\"([^\"]*)\"/)
+
+    if !idMatch
+      id = (new Date().getTime()).toString(36)
+
+      buffer = @editor.buffer
+      return if !buffer
+
+      lineNo = parseInt(codeChunk.getElementsByTagName('PRE')[0].getAttribute('data-line'))
+
+      line = buffer.lines[lineNo]
+      line = line.replace(/}$/, (if !dataArgs then '' else ',') + ' id:"' + id + '"}')
+
+      codeChunk.setAttribute('data-args', (if !dataArgs then '' else (dataArgs+', ')) + 'id:"' + id + '"')
+      codeChunk.id = 'code_chunk_' + id
+
+      @parseDelay = Date.now() + 500 # prevent renderMarkdown
+
+      buffer.setTextInRange([[lineNo, 0], [lineNo+1, 0]], line + '\n')
+    else
+      id = idMatch[1]

     codeChunkAPI.run code, @rootDirectoryPath, cmd, options, (error, data, options)=>
       codeChunk.classList.remove('running')
-      if (error)
-        return
+      return if error
+
+      # get new codeChunk
+      codeChunk = document.getElementById('code_chunk_' + id)
+      return if not codeChunk

       outputDiv = codeChunk.getElementsByClassName('output-div')?[0]
       if !outputDiv
@@ -584,28 +611,6 @@
       if outputDiv
         codeChunk.appendChild outputDiv
         @scrollMap = null
-
-      # check id and save outputDiv to @codeChunksData
-      idMatch = dataArgs.match(/\s*id\s*:\s*\"([^\"]*)\"/)
-
-      if !idMatch
-        id = (new Date().getTime()).toString(36)
-
-        buffer = @editor.buffer
-        return if !buffer
-
-        lineNo = parseInt(codeChunk.getElementsByTagName('PRE')[0].getAttribute('data-line'))
-
-        line = buffer.lines[lineNo]
-        line = line.replace(/}$/, (if !dataArgs then '' else ',') + ' id:"' + id + '"}')
-
-        codeChunk.setAttribute('data-args', (if !dataArgs then '' else (dataArgs+', ')) + 'id:"' + id + '"')
-
-        @parseDelay = Date.now() + 500 # prevent renderMarkdown
-
-        buffer.setTextInRange([[lineNo, 0], [lineNo+1, 0]], line + '\n')
-      else
-        id = idMatch[1]

       @codeChunksData[id] = outputDiv


Delete course coffe script.

Delete course coffe script.

--- app/assets/javascripts/courses.js.coffee
+++ app/assets/javascripts/courses.js.coffee
@@ -1,4 +0,0 @@
-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://coffeescript.org/
-


Remove redudant routes to support the new "overview" section

--- app/assets/javascripts/lib/router.coffee
+++ app/assets/javascripts/lib/router.coffee
@@ -1,24 +1,9 @@
 class @Router extends Backbone.Router
   routes:
-    "demand/:sidebar(/:slide)" : "demand"
-    "costs/:sidebar(/:slide)"  : "costs"
-    "overview/:sidebar(/:slide)": "overview"
-    "supply/:sidebar(/:slide)" : "supply"
-    "flexibility/:sidebar(/:slide)" : "flexibility"
-    "data/:sidebar(/:slide)" : "data"
     "report" : "report"
     ":tab/:sidebar(/:slide)" : "load_slides"
     "" : "load_default_slides"
-
-  demand:  (sidebar, slide) => @load_slides('demand', sidebar, slide)
-  costs:   (sidebar, slide) => @load_slides('costs', sidebar, slide)
-  overview: (sidebar, slide) => @load_slides('overview', sidebar, slide)
-  supply:  (sidebar, slide) => @load_slides('supply', sidebar, slide)
-  flexibility:  (sidebar, slide) => @load_slides('flexibility', sidebar, slide)
-  data:  (sidebar, slide) => @load_slides('data', sidebar, slide)
-
-  # root:
-
+
   report: =>
     # pass


motions.js: added preventDefault to username links

--- app/assets/javascripts/motions.js.coffee
+++ app/assets/javascripts/motions.js.coffee
@@ -35,8 +35,8 @@
       $("#input_date").datepicker("setDate", date_string)
       $("#date_hour").val(hour)

-#** presence validations: use this function any where just assign the class .presence-required
-#   to the text field in question and the .check-presence to the submit button **
+# presence validations: use this function any where just assign the class .presence-required
+# to the text field in question and the .check-presence to the submit button
 $ ->
   $(".check-presence").click((event, ui) ->
     if $(".inputError").val() == ""
@@ -51,7 +51,7 @@
     $(".error-message").hide()
   )

-#** Reload hidden close_date field **
+# Reload hidden close_date field
 $ ->
   $("#input_date").change((e) ->
     date = $(this).val()
@@ -74,7 +74,7 @@
     $("#motion_close_date").val(local_datetime)
   )

-#** character count for statement on discussion:show page **
+# character count for statement on discussion:show page
 pluralize_characters = ((num) ->
   if(num == 1)
     return num + " character"
@@ -108,7 +108,7 @@
       $('#new_vote').submit()
   )

-#** character count for title on discussion:new page **
+# character count for title on discussion:new page
 $ ->
   $(".limit").keyup(() ->
     $(".error-message").hide()
@@ -130,6 +130,13 @@
     $("#description").html(linkify_html($("#description").html()))
     $(".comment-body").each(-> $(this).html(linkify_html($(this).html())))

+# adds bootstrap popovers to vote buttons
 $ ->
   $(".vote").popover
     placement: "top"
+
+# disable links on usernames
+$ ->
+  $('.comment-username a, .member-name a').click((event) ->
+    event.preventDefault()
+  )


remove period from function call

remove period from function call

--- app/assets/javascripts/project.js.coffee
+++ app/assets/javascripts/project.js.coffee
@@ -51,7 +51,7 @@
       $(@).parents('ul').find('li.active').removeClass 'active'
       $(@).parent().addClass 'active'

-    @._projectSelectDropdown()
+    @_projectSelectDropdown()

   _projectSelectDropdown: ->
     new ProjectSelect()


series spacing for columns

series spacing for columns

--- app/assets/javascripts/zvg/column.coffee
+++ app/assets/javascripts/zvg/column.coffee
@@ -314,3 +314,49 @@
   override_n_values: (values) ->
     @_custom_n_values = true
     @n_values = values
+
+  # pre-establishes indexes for the spacing and grouping of series 1 data
+  # based on its contents (necessary because of the variable length of data within
+  # the series, otherwise simple rangebands could be used)
+  #
+  # @override
+  set_series_1_spacing: ->
+    @survey_title_to_series_name or= {}
+    @series_1_width      = []
+    @series_1_width_by_key = {}
+    @series_1_x          = []
+    @series_1_x_by_key   = {}
+    scale                = d3.scale.ordinal().domain(@series_1_domain())
+    ranges               = {}
+    total_column_count   = 0
+    total_column_count  += d.values.length for d in @_data
+
+    series_set = d3.set([])
+    series_set.add(@survey_title_to_series_name[d.key])for d,i in @_data
+    series_count = series_set.values().length
+
+    @column_spacing      = (@width - @x_offset)/(total_column_count + @_data.length + (series_count))
+    @column_padding      = 0.1 * @column_spacing
+    @series_padding      = 1.5 * @column_spacing / 2
+    current_x            = @x_offset # allow for scale on left
+    maxCount             = d3.max(@_data, (d) -> d.values.length)
+    current_series       = undefined
+
+
+    for d,i in @_data
+      do (d,i) =>
+        series = @survey_title_to_series_name[d.key]
+        if series isnt current_series
+          current_x += (@series_padding * 1.5) if i > 0
+          current_series = series
+
+        w = @column_spacing * (d.values.length + 1)
+        @series_1_width[i] = w - @series_padding * 2
+        @series_1_x[i] = current_x + @series_padding
+        @series_1_x_by_key[d.key] = current_x + @series_padding
+        current_x += w
+    @column_band = d3.scale.ordinal()
+      .domain([0...maxCount])
+      .rangeRoundBands([0, @column_spacing * maxCount], 0.1)
+    series_padding_sum = d3.max([0, series_count]) * @series_padding
+    @widen_chart((@width - @x_offset) + 100 + series_padding_sum) if @column_band.rangeBand() < @minimum_column_width