Skip to content

Commit

Permalink
Merge pull request #52 from skiv/master-dev-dev
Browse files Browse the repository at this point in the history
Master dev dev
  • Loading branch information
max-shamaev committed Nov 7, 2012
2 parents 48de006 + 5803717 commit dc4ec32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions src/classes/XLite/Model/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Attribute extends \XLite\Model\Base\I18n
*
* @Column (type="fixedstring", length=1)
*/
protected $type = self::TYPE_NUMBER;
protected $type = self::TYPE_TEXT;

/**
* Constructor
Expand Down Expand Up @@ -157,8 +157,8 @@ public function getProductsCount()
public static function getTypes($type = null)
{
$list = array(
self::TYPE_NUMBER => 'Number',
self::TYPE_TEXT => 'Text',
self::TYPE_NUMBER => 'Number',
self::TYPE_CHECKBOX => 'Checkbox',
self::TYPE_SELECT => 'Select',
);
Expand Down Expand Up @@ -234,9 +234,16 @@ public function setDefaultValue($value)
*/
public function getDefaultValue()
{
return self::TYPE_CHECKBOX == $this->type
? (boolean)$this->defaultValue
: $this->defaultValue;
$value = $this->defaultValue;
if (self::TYPE_NUMBER == $this->type) {
$value = (float)$value;

} elseif (self::TYPE_CHECKBOX == $this->type) {
$value = (boolean)$value;

}

return $value;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/skins/admin/en/form_field/input/text/combobox.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ input.combobox {
}

div.combobox-select {
background: transparent url(../images/arrows-select.png) center center no-repeat;
background: transparent url(../../../images/arrows-select.png) center center no-repeat;
width: 21px;
height: 21px;
float: left;
Expand Down

0 comments on commit dc4ec32

Please sign in to comment.