ComputeUtils: checkCredential -> reviveCredential, its not mandatory to have a valid credential to create a machine document. If provided and passed as shouldPassCredential we are checking it, otherwise just trying to revive from JCredential

--- workers/social/lib/social/models/computeproviders/computeutils.coffee
+++ workers/social/lib/social/models/computeproviders/computeutils.coffee
@@ -9,16 +9,15 @@
   engineyard   : require './engineyard'

-checkCredential = (client, pubKey, callback)->
+reviveCredential = (client, pubKey, callback)->
+
+  [pubKey, callback] = [callback, pubKey]  unless callback?
+
+  if not pubKey?
+    return callback null

   JCredential = require './credential'
-  JCredential.fetchByPublicKey client, pubKey, (err, credential)->
-
-    if err or not credential?
-      console.warn err  if err
-      callback new KodingError "Credential failed.", "AccessDenied"
-    else
-      callback null, credential
+  JCredential.fetchByPublicKey client, pubKey, callback

 reviveClient = (client, callback, revive = yes)->
@@ -72,20 +71,19 @@
       # This is Koding only which doesn't need a valid credential
       # since the user session is enough for koding provider for now.

-      if shouldPassCredential and provider isnt 'koding'
-
-        if not credential?
+      if shouldPassCredential and not credential?
+        if provider isnt 'koding'
           return callback new KodingError \
             "Credential is required.", "MissingCredential"

-        checkCredential client, credential, (err, cred)=>
+      reviveCredential client, credential, (err, cred)=>

-          if err then return callback err
+        if err then return callback err

-          options.credential = cred
-          fn.call this, client, options, callback
-
-      else
+        if shouldPassCredential and not cred?
+          return callback new KodingError "Credential failed.", "AccessDenied"
+        else
+          options.credential = cred  if cred?

         fn.call this, client, options, callback

@@ -134,5 +132,5 @@

 module.exports = {
-  PROVIDERS, fetchStackTemplate, revive, reviveClient, checkCredential
+  PROVIDERS, fetchStackTemplate, revive, reviveClient, reviveCredential
 }


use double quotes for strings with newlines

--- spec/vim-mode-spec.coffee
+++ spec/vim-mode-spec.coffee
@@ -158,7 +158,7 @@

         keydown('S', shift: true, element: editor[0])
         expect(editor).toHaveClass 'insert-mode'
-        expect(editor.getText()).toBe '12345\n\nABCDE'
+        expect(editor.getText()).toBe "12345\n\nABCDE"
         expect(editor.getCursorScreenPosition()).toEqual [1, 0]
         expect(vimState.getRegister('"').text).toBe "abcde\n"

@@ -172,7 +172,7 @@
           keydown('d', element: editor[0])
           expect(editor.getText()).toBe "12345\n\nABCDE"
           expect(editor.getCursorScreenPosition()).toEqual([1,0])
-          expect(vimState.getRegister('"').text).toBe 'abcde\n'
+          expect(vimState.getRegister('"').text).toBe "abcde\n"

         it "deletes the last line", ->
           editor.setText("12345\nabcde\nABCDE")


senpai ignore case for name

senpai ignore case for name

--- scripts/senpai.coffee
+++ scripts/senpai.coffee
@@ -49,6 +49,7 @@

 # {{{ existsUser
 existsUser = (robot, msg, name) ->
+  name = name.toLowerCase()
   return true if name is robot.name
   users = robot.brain.data.usersInfo ||= {}
   for u, v of users
@@ -71,6 +72,7 @@

 # {{{ UserInfo
 setUserInfo = (robot, msg, name, key, val) ->
+  name = name.toLowerCase()
   return null unless existsUser robot, msg, name
   usersInfo = robot.brain.data.usersInfo ||= {}
   usersInfo[name] ||= {}
@@ -79,6 +81,7 @@
   robot.brain.data.usersInfo = usersInfo

 getUserInfo = (robot, msg, name, key) ->
+  name = name.toLowerCase()
   return null unless existsUser robot, msg, name
   usersInfo = robot.brain.data.usersInfo ||= {}
   usersInfo[name] ||= {}
@@ -86,6 +89,7 @@
 # }}}

 whoIsThis = (robot, msg, name) -># {{{
+  name = name.toLowerCase()
   return name if existsUser robot, msg, name
   gNicknames = getSenpaiStorage robot, msg, 'NICKNAMES'
   gNicknames ||= {}
@@ -236,7 +240,7 @@
 # }}}

   robot.respond /([^ ]+)[ ]*の(あだ|アダ)名は?(何|なん|なに)/, (msg) -># {{{
-    realname = msg.match[1]
+    realname = msg.match[1].toLowerCase()
     unless existsUser robot, msg, realname
       msg.send "#{realname} って誰？"
       checkKeigo robot, msg
@@ -260,8 +264,8 @@

   robot.respond /([^ ]+)[ ]*は[ ]*([^ ]+)[ ]*(って|と)呼ばれ/, (msg) -># {{{
     return if msg.message.match('ない|ません')
-    realname = msg.match[1]
-    nickname = msg.match[2]
+    realname = msg.match[1].toLowerCase()
+    nickname = msg.match[2].toLowerCase()
     nickname = trimKeisho nickname
     unless existsUser robot, msg, realname
       msg.send "#{realname} って誰？"
@@ -294,8 +298,8 @@
 # }}}

   robot.respond /([^ ]+)[ ]*は[ ]*([^ ]+)[ ]*(って|と)呼ばれて(ない|ませ)/, (msg) -># {{{
-    realname = msg.match[1]
-    nickname = msg.match[2]
+    realname = msg.match[1].toLowerCase()
+    nickname = msg.match[2].toLowerCase()
     nickname = trimKeisho nickname
     unless existsUser robot, msg, realname
       msg.send "そもそも #{realname} って誰?"


FIX: Ensure tutor check uses name

FIX: Ensure tutor check uses name

--- src/app/common/services/unit-service.coffee
+++ src/app/common/services/unit-service.coffee
@@ -107,8 +107,8 @@
     unit.taskCount = -> unit.task_definitions.length

     # Returns all tutorials where the tutor name matches the user name provided
-    unit.tutorialsForUserName = (userId) ->
-      _.filter unit.tutorials, (tutorial) -> tutorial.tutor?.id is userId
+    unit.tutorialsForUserName = (userName) ->
+      _.filter unit.tutorials, (tutorial) -> tutorial.tutor_name is userName

     # Refresh callback for reloading students
     unit.refreshStudents = (onSuccess, onFailure) ->


FIX: Remove duplicate enrolled students in convenor view When using enrol modal in convenor view, enrolling a student would duplicate them in list of students

--- src/app/common/services/unit-service.coffee
+++ src/app/common/services/unit-service.coffee
@@ -96,7 +96,12 @@
     unit.addStudent = (student) ->
       analyticsService.event 'Unit Service', 'Added Student'
       unit.extendStudent(student)
-      unit.students.push(student)
+      if not unit.students[unit.students.indexOf(unit.findStudent(student.project_id))]?
+        #handles adding a newly enrolled student tutor view student list with enrol modal
+        unit.students.push(student)
+      else
+        #handles not adding a new entry to the student list in the convenor view with enrol modal
+        unit.students[unit.students.indexOf(unit.findStudent(student.project_id))] = student

     unit.active_students = () ->
       _.filter unit.students, (student) -> student.enrolled


Keep dropdown and divider classes displaying properly

--- app/assets/javascripts/ckeditor/plugins/effective_menus/plugin.js.coffee
+++ app/assets/javascripts/ckeditor/plugins/effective_menus/plugin.js.coffee
@@ -420,13 +420,11 @@
                 commit: (element) ->
                   if this.getDialog().getValueOf('item', 'source') == 'Divider'
                     element.children('.menu-item').children("input[name$='[special]']").val('divider')
-                    element.addClass('divider')
                   else if this.getElement().isVisible()
                     element.children('.menu-item').children("input[name$='[special]']").val(this.getValue())
-                    element.removeClass('divider')
                   else
                     element.children('.menu-item').children("input[name$='[special]']").val('')
-                    element.removeClass('divider')
+                  # There is more stuff in the classes commit
                 validate: ->
                   if this.getDialog().getValueOf('item', 'source') == 'Divider'
                     if this.getDialog().effective_menu_item.hasClass('dropdown')
@@ -511,7 +509,20 @@
                 setup: (element) ->
                   this.setValue(element.children('.menu-item').children("input[name$='[classes]']").val())
                 commit: (element) ->
-                  element.children('.menu-item').children("input[name$='[classes]']").val(this.getValue())
+                  value = this.getValue()
+                  element.children('.menu-item').children("input[name$='[classes]']").val(value)
+
+                  dropdown = element.hasClass('dropdown')
+
+                  element.prop('class', value)
+
+                  # Put back classes we need
+                  element.addClass('dropdown') if dropdown
+
+                  if this.getDialog().getValueOf('item', 'source') == 'Divider'
+                    element.addClass('divider')
+                  else
+                    element.removeClass('divider')
               }
             ]
           }


add ability to delete tutorials

add ability to delete tutorials

--- src/app/units/partials/directives/unit-contexts.coffee
+++ src/app/units/partials/directives/unit-contexts.coffee
@@ -152,7 +152,7 @@
   replace: true
   restrict: 'E'
   templateUrl: 'units/partials/templates/tutorial-admin-context.tpl.html'
-  controller: ($scope, $modal, $rootScope, Unit, UnitRole) ->
+  controller: ($scope, $modal, $rootScope, Unit, UnitRole, Tutorial, alertService) ->
     $scope.editTutorial = (tutorial) ->
       $modal.open
         controller: 'TutorialModalCtrl'
@@ -166,8 +166,11 @@

     $scope.deleteTutorial = (tutorial) ->
       # TODO: No endpoint for this yet
-      alert "Functionality coming soon!"
-      $scope.unit.tutorials = _.without $scope.unit.tutorials, tutorial
+      Tutorial.delete { id: tutorial.id },
+        (response) ->
+          $scope.unit.tutorials = _.without $scope.unit.tutorials, tutorial
+        (response) ->
+          alertService.add("danger", response.data.error)

     $scope.createTutorial = ->
       d = new Date()


Tests: disable environmnets vm-advanced suite.

--- scripts/test-instance/parallel-sets.coffee
+++ scripts/test-instance/parallel-sets.coffee
@@ -97,7 +97,7 @@
   ]

   [
-    { name: 'environments vm-advanced' }
+    # { name: 'environments vm-advanced' }
   ]

 ]


fix permission condition for put request

--- server/middlewares/utils.coffee
+++ server/middlewares/utils.coffee
@@ -109,7 +109,7 @@

 # Get the permission for a put request in replication protocole
 module.exports.checkPermissionsPutReplication = (req, res, next) ->
-    if req.url.indexOf '/replication/_local' is 0 # ????
+    if req.url.indexOf('/replication/_local') is 0 # ????
         # Use to save history replication
         # Local document aren't replicated
         next()


Disabled application session feature. It needs refactored and session button needs to moved into app settings button.

--- client/landing/app/CommonViews/applicationview/applicationtabview.coffee
+++ client/landing/app/CommonViews/applicationview/applicationtabview.coffee
@@ -11,7 +11,7 @@

     super options, data

-    # TODO: fatihacet: session logic should refactored to ui and ux
+    # TODO: fatihacet: session logic should refactored for ui and ux
     @isSessionEnabled = no #options.saveSession and options.sessionName

     appView = @getDelegate()
@@ -28,7 +28,8 @@

     @on 'PaneAdded', =>
       @tabHandleContainer.repositionPlusHandle @handles
-      @initSession @panes.last, => @updateSession() if @isSessionEnabled
+      if @isSessionEnabled
+        @initSession @panes.last, => @updateSession()

     @on 'SaveSession', (data) =>
       @appStorage.setValue @getOptions().sessionKey, data


change attribute name

change attribute name

--- src/indicators/directives/client-form/controller.coffee
+++ src/indicators/directives/client-form/controller.coffee
@@ -5,14 +5,14 @@
   loadingToast
   defaultSatisfactionForm
 ) ->
-  if $scope.sprint?.indicators?.clientSurvey?
-    $scope.survey = $scope.sprint?.indicators?.clientSurvey
+  if $scope.sprint?.indicators?.satisfactionSurvey?
+    $scope.survey = $scope.sprint?.indicators?.satisfactionSurvey
   else
     $scope.survey = angular.copy defaultSatisfactionForm

   $scope.save = ->
     $scope.sprint.indicators =
-      clientSurvey: $scope.survey
+      satisfactionSurvey: $scope.survey
     Sprint.save $scope.sprint

   $scope.print = ->


Handle with Process-Arguments and tidy

Handle with Process-Arguments and tidy

--- src/helper/paramHandler/paramHandler.coffee
+++ src/helper/paramHandler/paramHandler.coffee
@@ -1,19 +1,14 @@
 class ParamHandler
-  all: (callback) ->
+  constructor: (@payload = {}) ->

-    process = 'src/server --port 8000 --env development'
-    match = process.match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g

-    payload = {}
+  getArguments: (process, callback) ->
+    match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
+    match.map (found) =>
+      parse = found.match(/--([a-zA-Z]*)\s/)
+      @payload[parse[1]] = found.replace parse[0], ''

-    match.map (found) ->
-      parse = found.match(/--([a-zA-Z]*)\s/)
-      payload[parse[1]] = found.replace parse[0], ''
-
-    callback payload
-
-    return
-
+    callback @payload

 module.exports = new ParamHandler


Play Around With Using EDSL

Play Around With Using EDSL

To see if it's good.

--- src/coffee/game.coffee
+++ src/coffee/game.coffee
@@ -1,6 +1,6 @@
 angular.module 'gameDefinition', ['qbn.edsl']
   .run (qbnEdsl) ->
-    {quality, storylet, choice} = qbnEdsl
+    {quality} = qbnEdsl

     quality 'punchiness', 'Punchiness', 'One\'s capability for punching.',
         defaultValue: 7
@@ -10,3 +10,14 @@
         visible: false

     return
+  .run (qbnEdsl) ->
+    {storylet, choice} = qbnEdsl
+
+    storylet 'harrowing-carriage', 'A Harrowing Carriage-Voyage',
+      '''
+      Insert purple prose here.
+      ''',
+      [],
+      frontFacingChoice: choice 'A Harrowing Carriage-Voyage', 'Well, this is unpleasant…'
+
+    return


Remove debug alert

Remove debug alert

--- src/coffee/main.coffee
+++ src/coffee/main.coffee
@@ -41,7 +41,6 @@
     invalidCompoundMessage.show()

   resetBackground = (url) ->
-    alert url
     previewElement.css 'background', "url('#{url}')"
     previewElement.css 'background-color', "##{backgroundColor}"
     previewElement.css 'background-position', '50% 50%'


removed etcd for saving apps, directly save to db

--- server/cluster.coffee
+++ server/cluster.coffee
@@ -79,16 +79,12 @@
   clearInstance: (project, instance) ->
     console.log "Cluster.clearInstance #{project}, #{instance}"
     Instances.remove project: project, name: instance
-    # console.log "#{Settings.findOne().etcd}instances/#{project}/#{inst.application}/#{instance}?recursive=true"
-    # HTTP.del "#{Settings.findOne().etcd}instances/#{project}/#{inst.application}/#{instance}?recursive=true", {}, (error, result) ->
-    #   console.log(error) if error
-    #   console.log "Cluster.clearInstance completed -> #{project}, #{instance}"
-    #   sync()
-    ""

   saveApp: (name, version, definition) ->
-    EtcdClient.set "apps/#{Settings.findOne().project}/#{name}/#{version}", definition
-    ""
+    ApplicationDefs.upsert {name: "#{name}", version: "#{version}"},
+      name: "#{name}"
+      version: "#{version}"
+      def: definition

   retrieveApp: (name, version) ->
     ApplicationDefs.find({name: "#{name}", version: "#{version}"}, {fields: {"def":1, "_id":0}}).map (app) -> app.def


adding more networks

adding more networks

--- server/fetcher.coffee
+++ server/fetcher.coffee
@@ -7,15 +7,44 @@
 utils = require "utility"
 request = require "request"
 csv = require "csv"
-
+xml2js = require "xml2js"
 class Import

+class ImportTransnet extends Import
+  url: (month, type) ->
+    if type is "wind"
+      "http://www.transnetbw.de/en/key-figures/renewable-energies/wind-infeed?app=wind&activeTab=csv&selectMonat=0&view=1&download=true"
+    else
+      "http://www.transnetbw.de/en/key-figures/renewable-energies/photovoltaic?app=solar&activeTab=csv&selectMonat=0&view=1&download=true"
+
+class ImportAmprion extends Import
+  url: (day, type) ->
+    elements = day.split "-"
+    tag = "#{elements[2]}.#{elements[1]}.#{elements[0]}"
+    console.log tag
+    if type is "wind"
+      "http://amprion.de/applications/applicationfiles/winddaten2.php?mode=show&day=#{tag}"
+    else
+      "http://amprion.de/applications/applicationfiles/PV_einspeisung.php?mode=show&day=#{tag}"
+
+  fetch: (day, type, cb) ->
+    request @url(day, type),
+      (error, response, body) =>
+        # Stupid XML malformation on their side
+        body = body.replace /"time="/g, '" time="'
+        parser = new xml2js.Parser()
+        parser.parseString body, (err, result) ->
+          console.dir result.amprion.item
+
 class ImportTennet extends Import
-  url: (month) ->
-    "http://www.tennettso.de/site/Transparenz/veroeffentlichungen/netzkennzahlen/tatsaechliche-und-prognostizierte-windenergieeinspeisung/tatsaechliche-und-prognostizierte-windenergieeinspeisung/monthDataSheetCsv?monat=#{month}"
+  url: (month, type) ->
+    if type is "wind"
+      "http://www.tennettso.de/site/Transparenz/veroeffentlichungen/netzkennzahlen/tatsaechliche-und-prognostizierte-windenergieeinspeisung/tatsaechliche-und-prognostizierte-windenergieeinspeisung/monthDataSheetCsv?monat=#{month}"
+    else
+      "http://www.tennettso.de/site/Transparenz/veroeffentlichungen/netzkennzahlen/tatsaechliche-und-prognostizierte-solarenergieeinspeisung_land/monthDataSheetCsv?monat=#{month}"

-  fetch: (month, cb) ->
-    request @url(month),
+  fetch: (month, type, cb) ->
+    request @url(month, type),
       (error, response, body) =>
         csv.parse body,
           delimiter: ";",
@@ -65,8 +94,6 @@

     request @url(day, type, part),
       (error, response, body) =>
-        #console.log "resonse: #{body}"
-
         @parse JSON.parse(body.replace(/^jQuery\(/, "").replace(/\);$/, "")), cb

   parse: (data, cb) ->
@@ -84,6 +111,8 @@

     cb days

+importer = new ImportAmprion
+importer.fetch "2014-07-01", "wind"
 importer = new ImportTennet
-importer.fetch "2014-07", (days) -> console.log days
+importer.fetch "2014-07", "wind", (days) -> console.log days
 #importer.fetch "2014-07-01", "wind", "actual", (days) -> console.log days


#766 Disable part of cherry-pick for now

--- app/assets/javascripts/admin/views/tasktype/task_type_form_view.coffee
+++ app/assets/javascripts/admin/views/tasktype/task_type_form_view.coffee
@@ -147,8 +147,11 @@
     @ui.branchPointsAllowed.attr("checked", settings["branchPointsAllowed"])
     @ui.somaClickingAllowed.attr("checked", settings["somaClickingAllowed"])

-    inputStrings = ["expectedTime_maxHard"]
-    numValues = @model.get("expectedTime").match(/Limit: ([0-9]+)/).slice(1).map(parseFloat)
+    # TODO Replace once time changes have been ported to master
+    # inputStrings = ["expectedTime_maxHard"]
+    # numValues = @model.get("expectedTime").match(/Limit: ([0-9]+)/).slice(1).map(parseFloat)
+    inputStrings = ["expectedTime_minTime", "expectedTime_maxTime", "expectedTime_maxHard"]
+    numValues = @model.get("expectedTime").match(/([0-9]+) - ([0-9]+), Limit: ([0-9]+)/).slice(1).map(parseFloat)

     _.each(_.zip(inputStrings, numValues), (inputAndNum) =>
       [input, num] = inputAndNum


Cleanup events

Cleanup events

--- src/god/events.coffee
+++ src/god/events.coffee
@@ -13,13 +13,10 @@

     speaker = context.createOscillator()
     speaker.type = type
-
     speaker.connect context.destination
     speaker.noteOn 0
-
     turn_off = -> speaker.noteOff(0); on_end();
     setTimeout turn_off, duration
-

 exports.events = {
   _LABEL: "events"


if a list is not found, it should not break the app

instead, it should cause the validation step to fail.

--- source/javascripts/src/model_xlform.coffee
+++ source/javascripts/src/model_xlform.coffee
@@ -216,8 +216,8 @@
       if p2
         typeDetail.set("listName", p2, silent: true)
         matchedList = @_parent.choices.get(p2)
-        throw new Error("Matching list not found: #{p2}")  unless matchedList
-        typeDetail.set("list", matchedList)
+        if matchedList
+          typeDetail.set("list", matchedList)
       typeDetail.set("orOther", p3, silent: true)  if p3 is "or_other"
       if (rtp = XLF.lookupRowType(tpid))
         typeDetail.set("rowType", rtp, silent: true)


show marker at line middle

show marker at line middle

--- source/js/models/example_journey.js.coffee
+++ source/js/models/example_journey.js.coffee
@@ -20,11 +20,25 @@
     google.maps.event.addListener @_polyline, "click", @showExample
     @_polyline

+  exampleMarker: ->
+    return @_example_marker if @_example_marker?
+    @_example_marker = new google.maps.Marker
+      position: @halfwayPoint()
+      title: @get("name")
+    google.maps.event.addListener @_example_marker, "mouseover", @highlight
+    google.maps.event.addListener @_example_marker, "mouseout", @unhighlight
+    google.maps.event.addListener @_example_marker, "click", @showExample
+    @_example_marker
+
   queryString: ->
     query = "?mode=#{@get('mode')}"
     @waypoints.each (waypoint)->
       query += "&#{waypoint.queryStr()}"
     query
+
+  halfwayPoint: =>
+    distance = 0.5 * @get("total_distance")
+    @pointAlongPath(distance)

   showExample: =>
     JourneyPlanner.App.router.navigate @queryString(), {trigger: true, replace: true}
@@ -51,11 +65,18 @@

   resetOverlays:(map=JourneyPlanner.App.map)->
     @forEach (model)=>
-      if model.visible() then model.polyline().setMap(map) else model.polyline().setMap(null)
+      if model.visible()
+        model.polyline().setMap(map)
+        model.exampleMarker().setMap(map)
+      else
+        model.polyline().setMap(null)
+        model.exampleMarker().setMap(null)

   showOverlays: (map)->
     @forEach (model)=>
-      model.polyline().setMap(map) if model.visible()
+      if model.visible()
+        model.polyline().setMap(map)
+        model.exampleMarker().setMap(map)

   hideOverlays: ->
     @showOverlays(null)


fix typo

fix typo

--- spec/operator-transform-string-spec.coffee
+++ spec/operator-transform-string-spec.coffee
@@ -199,7 +199,7 @@
         settings.set('stayOnTransformString', true)
         set cursor: [0, 0]

-      it "indents the currrent selection and exits visual mode", ->
+      it "indents the current selection and exits visual mode", ->
         ensure 'v j >',
           mode: 'normal'
           textC: """


Fixed co2 emissions chart

Fixed co2 emissions chart

--- app/assets/javascripts/d3/co2_emissions.coffee
+++ app/assets/javascripts/d3/co2_emissions.coffee
@@ -10,6 +10,12 @@

     can_be_shown_as_table: -> true

+    margins:
+      top: 20
+      bottom: 35
+      left: 30
+      right: 40
+
     # This method is called right before rendering because the series are
     # added when the JSON request is complete, ie after the initialize method
     #
@@ -21,21 +27,19 @@
     draw: =>
       @setup_series()

-      margins =
-        top: 20
-        bottom: 35
-        left: 30
-        right: 40
+      @width  = @available_width()  - (@margins.left + @margins.right)
+      @height = @available_height() - (@margins.top + @margins.bottom)

-      @width = 494 - (margins.left + margins.right)
-      @series_height = 190
-      @height = @series_height + (margins.top + margins.bottom)
+      legend_height = @legend_cell_height
+      legend_margin = 20
+      @series_height = @height - legend_height - legend_margin
+
       @svg = d3.select(@container_selector())
         .append("svg:svg")
-        .attr("height", @height + margins.top + margins.bottom)
-        .attr("width", @width + margins.left + margins.right)
+        .attr("height", @height + @margins.top + @margins.bottom)
+        .attr("width", @width + @margins.left + @margins.right)
         .append("svg:g")
-        .attr("transform", "translate(#{margins.left}, #{margins.top})")
+        .attr("transform", "translate(#{@margins.left}, #{@margins.top})")

       # Ugly stuff. Check the db to see which series have been defined.
       # Since this chart is very specific the series could actually be
@@ -46,7 +50,7 @@
         svg: @svg
         series: series_for_legend
         width: @width
-        vertical_offset: @series_height + 20
+        vertical_offset: @series_height + legend_margin
         columns: 2

       @x = d3.scale.ordinal().rangeRoundBands([0, @width - 25])


Enabling the selection of year and month in date picker

--- app/assets/javascripts/lib/pickadate.js.coffee
+++ app/assets/javascripts/lib/pickadate.js.coffee
@@ -1,3 +1,5 @@
 $(document).ready ->
   $("input.date").pickadate
-    format: 'dd/mm/yyyy'
+    format: 'dd/mm/yyyy',
+    selectMonths: true,
+    selectYears: 200


Removes unexplicit JS console logs in vizu

--- app/assets/javascripts/visualization.js.coffee
+++ app/assets/javascripts/visualization.js.coffee
@@ -103,25 +103,12 @@
         zoom : 13

     _create: ->
-      console.log "1"
       $.extend(true, @options, @element.data("visualization"))
-
-      console.log "2"
       @mapElement = $("<div>", class: "map").insertAfter(@element)
-
-      console.log "3"
       @map = L.map(@mapElement[0], @options.map)
-
-      console.log "4"
       this._resize()
-
-      console.log "5"
       this._refreshView()
-
-      console.log "8"
       this._refreshControls()
-
-      console.log "9"

     _destroy: ->
       @mapElement.remove()


Drop the winning-facet viz chart down 10px.

Also used CS's identation syntax for JS objects.

Fixes #292.

--- app/assets/javascripts/visualization.js.coffee
+++ app/assets/javascripts/visualization.js.coffee
@@ -143,9 +143,13 @@

 window.drawChart = (dataArray,chartColors) ->
   data = google.visualization.arrayToDataTable(dataArray);
-  options = {
-    legend: {'position':'bottom'}
-    chartArea:{left:0,top:0,width:"99%",height:"50%"}
+  options =
+    legend:
+      'position':'bottom'
+    chartArea:
+      left: 0
+      top: 10
+      width: "99%"
+      height: "50%"
     colors: chartColors
-  };
   window.chart.draw(data, options);


fixing navigation fallback for html4

fixing navigation fallback for html4

--- src/core/router.coffee
+++ src/core/router.coffee
@@ -44,8 +44,8 @@

 	navigate:( url, trigger = true, replace = false )->
 		if @the.config.no_push_state
+			window.location = url
 			return
-			window.location = url
 		else
 			@trigger = trigger
 			action = if replace then "replaceState" else "pushState"


AppCatalog: Removed Technical Stuff and cleared Screenshots view if app has no screenshot.

--- client/app/Applications/Apps.kdapplication/Views/appdetailsview.coffee
+++ client/app/Applications/Apps.kdapplication/Views/appdetailsview.coffee
@@ -42,12 +42,16 @@
       @parent.$('.profilearea').removeClass "cast-shadow"

   pistachio:->
+    if @getData().manifest.screenshots
+      screenshots = """
+        Screenshots
+
{{> @slideShow}}

+      """
+
     """
     About {{#(title)}}

{{ @utils.applyTextExpansions #(manifest.description)}}

-    Screenshots
-
{{> @slideShow}}

-    Technical Stuff
+    #{screenshots or ""}

     Reviews

{{> @reviewView}}


Classroom: Template changes.

Classroom: Template changes.

--- client/landing/app/Applications/Classroom.kdapplication/AppView.coffee
+++ client/landing/app/Applications/Classroom.kdapplication/AppView.coffee
@@ -2,16 +2,14 @@

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

+    options.cssClass = "classroom"
+
     super options, data

-    @addSubView @container = new KDView
-      cssClass : "classroom"
       partial  : """
-

-

-
<classroom />

-
Start learning, teaching and sharing together.
 It's your classroom and it's online and it's free!

-
-

+

+
<classroom />

+
Start learning, teaching and sharing together.
 It's your classroom and it's online and it's free!

+

       """


Added more content. Show all active state

--- app/pages/team-page.cjsx
+++ app/pages/team-page.cjsx
@@ -53,9 +53,12 @@
         Chris is interested in how galaxies form and evolve, how citizen science can change the
         world, and whether the Chicago Fire can get their act together.'''
       chrisSnyder:
-        title: 'Educator'
+        title: 'Project Manager'
         bio: '''Chris Snyder began working on the Zooniverse team in fall 2012 as a web developer. In July 2013,
         he became the technical project manager. He received a degree in computer science from the University of Dayton.'''
+      christopherDoogue:
+        title: ' '
+        bio: ' '
       colemanKrawczyk:
         title: 'Data Scientist'
         bio: '''Coleman is helping to create new data analysis and visualization tools for existing Zooniverse
@@ -128,6 +131,9 @@
       michaelParrish:
         title: 'Developer'
         bio: '''Software developer at the Zooniverse. Dog, fishing, snakes, and bourbon.'''
+      perryRoper:
+        title: ' '
+        bio: ' '
       rebeccaSmethurst:
         title: 'Researcher'
         bio: '''Becky is an astrophysicist working towards her doctorate in Oxford. She is
@@ -148,13 +154,17 @@
         bio: '''Sascha joined the Zooniverse team in November 2013 as a front-end developer.
         A former researcher and software developer at NASA Ames, he received degrees in both
         computer science and mechanical engineering.'''
+      simoneDuca:
+        title: ' '
+        bio: ' '
+      veronicaMaidel:
+        title: ' '
+        bio: ' '
       victoriaVanHyning:
         title: 'Researcher'
         bio: '''Victoria is a Digital Humanities postdoc for the Zooniverse. She holds a masters
         in Medieval English literature from Oxford and a PhD in early modern English literature
         from the University of Sheffield. Coffee is her lifeblood.'''
-      portsmouth: ''' '''
-      taipei: ''' '''

 teamMembers =
   adamMcMaster:
@@ -224,6 +234,12 @@
     bio: counterpart "team.content.chrisSnyder.bio"
     image: "http://placehold.it/150x150"
     location: "chicago"
+  christopherDoogue:
+    name: "Christopher Doogue"
+    title: counterpart "team.content.christopherDoogue.title"
+    bio: counterpart "team.content.christopherDoogue.bio"
+    image: "http://placehold.it/150x150"
+    location: "oxford"
   colemanKrawczyk:
     name: "Coleman Krawczyk"
     twitter: "ColemanKrawczyk"
@@ -325,6 +341,12 @@
     bio: counterpart "team.content.michaelParrish.bio"
     image: "http://placehold.it/150x150"
     location: "chicago"
+  perryRoper:
+    name: "Perry Roper"
+    title: counterpart "team.content.perryRoper.title"
+    bio: counterpart "team.content.perryRoper.bio"
+    image: "http://placehold.it/150x150"
+    location: "oxford"
   rebeccaSmethurst:
     name: "Rebecca Smethurst"
     twitter: "becky1505"
@@ -352,6 +374,18 @@
     bio: counterpart "team.content.saschaIshikawa.bio"
     image: "http://placehold.it/150x150"
     location: "chicago"
+  simoneDuca:
+    name: "Simone Duca"
+    title: counterpart "team.content.simoneDuca.title"
+    bio: counterpart "team.content.simoneDuca.bio"
+    image: "http://placehold.it/150x150"
+    location: "oxford"
+  veronicaMaidel:
+    name: "Veronica Maidel"
+    title: counterpart "team.content.veronicaMaidel.title"
+    bio: counterpart "team.content.veronicaMaidel.bio"
+    image: "http://placehold.it/150x150"
+    location: "chicago"
   victoriaVanHyning:
     name: "Victoria van Hyning"
     twitter: "VanHyningV"
@@ -365,6 +399,10 @@

   getInitialState: ->
     currentSort: 'showAll'
+
+  componentDidMount: ->
+    button = React.findDOMNode(@refs.showAll)
+    @updateButtonState button

   render: ->
     sideBarNav = counterpart "team.nav"