Skip to content

Commit

Permalink
Updating formatting to standards
Browse files Browse the repository at this point in the history
  • Loading branch information
steverobbins committed Dec 25, 2014
1 parent 09600f1 commit 23d43ba
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ protected function _getHelper()
}
return $this->_helper;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Steverobbins_Redismanager_Block_Adminhtml_System_Config_Form_Field_Manual
{
/**
* Add columns
*
* @return void
*/
public function __construct()
{
Expand Down
30 changes: 13 additions & 17 deletions src/app/code/community/Steverobbins/Redismanager/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,30 @@ class Steverobbins_Redismanager_Helper_Data extends Mage_Core_Helper_Abstract
const XML_PATH_DEFAULT_SECTION = 'redismanager';
const XML_PATH_DEFAULT_GROUP = 'settings';

/**
* Config cache
* @var array
*/
private $_config = array();

/**
* Services cache
*
* @var array
*/
private $_services;
protected $_services;

/**
* Config getter
*
* @param string $path
*
* @return string
*/
public function getConfig($path)
{
if (!isset($this->_config[$path])) {
$bits = explode('/', $path);
$count = count($bits);
$this->_config[$path] = Mage::getStoreConfig(
($count == 3 ? $bits[0] : self::XML_PATH_DEFAULT_SECTION) . '/' .
($count > 1 ? $bits[$count - 2] : self::XML_PATH_DEFAULT_GROUP) . '/' .
$bits[$count - 1]
);
}
return $this->_config[$path];
$bits = explode('/', $path);
$count = count($bits);
return Mage::getStoreConfig(
($count == 3 ? $bits[0] : self::XML_PATH_DEFAULT_SECTION) . '/' .
($count > 1 ? $bits[$count - 2] : self::XML_PATH_DEFAULT_GROUP) . '/' .
$bits[$count - 1]
);
}

/**
Expand Down Expand Up @@ -99,6 +93,7 @@ public function getServices()
* @param string $port
* @param string $pass
* @param string $db
*
* @return array
*/
protected function _buildServiceArray($name, $host, $port, $pass, $db)
Expand All @@ -119,6 +114,7 @@ protected function _buildServiceArray($name, $host, $port, $pass, $db)
* @param string $port
* @param string $pass
* @param string $db
*
* @return Steverobbins_Redismanager_Model_Backend_Redis_Cm|Steverobbins_Redismanager_Model_Backend_Redis_Mage
*/
public function getRedisInstance($host, $port, $pass, $db)
Expand All @@ -140,4 +136,4 @@ public function getRedisInstance($host, $port, $pass, $db)
}
Mage::throwException('Unable to determine Redis backend class.');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public function getRedis()
{
return $this->_redis;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public function getRedis()
{
return $this->_redis;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Steverobbins_Redismanager_Model_Source_Manual
{
/**
* Event prefix for observers
*
* @var string
*/
protected $_eventPrefix = 'redismanager_manual';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ class Steverobbins_Redismanager_Adminhtml_RedismanagerController
*/
protected $_helper;

/**
* Set title
*
* @return void
*/
protected function _construct()
{
parent::_construct();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<config>
<modules>
<Steverobbins_Redismanager>
<version>1.2.4</version>
<version>1.2.5</version>
</Steverobbins_Redismanager>
</modules>
<global>
Expand Down
2 changes: 1 addition & 1 deletion src/app/etc/modules/Steverobbins_Redismanager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
</depends>
</Steverobbins_Redismanager>
</modules>
</config>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
border: 1px solid #d6d6d6;
background: #fafafa;
}

.redismanager table.services thead tr {
background: url(../../images/sort_row_bg.gif) 0 50% repeat-x;
}

.redismanager table.services th {
border-width: 1px;
border-color: #f9f9f9 #d1cfcf #f9f9f9 #d1cfcf;
Expand All @@ -24,43 +26,56 @@
font-size: .9em;
padding: 2px 4px;
}

.redismanager table.services th + th {
border-color: #f9f9f9 #d1cfcf #f9f9f9 #f9f9f9;
}

.redismanager table.services tbody tr:hover {
background: #fcf5dd;
cursor: pointer;
}

.redismanager table.services tr:nth-child(even) {
background: #f6f6f6;
}

.redismanager table.services td {
border-width: 0 1px 1px 0;
border-color: #dadfe0;
border-style: solid;
padding: 2px 4px;
}

.redismanager table.services td.empty-text {
padding: 15px;
}

.redismanager .entry-edit-head .actions {
float: right;
}

.redismanager * + .content-header {
margin-top: 15px;
}

#redisKeys {
min-width: 300px;
min-height: 150px
}

.redisKeySamples + * {
clear: both;
}

.redisKeySamples > * {
font-size: 10px;
float: left;
}

.redisKeySamples li {
float: left;
margin-left: 10px;
}

\

0 comments on commit 23d43ba

Please sign in to comment.