fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Dodanie przycisku obejmującego zaznaczony tekst tagiem <rozdzial> (testowo).
[redakcja.git]
/
project
/
templates
/
explorer
/
file_xml.html
diff --git
a/project/templates/explorer/file_xml.html
b/project/templates/explorer/file_xml.html
index
3f50659
..
66e128d
100644
(file)
--- a/
project/templates/explorer/file_xml.html
+++ b/
project/templates/explorer/file_xml.html
@@
-1,7
+1,7
@@
{% extends "base.html" %}
{% block extrahead %}
{% extends "base.html" %}
{% block extrahead %}
- <script src="/static/js/jquery.
lazyload
.js" type="text/javascript" charset="utf-8"></script>
+ <script src="/static/js/jquery.
fieldselection
.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function aboveViewport(container, element, treshold) {
return $(container).offset().top >= $(element).offset().top + $(element).height() + treshold;
<script type="text/javascript" charset="utf-8">
function aboveViewport(container, element, treshold) {
return $(container).offset().top >= $(element).offset().top + $(element).height() + treshold;
@@
-44,6
+44,12
@@
});
setTimeout(checkScroll, 2000);
});
setTimeout(checkScroll, 2000);
+
+ $('#rozdzial-button').click(function(event) {
+ console.log($('#id_text').getSelection().text);
+ $('#id_text').replaceSelection('<rozdzial>' + $('#id_text').getSelection().text + '</rozdzial>', true);
+ event.preventDefault();
+ });
});
</script>
{% endblock extrahead %}
});
</script>
{% endblock extrahead %}
@@
-59,7
+65,8
@@
</div>
</div>
<form action="." method="post" accept-charset="utf-8">
</div>
</div>
<form action="." method="post" accept-charset="utf-8">
+ <a href="#" id="rozdzial-button">Rodział</a>
{{ form.text }}
{{ form.text }}
- <p><input type="submit" value="Zapisz"/></p>
+ <p>
Użytkownik: {{ form.user }} Opis zmian: {{ form.commit_message }}
<input type="submit" value="Zapisz"/></p>
</form>
{% endblock maincontent %}
</form>
{% endblock maincontent %}