Skip to content

Commit

Permalink
prepare 0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Aug 1, 2017
1 parent 73b3d46 commit cdaac6f
Show file tree
Hide file tree
Showing 25 changed files with 539 additions and 36 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.12.2
------
2017-08-02

- Some work on full form-wizards support in the `foundation5` theme.
- Django 1.11 fixes for customised widgets.
- Update example project requirements.

0.12.1
------
2017-07-31
Expand Down
2 changes: 1 addition & 1 deletion examples/requirements/django_1_11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Django>=1.11,<2.0
django-admin-tools>=0.8.0
django-debug-toolbar==1.5
django-debug-toolbar==1.6
django-formtools==2.0
django-registration-redux>=1.4
django-simple-captcha==0.5.5
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/runserver/foundation5-theme.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
./manage.py runserver 0.0.0.0:8001 --settings=settings.foundation5 --traceback -v 3
./manage.py runserver 0.0.0.0:8001 --settings=settings.foundation5_theme --traceback -v 3
6 changes: 6 additions & 0 deletions examples/simple/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,9 @@
]
except ImportError:
pass

if getattr(settings, 'DEBUG', False) and getattr(settings, 'DEBUG_TOOLBAR', False):
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from distutils.version import LooseVersion
from setuptools import setup, find_packages

version = '0.12.1'
version = '0.12.2'

# ***************************************************************************
# ************************** Python version *********************************
Expand Down
4 changes: 2 additions & 2 deletions src/fobi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'django-fobi'
__version__ = '0.12.1'
__build__ = 0x00008a
__version__ = '0.12.2'
__build__ = 0x00008b
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
Expand Down
109 changes: 85 additions & 24 deletions src/fobi/contrib/themes/foundation5/fobi_themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class Foundation5Theme(BaseTheme):

# footer_text = '&copy; django-fobi example site 2014'

# *************************************************************************
# ********************** Form HTML specific *******************************
# *************************************************************************
# ***********************************************************************
# ***********************************************************************
# ********************** Form HTML specific *****************************
# ***********************************************************************
form_element_html_class = 'form-control'
form_element_checkbox_html_class = 'checkbox'

Expand All @@ -66,57 +67,117 @@ class Foundation5Theme(BaseTheme):
# Important
form_list_container_class = 'inline-list'

# *************************************************************************
# ********************** Templates specific *******************************
# *************************************************************************
# ***********************************************************************
# ***********************************************************************
# **************************** Templates ********************************
# ***********************************************************************
# ***********************************************************************

# ***********************************************************************
# *************************** Base templates ****************************
# ***********************************************************************
master_base_template = 'foundation5/_base.html'
base_template = 'foundation5/base.html'

form_ajax = 'foundation5/snippets/form_ajax.html'
# ***********************************************************************
# ***************************** Snippets ********************************
# ***********************************************************************
form_snippet_template_name = 'foundation5/snippets/form_snippet.html'

form_properties_snippet_template_name = \
'foundation5/snippets/form_properties_snippet.html'

messages_snippet_template_name = \
'foundation5/snippets/messages_snippet.html'

form_non_field_and_hidden_errors_snippet_template = \
'foundation5/snippets/form_non_field_and_hidden_errors_snippet.html'

add_form_element_entry_template = \
'foundation5/add_form_element_entry.html'
add_form_element_entry_ajax_template = \
'foundation5/add_form_element_entry_ajax.html'
form_ajax = 'foundation5/snippets/form_ajax.html'

add_form_handler_entry_template = \
'foundation5/add_form_handler_entry.html'
add_form_handler_entry_ajax_template = \
'foundation5/add_form_handler_entry_ajax.html'
form_wizard_ajax = 'foundation5/snippets/form_wizard_ajax.html' # TODO

form_wizard_snippet_template_name = \
'foundation5/snippets/form_wizard_snippet.html' # TODO

form_wizard_properties_snippet_template_name = \
'foundation5/snippets/form_wizard_properties_snippet.html' # TODO

# ***********************************************************************
# **************************** Form entry CRUD **************************
# ***********************************************************************
create_form_entry_template = 'foundation5/create_form_entry.html'
create_form_entry_ajax_template = \
'foundation5/create_form_entry_ajax.html'

dashboard_template = 'foundation5/dashboard.html'
forms_list_template = 'foundation5/forms_list.html'
edit_form_entry_template = 'foundation5/edit_form_entry.html'
edit_form_entry_ajax_template = 'foundation5/edit_form_entry_ajax.html'

form_entry_submitted_template = 'foundation5/form_entry_submitted.html'
form_entry_submitted_ajax_template = \
'foundation5/form_entry_submitted_ajax.html'

view_form_entry_template = 'foundation5/view_form_entry.html'
view_form_entry_ajax_template = 'foundation5/view_form_entry_ajax.html'

# ***********************************************************************
# *********************** Form element entry CUD ************************
# ***********************************************************************
add_form_element_entry_template = \
'foundation5/add_form_element_entry.html'
add_form_element_entry_ajax_template = \
'foundation5/add_form_element_entry_ajax.html'

edit_form_element_entry_template = \
'foundation5/edit_form_element_entry.html'
edit_form_element_entry_ajax_template = \
'foundation5/edit_form_element_entry_ajax.html'

edit_form_entry_template = 'foundation5/edit_form_entry.html'
edit_form_entry_ajax_template = 'foundation5/edit_form_entry_ajax.html'
# ***********************************************************************
# *********************** Form handler entry CUD ************************
# ***********************************************************************
add_form_handler_entry_template = \
'foundation5/add_form_handler_entry.html'
add_form_handler_entry_ajax_template = \
'foundation5/add_form_handler_entry_ajax.html'

edit_form_handler_entry_template = \
'foundation5/edit_form_handler_entry.html'
edit_form_handler_entry_ajax_template = \
'foundation5/edit_form_handler_entry_ajax.html'

form_entry_submitted_template = 'foundation5/form_entry_submitted.html'
form_entry_submitted_ajax_template = \
'foundation5/form_entry_submitted_ajax.html'
# ***********************************************************************
# ******************* Form wizard handler entry CUD *********************
# ***********************************************************************

view_form_entry_template = 'foundation5/view_form_entry.html'
view_form_entry_ajax_template = 'foundation5/view_form_entry_ajax.html'
# ***********************************************************************
# ***************************** Dashboard *******************************
# ***********************************************************************
dashboard_template = 'foundation5/dashboard.html'
form_wizards_dashboard_template = 'foundation5/form_wizards_dashboard.html'
forms_list_template = 'foundation5/forms_list.html'

# ***********************************************************************
# ************************ Form wizard entry CUD ************************
# ***********************************************************************
create_form_wizard_entry_template = \
'foundation5/create_form_wizard_entry.html' # TODO
create_form_wizard_entry_ajax_template = \
'foundation5/create_form_wizard_entry_ajax.html' # TODO

edit_form_wizard_entry_template = \
'foundation5/edit_form_wizard_entry.html' # TODO
edit_form_wizard_entry_ajax_template = \
'foundation5/edit_form_wizard_entry_ajax.html' # TODO

view_form_wizard_entry_template = \
'foundation5/view_form_wizard_entry.html' # TODO
view_form_wizard_entry_ajax_template = \
'foundation5/view_form_wizard_entry_ajax.html' # TODO

# ***********************************************************************
# ************************* Form importer templates *********************
# ***********************************************************************

import_form_entry_template = 'foundation5/import_form_entry.html'
import_form_entry_ajax_template = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ $(function() {

formElementPositionElements = $('.form-element-position');
if (formElementPositionElements.length) {
$('.form-horizontal .row').css({ 'cursor': 'move' });
$('.form-horizontal .row, .form-horizontal .form-group').css({ 'cursor': 'move' });

$('.form-horizontal').sortable({
axis: 'y',
items: ".row",
items: ".row, .form-group",
update: function(){
$.each($('.form-horizontal .row'), function(i){
$.each($('.form-horizontal .row, .form-horizontal .form-group'), function(i){
$(this).find('input:regex(name, .*-position)').val(i + 1);
});

$(this).find('.row').removeClass('row1').removeClass('row2');
$(this).find('.row, .form-group').removeClass('row1').removeClass('row2');

$(this).find('.row:odd').addClass('row2');
$(this).find('.row:even').addClass('row1');
$(this).find('.row:odd, .form-group:odd').addClass('row2');
$(this).find('.row:even, .form-group:even').addClass('row1');
}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "fobi/generic/add_form_wizard_handler_entry.html" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "fobi/generic/add_form_wizard_handler_entry_ajax.html" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "fobi/generic/create_form_wizard_entry.html" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "fobi/generic/create_form_wizard_entry_ajax.html" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "fobi/generic/edit_form_wizard_entry.html" %}

{% block main-content-inner-attrs %} class="large-12 columns"{% endblock main-content-inner-attrs %}
Loading

0 comments on commit cdaac6f

Please sign in to comment.