Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Fixed #110 #132

Merged
merged 2 commits into from
Jan 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 17 additions & 16 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ Changelog
1.2.0 (unreleased)
==================

* Fixed an issue with collapse styles from image plugin overriding bootstrap
styles already on the page
* Fixed an issue with dropzone strings visible inside djangocms-text-ckeditor
image preview under certain circumstances
* Added test framework
* Adapted root files such as ``README``, ``CHANGELOG``, ``setup.py`` and others
to conform with other core addons such as django CMS Picture
* Adapted labels and help texts of several plugins
* Added Django 1.10 support
* Added <code> plugin
* Added <cite> plugin to <blockquote>
* Added responsive plugin to set device and print breakpoints
Expand All @@ -23,20 +16,28 @@ Changelog
* Added default CKEditor "styleSet" to load via djangocms-text-ckeditor in
``/static/aldryn_bootstrap3/js/ckeditor.js``
* Added transifex integration for translations
* Set all max_values to 255
* Added test framework
* Changed root files such as ``README``, ``CHANGELOG``, ``setup.py`` and others
to conform with other core addons such as django CMS Picture
* Changed labels and help texts of several plugins
* Changed all max_values to 255
* Changed code to reflect Bootstrap 3's documentation
* Fixed an issue with collapse styles from image plugin overriding bootstrap
styles already on the page
* Fixed an issue with dropzone strings visible inside djangocms-text-ckeditor
image preview under certain circumstances
* Fixed an issue where column offset, push and pull did not accept "0" as a value
* Restructured code to reflect Bootstrap 3's documentation
* Simplified and removed constants such as ``LABEL_CONTEXT_CHOICES``,
``LABEL_CONTEXT_DEFAULT``, ,``TEXT_LINK_CONTEXT_CHOICES``,
``TXT_LINK_CONTEXT_DEFAULT``, ``PANEL_CONTEXT_CHOICES``,
``PANEL_CONTEXT_DEFAULT``, ``ACCORDION_ITEM_CONTEXT_CHOICES``,
``ACCORDION_ITEM_CONTEXT_DEFAULT``, ``LIST_GROUP_ITEM_CONTEXT_CHOICES``,
``LIST_GROUP_ITEM_CONTEXT_DEFAULT``
* **Backwards incompatible** changes:
* The Panel only allows header, body and footer now to be its direct
decendands and the descendends require the "Panel" parent.
* Drag & drop support has been removed from the rendered plugin markup
until a cleaner version is ready
* Simplified and removed constants such as ``LABEL_CONTEXT_CHOICES``,
``LABEL_CONTEXT_DEFAULT``, ,``TEXT_LINK_CONTEXT_CHOICES``,
``TXT_LINK_CONTEXT_DEFAULT``, ``PANEL_CONTEXT_CHOICES``,
``PANEL_CONTEXT_DEFAULT``, ``ACCORDION_ITEM_CONTEXT_CHOICES``,
``ACCORDION_ITEM_CONTEXT_DEFAULT``, ``LIST_GROUP_ITEM_CONTEXT_CHOICES``,
``LIST_GROUP_ITEM_CONTEXT_DEFAULT``


1.1.2 (2016-09-05)
Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ One of the easiest contributions you can make is helping to translate this addon
Documentation
=============

See ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/aldryn-bootstrap3/blob/master/setup.py>`_
See ``REQUIREMENTS`` in the `setup.py <https://github.com/aldryn/aldryn-bootstrap3/blob/master/setup.py>`_
file for additional dependencies:

* Python 2.7, 3.3 or higher
* Django 1.6 or higher
* Django Filer 1.2.4 or higher
* Django Text CKEditor 3.1.0 or higher

Make sure `django Filer <http://django-filer.readthedocs.io/en/latest/installation.html>`_
and `django CMS Text CKEditor <https://github.com/divio/djangocms-text-ckeditor>`_
are installed and configured appropriately.


Installation
Expand Down
14 changes: 8 additions & 6 deletions aldryn_bootstrap3/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json
import warnings

from django.conf.urls import patterns, url
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse
from django.templatetags.static import static
Expand Down Expand Up @@ -310,11 +310,13 @@ def icon_src(self, instance):
return ''

def get_plugin_urls(self):
urlpatterns = patterns(
'',
url(r'^ajax_upload/(?P<pk>[0-9]+)/$', self.ajax_upload,
name='bootstrap3_image_ajax_upload'),
)
urlpatterns = [
url(
r'^ajax_upload/(?P<pk>[0-9]+)/$',
self.ajax_upload,
name='bootstrap3_image_ajax_upload'
),
]
return urlpatterns

@csrf_exempt
Expand Down
4 changes: 2 additions & 2 deletions aldryn_bootstrap3/model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ def clean(self):
)

anchor_field_verbose_name = force_text(
self._meta.get_field_by_name(anchor_field_name)[0].verbose_name)
self._meta.get_field(anchor_field_name).verbose_name)
anchor_field_value = getattr(self, anchor_field_name)

link_fields = {
key: getattr(self, key)
for key in field_names
}
link_field_verbose_names = {
key: force_text(self._meta.get_field_by_name(key)[0].verbose_name)
key: force_text(self._meta.get_field(key).verbose_name)
for key in link_fields.keys()
}
provided_link_fields = {
Expand Down
22 changes: 0 additions & 22 deletions aldryn_bootstrap3/static/aldryn_bootstrap3/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,25 +669,6 @@
.replace(' ', '');
return cls;
}
},

imagePlugin: function imagePlugin() {
var useOriginalImageCheckbox = $('#id_use_original_image');
var fieldsToToggle = $([
'.field-aspect_ratio',
'.field-shape',
'.field-thumbnail',
'.field-override_width',
'.field-override_height'
].join(', '));

useOriginalImageCheckbox.on('change', function () {
if (this.checked) {
fieldsToToggle.hide();
} else {
fieldsToToggle.show();
}
}).trigger('change');
}
};

Expand Down Expand Up @@ -722,8 +703,5 @@
if ($('.aldryn-bootstrap3-label').length) {
bootstrap3.labelPlugin();
}
if ($('.model-boostrap3imageplugin').length) {
bootstrap3.imagePlugin();
}
});
})(window.jQuery || django.jQuery);
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'django-cms>=3.3.0',
'django-durationfield>=0.5.1',
'django-filer>=0.9.11',
'djangocms-text-ckeditor>=3.1.0',
'djangocms-attributes-field>=0.1.1',
]

Expand Down