border-radius: 3px;
/* font-size: 1.2em;*/
font-weight: bold;
- width: 370px;
+ width: 330px;
margin-bottom: 0.25em;
display: block;
}
padding-left: 30px;
list-style: disc;
}
+
+#document-list li {
+ padding: 5px;
+}
+
#document-list li li a {
- width: 340px;
+ width: 300px;
}
#document-list li a:hover, #document-list li a.active {
padding: 0
}
+#document-list .download-doc {
+ display: none;
+ color: #EE2124;
+}
+
/* ====================== */
/* = One percent banner = */
/* ====================== */
color: #FFF;
text-decoration: none;
}
+
#createNewShelf {
-display: none;
+ display: none;
}
.widget-code {
overflow: hidden;
}
+
+#presentation-frame {
+ border: 0px none white;
+}
-{% extends 'base.html' %}
-{% load i18n %}
-
-{% block title %}{{ object.title }} w WolneLektury.pl{% endblock %}
-
-{% block body %}
- <h1>{{ object.title }}</h1>
- <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
- <p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url lessons_document_list %}">{% trans "return to list of materials" %}</a></p>
- </form>
-
- <div id="document-detail">
- <p class="download"><a href="{{ object.file.url }}">{% trans "Download" %}</a> {% if object.author %}({% trans "author" %}: {{ object.author }}){% endif %}</p>
- {% if object.slideshare_id %}
- <object style="margin:0px" width="480" height="400">
- <param name="movie" value="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="400"></embed></object>
- {% endif %}
- {% if object.description %}
- <p>{{ object.description|urlize|linebreaks }}</p>
- {% endif %}
- </div>
-{% endblock body %}
\ No newline at end of file
+{% if not object.html %}
+ {% if object.slideshare_id %}
+ <object style="margin:0px" width="480" height="400">
+ <param name="movie" value="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="400"></embed></object>
+ {% endif %}
+{% else %}
+ {{ object.html|safe }}
+{% endif %}
{% block extrahead %}
<script type="text/javascript" charset="utf-8">
$(function() {
- $('#document-list a[data-hash]').click(function() {
- if (!$(this).hasClass('active')) {
- $('#document-list a[data-hash]').removeClass('active');
- $(this).addClass('active');
- document.location.hash = $(this).attr('data-hash');
- }
- return false;
+ $("#document-list a").click(function(e){
+ e.preventDefault();
+ if($("#presentation-frame").length == 0){
+ $("<iframe id='presentation-frame' width='600' height='500' border='0' src=''>").appendTo($("#document-detail"));
+ }
+ $("#presentation-frame").attr("src", this.href);
+ $('#document-list li').css('border', 'none');
+ $(this).closest('li').css('border', '1px solid green');
+ $('.download-doc').hide();
+ $(this).next('.download-doc').show();
});
-
- var lastHash = null;
-
- function checkHash() {
- if (document.location.hash != lastHash) {
- lastHash = document.location.hash;
- var documentLink = $('#document-list a[data-hash=' + document.location.hash + ']');
- if (!documentLink.hasClass('active')) {
- $('#document-list a').removeClass('active');
- documentLink.addClass('active');
- };
-
- if ($('#document-detail').attr('data-hash') != lastHash) {
- $('#document-detail')
- .attr('data-hash', lastHash)
- .load(documentLink.attr('href'));
- };
- } else if (!document.location.hash) {
- $first = $('#document-list a:first');
- $first.addClass('active');
- location.replace($first.attr('data-hash'));
- }
-
- setTimeout(checkHash, 500);
- };
-
- checkHash();
});
</script>
{% endblock extrahead %}
<form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
<p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url main_page %}">{% trans "return to main page" %}</a></p>
</form>
-
<div id="document-list">
{% chunk "document-list" %}
</div>