Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
f1nality committed Aug 27, 2016
2 parents c0717c0 + e1ac685 commit bf92290
Show file tree
Hide file tree
Showing 89 changed files with 361 additions and 2,900 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
Changelog
=========

1.0.0
-----
* Fixed dashboard module buttons mobile layout misplacement
* Fixed double tap menu issue for iOS devices
* Fixed changelist footer from fixed position transition
* Fixed system messages style
* Fixed jQuery UI base styles broken image paths
* Issue-69, 72: Updated checkboxes without label UI (thanks to h00p, JuniorLima for report)
* Issue-89: Fixed multiple admin sites support (thanks to sysint64 for report)
* Added missing locale files to PyPI package (thanks to SalahAdDin for report)
* Issue-49: Fixed AppList and ModelList models/exclude parsers (thanks to eltismerino for report)
* Issue-50: Fix pinned application user filtering (thanks to eltismerino for report)
* Fixed empty branding visibility
* Fixed IE dashboard list items wrapping
* Fixed IE sidebar popup items spacing
* Fixed dashboard module wrong height after animation
* Fixed dashboard module change form breadcrumbs
* Improved paginator 'show all' layout
* Updated documentation
* Added support for filters with multiple select


0.9.1
-----
* Mobile UX improved
* Refactored and optimized locale files
* More documentation added
* Improved object tools and toolbar arrangement
* Fixed change list footer misplacement
* Fix chromium sidebar scrollbar misplacement
* Fixed chromium sidebar scrollbar misplacement
* Remove unused tags
* Prefixed JET template tags
* Fixed jet_custom_apps_example command
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ include LICENSE
recursive-include jet/locale *
recursive-include jet/static *
recursive-include jet/templates *
recursive-include jet/dashboard/locale *
recursive-include jet/dashboard/static *
recursive-include jet/dashboard/templates *
18 changes: 18 additions & 0 deletions docs/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@ If want to show all application's models use ``__all__`` keyword.
...
]
If have multiple admin sites and you want to specify different menu applications for each admin site, wrap menu lists
in dictionary with admin site names as keys:

.. code:: python
JET_SIDE_MENU_CUSTOM_APPS = {
'admin': [
('core', ['__all__']),
...
],
'custom_admin': [
('custom_admin_app', [
'CustomAdminAppModel',
]),
...
]
}
.. note::

You can use ``jet_custom_apps_example`` management command to generate example ``JET_SIDE_MENU_CUSTOM_APPS``
Expand Down
12 changes: 12 additions & 0 deletions docs/contribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ In order to be merged into Django JET, contributions must have the following:
If your contribution lacks any of these things, they will have to be added by a core contributor before
being merged into Django JET proper, which may take time to get to.

Contribution Translations
-------------------------

If you want to add new translations locale, please do not use automatic Django locale generation, because it will
produce files with missing JS strings and duplicates. Instead copy the following well formatted "en" files to your
new locale folder:

* jet/locale/LOCALE/LC_MESSAGES/django.mo
* jet/locale/LOCALE/LC_MESSAGES/djangojs.mo
* jet/dashboard/locale/LOCALE/LC_MESSAGES/django.mo
* jet/dashboard/locale/LOCALE/LC_MESSAGES/djangojs.mo

Contribution Styles/Javascript/Translations
-------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/dashboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Dashboard
.. toctree::
:maxdepth: 2

dashboard_getting_started
dashboard_custom
dashboard_modules
dashboard_custom_module
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============
Getting Started
===============
================
Custom Dashboard
================

.. note::
Django JET Dashboard tries to be as compatible as possible with django-admin-tools dashboard so that
Expand Down Expand Up @@ -63,4 +63,4 @@ Set Up Custom Dashboard
That's all, now you have dashboard with only one widget - ``LinkList``. Dashboard reset may be needed
if your had another dashboard already rendered for any user. Visit :doc:`dashboard_modules` to learn
other widgets you can add to your custom dashboard or create your own.
other widgets you can add to your custom dashboard or :doc:`dashboard_custom_module` to create your own.
2 changes: 1 addition & 1 deletion docs/dashboard_custom_module.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=======================
Custom Dashboard module
Custom Dashboard Module
=======================


Expand Down
32 changes: 27 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('es6-promise').polyfill();
var gulp = require('gulp'),
browserify = require('browserify'),
concatCss = require('gulp-concat-css'),
minifyCss = require('gulp-minify-css'),
cleanCSS = require('gulp-clean-css'),
sass = require('gulp-sass'),
uglify = require('gulp-uglify'),
buffer = require('vinyl-buffer'),
Expand All @@ -13,7 +13,8 @@ var gulp = require('gulp'),
postcss = require('gulp-postcss'),
pxtorem = require('postcss-pxtorem'),
autoprefixer = require('autoprefixer'),
shell = require('gulp-shell');
shell = require('gulp-shell'),
replace = require('gulp-replace');

var cssProcessors = [
autoprefixer(),
Expand Down Expand Up @@ -54,12 +55,31 @@ gulp.task('styles', function() {
});

gulp.task('vendor-styles', function() {
gulp.src('./node_modules/jquery-ui/themes/base/images/*')
.pipe(gulp.dest('./jet/static/jet/css/jquery-ui/images/'));

merge(
gulp.src([
'./node_modules/select2/dist/css/select2.css',
'./node_modules/jquery-ui/themes/base/all.css',
'./node_modules/timepicker/jquery.ui.timepicker.css'
]),
gulp.src([
'./node_modules/jquery-ui/themes/base/all.css'
])
.pipe(cleanCSS()) // needed to remove jQuery UI comments breaking concatCss
.on('error', function(error) {
console.error(error);
})
.pipe(concatCss('jquery-ui.css', {
rebaseUrls: false
}))
.on('error', function(error) {
console.error(error);
})
.pipe(replace('images/', 'jquery-ui/images/'))
.on('error', function(error) {
console.error(error);
}),
gulp.src([
'./node_modules/perfect-scrollbar/src/css/main.scss'
])
Expand All @@ -74,11 +94,13 @@ gulp.task('vendor-styles', function() {
.on('error', function(error) {
console.error(error);
})
.pipe(minifyCss())
.pipe(concatCss('vendor.css', {
rebaseUrls: false
}))
.on('error', function(error) {
console.error(error);
})
.pipe(concatCss('vendor.css'))
.pipe(cleanCSS())
.on('error', function(error) {
console.error(error);
})
Expand Down
2 changes: 1 addition & 1 deletion jet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.9.1'
VERSION = '1.0.0'
10 changes: 6 additions & 4 deletions jet/dashboard/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,13 @@ def init_with_context(self, context):
app_to_remove = []

for app in app_list:
app_name = app.get('app_label', app.get('name', ''))
app['models'] = filter(
lambda model: self.models is None or model['object_name'] in self.models or app.get('app_label', app.get('name')) + '.*' in self.models,
lambda model: self.models is None or ('%s.%s' % (app_name, model['object_name'])) in self.models or ('%s.*' % app_name) in self.models,
app['models']
)
app['models'] = filter(
lambda model: self.exclude is None or model['object_name'] not in self.exclude and app.get('app_label', app.get('name')) + '.*' not in self.exclude,
lambda model: self.exclude is None or (('%s.%s' % (app_name, model['object_name'])) not in self.exclude and ('%s.*' % app_name) not in self.exclude),
app['models']
)
app['models'] = list(app['models'])
Expand Down Expand Up @@ -389,12 +390,13 @@ def init_with_context(self, context):
models = []

for app in app_list:
app_name = app.get('app_label', app.get('name', ''))
app['models'] = filter(
lambda model: self.models is None or model['object_name'] in self.models or app.get('app_label', app.get('name')) + '.*' in self.models,
lambda model: self.models is None or ('%s.%s' % (app_name, model['object_name'])) in self.models or ('%s.*' % app_name) in self.models,
app['models']
)
app['models'] = filter(
lambda model: self.exclude is None or model['object_name'] not in self.exclude and app.get('app_label', app.get('name')) + '.*' not in self.exclude,
lambda model: self.exclude is None or (('%s.%s' % (app_name, model['object_name'])) not in self.exclude and ('%s.*' % app_name) not in self.exclude),
app['models']
)
app['models'] = list(app['models'])
Expand Down
16 changes: 8 additions & 8 deletions jet/dashboard/templates/jet.dashboard/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
<div class="dashboard-item{% if module.collapsible %} collapsible{% endif %}{% if module.model.collapsed %} collapsed{% endif %}{% if module.deletable %} deletable{% endif %}{% if module.ajax_load %} ajax{% endif %}"{% if module.ajax_load %} data-ajax-url="{% url "jet-dashboard:load_dashboard_module" pk=module.model.id %}"{% endif %} data-module-id="{{ module.model.id }}">
<div class="dashboard-item-header">
<span class="dashboard-item-header-drag icon-grid"></span>
<span class="dashboard-item-header-buttons">
<a href="{% url "jet-dashboard:update_module" pk=module.model.id %}" title="{% trans "Change" %}"><span class="icon-edit"></span></a>

{% if module.deletable %}
<a href="#" title="{% trans "Delete" %}" class="dashboard-item-remove"><span class="icon-cross"></span></a>
{% endif %}
</span>
<span class="dashboard-item-header-title">
{% if module.collapsible %}
<a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-down"></span></a>
Expand All @@ -14,15 +21,8 @@
{% else %}
{{ module.title }}
{% endif %}

<span class="dashboard-item-header-buttons">
<a href="{% url "jet-dashboard:update_module" pk=module.model.id %}" title="{% trans "Change" %}"><span class="icon-edit"></span></a>

{% if module.deletable %}
<a href="#" title="{% trans "Delete" %}" class="dashboard-item-remove"><span class="icon-cross"></span></a>
{% endif %}
</span>
</span>
<div class="cf"></div>
</div>

<div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}"{% if module.style %} style="{{ module.style }}"{% endif %}>
Expand Down
7 changes: 0 additions & 7 deletions jet/dashboard/templates/jet.dashboard/update_module.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n jet_tags static %}

{% block extrahead %}
{{ block.super }}
<script type="text/javascript" src="{% static "admin/js/jquery.js" %}"></script>
<script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script>
<script type="text/javascript" src="{% static "admin/js/inlines.js" %}"></script>
{% endblock %}

{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
Expand Down
13 changes: 9 additions & 4 deletions jet/static/jet/css/_changeform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,16 @@ body.popup .submit-row {
margin-right: 2px;
margin-bottom: 4px;
border-radius: 4px 0 0 4px !important;
border-right: 0 !important;
border-right-width: 0 !important;

#changelist & {
border-radius: 4px !important;
border-right-width: 1px !important;
}

@include for-width(374px) {
border-radius: 4px !important;
border-right: 1px !important;
border-right-width: 1px !important;
}

&-link {
Expand Down Expand Up @@ -536,6 +541,7 @@ body.popup .submit-row {
display: inline-block;
background: $content-contrast2-background-color;
color: $content-contrast2-text-color;
margin-right: 10px;
padding: 4px 8px;
border-radius: 5px;
font-size: 10px;
Expand All @@ -548,13 +554,12 @@ body.popup .submit-row {
vertical-align: middle;

@include for-mobile {
margin-right: 10px;
line-height: normal;
}

~ .inlinechangelink, ~ .inlineviewlink {
font-size: 18px;
margin-left: 10px;
margin-right: 10px;
vertical-align: middle;

&:before {
Expand Down
Loading

0 comments on commit bf92290

Please sign in to comment.