Skip to content

Commit

Permalink
Added Grid compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
amphibian committed Aug 23, 2013
1 parent bd91558 commit 625fb07
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
28 changes: 26 additions & 2 deletions third_party/reegion_select/ft.reegion_select.php
Expand Up @@ -23,7 +23,7 @@ class Reegion_select_ft extends EE_Fieldtype {

var $info = array(
'name' => 'REEgion Select',
'version' => '2.0.7'
'version' => '2.0.8'
);


Expand All @@ -33,7 +33,12 @@ function __construct()
$this->EE->lang->loadfile('reegion_select');
}



function accepts_content_type($name)
{
return ($name == 'channel' || $name == 'grid');
}

function display_settings($settings)
{
$types = $this->_get_types();
Expand All @@ -56,6 +61,20 @@ function display_cell_settings($settings)

}


function grid_display_settings($settings)
{
$types = $this->_get_types();
return array(
$this->grid_dropdown_row(
$this->EE->lang->line('rs_region_type'),
'region_type',
$types,
(isset($settings['region_type'])) ? $settings['region_type'] : ''
)
);
}


// Low Variables support
function display_var_settings($settings)
Expand Down Expand Up @@ -85,6 +104,11 @@ function save_settings($data)
}


function grid_save_settings($data)
{
return $data;
}

// Low Variables support
function save_var_settings($data)
{
Expand Down
2 changes: 1 addition & 1 deletion third_party/reegion_select/pi.reegion_select.php
Expand Up @@ -21,7 +21,7 @@

$plugin_info = array(
'pi_name' => 'REEgion Select',
'pi_version' => '2.0.7',
'pi_version' => '2.0.8',
'pi_author' => 'Derek Hogue',
'pi_author_url' => 'http://github.com/amphibian/reegion_select.ee2_addon',
'pi_description' => 'Displays a drop down select menu of countries, US states, Canadian provinces, or UK counties.',
Expand Down

0 comments on commit 625fb07

Please sign in to comment.