Skip to content

Commit

Permalink
fix up grebe; work on #317
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Mar 18, 2016
1 parent b1fa262 commit 5cf1f36
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ gulp.task('install', ['build', 'compile']);
var web_compilables = [
'BulkSearch.js',
'GeneralSearchForwarding.js',
'Gannet.js',
'GOOSE.js',
'Grebe.js',
'Medial.js',
Expand Down
32 changes: 24 additions & 8 deletions javascript/web/Gannet.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
//// will probably leave DEBUG in.
////

var bbop = require('bbop-core');

// // Config.
// var amigo = new (require('amigo2-instance-data'))(); // no overload
// var golr_conf = require('golr-conf');
// var gconf = new golr_conf.conf(amigo.data.golr);
// var sd = amigo.data.server;
// var gserv = amigo.data.server.golr_base;
// var defs = amigo.data.definitions;
// // Linker.
// var linker = amigo.linker;
// // Handler.
// var handler = amigo.handler;
// // Management.
// var jquery_engine = require('bbop-rest-manager').jquery;
// var golr_manager = require('bbop-manager-golr');
// var golr_response = require('bbop-response-golr');

//
function GannetInit(){
Expand All @@ -12,15 +29,9 @@ function GannetInit(){
logger.DEBUG = true;
function ll(str){ logger.kvetch(str); }

// External meta-data.
var sd = new amigo.data.server();
var solr_server = sd.golr_base();
var gconf = new bbop.golr.conf(amigo.data.golr);

// Aliases.
var each = bbop.core.each;
var hashify = bbop.core.hashify;
var get_keys = bbop.core.get_keys;
var hashify = bbop.hashify;
var get_keys = bbop.get_keys;

// Helper: dedupe a list.
function dedupe(list){
Expand Down Expand Up @@ -56,3 +67,8 @@ function GannetInit(){

ll('GannetInit done.');
}

// Embed the jQuery setup runner.
(function (){
jQuery(document).ready(function(){ GannetInit(); });
})();
9 changes: 1 addition & 8 deletions perl/lib/AmiGO/WebApp/Gannet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -589,20 +589,13 @@ sub mode_gannet {
[
'com.jquery',
'com.bootstrap',
'com.jquery-ui',
'bbop',
'amigo2'
'com.jquery-ui'
],
javascript =>
[
$self->{JS}->get_lib('GeneralSearchForwarding.js'),
$self->{JS}->get_lib('Gannet.js')
],
javascript_init =>
[
'GeneralSearchForwardingInit();',
'GannetInit();'
],
content =>
[
'pages/gannet.tmpl'
Expand Down

0 comments on commit 5cf1f36

Please sign in to comment.