Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Add an empty option to the image size select menu (see #7436)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Nov 17, 2014
1 parent 41e3f54 commit 7ec91ee
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
6 changes: 5 additions & 1 deletion assets/contao/js/core-uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ var Backend =
* @param {object} ul The DOM element
*
* @author Joe Ray Gregory
* @author Martin Auswöger
*/
makeParentViewSortable: function(ul) {
var ds = new Scroller(document.getElement('body'), {
Expand Down Expand Up @@ -1273,10 +1274,13 @@ var Backend =
if (div.hasClass('wrapper_stop') && wrapLevel > 0) {
wrapLevel--;
}

div.className = div.className.replace(/(^|\s)indent[^\s]*/g, '');

if (wrapLevel > 0) {
div.addClass('indent').addClass('indent_' + wrapLevel);
}

if (div.hasClass('wrapper_start')) {
wrapLevel++;
}
Expand Down Expand Up @@ -2009,7 +2013,7 @@ var Backend =
widthInput = el.getChildren('input')[0],
heightInput = el.getChildren('input')[1],
update = function() {
if (select.get('value').toInt().toString() === select.get('value')) {
if (select.get('value') === '' || select.get('value').toInt().toString() === select.get('value')) {
widthInput.readOnly = true;
heightInput.readOnly = true;
var dimensions = $(select.getSelected()[0]).get('text');
Expand Down
2 changes: 1 addition & 1 deletion assets/contao/js/core.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions system/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Contao Open Source CMS changelog
Version 3.4.0 (2014-11-XX)
--------------------------

### Fixed
Add an empty option to the image size select menu (see #7436).

### Fixed
Nest wrapper elements in the back end preview (see #7434).

### Fixed
Correctly handle archives being part of multiple RSS feeds (see #7398).

Expand Down
2 changes: 1 addition & 1 deletion system/modules/calendar/dca/tl_calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
'inputType' => 'imageSize',
'options' => System::getImageSizes(),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('rgxp'=>'digit', 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'imagemargin' => array
Expand Down
2 changes: 1 addition & 1 deletion system/modules/core/dca/tl_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
'inputType' => 'imageSize',
'options' => System::getImageSizes(),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('rgxp'=>'natural', 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'imagemargin' => array
Expand Down
2 changes: 1 addition & 1 deletion system/modules/core/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
'inputType' => 'imageSize',
'options' => System::getImageSizes(),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('rgxp'=>'natural', 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'useCaption' => array
Expand Down
2 changes: 1 addition & 1 deletion system/modules/faq/dca/tl_faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
'inputType' => 'imageSize',
'options' => System::getImageSizes(),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('rgxp'=>'natural', 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'imagemargin' => array
Expand Down
2 changes: 1 addition & 1 deletion system/modules/news/dca/tl_news.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
'inputType' => 'imageSize',
'options' => System::getImageSizes(),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => array('rgxp'=>'natural', 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'helpwizard'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'imagemargin' => array
Expand Down

0 comments on commit 7ec91ee

Please sign in to comment.