added bootstrap js and other dependencies; tweaked settings template

This commit is contained in:
Tom Giannattasio
2012-08-17 09:37:42 -04:00
parent b0b10aa598
commit ad45a44a7c
4 changed files with 96 additions and 6 deletions

6
lms/static/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -368,6 +368,8 @@ section.wiki {
font-size: 0.8em;
margin-right: 5px;
line-height: 1.2em;
text-transform: none !important;
letter-spacing: 0 !important;
&:hover {
text-decoration: none;
@@ -382,6 +384,15 @@ section.wiki {
@include button(simple, $pink);
font-size: 0.8em;
}
&.btn-info {
@include button(simple, #ccc);
font-size: 0.8em;
}
}
a.btn {
padding: 7px 18px 8px !important;
}
.modal {
@@ -453,13 +464,13 @@ section.wiki {
text-decoration: none;
}
}
}
.collapse {
display: none;
.collapse {
display: none;
&.in {
display: block;
}
&.in {
display: block;
}
}

View File

@@ -5,7 +5,28 @@
{% block headextra %}
{% compressed_css 'course' %}
<script src="{{ STATIC_URL }}js/bootstrap-modal.js"></script>
<script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
<script type="text/javascript">
function ajaxError(){}
$.ajaxSetup({
timeout: 7000,
cache: false,
error: function(e, xhr, settings, exception) {
ajaxError();
}
});
function jsonWrapper(url, callback) {
$.getJSON(url, function(data) {
if (data == null) {
ajaxError();
} else {
callback(data);
}
});
}
</script>
{% endblock %}

View File

@@ -0,0 +1,52 @@
{% extends "wiki/base.html" %}
{% load wiki_tags i18n %}
{% load url from future %}
{% block pagetitle %}{% trans "Settings" %}: {{ article.current_revision.title }}{% endblock %}
{% block wiki_breadcrumbs %}
{% include "wiki/includes/breadcrumbs.html" %}
{% endblock %}
{% block wiki_contents %}
<div class="article-wrapper">
<article class="main-article">
{% if selected_tab != "edit" %}
<h1>{{ article.current_revision.title }}</h1>
{% endif %}
{% for form in forms %}
<form method="POST" class="form-horizontal" id="settings_form" action="?f={{form.action}}">
<h2>{{ form.settings_form_headline }}</h2>
<div class="well">
{% wiki_form form %}
</div>
<div class="form-actions">
<button type="submit" name="save" value="1" class="btn btn-large btn-primary">
<span class="icon-ok"></span>
{% trans "Save changes" %}
</button>
</div>
</form>
{% endfor %}
</article>
<div class="article-functions">
<div class="timestamp">
<span class="label">{% trans "Last modified:" %}</span><br />
<span class="date">{{ article.current_revision.modified }}</span>
</div>
<ul class="nav nav-tabs">
{% with "settings" as selected %}
{% include "wiki/includes/article_menu.html" %}
{% endwith %}
</ul>
</div>
</div>
{% endblock %}