Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Fixed) various fixes #57

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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.
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
'&nbsp;<span id="id_image' + idSuffix + '_description_txt" class="description_text"></span>' +
'<a onclick="return showRelatedObjectLookupPopup(this);" title="' + lang.browse +'" id="lookup_id_image' + idSuffix + '" ' +
'data-id="id_image' + idSuffix + '" class="related-lookup js-related-lookup" href="' + base_admin + '/filer/folder/last/?' + picker+ '">' +
'<img width="16" height="16" alt="' + lang.browse +'" src="' + base_static + '/admin/img/icon_searchbox.png">' +
'</a>' +
'<img width="10" height="10" title="' + lang.clear + '" alt="' + lang.clear + '" src="' + base_static + '/admin/img/icon_deletelink.gif" id="id_image' + idSuffix + '_clear">' +
'<br><input type="hidden" id="id_image' + idSuffix + '" data-id="id_image' + idSuffix + '" name="image" class="vForeignKeyRawIdAdminField">' +
Expand Down Expand Up @@ -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',
Expand All @@ -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) {
Expand Down Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
'&nbsp;<span id="id_image' + idSuffix + '_description_txt" class="description_text"></span>' +
'<a onclick="return showRelatedObjectLookupPopup(this);" title="' + lang.browse +'" id="lookup_id_image' + idSuffix + '" ' +
'data-id="id_image' + idSuffix + '" class="related-lookup js-related-lookup" href="' + base_admin + '/filer/folder/last/?' + picker+ '">' +
'<img width="16" height="16" alt="' + lang.browse +'" src="' + base_static + '/admin/img/icon_searchbox.png">' +
'</a>' +
'<img width="10" height="10" title="' + lang.clear + '" alt="' + lang.clear + '" src="' + base_static + '/admin/img/icon_deletelink.gif" id="id_image' + idSuffix + '_clear">' +
'<br><input type="hidden" id="id_image' + idSuffix + '" data-id="id_image' + idSuffix + '" name="image" class="vForeignKeyRawIdAdminField">' +
Expand Down Expand Up @@ -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',
Expand All @@ -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) {
Expand Down Expand Up @@ -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%' ],
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down