diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 2467b9d..7cbdde2 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -66,7 +66,7 @@ Ready to contribute? Here's how to set up `django-ckeditor-filebrowser-filer` fo
$ mkvirtualenv django-ckeditor-filebrowser-filer
$ cd django-ckeditor-filebrowser-filer/
- $ python setup.py develop
+ $ python3 -m pip install -e .
4. Create a branch for local development::
@@ -78,7 +78,7 @@ Now you can make your changes locally.
tests, including testing other Python versions with tox::
$ flake8 ckeditor_filebrowser_filer tests
- $ python setup.py test
+ $ python3 setup.py test
$ tox
To get flake8 and tox, just pip install them into your virtualenv.
@@ -109,4 +109,4 @@ Tips
To run a subset of tests::
- $ python -m unittest tests.test_ckeditor_filebrowser_filer
+ $ python3 -m unittest tests.test_ckeditor_filebrowser_filer
diff --git a/README.rst b/README.rst
index 8a0feb9..332d916 100644
--- a/README.rst
+++ b/README.rst
@@ -9,9 +9,9 @@ A django-filer based CKEditor filebrowser
Supported versions
==================
-Python: 2.7, 3.5, 3.6, 2.7
+Python: 3.7 to 3.11
-Django: 1.11 to 2.1
+Django: 3.2 to 4.2
django-filer: 1.2 and above
diff --git a/ckeditor_filebrowser_filer/static/ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js b/ckeditor_filebrowser_filer/static/ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
index 0200ff6..454d6bf 100644
--- a/ckeditor_filebrowser_filer/static/ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
+++ b/ckeditor_filebrowser_filer/static/ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
@@ -40,7 +40,6 @@
' ' +
'' +
- '
' +
'' +
'
' +
'
' +
@@ -135,20 +134,8 @@
var extra_items = [
{
type: 'hbox',
- widths: [ '33%', '33%', '33%' ],
+ widths: [ '50%', '50%' ],
children: [
- {
- type: 'checkbox',
- id: 'use_original_image',
- label: lang.useOriginal,
- setup: function (element) {
- this.setValue(element.getAttribute('original_image'));
- },
- // Called by the main commitContent call on dialog confirmation.
- commit: function (element) {
- element.setAttribute('original_image', this.getValue());
- }
- },
{
type: 'text',
id: 'width',
@@ -158,7 +145,6 @@
var ratio = this.getValue() / imageWidth; // get ratio for scaling image
dialog.getContentElement('tab-basic', 'height').setValue(Math.ceil(imageHeight * ratio));
}
-
//getImageUrl();
},
setup: function (element) {
@@ -187,6 +173,23 @@
]
},
{
+ type: 'hbox',
+ widths: [ '100%'],
+ children: [
+ {
+ type: 'checkbox',
+ id: 'use_original_image',
+ label: lang.useOriginal,
+ setup: function (element) {
+ this.setValue(element.getAttribute('original_image'));
+ },
+ // Called by the main commitContent call on dialog confirmation.
+ commit: function (element) {
+ element.setAttribute('original_image', this.getValue());
+ }
+ }
+ ]
+ }, {
type: 'hbox',
widths: [ '33%', '33%', '33%' ],
children: [
diff --git a/ckeditor_filebrowser_filer/static/djangocms_text_ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js b/ckeditor_filebrowser_filer/static/djangocms_text_ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
index 0200ff6..699f2a6 100644
--- a/ckeditor_filebrowser_filer/static/djangocms_text_ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
+++ b/ckeditor_filebrowser_filer/static/djangocms_text_ckeditor/ckeditor/plugins/filerimage/dialogs/filerImageDialog.js
@@ -40,7 +40,6 @@
' ' +
'' +
- '
' +
'' +
'
' +
'
' +
@@ -135,20 +134,8 @@
var extra_items = [
{
type: 'hbox',
- widths: [ '33%', '33%', '33%' ],
+ widths: [ '50%', '50%' ],
children: [
- {
- type: 'checkbox',
- id: 'use_original_image',
- label: lang.useOriginal,
- setup: function (element) {
- this.setValue(element.getAttribute('original_image'));
- },
- // Called by the main commitContent call on dialog confirmation.
- commit: function (element) {
- element.setAttribute('original_image', this.getValue());
- }
- },
{
type: 'text',
id: 'width',
@@ -158,7 +145,6 @@
var ratio = this.getValue() / imageWidth; // get ratio for scaling image
dialog.getContentElement('tab-basic', 'height').setValue(Math.ceil(imageHeight * ratio));
}
-
//getImageUrl();
},
setup: function (element) {
@@ -186,6 +172,24 @@
}
]
},
+ {
+ type: 'hbox',
+ widths: [ '100%'],
+ children: [
+ {
+ type: 'checkbox',
+ id: 'use_original_image',
+ label: lang.useOriginal,
+ setup: function (element) {
+ this.setValue(element.getAttribute('original_image'));
+ },
+ // Called by the main commitContent call on dialog confirmation.
+ commit: function (element) {
+ element.setAttribute('original_image', this.getValue());
+ }
+ }
+ ]
+ },
{
type: 'hbox',
widths: [ '33%', '33%', '33%' ],
diff --git a/setup.cfg b/setup.cfg
index 6acaee9..8424400 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -28,6 +28,7 @@ classifiers =
include_package_data = True
install_requires =
django-filer>=1.3
+ django-ckeditor>=6.6.1
setup_requires =
setuptools
packages = ckeditor_filebrowser_filer