Subversion Repositories DevTools

Rev

Rev 7279 | Rev 7286 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7279 Rev 7280
Line 435... Line 435...
435
		$('.comboParent').click(openComboBox);
435
		$('.comboParent').click(openComboBox);
436
 
436
 
437
		$('.comboBox tr').click(function(){
437
		$('.comboBox tr').click(function(){
438
            if ( $(this).hasClass('available') )
438
            if ( $(this).hasClass('available') )
439
            {
439
            {
440
                var elp = $(this).closest('.comboContainer').hide();
440
                var elp = $(this).closest('.comboContainer');
441
                $("#daemonHostDiv").focus();
441
                closeComboBox(elp)
442
                event.stopImmediatePropagation();
-
 
443
 
442
 
444
                // Capture the data and store it in the parent element
443
                // Capture the data and store it in the parent element
445
                elp.find('.selected').removeClass('selected');
444
                elp.find('.selected').removeClass('selected');
446
                $(this).addClass('selected');
445
                $(this).addClass('selected');
447
 
446
 
Line 459... Line 458...
459
        //
458
        //
460
        function openComboBox(e, that) {
459
        function openComboBox(e, that) {
461
            if ( that == undefined ) {
460
            if ( that == undefined ) {
462
				that = this;
461
				that = this;
463
            }
462
            }
-
 
463
 
464
            var el = $(that).find('.comboContainer:first').show();
464
            var el = $(that).find('.comboContainer:first');
-
 
465
			if (el.is(":hidden")) {
-
 
466
                el.show(); 
-
 
467
                event.stopImmediatePropagation();
-
 
468
                $(document).on('click.comboBox', function(){
-
 
469
                    var elp = $(that).closest('.comboContainer');
-
 
470
                    if ( elp.size() <= 0 ) {
-
 
471
                        closeComboBox(elp)
-
 
472
                    }
-
 
473
                });
-
 
474
            } else {
-
 
475
                // Combobox is already shown
-
 
476
                closeComboBox(el);
-
 
477
            }
-
 
478
        }
-
 
479
 
-
 
480
        // Hide the combo box and remove handlers
-
 
481
        //
-
 
482
        function closeComboBox( el) {
-
 
483
			el.hide();
-
 
484
            $(document).off('click.comboBox');
-
 
485
            $("#daemonHostDiv").focus(); 
465
            event.stopImmediatePropagation();
486
            event.stopImmediatePropagation();
466
            $(document).on('click', function(){
-
 
467
				var elp = $(that).closest('.comboContainer');
-
 
468
                if ( elp.size() <= 0 ) {
-
 
469
                    $('.comboContainer').hide();
-
 
470
                    $("#daemonHostDiv").focus();
-
 
471
                    $(document).off('click');
-
 
472
                    event.stopImmediatePropagation();
-
 
473
                }
-
 
474
            });
-
 
475
        }
487
        }
476
 
488
 
-
 
489
 
477
        //  Init the Deamon Host display.
490
        //  Init the Deamon Host display.
478
        //  Select the required data from the tables
491
        //  Select the required data from the tables
479
        function setDaemonHost() {
492
        function setDaemonHost() {
480
			var el = $("#daemonHost").find('.selected');
493
			var el = $("#daemonHost").find('.selected');
481
            if ( el.size() > 0 ) {
494
            if ( el.size() > 0 ) {
Line 503... Line 516...
503
.comboBox {}
516
.comboBox {}
504
.comboParent { position:relative; background:white;}
517
.comboParent { position:relative; background:white;}
505
.comboParent table {border-collapse:collapse;}
518
.comboParent table {border-collapse:collapse;}
506
.comboParent table td {border:1px solid darkgrey; padding-right: 10px;white-space: nowrap;overflow-x: hidden;}
519
.comboParent table td {border:1px solid darkgrey; padding-right: 10px;white-space: nowrap;overflow-x: hidden;}
507
.comboParent table {color:#000000;font:11px tahoma,sans-serif;text-decoration:none;}
520
.comboParent table {color:#000000;font:11px tahoma,sans-serif;text-decoration:none;}
508
.comboContainer{position:absolute;overflow-y:scroll;background:white; border: 1px solid darkgrey;display:none;top:0px;right:0px;left:0px;}
521
.comboContainer{position:absolute;overflow-y:scroll;background:white; border: 1px solid darkgrey;display:none;xxtop:0px;right:0px;left:0px;}
509
table.comboBox {border-collapse:collapse;}
522
table.comboBox {border-collapse:collapse;}
510
table.comboBox  td {border:1px solid darkgrey;padding-right: 10px;white-space: normal}
523
table.comboBox  td {border:1px solid darkgrey;padding-right: 10px;white-space: normal}
511
table.comboBox tr.available:hover {background: #1e90ff;}
524
table.comboBox tr.available:hover {background: #1e90ff;}
512
table.comboBox tr.selected {background: #d5e8fb;}
525
table.comboBox tr.selected {background: #d5e8fb;}
513
table.comboBox tr.disabled {color:grey;}
526
table.comboBox tr.disabled {color:grey;}