vendor/assets/javascripts/bhf/application.js in bhf-0.6.11 vs vendor/assets/javascripts/bhf/application.js in bhf-0.6.12

- old
+ new

@@ -97,10 +97,22 @@ scope.getElements('.map_data_lat').each(function(lat){ new Setlatlng(lat); }); }; + var windowHight = document.body.clientHeight; + window.onresize = function(e){ + windowHight = document.body.clientHeight; + }; + var scrollContent = function(){ + var innerForm = quickEdit.holder.getElement('form'); + if ( ! innerForm) { return; } + var scroll = document.body.scrollTop-83; + if (scroll + innerForm.getSize().y > windowHight) { return; } + quickEdit.holder.setStyle('padding-top', scroll); + }; + // window.onscroll = scrollContent; quickEdit.setup({ holderParent: $('content'), onStartRequest: function(form){ ajaxNote.loading(); @@ -305,28 +317,13 @@ } quickEdit.startEdit(holder.getElement('a')); } }); } - var windowHight = document.body.clientHeight; - window.onresize = function(e){ - windowHight = document.body.clientHeight; - }; - var scrollContent = function(){ - var innerForm = quickEdit.holder.getElement('form'); - if ( ! innerForm) { return; } - var scroll = document.body.scrollTop-70; - if (scroll < 10) { - scroll = 10; - } - if (scroll + innerForm.getSize().y > windowHight) { return; } - quickEdit.holder.setStyle('padding-top', scroll); - }; - window.onscroll = scrollContent; var fm = $('flash_massages'); if (fm) { - fm.removeClass.delay(4000, fm, 'show'); + fm.removeClass.delay(10000, fm, 'show'); } new BrowserUpdate({vs:{i:8,f:7,o:10.01,s:4,n:9}}); }; \ No newline at end of file