-body {\r
- font: 12px/16px Arial, Helvetica, sans-serif;\r
-}\r
-#fileQueue {\r
- width: 400px;\r
- height: 300px;\r
- overflow: auto;\r
- border: 1px solid #E5E5E5;\r
- margin-bottom: 10px;\r
+body {
+ font: 12px/16px Arial, Helvetica, sans-serif;
+}
+#fileQueue {
+ width: 400px;
+ height: 300px;
+ overflow: auto;
+ border: 1px solid #E5E5E5;
+ margin-bottom: 10px;
}
\ No newline at end of file
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining a copy\r
-of this software and associated documentation files (the "Software"), to deal\r
-in the Software without restriction, including without limitation the rights\r
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-copies of the Software, and to permit persons to whom the Software is\r
-furnished to do so, subject to the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be included in\r
-all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-THE SOFTWARE.\r
-*/\r
-.uploadifyQueueItem {\r
- font: 11px Verdana, Geneva, sans-serif;\r
- border: 2px solid #E5E5E5;\r
- background-color: #F5F5F5;\r
- margin-top: 5px;\r
- padding: 10px;\r
- width: 350px;\r
-}\r
-.uploadifyError {\r
- border: 2px solid #FBCBBC !important;\r
- background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
- float: right;\r
-}\r
-.uploadifyProgress {\r
- background-color: #FFFFFF;\r
- border-top: 1px solid #808080;\r
- border-left: 1px solid #808080;\r
- border-right: 1px solid #C5C5C5;\r
- border-bottom: 1px solid #C5C5C5;\r
- margin-top: 10px;\r
- width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
- background-color: #0099FF;\r
- width: 1px;\r
- height: 3px;\r
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+.uploadifyQueueItem {
+ font: 11px Verdana, Geneva, sans-serif;
+ border: 2px solid #E5E5E5;
+ background-color: #F5F5F5;
+ margin-top: 5px;
+ padding: 10px;
+ width: 350px;
+}
+.uploadifyError {
+ border: 2px solid #FBCBBC !important;
+ background-color: #FDE5DD !important;
+}
+.uploadifyQueueItem .cancel {
+ float: right;
+}
+.uploadifyProgress {
+ background-color: #FFFFFF;
+ border-top: 1px solid #808080;
+ border-left: 1px solid #808080;
+ border-right: 1px solid #C5C5C5;
+ border-bottom: 1px solid #C5C5C5;
+ margin-top: 10px;
+ width: 100%;
+}
+.uploadifyProgressBar {
+ background-color: #0099FF;
+ width: 1px;
+ height: 3px;
}
\ No newline at end of file
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining a copy\r
-of this software and associated documentation files (the "Software"), to deal\r
-in the Software without restriction, including without limitation the rights\r
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-copies of the Software, and to permit persons to whom the Software is\r
-furnished to do so, subject to the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be included in\r
-all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-THE SOFTWARE.\r
-*/\r
-.uploadifyQueueItem {\r
- font: 11px Verdana, Geneva, sans-serif;\r
- border: 2px solid #E5E5E5;\r
- background-color: #F5F5F5;\r
- margin-top: 5px;\r
- padding: 10px;\r
- width: 350px;\r
-}\r
-.uploadifyError {\r
- border: 2px solid #FBCBBC !important;\r
- background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
- float: right;\r
-}\r
-.uploadifyProgress {\r
- background-color: #FFFFFF;\r
- border-top: 1px solid #808080;\r
- border-left: 1px solid #808080;\r
- border-right: 1px solid #C5C5C5;\r
- border-bottom: 1px solid #C5C5C5;\r
- margin-top: 10px;\r
- width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
- background-color: #0099FF;\r
- width: 1px;\r
- height: 3px;\r
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+.uploadifyQueueItem {
+ font: 11px Verdana, Geneva, sans-serif;
+ border: 2px solid #E5E5E5;
+ background-color: #F5F5F5;
+ margin-top: 5px;
+ padding: 10px;
+ width: 350px;
+}
+.uploadifyError {
+ border: 2px solid #FBCBBC !important;
+ background-color: #FDE5DD !important;
+}
+.uploadifyQueueItem .cancel {
+ float: right;
+}
+.uploadifyProgress {
+ background-color: #FFFFFF;
+ border-top: 1px solid #808080;
+ border-left: 1px solid #808080;
+ border-right: 1px solid #C5C5C5;
+ border-bottom: 1px solid #C5C5C5;
+ margin-top: 10px;
+ width: 100%;
+}
+.uploadifyProgressBar {
+ background-color: #0099FF;
+ width: 1px;
+ height: 3px;
}
\ No newline at end of file
</select>
<button type="button" class="prev"><</button>
- <div class="button_group_container">
+ <div class="button_group_container">
{% for group in toolbar_groups %}
<ul data-group="{{ group.slug }}" class="button_group">
{# buttons for this group #}
import collections
def recursive_groupby(iterable):
- """
+ """
# >>> recursive_groupby([1,2,3,4,5])
# [1, 2, 3, 4, 5]
-
+
>>> recursive_groupby([[1]])
[1]
-
+
>>> recursive_groupby([('a', 1),('a', 2), 3, ('b', 4), 5])
['a', [1, 2], 3, 'b', [4], 5]
-
+
>>> recursive_groupby([('a', 'x', 1),('a', 'x', 2), ('a', 'x', 3)])
['a', ['x', [1, 2, 3]]]
-
+
"""
def _generator(iterator):
<tbody>
{% for doc in docs %}
<tr>
- <td colspan="3"><a target="_blank" data-id="{{doc}}"
+ <td colspan="3"><a target="_blank" data-id="{{doc}}"
href="{% url wiki_editor doc %}">{{ doc|wiki_title }}</a></td>
<!-- placeholder </td> -->
</tr>
<!-- gallery toolbar -->
<div class="toolbar">
<button class="previous-page">
- <img src="{{STATIC_URL}}icons/go-previous.png"
+ <img src="{{STATIC_URL}}icons/go-previous.png"
alt="{% trans "Previous" %}" title="{% trans "Previous" %}"/>
</button><input type="text" size="3" maxlength="3" value="1" class="page-number" />
<button class="next-page">
- <img src="{{STATIC_URL}}icons/go-next.png"
+ <img src="{{STATIC_URL}}icons/go-next.png"
alt="{% trans "Next" %}" title="{% trans "Next" %}"/>
</button>
<button class="zoom-in">{% trans "Zoom in" %}</button>
{% load i18n %}
<div id="history-view-editor" class="editor" style="display: none">
<div class="toolbar">
- <button type="button" id="make-diff-button">{% trans "Compare versions" %}</button>
- <button type="button" id="tag-changeset-button">{% trans "Mark version" %}</button>
- <button id="open-preview-button"
+ <button type="button" id="make-diff-button"
+ data-enabled-when="2" disabled="disabled">{% trans "Compare versions" %}</button>
+ <button type="button" id="tag-changeset-button"
+ data-enabled-when="1" disabled="disabled">{% trans "Mark version" %}</button>
+ <button type="button" id="doc-revert-button"
+ data-enabled-when="1" disabled="disabled">{% trans "Revert document" %}</button>
+ <button id="open-preview-button" disabled="disabled"
+ data-enabled-when="1"
data-basehref="{% url wiki_editor_readonly document_name %}">{% trans "View version" %}</button>
</div>
})
+@never_cache
+@normalized_name
+@require_POST
+def revert(request, name):
+ storage = getstorage()
+ revision = request.POST['target_revision']
+
+ try:
+ document = storage.revert(name, revision)
+
+ return JSONResponse({
+ 'text': document.plain_text if revision != document.revision else None,
+ 'meta': document.meta(),
+ 'revision': document.revision,
+ })
+ except DocumentNotFound:
+ raise http.Http404
+
@never_cache
def gallery(request, directory):
try:
"""
- Mercurial ui module replacement.
+ Mercurial ui module replacement.
"""
import mercurial.ui
def __init__(self, *args, **kwargs):
super(SilentUI, self).__init__(*args, **kwargs)
- # make sure this doesn't collide with anything in Mercurial
+ # make sure this doesn't collide with anything in Mercurial
self.__logger = logging.getLogger('mercurial')
def _is_trusted(self, fd, filename):
"django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
- "redakcja.context_processors.settings", # this is instead of media
+ "redakcja.context_processors.settings", # this is instead of media
"django.core.context_processors.request",
)
.dialog .help_text {
font-size: 11px;
- color: #2e3536;
+ color: #2e3536;
}
.dialog .action_area {
padding: 1em 0.5em 0.5em;
border-top: 1px solid black;
- margin-top: 0.5em;
+ margin-top: 0.5em;
}
.dialog p {
-/*
+/*
Document : filelist
Created on : 2009-09-04, 20:44:44
Author : lreqc
border: 1px solid black;
padding: 0.5em 2em;
margin: 1em;
- overflow: hidden;
+ overflow: hidden;
}
#content h1 img {
float: left;
max-width: 50%;
padding-right: 2%;
- border-right: 1px dashed black;
-
+ border-right: 1px dashed black;
+
}
#last-edited-list {
#last-edited-list ul {
margin: 0px;
-}
+}
#last-edited-list li {
margin-bottom: 1em;
a, a:visited, a:active {
color: blue;
- text-decoration: none;
+ text-decoration: none;
}
a:hover {
background-color: #FFF;
}
-#side-gallery .error_message
+#side-gallery .error_message
{
background-color: white;
color: black;
-khtml-user-select: none;
-moz-user-select: none;
cursor: pointer;
-
+
background-color: white;
min-height: 100px;
min-width: 100px;
}
.gallery-image img[src=''] {
- background-color: red;
+ background-color: red;
}
font-size: 8px;
line-height: 8px;
margin-bottom: 4px;
-
+
padding: 3px 4px;
vertical-align: super;
background-color:#add8e6;
margin-left: -80px;
width: 70px;
text-align: center;
-
+
-webkit-border-radius: 4px;
}
*/
.htmlview .motto_container {
display: inline-block;
margin: 1.5em 0 0;
- clear: right;
+ clear: right;
}
.htmlview .motto {
text-align: justify;
- font-style: italic;
+ font-style: italic;
}
.htmlview p.motto_podpis {
position: relative;
right: -3em;
- text-align: right;
+ text-align: right;
}
.htmlview div.fragment {
text-decoration: none;
background-color: #fff;
/* border: 1px solid gray;
-
+
border-right: none;
*/
z-index: 1;
left: 70px;
}
-.edit-button:hover, .edit-button:active,
-.delete-button:hover, .delete-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;
font-size: 16px;
font: Georgia, "Times New Roman", serif;
line-height: 1.5em;
- padding: 3em;
+ padding: 3em;
}
.htmlview div {
padding: 2px 5px;
cursor: default;
display: block;
- /*
- if width will be 100% horizontal scrollbar will apear
+ /*
+ if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
- /*
- it is very important, if line-height not setted or setted
+ /*
+ it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
a, a:visited, a:active {
color: blue;
- text-decoration: none;
+ text-decoration: none;
}
a:hover {
bottom: 0;
right: 0;
width: 26px;
- background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;
+ background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;
border-left: 2px solid #999;
border-right: 2px solid #999;
- cursor: pointer;
+ cursor: pointer;
}
.vsplitbar:hover {
right: 0px;
left: 0px;
height: 30px;
- border-bottom: 1px solid #999;
-
+ border-bottom: 1px solid #999;
+
margin: 0;
padding: 0;
background-color: #C1C1C1;
background-image: -webkit-gradient(linear, left top, left bottom, from(#C1C1C1), color-stop(0.9, #A2A2A2));
-
+
/* Firefox 3.6 */
background-image: -moz-linear-gradient(top left, #C1C1C1, #A2A2A2, 90%);
-
+
font: 11px Helvetica, Verdana, sans-serif;
font-weight: bold;
}
margin: 0;
padding: 0;
height: 31px;
- border: 0px;
- padding-left: 1em;
+ border: 0px;
+ padding-left: 1em;
}
#tabs li {
height: 18px;
margin-top: 6px;
- margin-bottom: 0px;
-
- -webkit-user-select: none;
+ margin-bottom: 0px;
+
+ -webkit-user-select: none;
cursor: pointer;
display: block;
float: left;
-
+
padding-left: 12px;
padding-right: 12px;
padding-top: 5px;
-
+
font-weight: bold;
color: #222;
- margin-left: 4px;
-
+ margin-left: 4px;
+
background-color: #A2A2A2;
-
+
-moz-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
-webkit-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
border: 1px solid #999;
- border-bottom-width: 0px;
+ border-bottom-width: 0px;
-moz-border-radius: 4px 4px 0px 0px;
-webkit-border-radius: 4px;
-webkit-border-bottom-left-radius: 0px;
}
#tabs li.active {
- background-color: #C1C1C1;
+ background-color: #C1C1C1;
}
#tools {
overflow: hidden;
margin: 0;
padding: 0;
- height: 30px;
+ height: 30px;
margin-right: 5px;
line-height: 30px;
font-size: 10px;
}
/* Remove extra padding in Firefox */
-button::-moz-focus-inner {
+button::-moz-focus-inner {
border: 0;
padding: 0;
}
}
/*
- * CodeMirror
+ * CodeMirror
*/
.CodeMirror-line-numbers {
padding: 0px;
- padding-top: 5px;
+ padding-top: 5px;
text-align: right;
overflow: hidden;
width: 40px;
}
.CodeMirror-line-numbers div {
- display: block;
+ display: block;
font-family:"Lucida Console", monospace;
font-size: 13px;
line-height: 18px;
img.tabclose {
padding-left: 8px;
width: 16px;
- height: 16px;
+ height: 16px;
vertical-align: middle;
vertical-align: text-bottom;
}
/*
* HTML Editor view
- */
-
+ */
+
.htmlview {
z-index: 1;
overflow: hidden;
.htmlview *[x-editable] {
background-color: white;
-
+
}
.htmlview .active[x-editable] {
background-color: #FAFAFA;
}
#summary-view {
- padding: 1em;
+ padding: 1em;
}
#summary-view .book-cover {
float: left;
margin: 1em;
margin-right: 2em;
-
+
height: 300px;
width: 212px;
-
-
+
+
border: 1px dashed black;
}
#summary-view p {
- margin: 0.5em;
+ margin: 0.5em;
}
#summary-view label {
- font-weight: bold;
-}
+ font-weight: bold;
+}
#summary-view .book-cover {
-
+
}
.toolbar > .group_selector {
position: absolute;
-
+
margin: 1px 5px 1px 0;
border: 1px solid #999;
padding: 1px;
-
+
top: 0px;
left: 0px;
bottom: 0px;
bottom: 0px;
}
-.toolbar ul.button_group {
+.toolbar ul.button_group {
margin: 0;
- padding: 0;
+ padding: 0;
width: 10000%;
}
.toolbar .button_group button img {
margin: 0;
- padding: 0;
+ padding: 0;
margin-bottom: -3px;
}
-.toolbar .button_group button:hover,
+.toolbar .button_group button:hover,
.toolbar .button_group button:active {
background: #777;
color: #FFF;
-.editbox {
+.editbox {
margin: .4em;
margin-top: 5px;
margin-left: 5px;
padding: 0;
font-family:"Lucida Console", monospace;
font-size: 13px;
- line-height: 18px;
+ line-height: 18px;
color: black;
}
}
.editbox span {
- display: inline;
+ display: inline;
font-size: 13px;
- line-height: 18px;
+ line-height: 18px;
}
span.xml-tagname {
-body {\r
- font: 12px/16px Arial, Helvetica, sans-serif;\r
-}\r
-#fileQueue {\r
- width: 400px;\r
- height: 300px;\r
- overflow: auto;\r
- border: 1px solid #E5E5E5;\r
- margin-bottom: 10px;\r
+body {
+ font: 12px/16px Arial, Helvetica, sans-serif;
+}
+#fileQueue {
+ width: 400px;
+ height: 300px;
+ overflow: auto;
+ border: 1px solid #E5E5E5;
+ margin-bottom: 10px;
}
\ No newline at end of file
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining a copy\r
-of this software and associated documentation files (the "Software"), to deal\r
-in the Software without restriction, including without limitation the rights\r
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-copies of the Software, and to permit persons to whom the Software is\r
-furnished to do so, subject to the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be included in\r
-all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-THE SOFTWARE.\r
-*/\r
-.uploadifyQueueItem {\r
- font: 11px Verdana, Geneva, sans-serif;\r
- border: 2px solid #E5E5E5;\r
- background-color: #F5F5F5;\r
- margin-top: 5px;\r
- padding: 10px;\r
- width: 350px;\r
-}\r
-.uploadifyError {\r
- border: 2px solid #FBCBBC !important;\r
- background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
- float: right;\r
-}\r
-.uploadifyProgress {\r
- background-color: #FFFFFF;\r
- border-top: 1px solid #808080;\r
- border-left: 1px solid #808080;\r
- border-right: 1px solid #C5C5C5;\r
- border-bottom: 1px solid #C5C5C5;\r
- margin-top: 10px;\r
- width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
- background-color: #0099FF;\r
- width: 1px;\r
- height: 3px;\r
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+.uploadifyQueueItem {
+ font: 11px Verdana, Geneva, sans-serif;
+ border: 2px solid #E5E5E5;
+ background-color: #F5F5F5;
+ margin-top: 5px;
+ padding: 10px;
+ width: 350px;
+}
+.uploadifyError {
+ border: 2px solid #FBCBBC !important;
+ background-color: #FDE5DD !important;
+}
+.uploadifyQueueItem .cancel {
+ float: right;
+}
+.uploadifyProgress {
+ background-color: #FFFFFF;
+ border-top: 1px solid #808080;
+ border-left: 1px solid #808080;
+ border-right: 1px solid #C5C5C5;
+ border-bottom: 1px solid #C5C5C5;
+ margin-top: 10px;
+ width: 100%;
+}
+.uploadifyProgressBar {
+ background-color: #0099FF;
+ width: 1px;
+ height: 3px;
}
\ No newline at end of file
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining a copy\r
-of this software and associated documentation files (the "Software"), to deal\r
-in the Software without restriction, including without limitation the rights\r
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-copies of the Software, and to permit persons to whom the Software is\r
-furnished to do so, subject to the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be included in\r
-all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-THE SOFTWARE.\r
-*/\r
-.uploadifyQueueItem {\r
- font: 11px Verdana, Geneva, sans-serif;\r
- border: 2px solid #E5E5E5;\r
- background-color: #F5F5F5;\r
- margin-top: 5px;\r
- padding: 10px;\r
- width: 350px;\r
-}\r
-.uploadifyError {\r
- border: 2px solid #FBCBBC !important;\r
- background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
- float: right;\r
-}\r
-.uploadifyProgress {\r
- background-color: #FFFFFF;\r
- border-top: 1px solid #808080;\r
- border-left: 1px solid #808080;\r
- border-right: 1px solid #C5C5C5;\r
- border-bottom: 1px solid #C5C5C5;\r
- margin-top: 10px;\r
- width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
- background-color: #0099FF;\r
- width: 1px;\r
- height: 3px;\r
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+.uploadifyQueueItem {
+ font: 11px Verdana, Geneva, sans-serif;
+ border: 2px solid #E5E5E5;
+ background-color: #F5F5F5;
+ margin-top: 5px;
+ padding: 10px;
+ width: 350px;
+}
+.uploadifyError {
+ border: 2px solid #FBCBBC !important;
+ background-color: #FDE5DD !important;
+}
+.uploadifyQueueItem .cancel {
+ float: right;
+}
+.uploadifyProgress {
+ background-color: #FFFFFF;
+ border-top: 1px solid #808080;
+ border-left: 1px solid #808080;
+ border-right: 1px solid #C5C5C5;
+ border-bottom: 1px solid #C5C5C5;
+ margin-top: 10px;
+ width: 100%;
+}
+.uploadifyProgressBar {
+ background-color: #0099FF;
+ width: 1px;
+ height: 3px;
}
\ No newline at end of file
ScriptletCenter.prototype.callInteractive = function(opts) {
$progress = $('<span>Executing script</span>');
var self = this;
-
+
/* This won't work, 'cause the JS below might be synchronous :( */
/* var timer = setTimeout(function() {
$.blockUI({message: $progress});
timer = null;
}, 1000); */
-
+
$.blockUI({message: $progress, showOverlay: false});
self.scriptlets[opts.action](opts.context, opts.extra, function(){
- /*if(timer)
- clearTimeout(timer);
+ /*if(timer)
+ clearTimeout(timer);
else */
$.unblockUI(); // done
});
ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement)
{
- $progress.html("Replacing text");
+ $progress.html("Replacing text");
editor.replaceSelection(replacement);
};
return "Na stronie mogą być nie zapisane zmiany.";
};
};
-
+
console.log("Fetching document's text");
$(document).bind('wlapi_document_changed', function(event, doc) {
* Toolbar plugin.
*/
(function($) {
-
+
$.fn.toolbarize = function(options) {
var $toolbar = $(this);
var $container = $('.button_group_container', $toolbar);
-
- $('.button_group button', $toolbar).click(function(event){
+
+ $('.button_group button', $toolbar).click(function(event){
event.preventDefault();
-
+
var params = eval("(" + $(this).attr('data-ui-action-params') + ")");
-
+
scriptletCenter.callInteractive({
action: $(this).attr('data-ui-action'),
context: options.actionContext,
extra: params
});
});
-
+
$toolbar.children().filter('select').change(function(event){
- var slug = $(this).val();
+ var slug = $(this).val();
$container.scrollLeft(0);
- $('*[data-group]').hide().filter('[data-group=' + slug + ']').show();
+ $('*[data-group]').hide().filter('[data-group=' + slug + ']').show();
}).change();
-
+
$('button.next', $toolbar).click(function() {
- var $current_group = $('.button_group:visible', $toolbar);
- var scroll = $container.scrollLeft();
-
+ var $current_group = $('.button_group:visible', $toolbar);
+ var scroll = $container.scrollLeft();
+
var $hidden = $("li", $current_group).filter(function() {
return ($(this).position().left + $(this).outerWidth()) > $container.width();
- }).first();
-
+ }).first();
+
if($hidden.length > 0) {
- scroll = $hidden.position().left + scroll + $hidden.outerWidth() - $container.width() + 1;
+ scroll = $hidden.position().left + scroll + $hidden.outerWidth() - $container.width() + 1;
$container.scrollLeft(scroll);
};
});
-
+
$('button.prev', $toolbar).click(function() {
- var $current_group = $('.button_group:visible', $toolbar);
+ var $current_group = $('.button_group:visible', $toolbar);
var scroll = $container.scrollLeft();
-
- /* first not visible element is: */
+
+ /* first not visible element is: */
var $hidden = $("li", $current_group).filter(function() {
return $(this).position().left < 0;
}).last();
-
+
if( $hidden.length > 0)
{
- scroll = scroll + $hidden.position().left;
+ scroll = scroll + $hidden.position().left;
$container.scrollLeft(scroll);
};
});
-
- };
-
+
+ };
+
})(jQuery);
\ No newline at end of file
self.showTagForm();
});
+ $('#doc-revert-button').click(function() {
+ self.revertDocumentToVersion();
+ });
+
$('#open-preview-button').click(function(event) {
var selected = $('#changes-list .entry.selected');
$('#changes-list .entry').live('click', function(){
var $this = $(this);
- if ($this.hasClass('selected'))
- return $this.removeClass('selected');
- if ($("#changes-list .entry.selected").length < 2)
- return $this.addClass('selected');
+ var selected_count = $("#changes-list .entry.selected").length;
+
+ if ($this.hasClass('selected')) {
+ $this.removeClass('selected');
+ selected_count -= 1;
+ }
+ else {
+ if (selected_count < 2) {
+ $this.addClass('selected');
+ selected_count += 1;
+ };
+ };
+
+ $('#history-view-editor .toolbar button').attr('disabled', 'disabled').
+ filter('*[data-enabled-when~=' + selected_count + '], *[data-enabled-when~=*]').
+ attr('disabled', null);
});
$('#changes-list span.tag').live('click', function(event){
});
};
+ HistoryPerspective.prototype.revertDocumentToVersion = function(){
+ var selected = $('#changes-list .entry.selected');
+
+ if (selected.length != 1) {
+ window.alert("Musisz zaznaczyć dokładnie jedną wersję.");
+ return;
+ }
+
+ var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
+ this.doc.revertToVersion({'revision': version});
+ };
+
$.wiki.HistoryPerspective = HistoryPerspective;
})(jQuery);
/*
* Return absolute reverse path of given named view. (at least he have it
* hard-coded in one place)
- *
+ *
* TODO: think of a way, not to hard-code it here ;)
- *
+ *
*/
function reverse() {
var vname = arguments[0];
};
/*
* Fetch history of this document.
- *
+ *
* from - First revision to fetch (default = 0) upto - Last revision to
* fetch (default = tip)
- *
+ *
*/
WikiDocument.prototype.fetchHistory = function(params) {
/* this doesn't modify anything, so no locks */
{% endblock %}
</head>
<body id="{% block bodyid %}base{% endblock %}">
-
+
<div id="loading-overlay" style="display: none;">
<div id="loading-message">
<img src="{{STATIC_URL}}img/spinner.gif" />
<p>{% trans "Loading" %}</p>
</div>
</div>
-
+
<div id="body-wrap">
<div id="content">{% block maincontent %} {% endblock %}</div>
</div>
## Book conversion library
git+git://github.com/fnp/librarian.git@master#egg=librarian
-## Django
+## Django
Django>=1.1.1,<1.2
sorl-thumbnail>=3.2
django-maintenancemode>=0.9