src/tools/component_tester.coffee in luca-0.9.2 vs src/tools/component_tester.coffee in luca-0.9.4

- old
+ new

@@ -93,16 +93,25 @@ @$el.parent().toggle() _.def("Luca.tools.ComponentTester").extends("Luca.core.Container").with + id: "component_tester" name: "component_tester" - className:"span11" - autoEvaluateCode: true + currentSize: 1 + + sizes:[ + icon: "resize-full" + value: ()-> $(window).height() * 0.3 + , + icon: "resize-small" + value: ()-> $(window).height() * 0.6 + ] + components:[ ctype: 'card_view' name: "component_detail" activeCard: 0 components:[ @@ -114,15 +123,10 @@ ctype: "code_editor" name: "ctester_edit" className: 'font-large fixed-height' minHeight:'350px' - styles: - "position" : "absolute" - "bottom" : "0px" - "width" : "96%" - currentBuffers: defaults compiledBuffers:["component","setup","implementation"] topToolbar: @@ -239,17 +243,10 @@ @[ value ] = _.bind(@[value], @) @defer("editComponent").until("after:render") afterRender: ()-> - @getOutput().applyStyles('min-height':'400px') - - # TEMP - # Visual hacks - @$('.toolbar-container').css('padding-right','12px') - @$('.luca-ui-toolbar.toolbar-bottom').css('margin','0px') - changeHandler = _.idleMedium ()=> if @autoEvaluateCode is true @applyTestRun() , 500 @@ -328,17 +325,10 @@ @getEditor().setMode(newMode) button.html _.string.capitalize((if newMode is "coffeescript" then "View Javascript" else "View Coffeescript")) @editBuffer @currentBufferName, (newMode is "javascript") - currentSize: 1 - sizes:[ - icon: "resize-full" - value: ()-> $(window).height() * 0.3 - , - icon: "resize-small" - value: ()-> $(window).height() * 0.6 - ] + toggleSize: (button)-> index = @currentSize++ % @sizes.length newSize = @sizes[ index ].value() newIcon = @sizes[ index ].icon \ No newline at end of file