Skip to content

Commit

Permalink
Merge 90ffc20 into 01101de
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschylus authored Nov 5, 2016
2 parents 01101de + 90ffc20 commit 57e22d2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 38 deletions.
15 changes: 4 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ module.exports = function(grunt) {
},

concat: {
js: {
options: {
banner: '//! <%= pkg.name %> <%= pkg.version %>\n' + '//! Built on <%= grunt.template.today("yyyy-mm-dd") %>\n',
process: true
},
src: [ "<banner>" ].concat(vendors, sources),
dest: distribution
},
css: {
src: [
'css/bootstrap.modals.css',
Expand All @@ -118,10 +110,11 @@ module.exports = function(grunt) {
uglify: {
options: {
preserveComments: 'some',
mangle: false
mangle: false,
sourceMap: true
},
mirador: {
src: [ distribution ],
src: [ vendors, sources ],
dest: minified
}
},
Expand Down Expand Up @@ -363,7 +356,7 @@ module.exports = function(grunt) {
// ----------
// Build task.
// Cleans out the build folder and builds the code and images into it, checking lint.
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'jshint', 'concat', 'cssmin', 'copy' ]);
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'jshint', 'concat', 'uglify', 'cssmin', 'copy' ]);

// ----------
// Dev Build task.
Expand Down
52 changes: 26 additions & 26 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ To initialize Mirador, it needs to be attached to an existing HTML **div** throu
position: fixed;
}
</style>
<link rel="stylesheet" type="text/css" href="build/mirador/css/mirador-combined.css">
<script src="build/mirador/mirador.js"></script>
<link rel="stylesheet" type="text/css" href="or/css/mirador-combined.css">
<script src="build/mirador/mirador.min.js"></script>
</head>
<body>
<div id="viewer"></div>
Expand Down Expand Up @@ -74,11 +74,11 @@ Note that the current version of Mirador can **only **parse collections that are
Within the application itself, there are two other ways for end users to add manifests to Mirador:
1. If showAddFromURLBox has not been disabled, an end user can add a known IIIF manifest URL through the Add new object from URL box:
1. If showAddFromURLBox has not been disabled, an end user can add a known IIIF manifest URL through the Add new object from URL box:
![image alt text](image_1.png)
2. Mirador can handle an end user dropping a IIIF manifest into a window using [IIIF Drag-and-drop](http://zimeon.github.io/iiif-dragndrop/):
2. Mirador can handle an end user dropping a IIIF manifest into a window using [IIIF Drag-and-drop](http://zimeon.github.io/iiif-dragndrop/):
![image alt text](image_2.gif)
Expand All @@ -88,9 +88,9 @@ By default, Mirador is configured to open with a single window. You can specify
```` javascript
Mirador({ id: "viewer",
data: [{
manifestUri: "http://iiif/id/and/uri/of/your/manifest.json",
location: "My Repository"
data: [{
manifestUri: "http://iiif/id/and/uri/of/your/manifest.json",
location: "My Repository"
}],
windowObjects: [{
loadedManifest: "http://iiif/id/and/uri/of/your/manifest.json",
Expand All @@ -108,14 +108,14 @@ There are four possible viewTypes in the current version of Mirador: ImageView (
##### BookView
Like the [previous ](https://github.com/IIIF/mirador/wiki/Configuration-Guides#specifying-which-manifest-will-open)viewType, this configuration provides a minimal, zooming reader, similar to the Internet Archive Bookreader. The instance is configured to show a specific book of the developer's choosing, displayed in a 2-page spread.
Like the [previous ](https://github.com/IIIF/mirador/wiki/Configuration-Guides#specifying-which-manifest-will-open)viewType, this configuration provides a minimal, zooming reader, similar to the Internet Archive Bookreader. The instance is configured to show a specific book of the developer's choosing, displayed in a 2-page spread.
```` javascript
Mirador({
id: "viewer",
data: [{
manifestUri: "http://iiif/id/and/uri/of/your/manifest.json",
location: "My Repository"
manifestUri: "http://iiif/id/and/uri/of/your/manifest.json",
location: "My Repository"
}],
windowObjects: [{
loadedManifest: "http://iiif/id/and/uri/of/your/manifest.json",
Expand All @@ -129,11 +129,11 @@ id: "viewer",
##### ThumbnailsView
The ThumbnailsView viewType configuration displays thumbnail images of all of the pages of the designated book laid out in a grid pattern, from which the user can select and click on a page to view more closely. Unlike the previous viewTypes, the images in ThumbnailsView are not zoomable.
The ThumbnailsView viewType configuration displays thumbnail images of all of the pages of the designated book laid out in a grid pattern, from which the user can select and click on a page to view more closely. Unlike the previous viewTypes, the images in ThumbnailsView are not zoomable.
![image alt text](image_5.png)
##### ScrollView
##### ScrollView
Like the previous viewType, ScrollView displays thumbnail images of the designated book, this time in a side-scrolling format, for the user to select from for closer viewing. As with ThumbnailsView, ScrollView does not display zoomable images.
Expand All @@ -148,8 +148,8 @@ Mirador({
id: "viewer",
layout: "1x2",
data: [{
manifestUri: "http://iiif.lib.harvard.edu/manifests/drs:5981093",
location: "Harvard University"
manifestUri: "http://iiif.lib.harvard.edu/manifests/drs:5981093",
location: "Harvard University"
},
{
manifestUri: "http://iiif.biblissima.fr/manifests/ark:/12148/btv1b84539771/manifest.json",
Expand Down Expand Up @@ -197,13 +197,13 @@ A barebones version of the viewer can be created by turning off the top menu bar
![image alt text](image_10.png)
The configuration and initialisation for this mode looks like this:
The configuration and initialisation for this mode looks like this:
```` javascript
Mirador({
id: "viewer",
buildPath: "",
data: [{
data: [{
manifestUri: "http://iiif/id/and/uri/of/your/manifest.json",
location: "My Repository"
}
Expand Down Expand Up @@ -248,7 +248,7 @@ With the current version of Mirador, you can embed any number of viewers this wa
### Inside a div on same web page
You can also embed Mirador inside a div. To do this, embed both the mirador-combined.css and mirador.js, the fixed-size div and the call to Mirador() as you would do with a full-screen setup. If you have set a CSS margin attribute in your main body tag, you need to add !important to it to prevent the mirador-combined.css from overriding it.
You can also embed Mirador inside a div. To do this, embed both the mirador-combined.css and mirador.js, the fixed-size div and the call to Mirador() as you would do with a full-screen setup. If you have set a CSS margin attribute in your main body tag, you need to add !important to it to prevent the mirador-combined.css from overriding it.
With the current version of Mirador, you can only embed one viewer this way. If you want to embed multiple viewers you must use iframes.
Expand Down Expand Up @@ -279,7 +279,7 @@ With the current version of Mirador, you can only embed one viewer this way. If
}
</style>
<link rel="stylesheet" type="text/css" href="build/mirador/css/mirador-combined.css">
<script src="build/mirador/mirador.js"></script>
<script src="build/mirador/mirador.min.js"></script>
</head>
<body>
<h1>Embedded Default Viewer</h1>
Expand Down Expand Up @@ -438,7 +438,7 @@ deleteAnnotation: function(annotationID, successCallback, errorCallback) {
if (typeof successCallback === "function") {
successCallback();
}
}
}

// Unsuccessful, run error callback if specified
catch (e) {
Expand All @@ -457,15 +457,15 @@ From the given Open Annotation item, find its ID and canvas ID, then replace the
```` javascript
update: function(oaAnnotation, successCallback, errorCallback) {
var _this = this,

// Find canvas ID and annotation ID
key = oaAnnotation.on.full,
annotationID = oaAnnotation['@id'];

try {
// If annotation list isn't loaded, reload
if (_this.annotationsList.length === 0) {
_this.annotationsList = _this.getAnnotationList(key);
_this.annotationsList = _this.getAnnotationList(key);
}

// Find the matching annotation in the array and update it
Expand Down Expand Up @@ -512,10 +512,10 @@ From the given Open Annotation item, find its canvas ID, then add it to the anno
```` javascript
create: function(oaAnnotation, successCallback, errorCallback) {
var _this = this,

// Find the canvas to annotate on
key = oaAnnotation.on.full;

try {
// Reload the annotation list if empty
if (_this.annotationsList.length === 0) {
Expand All @@ -525,7 +525,7 @@ create: function(oaAnnotation, successCallback, errorCallback) {
// Generate a new annotation ID and insert into annotation list
oaAnnotation["@id"] = key + '/' + Date.now();
_this.annotationsList.push(oaAnnotation);

// Remove endpoint reference before JSON.stringify
jQuery.each(_this.annotationsList, function(index, value) {
delete value.endpoint;
Expand Down Expand Up @@ -629,7 +629,7 @@ All remote state endpoints must implement the following functions:

Default options: For this example, the integrator should have a choice between local storage or session storage, and an optional prefix before each entry.

```` javascript
```` javascript
$.MyLocalStateEndpoint = function(opts) {
this.options = {
storage: window.localStorage,
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<body>
<div id="viewer"></div>

<script src="build/mirador/mirador.js"></script>
<script src="build/mirador/mirador.min.js"></script>
<script type="text/javascript">

$(function() {
Expand Down

0 comments on commit 57e22d2

Please sign in to comment.