* started workin on 'navbar' module

* changed bootstrap theme to bootswatch/Simplex

* big work on navbar logic

* starting creating menus using navbar

* converted app views to new Wepage decorator, updated navbar

* reimplemented DernieresMaraudes as a dropdown instead of ContextMixin

* reorganised static files, minor code cleanups

* turned Link.href into lazy-evaluated property

* collapsed 'navbar' module into 'website', dynamic building of ApplicationMenu subclasses

* minor cleanup

* blah blah blah

* added way to add admin/non-admin links

* minor style change : red border for active page instead of all dropdowns

* deleted file

* prepare adding removing menu templates files, being replaced by code

* essayé de généraliser le code pour les modaux bootstrap, non testé git status

* more preparation and thinking on navbar app_menus logic...

* added LinkManager and DropdownManager, getting closer...

* small fix in DropdownManager.__get__

* boosted up work: keep it simple so it can be merged fast, major layout changes

* added month filter on maraudes:liste

* added 'as_icon' filter to display boolean/null values as bootstrap icons

* remove inactive user from planning selection

* removed all unused 'menu' templates

* set up django_select2 to use static files

* small fix after review
This commit is contained in:
artus40
2017-02-11 18:20:13 +01:00
committed by GitHub
parent 288ca2cc20
commit 0be59a61a7
61 changed files with 665 additions and 525 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,23 +1,19 @@
#menu {
border: none;
border-right: 4px solid #980300;
}
.dropdown-toggle{
border-right: 4px solid #980300 !important;
}
.dropdown-menu {
border-bottom: none !important;
}
.navbar-fixed-side .navbar-nav>li>a {
border-bottom: none;
font-variant: small-caps;
color: #fff;
}
#menu {
border: none;
border-right: 4px solid #980300;
background-color: #121212;
}
@media (max-width:768px){
#menu { border: none; }
}
.app-menu {
background-color: #121212;
@@ -25,10 +21,12 @@
}
@media (max-width:768px){
#menu { border: none; }
.active{
border-right: 2px solid #980300 !important;
}
.jumbotron {
background-color: #fefefe;
.dropdown-menu {
border-bottom: none !important;
}

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

1
website/static/css/select2.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,21 +0,0 @@
/* Maraudes application base stylesheet */
.rencontre {
background-color: #efefef;
width:100%;
border: 5px dotted white;
margin:2px;
margin-bottom:8px;
font-family: Arial;
}
.header td {
color: white;
background-color: black;
text-align:center;
font-weight:bold;
font-family: Arial;
padding: 2px;
}

View File

@@ -0,0 +1,43 @@
/* Lier les boutons de création
* Thanks to Derek Morgan, https://dmorgan.info/posts/django-views-bootstrap-modals/
*/
;(function($) {
var formAjaxSubmit = function(form, modal)
{
$(form).submit(function (e) {
e.preventDefault();
$.ajax({
type: $(this).attr('method'),
url: $(this).attr('action'),
data: $(this).serialize(),
success: function (xhr, ajaxOptions, thrownError) {
if ( $(xhr).find('.has-error').length > 0 || $(xhr).find('.alert-danger').length > 0) {
$(modal).find('.modal-body').html(xhr);
formAjaxSubmit(form, modal);
} else {
$(modal).modal('toggle');
// Reload page ?
location.reload()
}
},
error: function (xhr, ajaxOptions, thrownError) {
// handle response errors here
}
});
});
};
$.fn.openModalEvent = function(id, href, title)
{
$('#'+id).click(function() {
$('#form-modal-body').load(href, function()
{
$('.modal-title').text(title);
$('#form-modal').modal('toggle');
formAjaxSubmit("#form-modal-body form", "#form-modal");
});
});
};
})(jQuery);

5
website/static/scripts/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
website/static/scripts/select2.min.js vendored Normal file

File diff suppressed because one or more lines are too long