-
{{ page|capfirst }}
+
{{ page|capfirst }}
{% blocktrans with modifier=latest_contributor|email2nickname modify_time=last_modified|translate_seahub_time %}Last modified by {{modifier}}, {{modify_time}}{% endblocktrans %}
@@ -83,7 +85,7 @@
-
+
{% endif %}
@@ -116,36 +118,31 @@ $('#wiki-content')
);
$('#page-create').click(function() {
- $('#page-create-form').modal({appendTo: '#main', autoResize: true});
-})
-
-$('#page-edit').click(function() {
- location.href = "{% url 'personal_wiki_page_edit' page %}";
-})
-
-$('#page-list').click(function () {
- location.href = "{% url 'personal_wiki_pages' %}";
+ $('#page-create-form').modal({appendTo: '#main'});
+ $('#simplemodal-container').css({'height':'auto'});
});
-
-$('#page-history').click(function () {
- window.open("{% url 'file_revisions' repo_id %}" + "?p=" + "{{path|urlencode}}");
+$('#page-create-form').submit(function() {
+ var page_name = $.trim($('[name="page_name"]', $(this)).val());
+ if (!page_name) {
+ return false;
+ }
});
addConfirmTo($('#page-delete'), {
'title': "{% trans "Delete Page" %}",
'con': "{% trans "Are you sure you want to delete this page?" %}"
});
-$('a.wiki-page-missing').each(function(){
- $(this).click(function() {
- $('#page-name').val($(this).text());
- $('#page-create-form').modal({appendTo: '#main', autoResize: true});
- return false;
- });
+$('a.wiki-page-missing').click(function() {
+ $('#page-create-form').modal({appendTo: '#main'});
+ $('#simplemodal-container').css({'height':'auto'});
+ $('#page-name').val($(this).text());
+ return false;
});
{% else %}
$('#wiki-create').click(function() {
- $('#wiki-create-form').modal({appendTo: '#main', autoResize: true});
+ $('#wiki-create-form').modal({appendTo: '#main'});
+ $('#simplemodal-container').css({'height':'auto'});
return false;
});
$('#wiki-create-form').submit(function () {
@@ -216,6 +213,7 @@ $('#wiki-use-lib-form').submit(function() {
{% endif %} // END wiki_exists
+{% comment %}
{% if wiki_exists %}
{% if wiki_index_exists %}
$('#wiki-index-con').html(marked('{{ index_content|escapejs }}'));
@@ -230,5 +228,6 @@ $('#create-index').click(function() {
});
{% endif %}
{% endif %}
+{% endcomment %}
{% endblock %}
diff --git a/seahub/templates/wiki/personal_wiki_pages.html b/seahub/templates/wiki/personal_wiki_pages.html
index fa6a9c710a..975e8d562b 100644
--- a/seahub/templates/wiki/personal_wiki_pages.html
+++ b/seahub/templates/wiki/personal_wiki_pages.html
@@ -14,7 +14,7 @@
{% trans "Pages" %}
{% trans "Wiki History" %}
-
+