Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuse #22

Merged
merged 170 commits into from
Jun 27, 2016
Merged

Fuse #22

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
611b8b0
Extract manuscript thumbnail for manuscript display
Dec 12, 2015
d437706
Allow localhost in webmock and change port for solr test env
Dec 22, 2015
1f4fd4e
Added century as a facet field and date to sort
Dec 3, 2015
d952188
Module for search behaviours
Dec 3, 2015
92133e1
homepage
Dec 3, 2015
bb93c5b
Fixed bug
Dec 3, 2015
b45e979
Added new request handlers to search descriptions, annotations and tr…
Dec 10, 2015
a44a690
Designed homepage with browse for manuscripts
Dec 10, 2015
ee63a90
placed all homepage views within its dir
Dec 12, 2015
0b816f5
Configured within the controller
Dec 13, 2015
4f11904
Images for the homepage and search results
Dec 14, 2015
c7d0d41
Browse manuscript links should link to descriptions request handler
Dec 14, 2015
aa998ca
Century slider on homepage
Dec 17, 2015
5a44310
style changes
Dec 21, 2015
ab588dc
Added filter for all search results and method to get annotations
Dec 21, 2015
90a5119
Added test for solr document model
Dec 21, 2015
5579180
Added spec for search builder
Dec 21, 2015
49a44f4
Added spec for application name
Dec 21, 2015
77adfb5
Added spec for catalog controller
Dec 22, 2015
84e78f1
Spec tests for homepage view
Dec 24, 2015
4ab9487
Set background image for logo to none
Dec 25, 2015
57bfbb1
Test javascript for search tab click
Dec 25, 2015
11ec18d
Test javascript for century slider and graph
Dec 25, 2015
fc9fcf1
Rubocop fixes
Dec 25, 2015
77f9ad0
Searchbar placed within the header
Dec 12, 2015
3758e97
Added bento search page for all search
Dec 13, 2015
67a0841
Use users params for constraints
Dec 14, 2015
b8918b7
Pass local variables to reuse manuscript search result display
Dec 14, 2015
7b82cf4
Designed search page for manuscripts (descriptions request handler)
Dec 14, 2015
08710e2
Added ids to hidden field to avoid duplication of ids
Dec 15, 2015
205847a
Styled search form on homepage and header
Dec 15, 2015
e4de969
Styles for application header
Dec 15, 2015
b8e7c28
Added search page for transcriptions
Dec 15, 2015
9cd0a10
Added search page for annotations
Dec 15, 2015
e289dbe
Hack - copied because of error initializing class or requiring file. …
Dec 15, 2015
b581b97
spec for search methods in catalog controller
Dec 25, 2015
11b683b
query to check for facets improved and specs added
Dec 26, 2015
ff9ae4b
Simplified check for facets (values are array)
Dec 26, 2015
869c5d3
Added tests for bento search page
Dec 27, 2015
5f1ae03
Added spec for bookmark feature in description search results
Dec 27, 2015
cba5cff
Rubocop fixes
Dec 27, 2015
7e020ea
Modified file locations
Dec 27, 2015
c6f8932
Removed the squiggly line ;)
Dec 27, 2015
d84a804
Changed left and right to next and prev and added id to the links
Dec 27, 2015
c22f4fd
Use document_list to check for no results
Dec 27, 2015
d600e7f
Minor tweaks
Dec 27, 2015
6923ad2
Spec tests for search results by type
Dec 27, 2015
a27aca0
Keep the data dir
Dec 27, 2015
9617035
Added a helper method to display breadcrumb terms
Dec 29, 2015
e6d2893
Added place_facet field
Dec 29, 2015
bb1f589
Added controller for manuscript with views to display the header info
Dec 29, 2015
24eb709
Place all content within col to align margins
Dec 29, 2015
ccdac72
Extended pagination tests to test last page, page with few results an…
Dec 29, 2015
1274ab0
Manuscript description displayed
Dec 29, 2015
17da105
Modified manifest model, manuscript controller and created views to d…
Dec 30, 2015
f291d98
Added methods to get related annotations and transcriptions and added…
Dec 30, 2015
a47ae70
Execute browse_century js only if page has century element
Dec 30, 2015
4872ac1
Add top to manuscript footer page
Jan 1, 2016
65f61e1
Display mirador viewer on page
Jan 1, 2016
fa95f36
Fixed path for annotations and transcriptions
Jan 2, 2016
f080945
Display prev and next record on manuscript page
Jan 4, 2016
48b787d
require statement not needed for controller
Jan 4, 2016
d20a15b
Need to replace namespace for bootstrap slider as Mirador uses jquery…
Jan 6, 2016
b64baee
Add current page details in sidebar
Jan 6, 2016
33a8b63
Merge pull request #23 from anusharanganathan/feature_manuscript_display
Jan 6, 2016
cc6b63e
Add current page details in sidebar
Jan 6, 2016
c3a8aea
tests for views
Jan 13, 2016
0b17668
Removed contents and bibliography from manuscript page - no info
Jan 23, 2016
8cdac69
Added socket error to list of http exceptions
Jan 23, 2016
8e1725e
Added sort index to annotations and transcriptions
Jan 26, 2016
4ddaf0a
Using druid rather than title to save related info in hashes
Jan 26, 2016
1b54923
Added test for saving search to session
Jan 26, 2016
b9d517b
Display related annotations and transcriptions for selected folio and…
Jan 26, 2016
e87f44e
Controller and views to display transcriptions and annotations for ea…
Jan 26, 2016
a84bdd7
Tidied code
Jan 26, 2016
8ff05f6
Alternate viewer behaviour for transcriptions
Jan 26, 2016
c14e67e
Merge pull request #24 from anusharanganathan/feature_manuscript_display
Jan 26, 2016
0af9798
Read the canvas id from the manifest
Jan 27, 2016
8ec5b16
css tweaks
Jan 27, 2016
add4855
Check if prev and next folio exists, before displaying
Jan 27, 2016
433c7f0
Scale font size dynamically
Feb 3, 2016
65d3b09
Fix header nav bar to top
Feb 3, 2016
d78faea
Change label for All search to All Content
Feb 3, 2016
34b4561
Color changes for dropdown element in header navbar
Feb 3, 2016
3f63751
Affix description navbar to top
Feb 3, 2016
fc91bb9
Add top to header and show on manuscript scroll
Feb 3, 2016
de4e0a6
Dropdown menu
Feb 4, 2016
98d514d
Experimenting with scrollspy
Feb 4, 2016
0b077c2
results-thumbnail class is applied to images
Feb 4, 2016
c593f7b
css and divider for dropdown menu
Feb 5, 2016
9687b71
Split the js for each tab style
Feb 18, 2016
1392452
Set description menu as active if no summary
Feb 18, 2016
459bb99
css and js for jquery table sort used in refine facets
Feb 18, 2016
e2ce3af
Default facet limit set to be unlimited
Feb 18, 2016
a1ddd28
Views and helpers for facets in tabs and table within a dropdown
Feb 18, 2016
fe77e8b
styles for refine dropdown and facet tabs
Feb 18, 2016
85b6467
Tablesort images
Feb 18, 2016
cd64a4a
css for glyph within searchbar in refine facets
Feb 18, 2016
b37e88c
js for refine facets dropdown, tabs, tablesort and autocomplete
Feb 18, 2016
7ff07b2
Remove unused css
Feb 18, 2016
689e99c
Disabled turbolinks
Feb 18, 2016
4ebc0a4
Enable top in header on scroll
Feb 18, 2016
556816f
Make autocomplete list clickable
Feb 18, 2016
b074a6b
Header spacing for smaller screen
Feb 18, 2016
d5ea966
Make homepage header sticky
Feb 18, 2016
8ecee1f
Hover effect for refine modified
Feb 18, 2016
8045277
Added css for highlighting odd row
Feb 18, 2016
0cc7ed8
Added top to bento page
Feb 18, 2016
727b0d4
Add description search field to params
Feb 23, 2016
60dca7c
Redesign facets more to new style - facet values and count in table w…
Feb 23, 2016
47ea956
Placed form controls in row and set width of panel
Feb 25, 2016
c3c8dfc
Header search controls tweaked for better responsive design
Feb 25, 2016
b767e9d
Offset top for affix set on page load
Feb 25, 2016
5212944
Add column for recent annotations
Feb 25, 2016
0ee09e9
Tweaked footer for better responsive display
Feb 25, 2016
128b1cd
Customized default layout for better responsive handling
Feb 25, 2016
454d852
Link annotation and transcription search results to folio display
Feb 25, 2016
37c7171
Set max per page to a large number to display all transcriptions
Feb 26, 2016
0cb9602
replacing get_search_results with search_results
Mar 17, 2016
28ef6d3
Support two facet layouts - refine for annotations and transcriptions…
Mar 17, 2016
52f1d48
Change more in front page to refine layout
Mar 17, 2016
c2cf45e
narrow panel footer and modified facets heading color
Mar 17, 2016
3e3bba5
fixture rake task needs dependency on env
Mar 18, 2016
bfc54d7
The facet pub_date_t is also needed for the search result
Mar 18, 2016
f1c6c7f
Fix thumbnail url for annotation and transcriotion results
Mar 28, 2016
d03229b
Display no annotations or transcriptions message in folio view
Mar 28, 2016
498d4c2
Add panel to display both recto and verso folio inofrmation in book view
Mar 28, 2016
bc9c7c6
Start parameter for manuscript result count is passed through
Mar 28, 2016
db45884
Display the correct tab in folio
Mar 28, 2016
b1861e1
Headings displayed only if content available
Mar 28, 2016
d37fe89
Displaying old and new designs for search constraints
Mar 30, 2016
5532df6
Added clear all to remove all constraints
Mar 30, 2016
0a2232a
Arrays displayed as joined string
Mar 30, 2016
4e5127b
Panel to find all transcriptions and annotations for manuscript
Mar 30, 2016
6f5f47b
render html line breaks and align text left
Mar 30, 2016
3994efd
display left column above description for small form-factor
Mar 30, 2016
1eaa03e
Border on all sides for footer panels
Mar 30, 2016
8a0dfcc
Enhance footer display for small form factor
Mar 30, 2016
dc25871
Removed incorrect height setting for thumbnail
Mar 30, 2016
7fa2215
Fixed breadcrumb trail info
Mar 30, 2016
cf01856
Author not needed in breadcrumb
Mar 30, 2016
c052777
Retaining new design for search result header and removing old
May 16, 2016
a699cf1
Building URLs without the need to initalize search state
May 17, 2016
01c5f63
Modified design and functionality of list bookmarks to be similar to …
May 17, 2016
31520df
Building URLs without the need to initalize search state
May 17, 2016
867dba3
Cleaned code to avoid repeating
May 17, 2016
5408dff
Renamed methods to avoid using the same name
May 17, 2016
feac1e8
Removed modified js for bookmark ajax requests and using default blac…
May 20, 2016
84ccc0f
Added method to return folio info as json and to get folio label and …
May 24, 2016
1738aa0
No ajax call for folio info
May 24, 2016
a573ea3
Adding folio img for annotations and transcriptions
Jun 11, 2016
6a97b5b
Fixed deprecated warning
Jun 11, 2016
93f1747
Removed unneccesary css classes
Jun 11, 2016
ec3c3e4
Added bookmark inprogress to locale
Jun 11, 2016
2a5031d
Updated tests for building URLs without the need to initalize search …
Jun 11, 2016
b76d908
style changes
Jun 11, 2016
4feb346
Updated tests
Jun 11, 2016
399ebda
Added tests for views
Jun 11, 2016
03168b6
js to handle page navigation from mirador in folio show
Jun 11, 2016
d88c46b
Rubocop fixes
Jun 16, 2016
0b4ffae
merging changes rom upstream
Jun 16, 2016
9408ebb
Add css to avoid setting mirador style
Jun 19, 2016
56a78c9
Change asset paths and add mirador images to vendor
Jun 19, 2016
8319a17
rspec feature tests to include only test fixtures
Jun 19, 2016
9ac76a0
Define date_range for graph but do not display facet
Jun 19, 2016
e35bf41
use fixtures rather than load controller
Jun 19, 2016
a3194c7
add colligo install tasks to ci
Jun 19, 2016
53bdeb5
Removed alternate folio viewer used as test
Jun 19, 2016
439a304
Using node.trigger as suggested by travis
Jun 19, 2016
a499592
Replacing click with node.trigger click in all places
Jun 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
Expand Down Expand Up @@ -48,9 +48,7 @@ group :development do
gem 'spring'
end

group :test do
gem 'webmock'
end
gem 'webmock', group: :test

gem 'blacklight', '>= 5.3.0'
gem 'jettywrapper', '>= 2.0'
Expand All @@ -62,6 +60,7 @@ gem 'blacklight-marc', '~> 5.0'
gem 'config', '~> 1.0.0.beta3'
gem 'mods_display', '0.3.4'
gem 'coderay'
gem 'blacklight_range_limit'

group :deployment do
gem 'capistrano', '~> 3.0'
Expand Down
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ GEM
blacklight (~> 5.10)
marc (>= 0.4.3, < 1.1)
rails
blacklight_range_limit (5.2.0)
blacklight (~> 5.15)
jquery-rails
rails (>= 3.0, < 5.0)
bootstrap-sass (3.3.5.1)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
Expand Down Expand Up @@ -292,8 +296,6 @@ GEM
thread_safe (0.3.5)
tilt (2.0.1)
tins (1.6.0)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
Expand Down Expand Up @@ -325,6 +327,7 @@ PLATFORMS
DEPENDENCIES
blacklight (>= 5.3.0)
blacklight-marc (~> 5.0)
blacklight_range_limit
byebug
capistrano (~> 3.0)
capistrano-bundler
Expand All @@ -351,7 +354,6 @@ DEPENDENCIES
spring
sqlite3
therubyracer
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
web-console (~> 2.0)
Expand Down
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ desc 'Execute the test build that runs on travis'
task ci: [:environment] do
if Rails.env.test?
Rake::Task['db:migrate'].invoke
Rake::Task['jetty:download'].invoke
Rake::Task['jetty:unzip'].invoke
Rake::Task['colligo:download_and_unzip_jetty'].invoke
Rake::Task['colligo:copy_solr_configs'].invoke
Jettywrapper.wrap(Jettywrapper.load_config) do
Rake::Task['colligo:fixtures'].invoke
Rake::Task['spec'].invoke
end
else
Expand Down
Binary file added app/assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file added app/assets/fonts/fontawesome-webfont.eot
Binary file not shown.
504 changes: 504 additions & 0 deletions app/assets/fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file added app/assets/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file added app/assets/images/iiif-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/other.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/parker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/play-arrow-16-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/play-arrow-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/play-arrow-32-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/stanford.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/walter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@
//
//= require jquery
//= require jquery_ujs
//= require turbolinks//
//= require jquery-ui
// require turbolinks
// For Mirador viewer
//= require mirador
// require openseadragon-viewerinputhook
// For scaling fonts
//= require flowtype
// Required by Blacklight
//= require blacklight/blacklight

//= require affix
//= require scrollspy
//= require "jquery.tablesorter"
//= require_tree .
//
// For blacklight_range_limit built-in JS, if you don't want it you don't need
// this:
//= require 'blacklight_range_limit'

205 changes: 205 additions & 0 deletions app/assets/javascripts/browse_century.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
window.onload = function () {
var century = $("#century");
if (century.length == 0) {
return;
}
// Vertical slider
var century_slider = $("#century_slider");
var boundaries = century_slider.data('boundaries');
// var slider_ticks = century_slider.data('ticks');
var min = boundaries[0];
var max = boundaries[1];
//*******Century HORIZONTAL BAR CHART
//http://www.jqueryflottutorial.com/how-to-make-jquery-flot-horizontal-bar-chart.html
var century_panel = $('#century_panel');
century_panel.width(century.width() - century_slider.width());
var rawData = century_panel.data('rawdata');
var ticks = century_panel.data('ticks');
var pointer_lookup = century_panel.data('pointerlookup');
// var display_ratio = 1/(1.618 * 2);
century_panel.height( century_panel.width() * 2 );
var dataSet = [{ label: "", data: rawData, color: "#009933" }];
var options = {
series: {
bars: {
show: true
}
},
bars: {
align: "center",
barWidth: 80,
horizontal: true,
fillColor: { colors: [{ opacity: 0.5 }, { opacity: 1}] },
lineWidth: 1
},
yaxis: {
//axisLabel: "Precious Metals",
//axisLabelUseCanvas: true,
//axisLabelFontSizePixels: 12,
//axisLabelFontFamily: 'Verdana, Arial',
//axisLabelPadding: 3,
//tickColor: "#5E5E5E",
ticks: ticks,
color: "white",
tickDecimals: 0
},
//legend: {
// noColumns: 0,
// labelBoxBorderColor: "#858585",
// position: "ne"
//},
grid: {
hoverable: true,
borderWidth: 0,
backgroundColor: { colors: ["#ffffff", "#ffffff"] },
autoHighlight: true,
clickable: true
}
};
//******Plot the graph, draw the slider, and define event handlers
$(document).ready(function () {
var plot;
var browse_century = $("#browse_century");
var form = century.parent().find("form.range_limit");
var begin_el = form.find("input.range_begin");
var end_el = form.find("input.range_end");
// Plot the graph
plot = $.plot(browse_century, dataSet, options);
var find_segment_for = function_for_find_segment(pointer_lookup);
var last_segment = null;
// plothover event
browse_century.bind("plothover", function (event, pos, item) {
if (item) {
var segment = find_segment_for(pos.y);
var msg = segment.label + ' (' + segment.count + ')';
if (segment == last_segment) {
$("#tooltip").remove();
last_segment = null;
} else {
$("#tooltip").remove();
showTooltip(item.pageX, item.pageY, '#000000', msg);
last_segment = segment;
}
}
});
// define the slider
var placeholder_input = $('<input type="text" data-slider-placeholder="true">').appendTo(century_slider);
if (placeholder_input.bootstrapSlider !== undefined) {
placeholder_input.bootstrapSlider({
min: min,
max: max,
value: [min, max],
tooltip_position: "right",
orientation: 'vertical',
reversed: true,
//step: 100,
//ticks: slider_ticks,
handle: 'custom'
});
}
// Match slider height to plot
var slider_body = $(".slider.slider-vertical");
slider_body.height( plot.height()-35 );
slider_body.css('margin-top',"25px");
// set values of form elements to min and max
begin_el.val(min);
end_el.val(max);
// on plot click
browse_century.bind("plotclick", function (event, pos, item) {
if ( plot.getSelection() == null) {
var segment = find_segment_for(pos.y);
plot.setSelection( normalized_selection(segment.from, segment.to));
begin_el.val(segment.from);
end_el.val(segment.to);
var slider_placeholder = century_slider.find("[data-slider-placeholder]");
if (slider_placeholder) {
slider_placeholder.bootstrapSlider("setValue", [segment.from, segment.to]);
}
}
});
// on plot select
browse_century.bind("plotselected plotselecting", function(event, ranges) {
if (ranges != null ) {
var from = Math.floor(ranges.yaxis.from);
var to = Math.floor(ranges.yaxis.to);
begin_el.val(from);
end_el.val(to);
var slider_placeholder = century_slider.find("[data-slider-placeholder]");
if (slider_placeholder) {
slider_placeholder.bootstrapSlider("setValue", [from, to+1]);
}
}
});
// on form input fields value change
form.find("input.range_begin, input.range_end").change(function () {
plot.setSelection( form_selection(form, min, max) , true );
});
begin_el.change( function() {
var val = BlacklightRangeLimit.parseNum($(this).val());
if ( isNaN(val) || val < min) {
//for weird data, set slider at min
val = min;
}
var values = placeholder_input.data("bootstrapSlider").getValue();
values[0] = val;
placeholder_input.bootstrapSlider("setValue", values);
});
end_el.change( function() {
var val = BlacklightRangeLimit.parseNum($(this).val());
if ( isNaN(val) || val > max ) {
//weird entry, set slider to max
val = max;
}
var values = placeholder_input.data("bootstrapSlider").getValue();
values[1] = val;
placeholder_input.bootstrapSlider("setValue", values);
});
// on slider value change
var slider_placeholder = century_slider.find("[data-slider-placeholder]");
slider_placeholder.on("change", function(event) {
var values = $(event.target).data("bootstrapSlider").getValue();
begin_el.val(values[0]);
end_el.val(values[1]);
plot.setSelection( normalized_selection(values[0], Math.max(values[0], values[1]-1)), true);
});
});

function showTooltip(x, y, color, contents) {
$('<div id="tooltip">' + contents + '</div>').css({
position: 'absolute',
display: 'none',
top: y - 10,
left: x + 10,
border: '2px solid ' + color,
padding: '3px',
'font-size': '12px',
'border-radius': '5px',
'background-color': '#fff',
'font-family': 'Verdana, Arial, Helvetica, Tahoma, sans-serif',
opacity: 0.9
}).appendTo("body").fadeIn(200);
}

function function_for_find_segment(pointer_lookup_arr) {
return function(y_coord) {
for (var i = pointer_lookup_arr.length-1 ; i >= 0 ; i--) {
var hash = pointer_lookup_arr[i];
if (y_coord >= hash.from) {
return hash;
}
}
return pointer_lookup_arr[0];
};
}

function normalized_selection(min, max) {
max += 0.99999;
return {xaxis: { 'from':min, 'to':max}}
}

/*
function isInt(n) {
return n % 1 === 0;
}
*/
};
43 changes: 43 additions & 0 deletions app/assets/javascripts/colligo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Tabs on homepage
$(document).on('click', '.search-tabs li', function() {
$(".search-tabs li").removeClass("active");
$(this).addClass("active");
$("#main_search_field").val($(this).data("field"));
$("#q" ).focus();
});

// Tabs on folio page
$(document).on('click', '.folio-tabs li', function() {
$(".folio-tabs li").removeClass("active");
$(".tab-pane").removeClass("active");
$(this).addClass("active");
var tab_ele = $(this).data('tab-id');
$("#"+tab_ele).addClass("active");
$("#folio-title").html(tab_ele[0].toUpperCase() + tab_ele.slice(1));
});


// nav on manuscript show
$(document).on('click', '.navbar-green li', function() {
$(".navbar-green li").removeClass("active");
$(this).addClass("active");
});

// enable top on scroll
$(window).scroll(function() {
if ($(window).scrollTop() > 0) {
$("#nav_top").css('display', 'block');
} else {
$("#nav_top").css('display', 'none');
}
});


$(document).on("focus", ".ui-autocomplete-input", function() {
$(this).val("");
});

$(document).on("click", "#home_modal_button", function(){
lookup_init('facet-language');
$(".tablesorter").tablesorter({});
});
Loading