Skip to content

Commit deafdc2

Browse files
fsbraunvinitkumar
andauthored
feat: Styling update (django-cms#1360)
* Fix: Failing js test * Separate icons from styles * Cancel button * Move cms detection into settings.py * fix isort * Frontend based on node 16 * Styling fixes * Show order in correct order in directory listing dropdown * Fix drop-down menus * Remove unused components * Remove unused component * Django 4.0+ triggers a migration due to new naming conmventions * Add explanation to except clause for detecting icons * Add no-cover for cms-specific code * Provide own filer-specific cms 4 icons * update iconfont * Update css * Update edit button on file widget * Add expand icon, only offer canonical url if it is configured in directory listing * Bump version * fix: typo in the word * Update filer/templates/admin/filer/tools/detail_info.html Co-authored-by: Vinit Kumar <[email protected]> * Update filer/templates/admin/filer/tools/detail_info.html Co-authored-by: Vinit Kumar <[email protected]> * Update filer/templates/admin/filer/folder/directory_table_list.html Co-authored-by: Vinit Kumar <[email protected]> * Add download and rel="noreferrer noopener" to download/canonical url actions * Shorten svg literal * fix isort issue * Fix folder breadcrumbs * Add webp support * transparent webp support * Breadcrumbs now preserve directory listing type --------- Co-authored-by: Vinit Kumar <[email protected]>
1 parent 2780b6b commit deafdc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+450
-257
lines changed

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-20.04
88
strategy:
99
matrix:
10-
node-version: [14.15.x]
10+
node-version: [16.20.x]
1111

1212
steps:
1313
- uses: actions/checkout@v2

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CHANGELOG
33
=========
44

5-
unreleased
5+
3.0.0rc1
66
==================
77

88
* Only show uncategorized files to owner or superuser if permissions are active
@@ -12,6 +12,7 @@ unreleased
1212
* Add Django 4.2 support
1313
* Add thumbnail view for faster visual management of image libraries
1414
* Fix File.objects.only() query required for deleting user who own files.
15+
* Fix several css quirks
1516

1617
2.2.5 (2023-06-11)
1718
==================

docs/upgrading.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ Usually upgrade procedure is straightforward: update the package and run migrati
77
require special attention from the developer and here we provide upgrade instructions for such cases.
88

99

10+
from 2.x to 3.0
11+
---------------
12+
13+
The dependency on django-mptt is dropped as of django-filer 3.0.
14+
15+
This implies that three fields are removed from the `Folder` model:
16+
* `level`
17+
* `lft`
18+
* `rght`
19+
* `tree_id`
20+
21+
Those fields were used by django-mptt for performance optimization.
22+
23+
1024
from 0.9.1 to 0.9.2
1125
-------------------
1226

@@ -108,4 +122,4 @@ Then run this snippet in the django shell::
108122
f.save()
109123
sys.stdout.write(u'done\n')
110124

111-
Double access modification is needed to enabled automatic file move.
125+
Double access modification is needed to enabled automatic file move.

filer/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313
8. Publish the release and it will automatically release to pypi
1414
"""
1515

16-
__version__ = '2.3rc1'
16+
__version__ = '3.0.0rc1'
17+
18+
default_app_config = 'filer.apps.FilerConfig'

filer/admin/fileadmin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class FileAdmin(PrimitivePermissionAwareModelAdmin):
2626
list_display = ('label',)
2727
list_per_page = 10
2828
search_fields = ['name', 'original_filename', 'sha1', 'description']
29-
raw_id_fields = ('owner',)
29+
autocomplete_fields = ('owner',)
3030
readonly_fields = ('sha1', 'display_canonical')
3131

3232
form = FileAdminChangeFrom

filer/fields/file.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from .. import settings as filer_settings
1616
from ..models import File
17+
from ..settings import ICON_CSS_LIB
1718
from ..utils.compatibility import truncate_words
1819
from ..utils.model_label import get_model_label
1920

@@ -88,9 +89,9 @@ def obj_for_value(self, value):
8889
class Media:
8990
extra = '' if settings.DEBUG else '.min'
9091
css = {
91-
'all': [
92+
'all': (
9293
'filer/css/admin_filer.css',
93-
]
94+
) + ICON_CSS_LIB,
9495
}
9596
js = (
9697
'admin/js/vendor/jquery/jquery%s.js' % extra,

filer/management/commands/import_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def import_file(self, file_obj, folder):
2929
iext = os.path.splitext(file_obj.name)[1].lower()
3030
except: # noqa
3131
iext = ''
32-
if iext in ['.jpg', '.jpeg', '.png', '.gif']:
32+
if iext in ['.jpg', '.jpeg', '.png', '.gif', '.webp']:
3333
obj, created = Image.objects.get_or_create(
3434
original_filename=file_obj.name,
3535
file=file_obj,

filer/migrations/0015_alter_file_owner_alter_file_polymorphic_ctype_and_more.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 4.0.3 on 2022-04-12 12:20
1+
# Generated by Django 4.1.9 on 2023-06-15 20:03
22

33
import django.db.models.deletion
44
from django.conf import settings

filer/models/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Meta:
7777
@classmethod
7878
def matches_file_type(cls, iname, ifile, mime_type):
7979
# source: https://www.freeformatter.com/mime-types-list.html
80-
image_subtypes = ['gif', 'jpeg', 'png', 'x-png', 'svg+xml']
80+
image_subtypes = ['gif', 'jpeg', 'png', 'x-png', 'svg+xml', 'webp']
8181
maintype, subtype = mime_type.split('/')
8282
return maintype == 'image' and subtype in image_subtypes
8383

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// @import "components/iconography";
2+
3+
@import "components/iconography";

0 commit comments

Comments
 (0)