Opted for simply using CSS for upper form notice

- This is essentially template logic anyway
master
Mike Gerwitz 2012-03-03 21:38:56 -05:00
parent 38aefd223a
commit e200ab3e82
4 changed files with 4 additions and 39 deletions

View File

@ -56,30 +56,6 @@ rectest.RecTest = Class( 'RecTest',
}, },
'public displayNotice': function( str )
{
this._jQuery( '.notice' )
.text( str )
.slideDown( 250, function()
{
$( this ).addClass( 'active' );
} );
return this;
},
'public hideNotice': function()
{
$( '.notice' ).slideUp( 250, function()
{
$( this ).removeClass( 'active' );
} );
return this;
},
'bindContinue': function( $element, callback ) 'bindContinue': function( $element, callback )
{ {
var _self = this, var _self = this,
@ -100,7 +76,7 @@ rectest.RecTest = Class( 'RecTest',
console.log( 'done' ); console.log( 'done' );
} ); } );
callback.call( _self.__inst ); callback && callback.call( _self.__inst );
} ); } );
return this; return this;

View File

@ -9,12 +9,6 @@ $( document ).ready( function()
{ {
rectest.RecTest( jQuery, rectest.cases ).init() rectest.RecTest( jQuery, rectest.cases ).init()
.listCases( $( '#case' ) ) .listCases( $( '#case' ) )
.displayNotice( .bindContinue( $( '#continue' ) )
'Please configure the test using the form below.'
)
.bindContinue( $( '#continue' ), function()
{
this.hideNotice();
} )
; ;
} ); } );

View File

@ -79,16 +79,11 @@ dd {
} }
.notice { .notice {
display: none;
background-color: #fce94f; background-color: #fce94f;
border-bottom: 2px solid #f4d030; border-bottom: 2px solid #f4d030;
color: black; color: black;
} }
.notice.active {
display: block;
}
#interval, #interval,

View File

@ -18,8 +18,8 @@
</div> </div>
<!-- holds notices --> <!-- holds notices -->
<div class="hasjs topbox notice"> <div class="hasjs topbox notice while-idle">
&nbsp; Please configure the test using the form below.
</div> </div>
<!-- status (while testing) --> <!-- status (while testing) -->