Permalink
Browse files

Merge branch 'master' of github.com:brandonkelly/pt_switch

  • Loading branch information...
brandonkelly committed Nov 2, 2010
2 parents b9f2818 + 8552d2d commit 856e3fd52fdfb98ded7f0550b16ca1518b2c0f5a
@@ -12,7 +12,7 @@ class Pt_switch extends Fieldframe_Fieldtype {
var $info = array(
'name' => 'P&T Switch',
- 'version' => '1.0.2',
+ 'version' => '1.0.3',
'versions_xml_url' => 'http://pixelandtonic.com/ee/versions.xml'
);
@@ -98,6 +98,14 @@ function display_cell_settings($data)
{
return $this->_field_settings($data, 'class="matrix-textarea"');
}
+
+ /**
+ * Display LV Settings
+ */
+ function display_var_settings($data)
+ {
+ return $this->_field_settings($data);
+ }
/**
* Field Settings
@@ -135,6 +143,23 @@ private function _field_settings($data, $attr = '')
// --------------------------------------------------------------------
+ /**
+ * Save LV Settings
+ */
+ function save_var_settings($settings)
+ {
+ global $IN;
+
+ foreach ($settings AS $key => &$val)
+ {
+ $val = ($IN->GBL($key, 'POST') !== FALSE) ? $IN->GBL($key, 'POST') : $val;
+ }
+
+ return $settings;
+ }
+
+ // --------------------------------------------------------------------
+
/**
* Display Field
*/
@@ -171,4 +196,12 @@ function display_cell($cell_name, $data, $settings)
return $this->display_field($cell_name, $data, $settings, TRUE);
}
+
+ /**
+ * Display Var
+ */
+ function display_var_field($cell_name, $data, $settings)
+ {
+ return $this->display_field($cell_name, $data, $settings);
+ }
}
@@ -1,5 +1,5 @@
<?php
$config['name'] = 'P&amp;T Switch';
-$config['version'] = '1.0.2';
+$config['version'] = '1.0.3';
$config['nsm_addon_updater']['versions_xml'] = 'http://pixelandtonic.com/ee/releasenotes.rss/pt_switch';
@@ -115,6 +115,14 @@ function display_cell_settings($data)
return $this->_field_settings($data, 'class="matrix-textarea"');
}
+ /**
+ * Display LV Settings
+ */
+ function display_var_settings($data)
+ {
+ return $this->_field_settings($data);
+ }
+
/**
* Field Settings
*/
@@ -186,6 +194,14 @@ function save_cell_settings($settings)
return $settings['pt_switch'];
}
+ /**
+ * Save LV Settings
+ */
+ function save_var_settings($settings)
+ {
+ return $this->EE->input->post('pt_switch');
+ }
+
// --------------------------------------------------------------------
/**
@@ -221,4 +237,12 @@ function display_cell($data)
return $this->display_field($data, TRUE);
}
+
+ /**
+ * Display Var
+ */
+ function display_var_field($data)
+ {
+ return $this->display_field($data);
+ }
}
@@ -1,4 +1,4 @@
-ul.pt-switch { display: inline-block; margin: 5px 0; padding: 0; list-style-type: none; line-height: 20px; font-weight: bold; text-shadow: 0 1px #fff; cursor: default;
+ul.pt-switch { display: inline-block; margin: 5px 0; padding: 0; list-style-type: none; line-height: 20px; font-weight: bold; text-shadow: 0 1px #fff; cursor: default; white-space: nowrap;
-webkit-user-select: none; -moz-user-select: none; }
ul.pt-switch li { float: left; }
@@ -12,11 +12,10 @@ ul.pt-switch li.toggle div { border: 1px solid #a8b1b3; height: 18px;
ul.pt-switch li.toggle { width: 50px; background: #e2e2e2; background: #f0f0f0 url(../images/toggle_bg.gif) repeat-x; overflow: hidden;
background: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(0,0,0,0.15)), to(rgba(0,0,0,0.1)));
background: -moz-linear-gradient(top, rgba(0,0,0,0.15), rgba(0,0,0,0.1));
- -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.1);
- -moz-box-shadow: inset 0 1px rgba(0,0,0,0.1); }
+ -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.1); -moz-box-shadow: inset 0 1px rgba(0,0,0,0.1); }
ul.pt-switch li.toggle div { position: relative; left: 0; margin: -1px; width: 20px; background: #fff url(../images/handle_bg.gif) repeat-x;
- -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.1);
- -moz-box-shadow: 0 0 2px rgba(0,0,0,0.1); }
+ -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.1); -moz-box-shadow: 0 0 2px rgba(0,0,0,0.1);
+ background-clip: content-box; -webkit-background-clip: content-box; -moz-background-clip: content-box; }
.matrix ul.pt-switch { margin: 0; }

0 comments on commit 856e3fd

Please sign in to comment.