* Had to hack on codemirror, to make line numbers bar resize properly.
<!-- <div class="toolbar">
</div> -->
<div id="summary-view">
<!-- <div class="toolbar">
</div> -->
<div id="summary-view">
- <img class="book-cover" src="{{MEDIA_URL}}images/empty.png">
+ <img class="book-cover" src="{{STATIC_URL}}img/sample_cover.png">
<h2>
<label for="title">Tytuł:</label>
<h2>
<label for="title">Tytuł:</label>
@never_cache
def document_detail(request, name, template_name='wiki/document_details.html'):
@never_cache
def document_detail(request, name, template_name='wiki/document_details.html'):
- document = getstorage().get(name)
+ document = storage.get(name)
except DocumentNotFound:
return http.HttpResponseRedirect(reverse("wiki_create_missing", args=[name]))
except DocumentNotFound:
return http.HttpResponseRedirect(reverse("wiki_create_missing", args=[name]))
def page_text(self, title, revision=None):
"""Read unicode text of a page."""
ctx = self._find_filectx(title, revision)
def page_text(self, title, revision=None):
"""Read unicode text of a page."""
ctx = self._find_filectx(title, revision)
+
+ if ctx is None:
+ raise DocumentNotFound(title)
+
return ctx.data().decode(self.charset, 'replace'), ctx.filerev()
def page_text_by_tag(self, title, tag):
return ctx.data().decode(self.charset, 'replace'), ctx.filerev()
def page_text_by_tag(self, title, tag):
-.htmlview .strofa .wers_wciety, .htmlview .strofa .wers_wciety[data-wlf-typ =
-'1'] {
+.htmlview .strofa .wers_wciety, .htmlview .strofa .wers_wciety[data-wlf-typ='1'] {
-.htmlview .strofa .wers_wciety[data-wlf-typ =
-'2'] {
+.htmlview .strofa .wers_wciety[data-wlf-typ='2'], .htmlview .strofa .wers_cd {
-.htmlview .strofa .wers_wciety[data-wlf-typ =
-'3'] {
+.htmlview .strofa .wers_wciety[data-wlf-typ='3'] {
-.htmlview .strofa .wers_wciety[data-wlf-typ =
-'4'] {
+.htmlview .strofa .wers_wciety[data-wlf-typ='4'] {
-.htmlview .strofa .wers_wciety[data-wlf-typ =
-'5'] {
+.htmlview .strofa .wers_wciety[data-wlf-typ='5'] {
-.htmlview .strofa .wers_wciety[data-wlf-typ =
-'6'] {
+.htmlview .strofa .wers_wciety[data-wlf-typ='6'] {
+.htmlview .motto_container {
+ display: inline-block;
+ margin: 1.5em 0 0;
+ clear: right;
+}
+
.htmlview .motto {
text-align: justify;
.htmlview .motto {
text-align: justify;
- font-style: italic;
- margin: 1.5em 0 0;
}
.htmlview p.motto_podpis {
}
.htmlview p.motto_podpis {
- font-size: 0.875em;
- text-align: right;
+ position: relative;
+ right: -3em;
+ text-align: right;
}
.htmlview div.fragment {
}
.htmlview div.fragment {
max-height: 24pt;
margin-left: 0.5em;
overflow: hidden;
max-height: 24pt;
margin-left: 0.5em;
overflow: hidden;
float: none;
padding: 0.5em 1em;
margin: 1em;
float: none;
padding: 0.5em 1em;
margin: 1em;
+.htmlview .annotation-inline-box .uwaga {
+ max-height: 100%;
+}
+
/* Motywy */
/* ======================== */
/* = Footnotes and themes = */
/* Motywy */
/* ======================== */
/* = Footnotes and themes = */
* Przypisy
*/
/* Znaczniki w tekście */
* Przypisy
*/
/* Znaczniki w tekście */
-.htmlview .annotation {
- vertical-align: super;
- text-decoration: none;
- /* font-size: 10px; */
-}
-
.htmlview .annotation:before {
content: "[" counter(main) "]";
counter-increment: main;
.htmlview .annotation:before {
content: "[" counter(main) "]";
counter-increment: main;
+ vertical-align: super;
+ text-decoration: none;
+ font-size: 66%;
}
.htmlview .annotation:hover {
}
.htmlview .annotation:hover {
-webkit-border-radius: 10px;
padding: 3px 5px;
text-decoration: none;
-webkit-border-radius: 10px;
padding: 3px 5px;
text-decoration: none;
-.edit-button:hover, .edit-button:active, .delete-button:hover, .delete-button:active, .accept-button:hover, .accept-button:active {
+.edit-button:hover, .edit-button:active,
+.delete-button:hover, .delete-button:active,
+.accept-button:hover, .accept-button:active {
/* color: #FFF;*/
background-color: #999;
color: #FFF;
/* color: #FFF;*/
background-color: #999;
color: #FFF;
margin: -0.25em;
padding: 0.25em;
border: 1px solid orange;
margin: -0.25em;
padding: 0.25em;
border: 1px solid orange;
+}
\ No newline at end of file
#summary-view .book-cover {
float: left;
margin: 1em;
#summary-view .book-cover {
float: left;
margin: 1em;
- min-height: 300px;
- min-width: 240px;
- max-height: 300px;
- max-width: 240px;
+ height: 300px;
+ width: 212px;
+
+
+ border: 1px dashed black;
#summary-view label {
font-weight: bold;
}
#summary-view label {
font-weight: bold;
}
+
+#summary-view .book-cover {
+
+}
var win = frame.contentWindow, doc = win.document,
nums = frame.nextSibling, scroller = nums.firstChild;
var win = frame.contentWindow, doc = win.document,
nums = frame.nextSibling, scroller = nums.firstChild;
- var nextNum = 1, barWidth = null;
- function sizeBar() {
- if (!frame.offsetWidth || !win.Editor) {
- for (var cur = frame; cur.parentNode; cur = cur.parentNode) {
- if (cur != document) {
- clearInterval(sizeInterval);
- return;
- }
- }
- }
-
- if (nums.offsetWidth != barWidth) {
- barWidth = nums.offsetWidth;
- nums.style.left = "-" + (frame.parentNode.style.marginLeft = barWidth + "px");
- }
- }
function update() {
var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
for (var n = Math.ceil(diff / 10); n > 0; n--) {
function update() {
var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
for (var n = Math.ceil(diff / 10); n > 0; n--) {
}
nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
}
}
nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
}
update();
win.addEventHandler(win, "scroll", update);
update();
win.addEventHandler(win, "scroll", update);
- win.addEventHandler(win, "resize", update);
- var sizeInterval = setInterval(sizeBar, 500);
+ win.addEventHandler(win, "resize", update);
}
function CodeMirror(place, options) {
}
function CodeMirror(place, options) {
$('#loading-overlay').fadeOut();
alert("FAILURE");
}
$('#loading-overlay').fadeOut();
alert("FAILURE");
}
- });
-
- $(window).resize();
}; /* end of initialize() */
var initAll = function(a, f) {
}; /* end of initialize() */
var initAll = function(a, f) {
},
iframeClass: 'xml-iframe',
textWrapping: true,
},
iframeClass: 'xml-iframe',
textWrapping: true,
width: "100%",
tabMode: 'spaces',
indentUnit: 0,
initCallback: function(){
width: "100%",
tabMode: 'spaces',
indentUnit: 0,
initCallback: function(){
- self.codemirror.grabKeys(function(event) {
+ self.codemirror.grabKeys(function(event) {
if (event.button) {
$(event.button).trigger('click');
event.button = null;
if (event.button) {
$(event.button).trigger('click');
event.button = null;
$('.toolbar select').change();
console.log("Initialized CodeMirror");
$('.toolbar select').change();
console.log("Initialized CodeMirror");
// textarea is no longer needed
$('codemirror_placeholder').remove();
// textarea is no longer needed
$('codemirror_placeholder').remove();
old_callback.call(self);
}
});
old_callback.call(self);
}
});
CodeMirrorPerspective.prototype.freezeState = function() {
};
CodeMirrorPerspective.prototype.freezeState = function() {
};
CodeMirrorPerspective.prototype.onEnter = function(success, failure) {
$.wiki.Perspective.prototype.onEnter.call(this);
console.log('Entering', this.doc);
this.codemirror.setCode(this.doc.text);
CodeMirrorPerspective.prototype.onEnter = function(success, failure) {
$.wiki.Perspective.prototype.onEnter.call(this);
console.log('Entering', this.doc);
this.codemirror.setCode(this.doc.text);
+
+ /* fix line numbers bar */
+ var $nums = $('.CodeMirror-line-numbers');
+ var barWidth = $nums.width();
+
+ $(this.codemirror.frame).css('margin-left', barWidth);
+ $nums.css('left', -barWidth);
+
+ $(this.codemirror.frame.contentWindow).trigger('resize');
-->
<xsl:template match="motto">
<xsl:param name="mixed" />
-->
<xsl:template match="motto">
<xsl:param name="mixed" />
+ <div class="motto_container">
<div x-editable="true">
<xsl:call-template name="standard-attributes" />
<xsl:apply-templates select="child::node()">
<xsl:with-param name="mixed" select="true()" />
<div x-editable="true">
<xsl:call-template name="standard-attributes" />
<xsl:apply-templates select="child::node()">
<xsl:with-param name="mixed" select="true()" />
+ </xsl:apply-templates>
+ </div>
+ <xsl:apply-templates select="following-sibling::*[1][self::motto_podpis]" mode="motto">
+ <xsl:with-param name="mixed" select="true()" />
+ </xsl:apply-templates>
- <xsl:template match="motto_podpis">
+ <!--
+ Catch stand-alone "motto_podpis" and make then render properly.
+ If not, editing will fail :(.
+
+ TODO: Make "motto" & "motto_podpis" one block in edit mode (like strofa)
+ -->
+ <xsl:template match="motto_podpis[not(preceding-sibling::*[1][self::motto])]">
+ <xsl:apply-templates select="." mode="motto">
+ <xsl:with-param name="mixed" select="true()" />
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="motto_podpis" mode="motto">
<xsl:param name="mixed" />
<p x-editable="true">
<xsl:call-template name="standard-attributes" />
<xsl:param name="mixed" />
<p x-editable="true">
<xsl:call-template name="standard-attributes" />
<xsl:with-param name="mixed" select="true()" />
</xsl:apply-templates>
</p>
<xsl:with-param name="mixed" select="true()" />
</xsl:apply-templates>
</p>
+ </xsl:template>
+
+ <xsl:template match="motto_podpis" />
+
+
<!--
Tagi obejmujące listę osób poprzedzającą tekst dramatu
<!--
Tagi obejmujące listę osób poprzedzającą tekst dramatu