Skip to content

Commit

Permalink
#1044: Add listbox for maximum image size dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Dec 7, 2016
1 parent e7c5fb5 commit c1e2827
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions template/helper/listbox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/joomlatools/joomlatools-framework-files for the canonical source repository
*/

class ComFilesTemplateHelperListbox extends ComKoowaTemplateHelperListbox
{
public function maximum_image_size($config = array())
{
$config = new KObjectConfigJson($config);
$config->append(array(
'name' => 'maximum_image_size',
'select2' => true,
'deselect' => true,
'selected' => $config->maximum_image_size,
'options' => [
['value' => '1024', 'label' => '1024x1024'],
['value' => '2048', 'label' => '2048x2048'],
['value' => '3072', 'label' => '3072x3072'],
['value' => '4096', 'label' => '4096x4096'],
]
));

return parent::optionlist($config);
}
}

0 comments on commit c1e2827

Please sign in to comment.