SOLR-3364 ensure that we have only one open selection at time

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1327405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Matheis 2012-04-18 07:46:50 +00:00
parent eb92d7ac88
commit 69198b7d89
1 changed files with 27 additions and 1 deletions

View File

@ -124,6 +124,18 @@ var logging_handler = function( response, text_status, xhr )
self self
.html( logger_content ); .html( logger_content );
self
.die( 'clear' )
.live
(
'clear',
function( event )
{
$( '.open', this )
.removeClass( 'open' );
}
);
$( 'li:last-child', this ) $( 'li:last-child', this )
.addClass( 'jstree-last' ); .addClass( 'jstree-last' );
@ -156,19 +168,33 @@ var logging_handler = function( response, text_status, xhr )
} }
) )
$( '.trigger, .selector .close', this ) $( '.trigger', this )
.die( 'click' ) .die( 'click' )
.live .live
( (
'click', 'click',
function( event ) function( event )
{ {
self.trigger( 'clear' );
$( '.selector-holder', $( this ).parents( 'li' ).first() ).first() $( '.selector-holder', $( this ).parents( 'li' ).first() ).first()
.trigger( 'toggle' ); .trigger( 'toggle' );
return false; return false;
} }
); );
$( '.selector .close', this )
.die( 'click' )
.live
(
'click',
function( event )
{
self.trigger( 'clear' );
return false;
}
);
$( '.selector-holder', this ) $( '.selector-holder', this )
.die( 'toggle') .die( 'toggle')