Improved use of .expanding(), removed log messages.

This commit is contained in:
Martin Edenhofer 2014-08-13 22:27:44 +02:00
parent 4109266fa5
commit 2a3aef0ca6
3 changed files with 20 additions and 8 deletions

View file

@ -654,8 +654,12 @@ class App.ControllerForm extends App.Controller
item = $( App.view('generic/textarea')( attribute: attribute ) + '<div class="file-uploader ' + attribute.class + '" id="' + fileUploaderId + '"></div>' ) item = $( App.view('generic/textarea')( attribute: attribute ) + '<div class="file-uploader ' + attribute.class + '" id="' + fileUploaderId + '"></div>' )
a = => a = =>
visible = $( item[0] ).is(":visible")
if visible && !$( item[0] ).expanding('active')
$( item[0] ).expanding() $( item[0] ).expanding()
$( item[0] ).on('focus', -> $( item[0] ).on('focus', ->
visible = $( item[0] ).is(":visible")
if visible && !$( item[0] ).expanding('active')
$( item[0] ).expanding() $( item[0] ).expanding()
) )
App.Delay.set( a, 80 ) App.Delay.set( a, 80 )

View file

@ -42,11 +42,15 @@ class App.WidgetOrganization extends App.Controller
) )
a = => a = =>
visible = @el.find('textarea').is(":visible")
if visible && !@el.find('textarea').expanding('active')
@el.find('textarea').expanding() @el.find('textarea').expanding()
@el.find('textarea').on('focus', => @el.find('textarea').on('focus', (e) =>
visible = @el.find('textarea').is(":visible")
if visible && !@el.find('textarea').expanding('active')
@el.find('textarea').expanding() @el.find('textarea').expanding()
) )
@delay( a, 80 ) @delay( a, 40 )
# enable user popups # enable user popups
@userPopups() @userPopups()

View file

@ -72,11 +72,15 @@ class App.WidgetUser extends App.ControllerDrox
) )
a = => a = =>
visible = @el.find('textarea').is(":visible")
if visible && !@el.find('textarea').expanding('active')
@el.find('textarea').expanding() @el.find('textarea').expanding()
@el.find('textarea').on('focus', => @el.find('textarea').on('focus', (e) =>
visible = @el.find('textarea').is(":visible")
if visible && !@el.find('textarea').expanding('active')
@el.find('textarea').expanding() @el.find('textarea').expanding()
) )
@delay( a, 80 ) @delay( a, 40 )
@userTicketPopups( @userTicketPopups(
selector: '.user-tickets' selector: '.user-tickets'