From e26da8a01a91574ca0060bfe0b13f53234ba2597 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Thu, 10 Apr 2014 15:31:52 -0400 Subject: [PATCH] Optimize JS delivery, toss unused files --- karmaworld/templates/base.html | 14 +- .../templates/courses/course_detail.html | 13 +- karmaworld/templates/courses/course_list.html | 3 - karmaworld/templates/notes/note_detail.html | 3 - .../templates/notes/search_results.html | 2 +- karmaworld/templates/partial/filepicker.html | 2 - .../templates/quizzes/keyword_edit.html | 93 ----------- karmaworld/templates/quizzes/quiz.html | 153 ------------------ 8 files changed, 10 insertions(+), 273 deletions(-) delete mode 100644 karmaworld/templates/quizzes/keyword_edit.html delete mode 100644 karmaworld/templates/quizzes/quiz.html diff --git a/karmaworld/templates/base.html b/karmaworld/templates/base.html index d29ef21..9c0c11c 100644 --- a/karmaworld/templates/base.html +++ b/karmaworld/templates/base.html @@ -14,13 +14,6 @@ - - - - {% block pagescripts %} - {% endblock %} - - {% block pagestyle %} {% endblock %} @@ -45,6 +38,7 @@ {% include 'footer.html' %} + @@ -55,10 +49,10 @@ $(document).foundation(); }); - - {% block bodyscripts %} + + {% block pagescripts %} {% endblock %} - + diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index 57304a0..821d517 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -12,20 +12,17 @@ var course_edit_url = "{% url 'edit_course' course.id %}"; var dataTable_sDom = '<"top">rt<"bottom"p><"clear">'; -{% endblock %} - -{% block pagestyle %} - - -{% endblock %} - -{% block bodyscripts %} + {% endblock %} +{% block pagestyle %} + + +{% endblock %} {% block title %} Share Notes for {{ course.name }} | {{ course.school.name }} diff --git a/karmaworld/templates/courses/course_list.html b/karmaworld/templates/courses/course_list.html index 8a262ee..a8aaece 100644 --- a/karmaworld/templates/courses/course_list.html +++ b/karmaworld/templates/courses/course_list.html @@ -24,9 +24,6 @@ -{% endblock %} - -{% block bodyscripts %} {% endblock %} diff --git a/karmaworld/templates/notes/note_detail.html b/karmaworld/templates/notes/note_detail.html index 977ac8e..8122061 100644 --- a/karmaworld/templates/notes/note_detail.html +++ b/karmaworld/templates/notes/note_detail.html @@ -26,9 +26,6 @@ var empty_js = "{{ STATIC_URL }}js/empty.js"; -{% endblock %} - -{% block bodyscripts %} diff --git a/karmaworld/templates/notes/search_results.html b/karmaworld/templates/notes/search_results.html index 6c59cac..b82ec12 100644 --- a/karmaworld/templates/notes/search_results.html +++ b/karmaworld/templates/notes/search_results.html @@ -10,7 +10,7 @@ {% endblock %} -{% block bodyscripts %} +{% block pagescripts %} - - diff --git a/karmaworld/templates/quizzes/keyword_edit.html b/karmaworld/templates/quizzes/keyword_edit.html deleted file mode 100644 index 0e6bff6..0000000 --- a/karmaworld/templates/quizzes/keyword_edit.html +++ /dev/null @@ -1,93 +0,0 @@ -{% extends "base.html" %} -{% load url from future %} -{% load account %} - -{% block pagestyle %} - -{% endblock %} - -{% block bodyscripts %} - -{% endblock %} - -{% block title %} - {{ note.name }} -{% endblock %} - -{% block raw_content %} -
-
- - - -
-
-

Define keywords for the note
- {{ note.name }}

-
-
- -
-
-

(Press button or hit tab in the last definition box for more rows)

-
-
- -
- -
-
-
-
- {% csrf_token %} - {{ form.management_form }} -
-
-
- {{ prototype_form.keyword }} -
-
- {{ prototype_form.definition }} - {{ formprototype_form_row.id }} -
-
-
-
-
- {% for form_row in form %} -
-
- {{ form_row.keyword }} -
-
- {{ form_row.definition }} - {{ form_row.id }} -
-
-
- {% endfor %} -
-
-
- -
-
- -
-
-
-
-
-
- - - -
- -{% endblock %} diff --git a/karmaworld/templates/quizzes/quiz.html b/karmaworld/templates/quizzes/quiz.html deleted file mode 100644 index 2d53cff..0000000 --- a/karmaworld/templates/quizzes/quiz.html +++ /dev/null @@ -1,153 +0,0 @@ -{% extends "base.html" %} -{% load url from future %} -{% load account %} - -{% block pagestyle %} - -{% endblock %} - -{% block bodyscripts %} - - - -{% endblock %} - -{% block title %} - {{ quiz.name }} -{% endblock %} - -{% block raw_content %} -
-
- -
-
- {{ quiz.name }} -
-
-
-
-
-
- you've passed -
-
- out of -
-
-
-
- 0 -
-
- {{ questions|length }} -
-
-
-
- questions -
-
- total -
-
-
-
- -
- -
- - {% if not questions %} -
-
-

This quiz has no questions.

-
-
- {% endif %} - - {% for item in questions %} - {% with question=item.1 %} -
-
- {% if 'MultipleChoiceQuestion' in item.0 %} -

{{ question.question_text }}

-
    - {% for choice in question.choices.all %} -
  • - {% endfor %} -
- {% endif %} - - {% if 'TrueFalseQuestion' in item.0 %} -

{{ question.text }}

-
    -
  • -
  • -
- {% endif %} - - {% if 'FlashCardQuestion' in item.0 %} -

{{ question.definition_side }}

- - {% endif %} - -
-
- -
-
- -
-
- -
-
- -
-
- {% endwith %} - {% endfor %} - -
- - - -
- -{% endblock %} -- 2.25.1