Skip to content

Commit

Permalink
Merge 226b1f7 into 04d9a6d
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Mar 16, 2018
2 parents 04d9a6d + 226b1f7 commit 64cde6e
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,3 +37,4 @@ restapi.doc
package-lock.json
jb_run.js
jb_setup.js
.DS_Store
3 changes: 1 addition & 2 deletions .jshintrc
Expand Up @@ -10,18 +10,17 @@
"browser": true,
"dojo": true,
"evil": true, // allow eval
"esversion": 6,
"laxbreak": true,
"laxcomma": true,
"loopfunc": true,
"funcscope": true,
"maxlen": 10000,
"indent": 4,
"shadow": true,
"maxerr": 250,
"sub": true,
"predef": [ "require", "define", "SockJS", "Stomp", "bbop", "amigo" ],
"maxcomplexity": 40,
"indent": 2,
"undef": true,
"trailing": true,
"devel": true
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -52,7 +52,7 @@ cache:
- $HOME/.gradle/wrapper/
script:
- travis_wait ./gradlew handleJBrowse copy-resources gwtc && ./grailsw refresh-dependencies --stacktrace && ./grailsw test-app -coverage -xml --stacktrace
- node web-app/jbrowse/src/dojo/dojo.js load=build --require "web-app/jbrowse/src/JBrowse/init.js" --profile "web-app/jbrowse/plugins/WebApollo/js/WebApollo"
#- node web-app/jbrowse/src/dojo/dojo.js load=build --require "web-app/jbrowse/src/JBrowse/init.js" --profile "web-app/jbrowse/plugins/WebApollo/js/WebApollo"
- jshint client/apollo/js
after_success:
- ./grailsw coveralls
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Expand Up @@ -313,6 +313,10 @@ def cloneRepoNpm(String url, String directory, String branch){
logger.quiet "Using npm to install: ${finalUrl}"
commandLine "npm","install",finalUrl,"--ignore-scripts"
}
println "CURRENT DIRECTORY"
println new File(".").absolutePath
// commandLine "npm","install",finalUrl,"--ignore-scripts"


File npmDirectory = new File('node_modules')
if(finalUrl.contains("#") && (finalUrl.endsWith("jbrowse") || finalUrl.split("#")[0].endsWith("jbrowse"))) {
Expand Down
1 change: 1 addition & 0 deletions client/apollo/.gitignore
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions client/apollo/LICENSE.md
@@ -0,0 +1,13 @@
-------
Copyright (c) 2015, Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Neither the name of the Lawrence Berkeley National Lab nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1 change: 1 addition & 0 deletions client/apollo/README.md
@@ -0,0 +1 @@
Install this plugin into your JBrowse from npm. `cd jbrowse; npm install @gmod/apollo-jbrowse-plugin`
7 changes: 4 additions & 3 deletions client/apollo/js/FeatureEdgeMatchManager.js
@@ -1,9 +1,10 @@
define( ['dojo/_base/declare',
'jquery',
const $ = require('jquery')

define( ['dojo/_base/declare',
'WebApollo/View/Track/DraggableHTMLFeatures',
'WebApollo/View/Track/AnnotTrack'
],
function( declare, $, DraggableFeatureTrack, AnnotTrack ) {
function( declare, DraggableFeatureTrack, AnnotTrack ) {

var FeatureEdgeMatchManager = declare( null,

Expand Down
7 changes: 4 additions & 3 deletions client/apollo/js/SequenceSearch.js
@@ -1,17 +1,18 @@
const $ = require('jquery')

define( [
'dojo/_base/declare',
'dojo/_base/array',
'dojo/dom-construct',
'dojo/dom-attr',
'dojo/dom',
'jquery'
],
function( declare,
array,
domConstruct,
domAttr,
dom,
$ ) {
dom
) {

return declare(null, {
constructor: function(contextPath) {
Expand Down
19 changes: 7 additions & 12 deletions client/apollo/js/View/Track/AnnotTrack.js
@@ -1,14 +1,13 @@
const $ = require('jquery');
const jui = require('jqueryui');
const {draggable,droppable,resizable,autocomplete,dialog} = $.ui;


define([
'dojo/_base/declare',
'dojo/_base/array',
'dojo/on',
'dojo/request',
'jquery',
'jqueryui/draggable',
'jqueryui/droppable',
'jqueryui/resizable',
'jqueryui/autocomplete',
'jqueryui/dialog',
'dijit/registry',
'dijit/Menu',
'dijit/MenuItem',
Expand Down Expand Up @@ -49,12 +48,8 @@ define([
array,
on,
request,
$,
draggable,
droppable,
resizable,
autocomplete,
dialog,


registry,
dijitMenu,
dijitMenuItem,
Expand Down
5 changes: 3 additions & 2 deletions client/apollo/js/View/Track/DraggableBLASTFeatures.js
@@ -1,9 +1,10 @@
const $ = require('jquery')

define( [
'dojo/_base/declare',
'WebApollo/View/Track/DraggableHTMLFeatures',
'jquery'
],
function(declare, DraggableFeatureTrack,$) {
function(declare, DraggableFeatureTrack) {

var DraggableBLASTFeatures = declare(DraggableFeatureTrack, {
constructor: function(args) { },
Expand Down
12 changes: 6 additions & 6 deletions client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -1,3 +1,7 @@
const $ = require('jquery')
require('jqueryui')
const { draggable } = $.ui;

define( [
'dojo/_base/declare',
'dojo/_base/array',
Expand All @@ -9,8 +13,6 @@ define( [
'dijit/MenuSeparator',
'dijit/PopupMenuItem',
'dijit/Dialog',
'jquery',
'jqueryui/draggable',
'JBrowse/Util',
'JBrowse/Model/SimpleFeature',
'WebApollo/SequenceOntologyUtils'
Expand All @@ -25,8 +27,6 @@ define( [
dijitMenuSeparator,
dijitPopupMenuItem,
dijitDialog,
$,
draggable,
Util,
SimpleFeature,
SeqOnto ) {
Expand Down Expand Up @@ -1039,8 +1039,8 @@ var draggableTrack = declare( HTMLFeatureTrack,
// for more explanation of event handling changes in JQuery 1.7

// _mouseDown(event) triggering boostrapping of feature drag
// $featdiv.data("draggable")._mouseDown(event);
$featdiv.draggable().data("draggable")._mouseDown(event);
// $featdiv.data("draggable")._mouseDown(event);
// $featdiv.draggable().data("draggable")._mouseDown(event);
// $featdiv.trigger(event);
}
}
Expand Down
8 changes: 4 additions & 4 deletions client/apollo/js/View/Track/SequenceTrack.js
@@ -1,3 +1,5 @@
const $ = require('jquery')

define( [
'dojo/_base/declare',
'dojo/request/xhr',
Expand All @@ -6,8 +8,7 @@ define( [
'WebApollo/View/Track/DraggableHTMLFeatures',
'WebApollo/JSONUtils',
'WebApollo/Permission',
'dojox/widget/Standby',
'jquery/jquery'
'dojox/widget/Standby'
],
function( declare,
xhr,
Expand All @@ -16,8 +17,7 @@ function( declare,
DraggableFeatureTrack,
JSONUtils,
Permission,
Standby,
$
Standby
) {

var SequenceTrack = declare( "SequenceTrack", DraggableFeatureTrack,
Expand Down
32 changes: 12 additions & 20 deletions client/apollo/js/main.js
@@ -1,13 +1,4 @@
require({
packages: [
{ name: 'jqueryui', location: '../plugins/WebApollo/jslib/jqueryui' },
{ name: 'jquery', location: '../plugins/WebApollo/jslib/jquery', main: 'jquery' }
]
},
[],
function() {

define.amd.jQuery = true;
const $ = require('jquery')

define([
'dojo/_base/declare',
Expand Down Expand Up @@ -38,8 +29,6 @@ define([
'JBrowse/View/FileDialog/TrackList/GFF3Driver',
'JBrowse/CodonTable',
'dojo/io-query',
'jquery/jquery',
'lazyload/lazyload'
],
function( declare,
lang,
Expand Down Expand Up @@ -68,9 +57,8 @@ define([
HelpMixin,
GFF3Driver,
CodonTable,
ioQuery,
$,
LazyLoad ) {
ioQuery
) {

return declare( [JBPlugin, HelpMixin],
{
Expand Down Expand Up @@ -389,9 +377,15 @@ return declare( [JBPlugin, HelpMixin],
}

// move Tool menu in front of Help menu
var toolsMenu = dijit.byId('dropdownbutton_tools');
var helpMenu = dijit.byId('dropdownbutton_help');
domConstruct.place(toolsMenu.domNode,helpMenu.domNode,'before');
var intervalFunction = function(){
var toolsMenu = dijit.byId('dropdownbutton_tools');
var helpMenu = dijit.byId('dropdownbutton_help');
if(toolsMenu && helpMenu){
domConstruct.place(toolsMenu.domNode,helpMenu.domNode,'before');
clearInterval(intervalID); // Will clear the timer.
}
};
var intervalID = setInterval(intervalFunction, 100); // Will alert every second.
this.searchMenuInitialized = true;
},

Expand Down Expand Up @@ -750,5 +744,3 @@ return declare( [JBPlugin, HelpMixin],
});

});

});
3 changes: 2 additions & 1 deletion client/apollo/json/annot.json
@@ -1,7 +1,8 @@
{
"plugins" : [
{
"location" : "./plugins/WebApollo",
"pluginsDir" : "./plugins/WebApollo",
"location" : "./plugins/WebApollo/js",
"name" : "WebApollo"
}
],
Expand Down
31 changes: 31 additions & 0 deletions client/apollo/package.json
@@ -0,0 +1,31 @@
{
"name": "@gmod/apollo-jbrowse-plugin",
"version": "1.0.0",
"description": "JBrowse client plugin for Apollo",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Nathan Dunn",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"jquery": "^3.3.1",
"jqueryui": "^1.11.1"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/GMOD/Apollo.git"
},
"keywords": [
"genome",
"curation"
],
"bugs": {
"url": "https://github.com/GMOD/Apollo/issues"
},
"homepage": "https://github.com/GMOD/Apollo#readme",
"jbrowsePlugin": {
"name": "WebApollo"
}
}
8 changes: 4 additions & 4 deletions grails-app/conf/Config.groovy
Expand Up @@ -397,10 +397,10 @@ auditLog {
jbrowse {
git {
url = "https://github.com/gmod/jbrowse"
// branch = "master"
tag = "15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
alwaysPull = false
alwaysRecheck = false
branch = "dev"
// tag = "15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
alwaysPull = true
alwaysRecheck = true
}
// url {
// // always use dev for apollo
Expand Down
Expand Up @@ -458,7 +458,8 @@ class JbrowseController {
}
}
// add core plugin: https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/Browser.js#L244
pluginKeys.add("RegexSequenceSearch")
// pluginKeys.add("RegexSequenceSearch")
pluginKeys.add("WebApollo")
for (plugin in plugins) {
if (!pluginKeys.contains(plugin.key)) {
pluginKeys.add(plugin.key)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -28,6 +28,7 @@
},
"homepage": "https://github.com/GMOD/Apollo#readme",
"dependencies": {
"@gmod/jbrowse": "github:gmod/jbrowse#15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
"@gmod/client/apollo": "client/apollo",
"@gmod/jbrowse": "github:gmod/jbrowse#dev"
}
}
2 changes: 1 addition & 1 deletion sample-h2-apollo-config.groovy
Expand Up @@ -78,7 +78,7 @@ environments {
// git {
// url= "https://github.com/GMOD/jbrowse"
// tag = "15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
//// branch = "master"
//// branch = "dev"
// alwaysPull = true
// alwaysRecheck = true
// }
Expand Down
2 changes: 1 addition & 1 deletion sample-mysql-apollo-config.groovy
Expand Up @@ -77,7 +77,7 @@ environments {
// git {
// url= "https://github.com/GMOD/jbrowse"
// tag = "15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
//// branch = "master"
//// branch = "dev"
// alwaysPull = true
// alwaysRecheck = true
// }
Expand Down
2 changes: 1 addition & 1 deletion sample-postgres-apollo-config.groovy
Expand Up @@ -122,7 +122,7 @@ environments {
// git {
// url= "https://github.com/GMOD/jbrowse"
// tag = "15dfd2309f2d508d8bed782d0f68b38dd9927bb4"
//// branch = "master"
//// branch = "dev"
// alwaysPull = true
// alwaysRecheck = true
//
Expand Down

0 comments on commit 64cde6e

Please sign in to comment.