Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 520dceaa97 | |||
| 2fa85eb964 | |||
| 3bc6e6fe3b | |||
| 3dc31df5f1 | |||
| 8ded8e160b | |||
| f4e5662e49 | |||
| dba9c35ac8 | |||
| 3431565f74 | |||
| 6a42df67b1 | |||
| 593709808f | |||
| 3a2b59f7cc | |||
| b7d9b969b4 | |||
| cacf0e0534 | |||
| e2239dcb99 | |||
| c769a449f2 | |||
| 3cff729a8a | |||
| c44db23b31 | |||
| 485f5400db | |||
| a2329fdae5 | |||
| a388ec234c | |||
| a3b3f8922d | |||
| 6b6eed3aa0 | |||
| fd48e5ca97 | |||
| fbc29246ff | |||
| 1569828c67 | |||
| bb73fafeff | |||
| f76a41ff14 |
@@ -0,0 +1,71 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '26 21 * * 0'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'javascript', 'python' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
@@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.18.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.2) - 2021-10-25
|
||||||
|
- Fixed migration error.
|
||||||
|
|
||||||
|
## [0.18.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.1) - 2021-10-25
|
||||||
|
- Removed wrong migration.
|
||||||
|
|
||||||
|
## [0.18.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.0) - 2021-10-24
|
||||||
|
- Added foldable apps support. #117
|
||||||
|
- Removed `css` field from `Theme` model.
|
||||||
|
|
||||||
|
## [0.17.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.3) - 2021-10-12
|
||||||
|
- Fixed `FileExtensionValidator` `TypeError` on django < 1.11.
|
||||||
|
|
||||||
|
## [0.17.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.2) - 2021-10-08
|
||||||
|
- Fixed `FileExtensionValidator` `TypeError` on django < 1.11.
|
||||||
|
|
||||||
|
## [0.17.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.1) - 2021-09-24
|
||||||
|
- Fixed `TemplateDoesNotExist` error on `django==4.0.a1` removing checking condition for `colorfield` package. #134
|
||||||
|
- Fixed favicon fetching incompatible with `django-storages` `S3`. #128
|
||||||
|
|
||||||
|
## [0.17.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.0) - 2021-09-16
|
||||||
|
- Added `logo_max_width` and `logo_max_height`. #127
|
||||||
|
|
||||||
|
## [0.16.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.4) - 2021-09-04
|
||||||
|
- Fixed `0020_module_selected_colors` migration for multiple dbs. #132
|
||||||
|
- Fixed sticky pagination `width` and `border-bottom`.
|
||||||
|
- Fixed inlines vertical overlow.
|
||||||
|
- Improved header elements vertical alignment.
|
||||||
|
|
||||||
## [0.16.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.3) - 2021-04-26
|
## [0.16.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.3) - 2021-04-26
|
||||||
- Added `compat` module.
|
- Added `compat` module.
|
||||||
- Added missing `0021_file_extension_validator` migration. #126
|
- Added missing `0021_file_extension_validator` migration. #126
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
|||||||
- Environment name/marker
|
- Environment name/marker
|
||||||
- Language chooser
|
- Language chooser
|
||||||
- List filter dropdown
|
- List filter dropdown
|
||||||
|
- `NEW` **Foldable apps** *(accordions in the navigation bar)*
|
||||||
- `NEW` **List filter sticky**
|
- `NEW` **List filter sticky**
|
||||||
- `NEW` **Form controls sticky** *(pagination and save/delete buttons)*
|
- `NEW` **Form controls sticky** *(pagination and save/delete buttons)*
|
||||||
- Compatibility / Style optimizations for:
|
- Compatibility / Style optimizations for:
|
||||||
@@ -51,7 +52,9 @@ INSTALLED_APPS = (
|
|||||||
#...
|
#...
|
||||||
)
|
)
|
||||||
|
|
||||||
X_FRAME_OPTIONS='SAMEORIGIN' # only if django version >= 3.0
|
# only if django version >= 3.0
|
||||||
|
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||||
|
SILENCED_SYSTEM_CHECKS = ['security.W019']
|
||||||
```
|
```
|
||||||
- Run ``python manage.py migrate``
|
- Run ``python manage.py migrate``
|
||||||
- Run ``python manage.py collectstatic``
|
- Run ``python manage.py collectstatic``
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ class ThemeAdmin(admin.ModelAdmin):
|
|||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': (
|
'fields': (
|
||||||
'logo',
|
'logo',
|
||||||
|
'logo_max_width',
|
||||||
|
'logo_max_height',
|
||||||
'logo_color',
|
'logo_color',
|
||||||
'logo_visible',
|
'logo_visible',
|
||||||
)
|
)
|
||||||
@@ -98,6 +100,12 @@ class ThemeAdmin(admin.ModelAdmin):
|
|||||||
'css_delete_button_text_color',
|
'css_delete_button_text_color',
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
|
(_('Navigation Bar'), {
|
||||||
|
'classes': ('wide', ),
|
||||||
|
'fields': (
|
||||||
|
'foldable_apps',
|
||||||
|
)
|
||||||
|
}),
|
||||||
(_('Related Modal'), {
|
(_('Related Modal'), {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': (
|
'fields': (
|
||||||
|
|||||||
@@ -12,4 +12,7 @@ else:
|
|||||||
if django.VERSION >= (1, 11):
|
if django.VERSION >= (1, 11):
|
||||||
from django.core.validators import FileExtensionValidator
|
from django.core.validators import FileExtensionValidator
|
||||||
else:
|
else:
|
||||||
FileExtensionValidator = lambda allowed_extensions: None
|
def FileExtensionValidator(*args, **kwargs):
|
||||||
|
def noop(*args, **kwargs):
|
||||||
|
pass
|
||||||
|
return noop
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
"css_delete_button_background_color": "#D9534F",
|
"css_delete_button_background_color": "#D9534F",
|
||||||
"css_delete_button_background_hover_color": "#C9302C",
|
"css_delete_button_background_hover_color": "#C9302C",
|
||||||
"css_delete_button_text_color": "#FFFFFF",
|
"css_delete_button_text_color": "#FFFFFF",
|
||||||
"css": "",
|
|
||||||
"related_modal_active": true,
|
"related_modal_active": true,
|
||||||
"related_modal_background_color": "#503873",
|
"related_modal_background_color": "#503873",
|
||||||
"related_modal_background_opacity": 0.2,
|
"related_modal_background_opacity": 0.2,
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
"css_delete_button_background_color": "#BA2121",
|
"css_delete_button_background_color": "#BA2121",
|
||||||
"css_delete_button_background_hover_color": "#A41515",
|
"css_delete_button_background_hover_color": "#A41515",
|
||||||
"css_delete_button_text_color": "#FFFFFF",
|
"css_delete_button_text_color": "#FFFFFF",
|
||||||
"css": "",
|
|
||||||
"related_modal_active": true,
|
"related_modal_active": true,
|
||||||
"related_modal_background_color": "#000000",
|
"related_modal_background_color": "#000000",
|
||||||
"related_modal_background_opacity": 0.2,
|
"related_modal_background_opacity": 0.2,
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
"css_delete_button_background_color": "#CC4B37",
|
"css_delete_button_background_color": "#CC4B37",
|
||||||
"css_delete_button_background_hover_color": "#BF4634",
|
"css_delete_button_background_hover_color": "#BF4634",
|
||||||
"css_delete_button_text_color": "#FFFFFF",
|
"css_delete_button_text_color": "#FFFFFF",
|
||||||
"css": "",
|
|
||||||
"related_modal_active": true,
|
"related_modal_active": true,
|
||||||
"related_modal_background_color": "#000000",
|
"related_modal_background_color": "#000000",
|
||||||
"related_modal_background_opacity": 0.2,
|
"related_modal_background_opacity": 0.2,
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
"css_delete_button_background_color": "#CD2026",
|
"css_delete_button_background_color": "#CD2026",
|
||||||
"css_delete_button_background_hover_color": "#981B1E",
|
"css_delete_button_background_hover_color": "#981B1E",
|
||||||
"css_delete_button_text_color": "#FFFFFF",
|
"css_delete_button_text_color": "#FFFFFF",
|
||||||
"css": "",
|
|
||||||
"related_modal_active": true,
|
"related_modal_active": true,
|
||||||
"related_modal_background_color": "#000000",
|
"related_modal_background_color": "#000000",
|
||||||
"related_modal_background_opacity": 0.8,
|
"related_modal_background_opacity": 0.8,
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
"css_delete_button_background_color": "#BA2121",
|
"css_delete_button_background_color": "#BA2121",
|
||||||
"css_delete_button_background_hover_color": "#A41515",
|
"css_delete_button_background_hover_color": "#A41515",
|
||||||
"css_delete_button_text_color": "#FFFFFF",
|
"css_delete_button_text_color": "#FFFFFF",
|
||||||
"css": "",
|
|
||||||
"related_modal_active": true,
|
"related_modal_active": true,
|
||||||
"related_modal_background_color": "#000000",
|
"related_modal_background_color": "#000000",
|
||||||
"related_modal_background_opacity": 0.2,
|
"related_modal_background_opacity": 0.2,
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ import colorfield.fields
|
|||||||
|
|
||||||
def default_link_selected(apps, schema_editor):
|
def default_link_selected(apps, schema_editor):
|
||||||
Theme = apps.get_model("admin_interface", "Theme")
|
Theme = apps.get_model("admin_interface", "Theme")
|
||||||
Theme.objects.update(
|
db_alias = schema_editor.connection.alias
|
||||||
|
Theme.objects.using(db_alias).update(
|
||||||
css_module_link_selected_color=F('css_module_link_color'))
|
css_module_link_selected_color=F('css_module_link_color'))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('admin_interface', '0021_file_extension_validator'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='logo_max_height',
|
||||||
|
field=models.PositiveSmallIntegerField(blank=True, default=100, verbose_name='max height'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='logo_max_width',
|
||||||
|
field=models.PositiveSmallIntegerField(blank=True, default=400, verbose_name='max width'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('admin_interface', '0022_add_logo_max_width_and_height'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='foldable_apps',
|
||||||
|
field=models.BooleanField(default=True, verbose_name='foldable apps'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('admin_interface', '0023_theme_foldable_apps'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='theme',
|
||||||
|
name='css',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -103,6 +103,14 @@ class Theme(models.Model):
|
|||||||
help_text='#FFFFFF',
|
help_text='#FFFFFF',
|
||||||
max_length=10,
|
max_length=10,
|
||||||
verbose_name=_('color'))
|
verbose_name=_('color'))
|
||||||
|
logo_max_width = models.PositiveSmallIntegerField(
|
||||||
|
blank=True,
|
||||||
|
default=400,
|
||||||
|
verbose_name=_('max width'))
|
||||||
|
logo_max_height = models.PositiveSmallIntegerField(
|
||||||
|
blank=True,
|
||||||
|
default=100,
|
||||||
|
verbose_name=_('max height'))
|
||||||
logo_visible = models.BooleanField(
|
logo_visible = models.BooleanField(
|
||||||
default=True,
|
default=True,
|
||||||
verbose_name=_('visible'))
|
verbose_name=_('visible'))
|
||||||
@@ -261,10 +269,6 @@ class Theme(models.Model):
|
|||||||
max_length=10,
|
max_length=10,
|
||||||
verbose_name=_('text color'))
|
verbose_name=_('text color'))
|
||||||
|
|
||||||
css = models.TextField(
|
|
||||||
blank=True,
|
|
||||||
verbose_name=_('text color'))
|
|
||||||
|
|
||||||
related_modal_active = models.BooleanField(
|
related_modal_active = models.BooleanField(
|
||||||
default=True,
|
default=True,
|
||||||
verbose_name=_('active'))
|
verbose_name=_('active'))
|
||||||
@@ -305,6 +309,10 @@ class Theme(models.Model):
|
|||||||
default=True,
|
default=True,
|
||||||
verbose_name=_('sticky position'))
|
verbose_name=_('sticky position'))
|
||||||
|
|
||||||
|
foldable_apps = models.BooleanField(
|
||||||
|
default=True,
|
||||||
|
verbose_name=_('foldable apps'))
|
||||||
|
|
||||||
recent_actions_visible = models.BooleanField(
|
recent_actions_visible = models.BooleanField(
|
||||||
default=True,
|
default=True,
|
||||||
verbose_name=_('visible'))
|
verbose_name=_('visible'))
|
||||||
|
|||||||
@@ -23,6 +23,5 @@ def check_installed_app(app, app_dj_version_limit):
|
|||||||
|
|
||||||
|
|
||||||
def check_installed_apps():
|
def check_installed_apps():
|
||||||
check_installed_app('colorfield', (4, 0))
|
|
||||||
check_installed_app('flat', (1, 9))
|
check_installed_app('flat', (1, 9))
|
||||||
check_installed_app('flat_responsive', (2, 0))
|
check_installed_app('flat_responsive', (2, 0))
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
.admin-interface.foldable-apps [class^="app-"].module {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module.foldable-apps-ready {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module > table > caption {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
/* pointer-events: none; */
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-touch-callout: none; /* iOS Safari */
|
||||||
|
-webkit-user-select: none; /* Safari */
|
||||||
|
-khtml-user-select: none; /* Konqueror HTML */
|
||||||
|
-moz-user-select: none; /* Firefox */
|
||||||
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||||
|
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module > table > caption > a {
|
||||||
|
display: inline-block;
|
||||||
|
/* pointer-events: all !important; */
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module > table > caption::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 10;
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
content: "−";
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-align: center;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: all !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module > table > caption::after {
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module > table {
|
||||||
|
display: table;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module.collapsed {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module.collapsed > table > caption::after {
|
||||||
|
content: "+";
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface.foldable-apps [class^="app-"].module.collapsed > table > tbody {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
(function() {
|
||||||
|
window.onload = function() {
|
||||||
|
for (let moduleEl of document.querySelectorAll('.admin-interface.foldable-apps [class^="app-"].module')) {
|
||||||
|
// apply collapsed value from localstorage value
|
||||||
|
let moduleAppClass = null;
|
||||||
|
let moduleCollapsedClass = 'collapsed';
|
||||||
|
moduleEl.classList.forEach(function(className) {
|
||||||
|
if (className.startsWith('app-')) {
|
||||||
|
moduleAppClass = className;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (moduleAppClass) {
|
||||||
|
let moduleAppKey = 'admin-interface.foldable-apps_' + moduleAppClass + '_collapsed';
|
||||||
|
let moduleCollapsed = Boolean(parseInt((localStorage.getItem(moduleAppKey) || 0)) || 0);
|
||||||
|
if (moduleCollapsed === true) {
|
||||||
|
moduleEl.classList.add(moduleCollapsedClass);
|
||||||
|
} else {
|
||||||
|
moduleEl.classList.remove(moduleCollapsedClass);
|
||||||
|
}
|
||||||
|
// attach click for togggle collapsed class
|
||||||
|
for (let captionEl of moduleEl.querySelectorAll('caption')) {
|
||||||
|
captionEl.onclick = function(event) {
|
||||||
|
// only when not clicking on the app name link
|
||||||
|
if (event.target.tagName.toLowerCase() === 'caption') {
|
||||||
|
moduleEl.classList.toggle(moduleCollapsedClass);
|
||||||
|
moduleCollapsed = moduleEl.classList.contains(moduleCollapsedClass);
|
||||||
|
localStorage.setItem(moduleAppKey, (moduleCollapsed ? 1 : 0));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
moduleEl.classList.add('foldable-apps-ready');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
@@ -29,11 +29,6 @@ https://github.com/fabiocaccamo/django-admin-interface
|
|||||||
{% include "admin_interface/css/tinymce.css" %}
|
{% include "admin_interface/css/tinymce.css" %}
|
||||||
{% include "admin_interface/css/json-widget.css" %}
|
{% include "admin_interface/css/json-widget.css" %}
|
||||||
{% include "admin_interface/css/rtl.css" %}
|
{% include "admin_interface/css/rtl.css" %}
|
||||||
|
|
||||||
{% if theme.css %}
|
|
||||||
{{ theme.css|safe }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% if current_lang == 'fa' %}
|
{% if current_lang == 'fa' %}
|
||||||
@@ -51,10 +46,22 @@ https://github.com/fabiocaccamo/django-admin-interface
|
|||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?v={{ version }}">
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?v={{ version }}">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive_rtl.css' %}?v={{ version }}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive_rtl.css' %}?v={{ version }}" />
|
||||||
{% include "admin_interface/favicon.html" %}
|
{% include "admin_interface/favicon.html" %}
|
||||||
|
{% include "admin_interface/foldable-apps.html" %}
|
||||||
{% include "admin_interface/related-modal.html" %}
|
{% include "admin_interface/related-modal.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block bodyclass %}admin-interface flat-theme {% get_admin_interface_theme as theme %}{% if theme.name %}{{ theme.name|slugify }}-theme{% endif %}{% if theme.form_submit_sticky %} sticky-submit {% endif %}{% if theme.form_pagination_sticky %} sticky-pagination {% endif %}{% endblock %}
|
{% block extrahead %}
|
||||||
|
{{ block.super }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block bodyclass %}
|
||||||
|
{% get_admin_interface_theme as theme %}
|
||||||
|
flat-theme admin-interface
|
||||||
|
{% if theme.name %} {{ theme.name|slugify }}-theme {% endif %}
|
||||||
|
{% if theme.foldable_apps %} foldable-apps {% endif %}
|
||||||
|
{% if theme.form_submit_sticky %} sticky-submit {% endif %}
|
||||||
|
{% if theme.form_pagination_sticky %} sticky-pagination {% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block branding %}
|
{% block branding %}
|
||||||
{% get_admin_interface_theme as theme %}
|
{% get_admin_interface_theme as theme %}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface.login #header {
|
.admin-interface.login #header {
|
||||||
|
min-height: auto;
|
||||||
padding: 10px 30px;
|
padding: 10px 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -40,7 +41,6 @@
|
|||||||
|
|
||||||
.admin-interface.login #header #branding h1 img.logo+span {
|
.admin-interface.login #header #branding h1 img.logo+span {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface.login #login-form {
|
.admin-interface.login #login-form {
|
||||||
@@ -77,18 +77,16 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: start;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:1024px) {
|
@media (max-width:1024px) {
|
||||||
.admin-interface #header {
|
.admin-interface #header {
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface #branding h1 img.logo {
|
.admin-interface #branding h1 img.logo {
|
||||||
max-width: 400px;
|
|
||||||
max-height:100px;
|
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
margin-right:15px;
|
margin-right:15px;
|
||||||
@@ -103,13 +101,28 @@
|
|||||||
|
|
||||||
.admin-interface #branding h1 span {
|
.admin-interface #branding h1 span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface #branding h1 img.logo+span {
|
.admin-interface #branding h1 img.logo+span {
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-interface #user-tools {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface #user-tools br {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.admin-interface #user-tools br {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.admin-interface fieldset.collapse {
|
.admin-interface fieldset.collapse {
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
@@ -313,6 +326,7 @@ body.admin-interface .paginator a.showall:visited {
|
|||||||
/* begin fix tabular inlines horizontal scroll */
|
/* begin fix tabular inlines horizontal scroll */
|
||||||
.admin-interface .inline-related.tabular {
|
.admin-interface .inline-related.tabular {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
.admin-interface .inline-related.tabular fieldset.module {
|
.admin-interface .inline-related.tabular fieldset.module {
|
||||||
display: contents;
|
display: contents;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
@media (min-width:1280px) {
|
@media (min-width:1280px) {
|
||||||
.admin-interface.sticky-pagination.change-list:not(.popup) #main.shifted > #nav-sidebar + .content .paginator {
|
.admin-interface.sticky-pagination.change-list:not(.popup) #main.shifted > #nav-sidebar + .content .paginator {
|
||||||
width: calc(100% - 359px);
|
width: calc(100% - 360px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-top: 1px solid #EEEEEE;
|
border-top: 1px solid #EEEEEE;
|
||||||
border-bottom: none;
|
border-bottom: none !important;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% if theme.favicon %}
|
{% if theme.favicon %}
|
||||||
<link rel="icon" href="{{ theme.favicon.url }}?v={{ version }}">
|
<link rel="icon" href="{{ theme.favicon.url }}">
|
||||||
{% if theme.env_visible_in_favicon %}
|
{% if theme.env_visible_in_favicon %}
|
||||||
<script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?v={{ version }}"></script>
|
<script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?v={{ version }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% if theme.foldable_apps %}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/foldable-apps/foldable-apps.css' %}?v={{ version }}">
|
||||||
|
<script type="text/javascript" src="{% static 'admin_interface/foldable-apps/foldable-apps.js' %}?v={{ version }}"></script>
|
||||||
|
{% endif %}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = '0.16.3'
|
__version__ = '0.18.2'
|
||||||
|
|||||||
Reference in New Issue
Block a user