{% extends 'roche/base.html' %}
{% load i18n %}
{% load static %}

{% block page_title %}
  {{tei_documents.0.title}} ({{tei_documents.0.title_en}})
{% endblock %}

{% block content %}

<script src="{% static 'js/zepto.min.js' %}"></script>

<div class="container" style="font-size: 220%; margin-top: 70px;">

	{% autoescape off %}
	{{tei_transform}}
	{% endautoescape %}

</div>

<script type="text/javascript">
$('.container').bind('mouseup', bindingMouseup);

function bindingMouseup(event) {
	var selectedText = "NO-RESULT";

	if (window.getSelection) {
		var range = window.getSelection();

		selectedText = range.toString();
	} else if (document.selection.createRange) {
		var range = document.selection.createRange();

		selectedText = range.text;
	}

	console.log(selectedText);
};

</script>

{% endblock %}

{% extends 'roche/base.html' %}
{% load i18n %}
{% load static %}

{% block page_title %}
  {{tei_documents.0.title}} ({{tei_documents.0.title_en}})
{% endblock %}

{% block content %}

<script src="{% static 'js/zepto.min.js' %}"></script>

<div class="container" style="font-size: 220%; margin-top: 70px;">

	{% autoescape off %}
	{{tei_transform}}
	{% endautoescape %}

</div>

<script type="text/javascript">

function BrowserView() {
	this.hidingInterpuction = false;
};

BrowserView.prototype.keyUp = function (event) {
	var pressedKey = event.keyCode;

	console.log(pressedKey);

	if (pressedKey == 190) {
		if (this.hidingInterpuction) {
			$(".pc").removeClass("hide");
			this.hidingInterpuction = false;
		} else {
			$(".pc").addClass("hide");
			this.hidingInterpuction = true;
		}
		console.log("Hiding 'pc' elems");
	}

};

var browserView = new BrowserView();

$('.container').bind('mouseup', bindingMouseup);
$(document).bind('keyup', browserView.keyUp);


function bindingMouseup(event) {
	var selectedText = "NO-RESULT";

	if (window.getSelection) {
		var range = window.getSelection();

		selectedText = range.toString();
	} else if (document.selection.createRange) {
		var range = document.selection.createRange();

		selectedText = range.text;
	}

	console.log(selectedText);
};

</script>

{% endblock %}

Enable hiding of interpuction in brower view
Enable hiding of interpuction in brower view
