[smolder-commits] SF.net SVN: smolder: [632] trunk
Brought to you by:
michael_peters
From: <mic...@us...> - 2007-07-27 19:16:25
|
Revision: 632 http://smolder.svn.sourceforge.net/smolder/?rev=632&view=rev Author: michael_peters Date: 2007-07-27 12:16:24 -0700 (Fri, 27 Jul 2007) Log Message: ----------- fix some problems with TAP ajaxy reports Modified Paths: -------------- trunk/htdocs/js/smolder.js trunk/htdocs/js/tap_behaviours.js trunk/templates/TAP/full_report.html Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Name: svk:merge - 6cb60ec2-19fc-4f48-ba02-516b4c84136d:/local/smolder:23500 ef85ff6a-427b-4ddd-bce6-61dc0fed61e7:/local/smolder/trunk:15707 + 6cb60ec2-19fc-4f48-ba02-516b4c84136d:/local/smolder:23500 ef85ff6a-427b-4ddd-bce6-61dc0fed61e7:/local/smolder/trunk:15708 Modified: trunk/htdocs/js/smolder.js =================================================================== --- trunk/htdocs/js/smolder.js 2007-07-27 19:16:20 UTC (rev 631) +++ trunk/htdocs/js/smolder.js 2007-07-27 19:16:24 UTC (rev 632) @@ -83,7 +83,7 @@ // parmas : an object of query params to send along // indicator : the id of the image to use as an indicator (optional defaults to 'indicator') // onComplete: a call back function to be executed after the normal processing (optional) -// Receives as arguments, the same args passed into Smolder.Ajax.update +// Receives as arguments, the same args passed into Smolder.Ajax.request // // Smolder.Ajax.request({ // url : '/app/some_mod/something', @@ -124,7 +124,7 @@ args.json = json; complete(args); }, - //onException: function(request, exception) { alert("ERROR FROM AJAX REQUEST:\n" + exception) }, + onException: function(request, exception) { alert("ERROR FROM AJAX REQUEST:\n" + exception) }, onFailure: function(request) { Smolder.show_error() } } ); @@ -185,7 +185,7 @@ args.json = json; complete(args); }, - //onException: function(request, exception) { alert("ERROR FROM AJAX REQUEST:\n" + exception) }, + onException: function(request, exception) { alert("ERROR FROM AJAX REQUEST:\n" + exception) }, onFailure: function(request) { Smolder.show_error() } } ); Modified: trunk/htdocs/js/tap_behaviours.js =================================================================== --- trunk/htdocs/js/tap_behaviours.js 2007-07-27 19:16:20 UTC (rev 631) +++ trunk/htdocs/js/tap_behaviours.js 2007-07-27 19:16:24 UTC (rev 632) @@ -3,28 +3,35 @@ 'a.testfile_details_trigger' : function(el) { // get the id of the target div var matches = el.id.match(/^for_(.*)$/); - var targetId = matches[1]; + var target = matches[1]; // get the id of the indicator image matches = el.className.match(/(^|\s)show_(\S*)($|\s)/); var indicator = matches[2]; el.onclick = function() { - if( Element.visible(targetId) ) { - Effect.BlindUp(targetId, { duration: .5 }); +console.log('clicking'); + if( Element.visible(target) ) { +console.log(' is ivisible'); + Effect.BlindUp(target, { duration: .5 }); } else { +console.log(' not visibile'); $(indicator).style.visibility = 'visible'; +console.log(' making ajax request for target: ' + target); Smolder.Ajax.update({ url : el.href, - target : targetId, + target : target, indicator : 'none', onComplete : function() { +console.log(' in onComplete'); window.setTimeout(function() { $(indicator).style.visibility = 'hidden'}, 200); +console.log(' BlindDown'); Effect.BlindDown( - targetId, + target, // reapply any dynamic bits { afterFinish : function() { - Behaviour.apply(); +console.log(' in afterFinish()'); + Behaviour.apply(target); }, duration : .5 } @@ -32,15 +39,16 @@ } }); } +console.log('returning false'); return false; }; }, 'div.diag': function(el) { - setup_tooltip(el, el); + Smolder.setup_tooltip(el, el); }, 'td.tooltip_trigger' : function(el) { var diag = document.getElementsByClassName('tooltip', el)[0]; - setup_tooltip(el, diag); + Smolder.setup_tooltip(el, diag); }, 'a.show_all' : function(el) { Event.observe(el, 'click', function() { @@ -48,8 +56,11 @@ // panel is opened so that it opens the next one var show_details = function(index) { var el = $('testfile_details_' + index); - // return if we're the last one - if( ! el ) return; + // apply the behaviours if we're the last one + if( ! el ) { + Behaviour.apply(); + return; + } // we only need to fetch it if we're not already visible if( Element.visible(el) ) { @@ -74,7 +85,6 @@ } }; show_details(0); - Behaviour.apply(); }); } }; Modified: trunk/templates/TAP/full_report.html =================================================================== --- trunk/templates/TAP/full_report.html 2007-07-27 19:16:20 UTC (rev 631) +++ trunk/templates/TAP/full_report.html 2007-07-27 19:16:24 UTC (rev 632) @@ -125,4 +125,8 @@ </div> </body> + +<script type="text/javascript"> +Behaviour.apply(); +</script> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |