Skip to content

Commit

Permalink
Merge branch 'stable/2.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
sehmaschine committed Sep 17, 2012
2 parents 16dbfcb + ea4aa41 commit cd4f041
Show file tree
Hide file tree
Showing 77 changed files with 1,503 additions and 278 deletions.
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -18,7 +18,7 @@ http://readthedocs.org/docs/django-grappelli/
Releases
--------

* Grappelli 2.4.0 (July 20 2012): Compatible with Django 1.4
* Grappelli 2.3.8 (April 2012): Compatible with Django 1.3
* Grappelli 2.4.1 (September 17 2012): Compatible with Django 1.4
* Grappelli 2.3.9 (September 06 2012): Compatible with Django 1.3

Older versions are availabe at GitHub, but are not supported anymore.
22 changes: 22 additions & 0 deletions docs/changelog.rst
Expand Up @@ -8,6 +8,28 @@
Changelog
=========

2.4.2 (not yet released)
------------------------

2.4.1 (September 17, 2012)
--------------------------

* Fixed: Footer buttons in change_form.html do not flow correctly when screen width is reduced.
* Fixed: Breadcrumbs of delete_selected_confirmation.
* Fixed: Added titles for page-tools (open/close).
* Fixed: Margins and capfirst for filter labels.
* Fixed: Delete persmissions with inlines (stacked and tabular).
* Fixed: Removed double dots for labels with auth- and registration-templates.
* Fixed: Button with TinyMCE AdvLink.
* Fixed: Timepicker closes with ESC.
* Fixed: Window width with popups.
* Added: Compass experimental svg support (for IE9).
* Added: Reset actions select box with javascript.
* Added setting ``AUTOCOMPLETE_LIMIT``.
* Improved: sortables with django file uploads.
* Improved: HTML is now allowed for object representation with related-lookups.
* Improved: Documentation with using TinyMCE.

2.4.0 (July 20, 2012)
---------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -49,9 +49,9 @@
# built documents.
#
# The short X.Y version.
version = '2.4.0'
version = '2.4.1'
# The full version, including alpha/beta/rc tags.
release = '2.4.0'
release = '2.4.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
8 changes: 7 additions & 1 deletion docs/customization.rst
Expand Up @@ -13,9 +13,15 @@ While |grappelli| is mainly about the look & feel of the admin interface, it als
Available Settings
------------------

.. versionadded:: 2.4.1
Added setting AUTOCOMPLETE_LIMIT

``GRAPPELLI_ADMIN_TITLE``
The Site Title of your admin interface. Change this instead of changing index.html

``AUTOCOMPLETE_LIMIT``
Number of items to show with autocomplete drop-downs.

.. _customizationcollapsibles:

Collapsibles
Expand Down Expand Up @@ -246,7 +252,7 @@ Using TinyMCE
.. versionchanged:: 2.4
The admin media URLs has been changed to use a static URLs in compliance with Django 1.4

Copy ``tinymce_setup.js`` to your static-directory, adjust the setup (see `TinyMCE Configuration <http://www.tinymce.com/wiki.php/Configuration>`_) and add the necessary javascripts::
|grappelli| already comes with TinyMCE and a minimal theme as well. In order to use TinyMCE, you need to copy ``tinymce_setup.js`` to your static-directory, adjust the setup (see `TinyMCE Configuration <http://www.tinymce.com/wiki.php/Configuration>`_) and add the necessary javascripts to your ModelAdmin definition (see `ModelAdmin Media definitions <https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#modeladmin-media-definitions>`_)::

class Media:
js = [
Expand Down
10 changes: 10 additions & 0 deletions docs/faq.rst
Expand Up @@ -30,6 +30,16 @@ Can I use another editor than TinyMCE?

Of course.

Why are you using TinyMCE and not RedactorJS?
---------------------------------------------

Unfortunately, Redactor currently produces strange/wrong HTML. Moreover, we´re missing an easy way to define formatting–options as well as a possibility to insert classes. Once these issue are resolved, we´ll probably switch.

Why don´t you use Twitter Bootstrap?
------------------------------------

For now, custom Compass-based stylesheets gives us much more flexibility. But we do understand the need to easily customize the admin interface and we´re discussing this issue on a regular basis.

Do you guys cooperate with the Django–Devs?
-------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -4,7 +4,7 @@
contain the root `toctree` directive.
.. |grappelli| replace:: Grappelli
.. |filebrowser| replace:: FileBrowser
.. |version| replace:: 2.4.0
.. |version| replace:: 2.4.1

.. _index:

Expand Down
2 changes: 1 addition & 1 deletion grappelli/__init__.py
@@ -1 +1 @@
VERSION = '2.4.0'
VERSION = '2.4.1'
193 changes: 193 additions & 0 deletions grappelli/compass/sass/mueller/grid/_grid-system-rtl.scss
@@ -0,0 +1,193 @@
// **************************************************
//
// MUELLER
// modular grid system
//
// _grid_system.scss
//
// the basic grid implementation
//
// **************************************************

// **************************************************
// IMPORTS & VARIABLES

@import "compass/utilities/general/clearfix";

$float-direction: right;
$show-grid-background: false;

// **************************************************
// GENERAL MIXINS

@mixin centered {
float: none;
margin: 0 auto;
}

@mixin floated($side: $float-direction) {
float: $side;
}

// **************************************************
// THE GRID SYSTEM

// The width of a column given the units and unit width of the grid.
@function column-width($n, $col-width, $gutter-width: $gutter-width) {
@return $col-width * $n + $gutter-width * ($n - 1);
}

// A grid container. Unlike most grid containers,
// this one does not have a width. That is assigned
// on a per-media basis.
@mixin container {
@include pie-clearfix;
&.g-centered {
@include centered;
}
}

// The basic structure for a column aligned to a grid.
@mixin column-base {
@include floated; // make this column floated to the left
@include pie-clearfix;
}

// Generates the base classes needed for a grid system
@mixin grid-base($gutter-width, $base-class: grid-column, $first-column-class: g-all-f, $last-column-class: g-all-l) {
.#{$base-class} {
@include column-base;
}
.#{$first-column-class} {
margin-right: 0 !important;
margin-left: $gutter-width !important; // needed to overwrite last with first
clear: right;
}
.#{$last-column-class} {
margin-left: 0 !important;
}
}

// add $n grid units worth of space to the left of a column
@mixin prepend($n, $col-width, $gutter-width) {
padding-right: column-width($n, $col-width, $gutter-width) + $gutter-width !important;
}

// add $n grid units worth of space to the left of a column
@mixin append($n, $col-width, $gutter-width) {
padding-left: column-width($n, $col-width, $gutter-width) + $gutter-width !important;
}

@mixin push($n, $col-width, $gutter-width) {
position: relative;
margin-right: $n*($col-width+$gutter-width) !important;
margin-left: -$n*($col-width+$gutter-width) !important;
margin-top: 0; margin-bottom: 0;
}

// add $n grid units worth of space to the left of a column
@mixin pull($n, $col-width, $gutter-width) {
position: relative;
margin-right: -$n*($col-width+$gutter-width) + $gutter-width !important;
}
// ADDED double pull for elements with display: table-cell
@mixin doublepull($n, $col-width, $gutter-width) {
position: relative;
margin-right: -($n*($col-width+$gutter-width) + $gutter-width)*2 !important;
}

// The column mixin can be used in two different ways.
// Where base classes are provided they are extended to
// produce less css output. When not provided this
// mixin produces output generally equivalent to the
// blueprint column mixin.
@mixin column($n, $max-unit, $col-width, $gutter-width, $base-class: false, $first-column-class: false, $last-column-class: false) {
@include column-base;
@if $n == $max-unit {
margin-left: 0 !important;
margin-right: 0 !important;
clear: both;
} @else {
margin-left: $gutter-width;
}
width: column-width($n, $col-width, $gutter-width);
}


// ADDED replace margins with paddings for elements with display: table-cell plus additional settings
@mixin column-table-cell($n, $max-unit, $col-width, $gutter-width, $base-class: false, $first-column-class: false, $last-column-class: false) {
@include column-base;
@if $n == $max-unit {
margin-left: 0 !important;
margin-right: 0 !important;
padding-left: 0 !important;
clear: both;
} @else {
padding-left: $gutter-width;
}
width: column-width($n, $col-width, $gutter-width);
min-width: column-width($n, $col-width, $gutter-width);
float: none;
display: table-cell;
}

// Generate grid classes according to a common naming convention
// $media is the media prefix. E.g. d (deskotop), t (tablet), tp (tablet portrait), h (handheld), or hl (handheld landscape)
// $max-unit is how many columns are in this grid system.
// $col-width is the width of a column.
// $gutter-width is the width of a gutter (margin-right).
// The column base class and gutter removal class names are derived
// from the prefix, but can be overridden.
@mixin grids($media, $units, $max-unit, $col-width, $gutter-width,
$pad-units: 12 11 10 9 8 7 6 5 4 3 2 1 0,
$base-class: "g-#{$media}",
$first-column-class: "g-#{$media}-f",
$last-column-class: "g-#{$media}-l") {
// establish the base classes
@include grid-base($gutter-width, $base-class, $first-column-class, $last-column-class);
// generate padding classes
@each $n in $pad-units {
.g-#{$media}-prepend#{$n} {
@include prepend($n, $col-width, $gutter-width);
}
.g-#{$media}-append#{$n} {
@include append($n, $col-width, $gutter-width);
}
.g-#{$media}-push#{$n} {
@include push($n, $col-width, $gutter-width);
}
.g-#{$media}-pull#{$n} {
@include pull($n, $col-width, $gutter-width);
}
.g-#{$media}-doublepull#{$n} {
@include doublepull($n, $col-width, $gutter-width);
}
}
// generate grid classes
@each $n in $units {
.g-#{$media}-#{$n} {
@include column($n, $max-unit, $col-width, $gutter-width, $base-class, $first-column-class, $last-column-class);
}
}
// generate table-cell grid classes
@each $n in $units {
.g-#{$media}-#{$n}-td {
@include column-table-cell($n, $max-unit, $col-width, $gutter-width, $base-class, $first-column-class, $last-column-class);
// seems to be obsolete: assign different width for webkit because of safaris different interpretation of table-layout:fixed (does not add padding to width)
// @media screen and (-webkit-min-device-pixel-ratio:0) {
// width: column-width($n, $col-width, $gutter-width) + $gutter-width;
// -webkit-box-sizing: border-box;
// }
}
}
// ADDED generate form field widths
@each $n in $units {
.g-#{$media}-#{$n} input[type=text],
.g-#{$media}-#{$n} input[type=password],
.g-#{$media}-#{$n} select,
.g-#{$media}-#{$n} textarea {
width: 100%;
// width: column-width($n, $col-width, $gutter-width);
}
}
}
54 changes: 16 additions & 38 deletions grappelli/compass/sass/mueller/grid/_grid-system.scss
Expand Up @@ -102,23 +102,11 @@ $show-grid-background: false;
// mixin produces output generally equivalent to the
// blueprint column mixin.
@mixin column($n, $max-unit, $col-width, $gutter-width, $base-class: false, $first-column-class: false, $last-column-class: false) {
@if $base-class {
@extend .#{$base-class};
} @else {
@include column-base;
}
@include column-base;
@if $n == $max-unit {
@if $first-column-class {
@extend .#{$first-column-class};
} @else {
margin-left: 0;
}
@if $last-column-class {
@extend .#{$last-column-class};
} @else {
margin-right: 0;
}
@extend .#{$last-column-class};
margin-left: 0 !important;
margin-right: 0 !important;
clear: both;
} @else {
margin-right: $gutter-width;
}
Expand All @@ -128,33 +116,23 @@ $show-grid-background: false;

// ADDED replace margins with paddings for elements with display: table-cell plus additional settings
@mixin column-table-cell($n, $max-unit, $col-width, $gutter-width, $base-class: false, $first-column-class: false, $last-column-class: false) {
@if $base-class {
@extend .#{$base-class};
} @else {
@include column-base;
}
@include column-base;
@if $n == $max-unit {
@if $first-column-class {
@extend .#{$first-column-class};
} @else {
padding-left: 0;
}
@if $last-column-class {
@extend .#{$last-column-class};
} @else {
padding-right: 0;
}
@extend .#{$last-column-class};
margin-left: 0 !important;
margin-right: 0 !important;
padding-right: 0 !important;
clear: both;
} @else {
padding-right: $gutter-width;
}
width: column-width($n, $col-width, $gutter-width);
min-width: column-width($n, $col-width, $gutter-width);
float: none;
display: table-cell;
}

// Generate grid classes according to a common naming convention
// $media is the media prefix. E.g. d (deskotop), t (tablet), tp (tablet portrait), h (handheld), or hl (handheld landscape)
// $media is the media prefix. E.g. d (desktop), t (tablet), tp (tablet portrait), h (handheld), or hl (handheld landscape)
// $max-unit is how many columns are in this grid system.
// $col-width is the width of a column.
// $gutter-width is the width of a gutter (margin-right).
Expand Down Expand Up @@ -195,11 +173,11 @@ $show-grid-background: false;
@each $n in $units {
.g-#{$media}-#{$n}-td {
@include column-table-cell($n, $max-unit, $col-width, $gutter-width, $base-class, $first-column-class, $last-column-class);
// assign different width for webkit because of safaris different interpretation of table-layout:fixed (does not add padding to width)
@media screen and (-webkit-min-device-pixel-ratio:0) {
width: column-width($n, $col-width, $gutter-width) + $gutter-width;
-webkit-box-sizing: border-box;
}
// seems to be obsolete: assign different width for webkit because of safaris different interpretation of table-layout:fixed (does not add padding to width)
// @media screen and (-webkit-min-device-pixel-ratio:0) {
// width: column-width($n, $col-width, $gutter-width) + $gutter-width;
// -webkit-box-sizing: border-box;
// }
}
}
// ADDED generate form field widths
Expand Down

0 comments on commit cd4f041

Please sign in to comment.