From fb594ae816aafe69fa4d7df160ca676d744ea6a8 Mon Sep 17 00:00:00 2001 From: "Jesse P. Karlsberg" Date: Mon, 15 Apr 2019 11:38:36 -0400 Subject: [PATCH 1/2] Update README.md --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7273906a3..8f5e75acb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # Readux -... +Readux is a platform developed by the Emory Center for Digital Scholarship which allows users to read, take notes on, and publish with digitized texts from libraries’ archival collections. With Readux, users are able to: +- browse digitized page images, +- search and select the texts of these digitized books, +- annotate text or illustrations in these works, and then +- publish digital copies of the texts with their annotations. +Administrators can organize digitized books into collections, facilitating user access to digitized books available through the platform. Since its release, Readux has proved to be an innovative research and pedagogy tool for scholars and faculty at Emory University and beyond, with an array of use-cases ranging from teaching to publishing. + ## Motivation @@ -67,4 +73,4 @@ We use the [Git-Flow](https://danielkummer.github.io/git-flow-cheatsheet/) branc ## License -This software is distributed under the Apache 2.0 License. \ No newline at end of file +This software is distributed under the Apache 2.0 License. From 7db2df7f53f99c832d3667acad79ddcf86fcbcca Mon Sep 17 00:00:00 2001 From: Joanna Date: Mon, 15 Apr 2019 12:44:20 -0400 Subject: [PATCH 2/2] Resolving post migrations conflict - added back in js for page URL and meta - fixed extra lines in col models --- .../migrations/0004_auto_20190415_1613.py | 23 ++++++++++++++++++ apps/iiif/kollections/models.py | 24 ++++++++++--------- apps/static/mirador/mirador.js | 14 +++++++++++ apps/templates/page.html | 3 ++- 4 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 apps/iiif/kollections/migrations/0004_auto_20190415_1613.py diff --git a/apps/iiif/kollections/migrations/0004_auto_20190415_1613.py b/apps/iiif/kollections/migrations/0004_auto_20190415_1613.py new file mode 100644 index 000000000..aab6a1493 --- /dev/null +++ b/apps/iiif/kollections/migrations/0004_auto_20190415_1613.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.2 on 2019-04-15 16:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('kollections', '0003_auto_20190415_0145'), + ] + + operations = [ + migrations.AlterField( + model_name='collection', + name='created_at', + field=models.DateTimeField(auto_now_add=True), + ), + migrations.AlterField( + model_name='collection', + name='upload', + field=models.FileField(blank=True, null=True, upload_to='uploads/'), + ), + ] diff --git a/apps/iiif/kollections/models.py b/apps/iiif/kollections/models.py index 992a3fd11..2989a76a8 100644 --- a/apps/iiif/kollections/models.py +++ b/apps/iiif/kollections/models.py @@ -6,6 +6,8 @@ from io import BytesIO from django.core.files.base import ContentFile from PIL import Image +from django.utils import timezone +from ...users.models import User class Collection(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) @@ -126,14 +128,14 @@ def make_thumbnail(self): # header_io.close() # # return True - upload = models.FileField(upload_to='uploads/', null=True) - created_at = models.DateTimeField() - - def __str__(self): - return self.label - - def save(self, *args, **kwargs): - ''' On create, set create time ''' - if not self.id: - self.created_at = timezone.now() - return super(User, self).save(*args, **kwargs) + #upload = models.FileField(upload_to='uploads/', null=True) + #created_at = models.DateTimeField() + # +# def __str__(self): +# return self.label +# +# def save(self, *args, **kwargs): +# ''' On create, set create time ''' +# if not self.id: +# self.created_at = timezone.now() +# return super(User, self).save(*args, **kwargs) diff --git a/apps/static/mirador/mirador.js b/apps/static/mirador/mirador.js index b5c9de350..11bc469d0 100644 --- a/apps/static/mirador/mirador.js +++ b/apps/static/mirador/mirador.js @@ -41882,6 +41882,15 @@ return /******/ (function(modules) { // webpackBootstrap // navigation, we need to update the location and history with the new // canvas id. history.pushState(history.state, '', page.replace(/:/g, '%3A')); + var el = document.getElementById("myMeta"); + var content1 = document.getElementById("myContent1"); + document.getElementById("myMeta").content=content1.content + '/' + page + '/full/600,/0/default.jpg'; + var el2 = document.getElementById("myMeta2"); + var content2 = document.getElementById("myContent2"); + document.getElementById("myMeta2").content=content2.content + '/' + page + '/full/600,/0/default.jpg'; + var el3 = document.getElementById("myMeta3"); + var content3 = document.getElementById("myContent3"); + document.getElementById("myMeta3").content=content3.content + '/page/' + page; } this.annotationsList = []; @@ -47901,6 +47910,9 @@ return /******/ (function(modules) { // webpackBootstrap // Under firefox $.show() used under display:none iframe does not change the display. // This is workaround for https://github.com/IIIF/mirador/issues/929 jQuery(this).css('display', 'block'); + // grabs the url onload to display on the page + var canvasID = window.location.href; + document.getElementById("mySpan").innerHTML=canvasID; }); }); @@ -47913,6 +47925,8 @@ return /******/ (function(modules) { // webpackBootstrap _this.element.find('.thumbnail-image').on('click', function () { var canvasID = jQuery(this).attr('data-image-id'); _this.eventEmitter.publish('SET_CURRENT_CANVAS_ID.' + _this.windowId, canvasID); + // grabs the changed url when you click a thumbnail and updates the myLink variable to change the page url + document.getElementById("mySpan").innerHTML=canvasID; }); }, diff --git a/apps/templates/page.html b/apps/templates/page.html index 486728e99..1656b15ab 100644 --- a/apps/templates/page.html +++ b/apps/templates/page.html @@ -49,8 +49,9 @@


Stable volume URL: https://{{ request.META.HTTP_HOST }}{% url 'volume' col.pid volume.pid %}
- Stable page URL: + Canvas URL:
+ Stable page URL: