aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/docedit.html8
-rw-r--r--wqflask/wqflask/templates/search_result_page.html9
-rw-r--r--wqflask/wqflask/views.py2
3 files changed, 15 insertions, 4 deletions
diff --git a/wqflask/wqflask/templates/docedit.html b/wqflask/wqflask/templates/docedit.html
index e8aa7da1..b87c5b41 100644
--- a/wqflask/wqflask/templates/docedit.html
+++ b/wqflask/wqflask/templates/docedit.html
@@ -5,20 +5,26 @@
{% block content %}
<div class="container">
<h3>Edit: {{title}}</h3>
- <form action="/update_text" method="post">
+ <form id="update_text" action="/update_text" method="post">
<input type="hidden" name="entry_type" value="{{ entry }}">
<input type="hidden" name="title" value="{{ title }}">
{% if editable is defined %}
<input type="hidden" name="edit" value="{{ editable }}">
{% endif %}
+ <button class="submit_changes" style="margin-bottom: 20px;">Submit Changes</button>
<textarea name="ckcontent" id="ckcontent">
{{content|safe}}
</textarea>
+ <button class="submit_changes" style="margin-top: 20px;">Submit Changes</button>
<script src="/static/packages/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
CKEDITOR.replace('ckcontent', {
height: '650px',
});
+
+ $('.submit_changes').click(function() {
+ $('#update_text').submit();
+ })
</script>
</form>
</div>
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 2c67f6c3..262a563d 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -348,9 +348,14 @@
'render': function(data, type, row, meta) {
author_list = data.authors.split(",")
if (author_list.length >= 6) {
- return author_list.slice(0, 6).join(",") + ", et al."
+ author_string = author_list.slice(0, 6).join(",") + ", et al."
} else{
- return data.authors
+ author_string = data.authors
+ }
+ try {
+ return decodeURIComponent(escape(author_string))
+ } catch(err){
+ return escape(author_string)
}
}
},
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 70748040..bff9f9d2 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -307,7 +307,7 @@ def submit_trait_form():
@app.route("/create_temp_trait", methods=('POST',))
def create_temp_trait():
logger.info(request.url)
- print("REQUEST.FORM:", request.form)
+
#template_vars = submit_trait.SubmitTrait(request.form)
doc = docs.Docs("links")