baseboard 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/templates/project/Gemfile +1 -1
- data/templates/project/README.md +0 -1
- data/templates/project/assets/javascripts/application.coffee +11 -12
- data/templates/project/assets/javascripts/dashing.gridster.coffee +8 -8
- data/templates/project/config.ru +1 -1
- data/templates/project/dashboards/sampletv.erb +3 -3
- data/templates/project/widgets/clock/clock.coffee +1 -1
- data/templates/project/widgets/comments/comments.coffee +1 -1
- data/templates/project/widgets/graph/graph.coffee +3 -3
- data/templates/project/widgets/iframe/iframe.coffee +1 -1
- data/templates/project/widgets/image/image.coffee +1 -1
- data/templates/project/widgets/list/list.coffee +1 -1
- data/templates/project/widgets/meter/meter.coffee +2 -2
- data/templates/project/widgets/number/number.coffee +2 -2
- data/templates/project/widgets/text/text.coffee +1 -1
- data/templates/widget/%name%/%name%.coffee.tt +1 -1
- data/templates/widget/%name%/%name%.scss.tt +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            !binary "U0hBMQ==":
         | 
| 3 3 | 
             
              metadata.gz: !binary |-
         | 
| 4 | 
            -
                 | 
| 4 | 
            +
                OTZhZWMzMTI4ZjJkYTMxYmJlMDlhMzM1NDMxYTkyNTFhMGQwYzk4OA==
         | 
| 5 5 | 
             
              data.tar.gz: !binary |-
         | 
| 6 | 
            -
                 | 
| 6 | 
            +
                ZWIzMDViNDQyYjE1MDZlNjg5MzQyZjBjZWI2OGVlZjE4NWZiYjg4NQ==
         | 
| 7 7 | 
             
            SHA512:
         | 
| 8 8 | 
             
              metadata.gz: !binary |-
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
                 | 
| 11 | 
            -
                 | 
| 9 | 
            +
                ZDRjM2UzYTA0ZTM3Mjc4NGUyN2M5MmQ4Y2E0Njc5MWFiYWZiYWRmYzgyNzE0
         | 
| 10 | 
            +
                MWU2NThhMDQ1OGQxMTM4MjAxYzFhNTc3Y2M2YTYyYzNkNDFhYzUzNDhmZmI5
         | 
| 11 | 
            +
                YThmY2NjZjc4YzlhNDFhNWNiYjZhNGU3NjFiOTgzMTljNmM0OWM=
         | 
| 12 12 | 
             
              data.tar.gz: !binary |-
         | 
| 13 | 
            -
                 | 
| 14 | 
            -
                 | 
| 15 | 
            -
                 | 
| 13 | 
            +
                ZDAwMWEyODY5M2FiM2I4N2ZlMzViNWZhMzNkNmU0MzEwYjQ5MzIzYjM1MTc5
         | 
| 14 | 
            +
                YzY3ZGIyOGE1ZTgwNWVkMDNhODJhNjhjMjRkYTlmZTZkYTg2MjliNmE2NDkw
         | 
| 15 | 
            +
                MGRmYjM0NDU5NjI0NGI3YzgzOGJhNDllMjRhNzRhYjRmNjYwNDU=
         | 
    
        data/templates/project/Gemfile
    CHANGED
    
    
    
        data/templates/project/README.md
    CHANGED
    
    | @@ -1 +0,0 @@ | |
| 1 | 
            -
            Check out http://shopify.github.com/dashing for more information.
         | 
| @@ -1,25 +1,24 @@ | |
| 1 | 
            -
            # dashing.js is located in the dashing framework
         | 
| 2 1 | 
             
            # It includes jquery & batman for you.
         | 
| 3 | 
            -
            #= require  | 
| 2 | 
            +
            #= require baseboard.js
         | 
| 4 3 |  | 
| 5 4 | 
             
            #= require_directory .
         | 
| 6 5 | 
             
            #= require_tree ../../widgets
         | 
| 7 6 |  | 
| 8 7 | 
             
            console.log("Yeah! The dashboard has started!")
         | 
| 9 8 |  | 
| 10 | 
            -
             | 
| 11 | 
            -
               | 
| 12 | 
            -
               | 
| 13 | 
            -
               | 
| 9 | 
            +
            Baseboard.on 'ready', ->
         | 
| 10 | 
            +
              Baseboard.widget_margins ||= [5, 5]
         | 
| 11 | 
            +
              Baseboard.widget_base_dimensions ||= [300, 360]
         | 
| 12 | 
            +
              Baseboard.numColumns ||= 4
         | 
| 14 13 |  | 
| 15 | 
            -
              contentWidth = ( | 
| 14 | 
            +
              contentWidth = (Baseboard.widget_base_dimensions[0] + Baseboard.widget_margins[0] * 2) * Baseboard.numColumns
         | 
| 16 15 |  | 
| 17 16 | 
             
              Batman.setImmediate ->
         | 
| 18 17 | 
             
                $('.gridster').width(contentWidth)
         | 
| 19 18 | 
             
                $('.gridster ul:first').gridster
         | 
| 20 | 
            -
                  widget_margins:  | 
| 21 | 
            -
                  widget_base_dimensions:  | 
| 22 | 
            -
                  avoid_overlapped_widgets: ! | 
| 19 | 
            +
                  widget_margins: Baseboard.widget_margins
         | 
| 20 | 
            +
                  widget_base_dimensions: Baseboard.widget_base_dimensions
         | 
| 21 | 
            +
                  avoid_overlapped_widgets: !Baseboard.customGridsterLayout
         | 
| 23 22 | 
             
                  draggable:
         | 
| 24 | 
            -
                    stop:  | 
| 25 | 
            -
                    start: ->  | 
| 23 | 
            +
                    stop: Baseboard.showGridsterInstructions
         | 
| 24 | 
            +
                    start: -> Baseboard.currentWidgetPositions = Baseboard.getWidgetPositions()
         | 
| @@ -4,8 +4,8 @@ | |
| 4 4 | 
             
            # Delete it if you'd rather handle the layout yourself.
         | 
| 5 5 | 
             
            # You'll miss out on a lot if you do, but we won't hold it against you.
         | 
| 6 6 |  | 
| 7 | 
            -
             | 
| 8 | 
            -
               | 
| 7 | 
            +
            Baseboard.gridsterLayout = (positions) ->
         | 
| 8 | 
            +
              Baseboard.customGridsterLayout = true
         | 
| 9 9 | 
             
              positions = positions.replace(/^"|"$/g, '')
         | 
| 10 10 | 
             
              positions = $.parseJSON(positions)
         | 
| 11 11 | 
             
              widgets = $("[data-row^=]")
         | 
| @@ -13,19 +13,19 @@ Dashing.gridsterLayout = (positions) -> | |
| 13 13 | 
             
                $(widget).attr('data-row', positions[index].row)
         | 
| 14 14 | 
             
                $(widget).attr('data-col', positions[index].col)
         | 
| 15 15 |  | 
| 16 | 
            -
             | 
| 16 | 
            +
            Baseboard.getWidgetPositions = ->
         | 
| 17 17 | 
             
              $(".gridster ul:first").gridster().data('gridster').serialize()
         | 
| 18 18 |  | 
| 19 | 
            -
             | 
| 20 | 
            -
              newWidgetPositions =  | 
| 19 | 
            +
            Baseboard.showGridsterInstructions = ->
         | 
| 20 | 
            +
              newWidgetPositions = Baseboard.getWidgetPositions()
         | 
| 21 21 |  | 
| 22 | 
            -
              unless JSON.stringify(newWidgetPositions) == JSON.stringify( | 
| 23 | 
            -
                 | 
| 22 | 
            +
              unless JSON.stringify(newWidgetPositions) == JSON.stringify(Baseboard.currentWidgetPositions)
         | 
| 23 | 
            +
                Baseboard.currentWidgetPositions = newWidgetPositions
         | 
| 24 24 | 
             
                $('#save-gridster').slideDown()
         | 
| 25 25 | 
             
                $('#gridster-code').text("
         | 
| 26 26 | 
             
                  <script type='text/javascript'>\n
         | 
| 27 27 | 
             
                  $(function() {\n
         | 
| 28 | 
            -
                  \ \  | 
| 28 | 
            +
                  \ \ Baseboard.gridsterLayout('#{JSON.stringify(Baseboard.currentWidgetPositions)}')\n
         | 
| 29 29 | 
             
                  });\n
         | 
| 30 30 | 
             
                  </script>
         | 
| 31 31 | 
             
                ")
         | 
    
        data/templates/project/config.ru
    CHANGED
    
    
| @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            <script type='text/javascript'>
         | 
| 2 2 | 
             
            $(function() {
         | 
| 3 3 | 
             
              // These settings override the defaults set in application.coffee. You can do this on a per dashboard basis.
         | 
| 4 | 
            -
               | 
| 5 | 
            -
               | 
| 6 | 
            -
               | 
| 4 | 
            +
              Baseboard.gridsterLayout('[{"col":2,"row":1},{"col":1,"row":1},{"col":3,"row":1},{"col":2,"row":2},{"col":3,"row":2},{"col":1,"row":2},{"col":5,"row":1},{"col":4,"row":2},{"col":2,"row":3}]')
         | 
| 5 | 
            +
              Baseboard.widget_base_dimensions = [370, 340]
         | 
| 6 | 
            +
              Baseboard.numColumns = 5
         | 
| 7 7 | 
             
            });
         | 
| 8 8 | 
             
            </script>
         | 
| 9 9 |  | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            class  | 
| 1 | 
            +
            class Baseboard.Graph extends Baseboard.Widget
         | 
| 2 2 |  | 
| 3 3 | 
             
              @accessor 'current', ->
         | 
| 4 4 | 
             
                return @get('displayedValue') if @get('displayedValue')
         | 
| @@ -9,8 +9,8 @@ class Dashing.Graph extends Dashing.Widget | |
| 9 9 | 
             
              ready: ->
         | 
| 10 10 | 
             
                container = $(@node).parent()
         | 
| 11 11 | 
             
                # Gross hacks. Let's fix this.
         | 
| 12 | 
            -
                width = ( | 
| 13 | 
            -
                height = ( | 
| 12 | 
            +
                width = (Baseboard.widget_base_dimensions[0] * container.data("sizex")) + Baseboard.widget_margins[0] * 2 * (container.data("sizex") - 1)
         | 
| 13 | 
            +
                height = (Baseboard.widget_base_dimensions[1] * container.data("sizey"))
         | 
| 14 14 | 
             
                @graph = new Rickshaw.Graph(
         | 
| 15 15 | 
             
                  element: @node
         | 
| 16 16 | 
             
                  width: width
         | 
| @@ -1 +1 @@ | |
| 1 | 
            -
            class  | 
| 1 | 
            +
            class Baseboard.Text extends Baseboard.Widget
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: baseboard
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Nikit Saraf, Yash Shah
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015-03- | 
| 11 | 
            +
            date: 2015-03-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: sass
         |