GBrowse

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

2.10 Tue Jun 15 10:58:32 EDT 2010
        * Fully generalized subtrack creation.

2.09 Mon May 24 18:45:48 PDT 2010
	* To turn off caching of the config file (which is causing deparse errors for some
	  callbacks) set the environment variable GBROWSE_NOCACHE to a true value
	  (like "1" or "yes"). This must be done in the Apache config.
        * Fixed various bugs in the processing of SAM and BAM files.
	* BAM parser now creates BigWig indexes if library is available.
	* Fixed "no overloaded magic in Bio::DAS::Segment" error.
	* Made Menus and tabbed section labels larger (if you don't like, 
	  edit htdocs/css/dropdown/default-theme.css).
	* Moved track table into its own tabbed section.
	* TrackFinder plugin now hilights the matches in the track table.
	* New "subtrack table" and "subtrack select" options allow you to create nice
	  sortable tables of potential subtracks. The old "select" option is still
	  supported, but deprecated.
	* Added "kewl" blinds down effect when changing tabs.
	* Greatly improved track configuration.
	* From E.O. Stinson: added fixes for embedding GBrowse in other web pages.
	* From E.O. Stinson: Added support for regex-style datasources that let you define

conf/plugins/PrimerDesigner.pm  view on Meta::CPAN

</script>
JS



}

sub detail_select_menu {

<<DETAILS;
<div id="detailSelectMenu">
    <table style="width:100%">
	<tr>
	<th style="background:lightgrey;cell-padding:5">
	    SELECTION
	    <a style="right:0px;position:absolute;color:blue;cursor:pointer" 
		onclick="oPrimerDesigner.unselectRegion()">
	    [X]
	    </a> 
	</th>
	</tr>

docs/pod/CONFIGURE_HOWTO.pod  view on Meta::CPAN

Bio::DB::SeqFeature::Store database is a bit smarter about searching,
and will only, by default, search attributes named "Note". You can
expand the search by giving a list of attribute names to the "search
attributes" option.

=item * remote sources

This option allows you to add remote annotation sources to the menu of such
sources at the bottom of the main window.  The format is:

      remote sources = "Menu Label 1" http://url1.host.com/etc/etc
		       "Menu Label 2" http://url2.host.com/etc/etc

=item * instructions, search_instructions, navigation_instructions

You may override the default instructions (as defined in the language-specific
configuration files in conf/lang) by setting these options.  For example:

         instructions = "Type in the name of a contig or clone."

=item * no search

htdocs/css/dropdown/default_theme.css  view on Meta::CPAN

@charset "UTF-8";

/** 
 * Flickr CSS Drop-Down Menu Theme
 *
 * @file		default.css
 * @name		Flickr
 * @version		beta
 * @type		transitional
 * @browsers	Windows: IE5+, Opera7+, Firefox1+
 *				Mac OS: Safari2+, Firefox2+
 *
 * @link		http://www.lwis.net/
 * @copyright	2008 Live Web Institute. All Rights Reserved.

htdocs/css/dropdown/dropdown.css  view on Meta::CPAN

@charset "UTF-8";

/**
 * Horizontal CSS Drop-Down Menu Module
 *
 * @file		dropdown.css
 * @package		Dropdown
 * @version		0.7.1
 * @type		Transitional
 * @stacks		597-599
 * @browsers	Windows: IE6+, Opera7+, Firefox1+
 *				Mac OS: Safari2+, Firefox2+
 *
 * @link		http://www.lwis.net/

htdocs/js/controller.js  view on Meta::CPAN

		    parameters: {
			action: 'render_panels'
		    },
		    onSuccess: function(transport) { 
			$('panels').innerHTML = transport.responseText;
			$('panels').innerHTML.evalScripts();
			var color = overviewObject.background;
			var unit  = overviewObject.unit;
			var divider = overviewObject.divider;
			['overview','region','detail'].each(function(e) {
				    var m = $(e+'SelectMenu');
				    if (m) m.remove();
			    });
			this.initialize_page();
			set_dragcolors(color);
			set_dragunits(unit,divider);
		    }
		});
	    
	}, //end render_panels()

htdocs/js/detailSelect.js  view on Meta::CPAN

// 	  var help = '<b>Scalebar:</b> Click here to recenter or click and drag left or right to select a region';
// 	  detailBalloon.showTooltip(event,help,0,250);
//       }
//       i.onmouseover = helpFunction;
//   }
//   catch(e) {
//       i.setAttribute('title','click and drag to select a region');
//   }

  self.scalebar = i;
  self.addSelectMenu('detail');
  self.addSelectBox('detail');
  detailsObject = self;
}

Details.prototype.startSelection = function(event) {
  var self = detailsObject;
  var evt = event || window.event;
  SelectArea.prototype.startRubber(self,event);
}

htdocs/js/detailSelect.js  view on Meta::CPAN

    this.padLeft     += actualWidth - expectedWidth;
  }

  // We fetch the left margin again because the controller can change 
  // the size & position of the section after it is created.
  this.left       = this.elementLocation($(this.imageId),'x1') - this.elementLocation(this.selectLayer,'x1');

  this.pixelStart   = this.left  + this.padLeft;
}

Details.prototype.formatMenu = function() {
  this.menuHTML = this.selectMenu.innerHTML || '\
  <table style="width:100%">\
         <tr>\
           <th style="background:lightgrey;cell-padding:5">\
             SELECTION\
             <a style="right:0px;position:absolute" href="javascript:SelectArea.prototype.cancelRubber()">\
               [X]\
             </a>\
           </th>\
         </tr>\
         <tr>\

htdocs/js/login.js  view on Meta::CPAN

var LoginScript = '../../gbrowse/';
var Logged      = false;
var OpenIDMenu        = false;

var ImgLocation, AppName, AppNameLong;                         // General Information
var Source, CurrentUser, SessionID, LoginPage, EditDetails;    // Dynamic Variables
var UsingOpenID, OpenIDCount, SelectedID;                      // OpenID Variables

////////////////////////////////////////////////////////////////////////////////////
//  Logged      = true if the user is logged in, false otherwise.
//  OpenIDMenu  = true if the user is viewing the openID login menu.
//  OpenIDMenu  = true if the user is viewing the openID login menu.
//  CurrentUser = holds the value of the currently logged in username.
//  SessionID   = holds the value of the current session id.
//  LoginPage   = holds the value of the current login page name.
//  EditDetails = holds the value of the current account details page name.
//  UsingOpenID = true if the user is logged in with an openID only account.
//  OpenIDCount = holds the number of openIDs associated with a given account.
//  SelectedID  = holds the value of the selected openID which is to be removed.
////////////////////////////////////////////////////////////////////////////////////

//Loads the global variables for the rest of the script

htdocs/js/login.js  view on Meta::CPAN

    if(username != false) {
        Logged = true;
        CurrentUser = username;
        login_page_change('edit');
        edit_details('home');
    } else {
        CurrentUser = '';
    }

    //Format the login popup accordingly if it is opened with the openid login screen
    if(OpenIDMenu) {login_page_openid(true);}
    return;
}

//Shows, hides, and changes the titles of elements for a given page in the login popup
function login_page_change(page) {
    LoginPage = page;
    login_loading(false);
    $('loginPass').value = '';
    $('loginPass2').value = '';
    $('loginWarning').hide();

htdocs/js/login.js  view on Meta::CPAN

        $('loginButtons').style.paddingTop = '18px';
    } else if(page == 'edit') {
        $('loginTable').style.paddingTop = '12px';
        $('loginButtons').style.paddingTop = '12px';
    } else {
        $('loginTable').style.paddingTop = '3px';
        $('loginButtons').style.paddingTop = '3px';
    }
    
    if (Controller.can_openid) {
        if(OpenIDMenu && ((page == 'main') || (page == 'edit'))) {
            $('loginDOpenid').show(); $('loginNorm').hide(); $('loginDONew').focus(); 
        } else {
            $('loginDOpenid').hide(); $('loginNorm').show();
            if(page == 'forgot') {$('loginEmail').focus();}
            else {$('loginUser').focus();}
        }
    }

    return;
}

htdocs/js/login.js  view on Meta::CPAN

    if (table == null) return;
    var all = table.select('tr');
    all.each(function(a){a.hide()});
    rows.each(function(a){$(a).show()});
}

//Switches between a normal username/pass form and an openid form
function login_page_openid(openID) {
    $('loginWarning').hide();
    if(openID) {
        OpenIDMenu = true;
        $('loginOpenIDY').hide();  $('loginDOpenid').show();
        $('loginOpenIDN').show();  $('loginNorm').hide();
        $('loginDONew').focus();
	login_openid_html('http://youropenidhere',7,14);
    } else {
        OpenIDMenu = false;
        $('loginOpenIDY').show();  $('loginDOpenid').hide();
        $('loginOpenIDN').hide();  $('loginNorm').show();
        $('loginUser').focus();
    }
}

//Used to disable everything while AJAX requests are being processed
function login_loading(toggle) {
    if(toggle) {
        $('loginSubmit').disabled  = true;   $('loginCancel').disabled  = true;

htdocs/js/login.js  view on Meta::CPAN

        break;
    case 'new-openid':
        if(user==0) {
            $('loginWarning').innerHTML = Controller.translate('ALL_FIELDS_REQUIRED') + '<br>' + html;
        } else {
            add_openid_user(CurrentUser,openid);
            return;
        }
        break;
    default:
        if(OpenIDMenu) {
            if(openid.length==0 || openid=='http://' || openid=='https://' || openid.indexOf('.')==-1) {
                $('loginWarning').innerHTML = Controller.translate('TYPE_PROPER_OPENID');
            } else {
                check_openid(openid);
                return;
            }
        } else {
            if(user==0 || pass.length==0) {
                $('loginWarning').innerHTML = Controller.translate('ALL_FIELDS_REQUIRED');
            } else {

htdocs/js/login.js  view on Meta::CPAN

                login_get_account(results[0].user,results[0].session,results[0].remember,true);
            }
        }
    });
    return;
}

//Handle the different cases and error messages associated with openid accounts
function confirm_openid_error(session,page,logged_in,error,openid,only,email,gecos) {
    var event  = new fakeEvent();
    (only == 0 || logged_in) ? OpenIDMenu = false : OpenIDMenu = true;
    load_login_balloon(event,session,false,false);
    login_blackout(true,'');

    if(only == 1) {UsingOpenID=true;}
    if(page == 'openid-add') {login_page_change('edit');}
    else {login_page_change(page);}

    if(error.indexOf('has not been used before.')!=-1 && LoginPage=='main') {
        LoginPage                     = 'new-openid';
        CurrentUser                   = openid;

htdocs/js/menu.js  view on Meta::CPAN

// $Id$

var PopupMenu = Class.create( {
    initialize:
    function (title,options) {
      var d = document.createElement('DIV');
      d.innerHTML  = title;
      d.innerHTML += "<br>item1<br>item2<br>item3";
      d.setStyle({position: 'absolute',outline: 'black outset 2px'});
      d.hide();
      this.contents = d;
    },

htdocs/js/overviewSelect.js  view on Meta::CPAN

      img[n].onclick = nullFunc;
    }
  }

  var p = i.parentNode.parentNode;
  i = self.replaceImage(i);

  self.selectLayer = $('overview_panels');
  self.scalebar = i;

  self.addSelectMenu('overview');
  self.addSelectBox('overview');

  overviewObject = self;
}

Overview.prototype.startSelection = function(event) {
  var self = overviewObject;
  var evt = event || window.event;
  SelectArea.prototype.startRubber(self,event);
}

htdocs/js/overviewSelect.js  view on Meta::CPAN

  // If the keystyle is left, there may be extra padding
  var actualWidth   = this.elementLocation(i,'width');
  var expectedWidth = parseInt(segment_info.overview_width);
  if (actualWidth > expectedWidth) {
    this.padLeft     += actualWidth - expectedWidth;
  }

  this.pixelStart = this.padLeft;
}

Overview.prototype.formatMenu = function() {
  this.menuHTML = this.selectMenu.innerHTML || '\
   <div style="padding:5px;text-align:center">\
     <b>SELECTION</b><hr>\
     <a href="javascript:SelectArea.prototype.clearAndSubmit()">' + Controller.translate('ZOOM') + '</a>\
     &nbsp;&nbsp;|&nbsp;&nbsp;\
     <a href="javascript:SelectArea.prototype.cancelRubber()">' + Controller.translate('CANCEL') + '</a>\
  </div>';
}

htdocs/js/regionSelect.js  view on Meta::CPAN

      img[n].onclick = nullFunc;      
    }
  }


  var p = i.parentNode.parentNode;
  i = self.replaceImage(i);

  self.selectLayer = p.parentNode.parentNode;
  self.scalebar = i;
  self.addSelectMenu('region');
  self.addSelectBox('region');
  regionObject = self;
}

Region.prototype.startSelection = function(event) {
  var self = regionObject;
  var evt = event || window.event;
  SelectArea.prototype.startRubber(self,event);
}

htdocs/js/regionSelect.js  view on Meta::CPAN

  // If the keystyle is left, there may been extra padding
  var actualWidth   = this.elementLocation(i,'width');
  var expectedWidth = parseInt(segment_info.overview_width);
  if (actualWidth > expectedWidth) {
    this.padLeft     += actualWidth - expectedWidth;
  }

  this.pixelStart   = this.padLeft;
}

Region.prototype.formatMenu = function() {
  this.menuHTML = this.selectMenu.innerHTML || '\
   <div style="padding:5px;text-align:center">\
     <b>SELECTION</b><hr>\
     <a href="javascript:SelectArea.prototype.clearAndSubmit()">' + Controller.translate('ZOOM') + '</a>\
     &nbsp;&nbsp;|&nbsp;&nbsp;\
     <a href="javascript:SelectArea.prototype.cancelRubber()">' + Controller.translate('CANCEL') + '</a>\
  </div>';
}

htdocs/js/rubber.js  view on Meta::CPAN

  selectAreaIsActive = true;
}

SelectArea.prototype.cancelRubber = function() {
  var self = currentSelectArea || new SelectArea;
  balloonIsSuppressed = false;

  if (!self.selectBox) return false;
  
  self.selectBox.setStyle({visibility:'hidden'});
  self.selectMenu.setStyle({visibility:'hidden'});
  selectAreaIsActive = false;

  if (self.originalLandmark) {
    document.searchform.name.value = self.originalLandmark;
  }
  self.moved = false;
}

SelectArea.prototype.round = function(nearest,num) {
  if (num > nearest) {

htdocs/js/rubber.js  view on Meta::CPAN

    el.onselectstart = function() {
        return false;
    };
    el.unselectable = "on";
    el.style.MozUserSelect = "none";
    el.style.cursor = "default";
}


// Builds the popup menu that appears when selection is complete
SelectArea.prototype.addSelectMenu = function(view) {

  var menu =  $(view+'SelectMenu'); 
  if (menu) {
    this.autoSubmit = false;
  }
  else {
    menu = this.createAndAppend('div',document.body,view+'SelectMenu');
  }

  // required style 
  menu = Element.extend(menu);
  menu.setStyle({ position: 'absolute',
                  display: 'block',
                  zIndex: '101',
                  visibility: 'hidden'
  });

  // optional style -- check if a custom menu has styles set already
  var existingStyle = new String(menu.getAttribute('style'));
  if (existingStyle) {
    if (!existingStyle.match(/width/i))      menu.setStyle({ width: this.menuWidth||'200px'});
    if (!existingStyle.match(/font/i))       menu.setStyle({ font: '12px sans-serif'});
    if (!existingStyle.match(/background/i)) menu.setStyle({ background: 'lightyellow'});
    if (!existingStyle.match(/border/i))     menu.setStyle({ border: '1px solid #003366'});
  }

  this.selectMenu = menu;
  this.formatMenu();
}

// Initial creation of the select box
SelectArea.prototype.addSelectBox = function(view) {
  
  var supportsTouch = ('createTouch' in document);

  if (this.selectBox) return false;
 
  var box = this.createAndAppend('div',this.selectLayer,view+'selectBox');

htdocs/js/rubber.js  view on Meta::CPAN

  selectAreaIsActive = false;
  self.moved = false;

  // autoSubmit option will bypass the menu
  if (self.autoSubmit && !self.overrideAutoSubmit) {
    SelectArea.prototype.cancelRubber();
    //document.searchform.submit();
    self.submit();
  }
  else {
    self.showMenu(event);
  }
}

SelectArea.prototype.showMenu = function(event) {
  var self = currentSelectArea;
  var menu = self.selectMenu;
  menu.innerHTML = self.menuHTML.replace(/SELECTION/g,self.currentSegment);

  var pageWidth  =
  document.viewport.getWidth();
  var menuWidth  = self.elementLocation(menu,'width');
  var menuHeight = self.elementLocation(menu,'height');
  var menuYHalf  = Math.round(menuHeight/2); 
  
  if ('createTouch' in document){
  var left = lefttemp+50;

htdocs/js/rubber.js  view on Meta::CPAN

  // Abort if there is no selection
  if (self.selectBox.getStyle('visibility') == 'hidden') {
    self.cancelRubber;
    return false;
  }

  menu.setStyle({ visibility: 'visible' });

}

SelectArea.prototype.hideMenu = function() {
  var self = currentSelectArea;

  self.selectBox.setStyle({ width: 1,
                            visibility: 'hidden'
  });
  self.selectMenu.setStyle({visibility: 'hidden'});
}

SelectArea.prototype.clearAndSubmit = function(plugin,action) {
  this.hideMenu();
  if (plugin) {
    action = action || 'Go';
    var url = window.location;
    url += '?plugin='+plugin+';plugin_do='+action; 
    document.location = url;
  }
  else {
    this.submit();
  }
}

SelectArea.prototype.clearAndRecenter = function() {
  this.hideMenu();
  var self = currentSelectArea;
  self.loadSegmentInfo();
  var start   = self.detailStart+'';
  start   = start.replace(/\D+/,'') * 1;
  var end   = self.detailEnd+'';
  end   = end.replace(/\D+/,'') * 1;
  var half    = Math.round(Math.abs((end - start)/2));
  var middle  = Math.round((self.selectSequenceStart + self.selectSequenceEnd)/2);
  var newName = self.ref+':'+(middle-half)+'..'+(middle+half);
  self.currentSegment = newName;

lib/Bio/Graphics/Browser2/Render/HTML.pm  view on Meta::CPAN

	my $val = $self->setting($config_label => $att) || next;
	$style{$att} = $val;
    } 
    $style{width} .= 'px';
    my $style = join('; ', map {"$_:$style{$_}"} keys %style);

    # clean up the HTML just a bit
    $menu_html =~ s/\</\n\</g;

    return div( { -style => $style, 
		  -id    => lc($view).'SelectMenu' }, 
		$menu_html );
}

# Returns the HTML for the page's title, as displayed at the top.
sub render_title {
    my $self  = shift;
    my $title = shift;
    my $error = shift;
    my $settings = $self->state;
    return $settings->{head}

lib/Legacy/Graphics/Browser/Util.pm  view on Meta::CPAN

    my $val = $CONFIG->setting($config_label => $att) || next;
    $style{$att} = $val;
  } 
  $style{width} .= 'px';
  my $style = join('; ', map {"$_:$style{$_}"} keys %style);

  # clean up the HTML just a bit
  $menu_html =~ s/\</\n\</g;

  print div( { -style => $style, 
	       -id    => lc($view).'SelectMenu' }, 
	     $menu_html );
}

sub print_balloon_settings {
  my $custom_balloons    = $CONFIG->setting('custom balloons');
  my $images             = $CONFIG->relative_path('images');
  my %config_values = $custom_balloons =~ /\[([^]]+)\]([^[]+)/g;
  $config_values{'balloon'} ||= <<END;
images    =  $images/balloons
delayTime =  500



( run in 0.701 second using v1.01-cache-2.11-cpan-49f99fa48dc )