-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #432 from lucky-user/master
bootstrap_modal test app
- Loading branch information
Showing
17 changed files
with
385 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
test_project/bootstrap_modal/static/bootstrap/css/bootstrap-theme.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
test_project/bootstrap_modal/static/bootstrap/css/bootstrap-theme.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test_project/bootstrap_modal/static/bootstrap/css/bootstrap.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
test_project/bootstrap_modal/static/bootstrap/css/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+19.7 KB
test_project/bootstrap_modal/static/bootstrap/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
288 changes: 288 additions & 0 deletions
288
...project/bootstrap_modal/static/bootstrap/fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.3 KB
test_project/bootstrap_modal/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file added
BIN
+22.9 KB
test_project/bootstrap_modal/static/bootstrap/fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file added
BIN
+17.6 KB
test_project/bootstrap_modal/static/bootstrap/fonts/glyphicons-halflings-regular.woff2
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
test_project/bootstrap_modal/static/bootstrap/js/bootstrap.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
test_project/bootstrap_modal/templates/bootstrap_modal/modal.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %} | ||
Bootstrap modal dialog example | ||
{% endblock %} | ||
|
||
{% block branding %} | ||
<h1 style="display: inline-block" id="site-name">Bootstrap modal dialog example</h1> | ||
{% endblock %} | ||
|
||
{% block extrahead %} | ||
<link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet"> | ||
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script> | ||
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script> | ||
{% include 'autocomplete_light/static.html' %} | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
$('#modal_autocomplete').yourlabsAutocomplete({ | ||
url: '{% url 'navigation_autocomplete' %}', | ||
choiceSelector: 'a', | ||
}).input.bind('selectChoice', function(e, choice, autocomplete) { | ||
document.location.href = choice.attr('href'); | ||
}); | ||
}); | ||
</script> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<button style="margin-bottom: 10px" type="button" | ||
class="btn btn-primary btn-block col-md-6" | ||
data-toggle="modal" data-target="#filter-modal"> | ||
Open dialog | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal fade" id="filter-modal" tabindex="-1" role="dialog" aria-labelledby="filter-modal-label" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
<h4 class="modal-title" id="filter-modal-label">Dialog</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<form id="filter-form" class="form-horizontal" method="get"> | ||
<div class="form-group"> | ||
<div class="col-md-6"> | ||
<input type="text" name="q" id="modal_autocomplete" class="form-control"> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<input form="filter-form" name="filter" type="submit" class="btn btn-primary" value="Submit"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.conf.urls import url | ||
from django.views.generic.base import TemplateView | ||
|
||
urlpatterns = [ | ||
url(r'^$', TemplateView.as_view(template_name="bootstrap_modal/modal.html"), name="bootstrap_modal"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,7 @@ | |
|
||
'navigation_autocomplete', | ||
'admin_autocomplete_in_row', | ||
'bootstrap_modal' | ||
) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters