[ticket/16241] Color Palette backwards compatibility

PHPBB3-16241
This commit is contained in:
Matt Friedman 2019-11-30 09:17:08 -08:00
parent 5d5c3481b7
commit 68326c6aa1

View file

@ -1587,7 +1587,7 @@ phpbb.colorPalette = function(dir, width, height) {
* @param {jQuery} el jQuery object for the palette container. * @param {jQuery} el jQuery object for the palette container.
*/ */
phpbb.registerPalette = function(el) { phpbb.registerPalette = function(el) {
var orientation = el.attr('data-color-palette'), var orientation = el.attr('data-color-palette') || el.attr('data-orientation'), // data-orientation kept for backwards compat.
height = el.attr('data-height'), height = el.attr('data-height'),
width = el.attr('data-width'), width = el.attr('data-width'),
target = el.attr('data-target'), target = el.attr('data-target'),
@ -1801,7 +1801,7 @@ $(function() {
phpbb.registerPageDropdowns(); phpbb.registerPageDropdowns();
$('[data-color-palette]').each(function() { $('[data-color-palette], [data-orientation]').each(function() {
phpbb.registerPalette($(this)); phpbb.registerPalette($(this));
}); });