Merge branch 'master' of https://github.com/thelia/thelia into coupon
# By franck # Via franck * 'master' of https://github.com/thelia/thelia: Factorized ModelCriterialTools calls in loops Conflicts: templates/admin/default/assets/bootstrap-editable/css/bootstrap-editable.css templates/admin/default/assets/css/admin.less
This commit is contained in:
@@ -89,7 +89,7 @@ class CategoryController extends BaseAdminController
|
|||||||
$categoryDeletionForm = new CategoryDeletionForm($this->getRequest());
|
$categoryDeletionForm = new CategoryDeletionForm($this->getRequest());
|
||||||
|
|
||||||
$data = $this->validateForm($categoryDeletionForm, "POST")->getData();
|
$data = $this->validateForm($categoryDeletionForm, "POST")->getData();
|
||||||
var_dump($data);
|
|
||||||
$categoryDeleteEvent = new CategoryDeleteEvent($data['category_id']);
|
$categoryDeleteEvent = new CategoryDeleteEvent($data['category_id']);
|
||||||
|
|
||||||
$this->dispatch(TheliaEvents::CATEGORY_DELETE, $categoryDeleteEvent);
|
$this->dispatch(TheliaEvents::CATEGORY_DELETE, $categoryDeleteEvent);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
use Thelia\Core\Security\SecurityContext;
|
use Thelia\Core\Security\SecurityContext;
|
||||||
|
use Thelia\Model\Tools\ModelCriteriaTools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -234,6 +235,28 @@ abstract class BaseLoop
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup ModelCriteria for proper i18n processing
|
||||||
|
*
|
||||||
|
* @param ModelCriteria $search the Propel Criteria to configure
|
||||||
|
* @param array $columns the i18n columns
|
||||||
|
* @param string $foreignTable the specified table (default to criteria table)
|
||||||
|
* @param string $foreignKey the foreign key in this table (default to criteria table)
|
||||||
|
*/
|
||||||
|
protected function configureI18nProcessing(ModelCriteria $search, $columns = array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'), $foreignTable = null, $foreignKey = 'ID') {
|
||||||
|
|
||||||
|
/* manage translations */
|
||||||
|
ModelCriteriaTools::getI18n(
|
||||||
|
$this->getBackend_context(),
|
||||||
|
$this->getLang(),
|
||||||
|
$search,
|
||||||
|
$this->request->getSession()->getLocale(),
|
||||||
|
$columns,
|
||||||
|
$foreignTable,
|
||||||
|
$foreignKey
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* this function have to be implement in your own loop class.
|
* this function have to be implement in your own loop class.
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
|
|||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Base\LangQuery;
|
use Thelia\Model\Base\LangQuery;
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\CategoryQuery;
|
use Thelia\Model\Base\CategoryQuery;
|
||||||
use Thelia\Model\Base\ProductCategoryQuery;
|
use Thelia\Model\Base\ProductCategoryQuery;
|
||||||
@@ -92,7 +91,7 @@ class Attribute extends BaseLoop
|
|||||||
$lang = $this->getLang();
|
$lang = $this->getLang();
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\AttributeAvQuery;
|
use Thelia\Model\Base\AttributeAvQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
@@ -79,12 +77,8 @@ class AttributeAvailability extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = AttributeAvQuery::create();
|
$search = AttributeAvQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\AttributeCombinationQuery;
|
use Thelia\Model\Base\AttributeCombinationQuery;
|
||||||
use Thelia\Model\Map\AttributeAvTableMap;
|
use Thelia\Model\Map\AttributeAvTableMap;
|
||||||
use Thelia\Model\Map\AttributeTableMap;
|
use Thelia\Model\Map\AttributeTableMap;
|
||||||
@@ -59,6 +57,7 @@ class AttributeCombination extends BaseLoop
|
|||||||
{
|
{
|
||||||
return new ArgumentCollection(
|
return new ArgumentCollection(
|
||||||
Argument::createIntTypeArgument('product_sale_elements', null, true),
|
Argument::createIntTypeArgument('product_sale_elements', null, true),
|
||||||
|
Argument::createIntTypeArgument('lang'),
|
||||||
new Argument(
|
new Argument(
|
||||||
'order',
|
'order',
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
@@ -79,20 +78,16 @@ class AttributeCombination extends BaseLoop
|
|||||||
$search = AttributeCombinationQuery::create();
|
$search = AttributeCombinationQuery::create();
|
||||||
|
|
||||||
/* manage attribute translations */
|
/* manage attribute translations */
|
||||||
ModelCriteriaTools::getFrontEndI18n(
|
$this->configureI18nProcessing(
|
||||||
$search,
|
$search,
|
||||||
ConfigQuery::read("default_lang_without_translation", 1),
|
|
||||||
$this->request->getSession()->getLocale(),
|
|
||||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||||
AttributeTableMap::TABLE_NAME,
|
AttributeTableMap::TABLE_NAME,
|
||||||
'ATTRIBUTE_ID'
|
'ATTRIBUTE_ID'
|
||||||
);
|
);
|
||||||
|
|
||||||
/* manage attributeAv translations */
|
/* manage attributeAv translations */
|
||||||
ModelCriteriaTools::getFrontEndI18n(
|
$this->configureI18nProcessing(
|
||||||
$search,
|
$search,
|
||||||
ConfigQuery::read("default_lang_without_translation", 1),
|
|
||||||
$this->request->getSession()->getLocale(),
|
|
||||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||||
AttributeAvTableMap::TABLE_NAME,
|
AttributeAvTableMap::TABLE_NAME,
|
||||||
'ATTRIBUTE_AV_ID'
|
'ATTRIBUTE_AV_ID'
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\CategoryQuery;
|
use Thelia\Model\CategoryQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
@@ -98,12 +96,8 @@ class Category extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = CategoryQuery::create();
|
$search = CategoryQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
@@ -169,7 +163,6 @@ class Category extends BaseLoop
|
|||||||
$loopResult = new LoopResult();
|
$loopResult = new LoopResult();
|
||||||
|
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* no cause pagination lost :
|
* no cause pagination lost :
|
||||||
* if ($this->getNotEmpty() && $category->countAllProducts() == 0) continue;
|
* if ($this->getNotEmpty() && $category->countAllProducts() == 0) continue;
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ class CategoryPath extends BaseLoop
|
|||||||
Argument::createIntTypeArgument('category', null, true),
|
Argument::createIntTypeArgument('category', null, true),
|
||||||
Argument::createIntTypeArgument('depth'),
|
Argument::createIntTypeArgument('depth'),
|
||||||
Argument::createIntTypeArgument('level'),
|
Argument::createIntTypeArgument('level'),
|
||||||
Argument::createBooleanOrBothTypeArgument('visible', true, false)
|
Argument::createBooleanOrBothTypeArgument('visible', true, false),
|
||||||
|
Argument::createIntTypeArgument('lang')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,6 +81,9 @@ class CategoryPath extends BaseLoop
|
|||||||
$visible = $this->getVisible();
|
$visible = $this->getVisible();
|
||||||
|
|
||||||
$search = CategoryQuery::create();
|
$search = CategoryQuery::create();
|
||||||
|
|
||||||
|
$this->configureI18nProcessing($search, array('TITLE'));
|
||||||
|
|
||||||
$search->filterById($id);
|
$search->filterById($id);
|
||||||
if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible);
|
if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible);
|
||||||
|
|
||||||
@@ -95,7 +99,7 @@ class CategoryPath extends BaseLoop
|
|||||||
$loopResultRow = new LoopResultRow();
|
$loopResultRow = new LoopResultRow();
|
||||||
|
|
||||||
$loopResultRow
|
$loopResultRow
|
||||||
->set("TITLE",$category->getTitle())
|
->set("TITLE",$category->getVirtualColumn('i18n_TITLE'))
|
||||||
->set("URL", $category->getUrl())
|
->set("URL", $category->getUrl())
|
||||||
->set("ID", $category->getId())
|
->set("ID", $category->getId())
|
||||||
;
|
;
|
||||||
@@ -114,8 +118,11 @@ class CategoryPath extends BaseLoop
|
|||||||
$ids[] = $parent;
|
$ids[] = $parent;
|
||||||
|
|
||||||
$search = CategoryQuery::create();
|
$search = CategoryQuery::create();
|
||||||
|
|
||||||
|
$this->configureI18nProcessing($search, array('TITLE'));
|
||||||
|
|
||||||
$search->filterById($parent);
|
$search->filterById($parent);
|
||||||
if ($visible == true) $search->filterByVisible($visible);
|
if ($visible != BooleanOrBothType::ANY) $search->filterByVisible($visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while ($category != null && $parent > 0);
|
} while ($category != null && $parent > 0);
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\FolderQuery;
|
use Thelia\Model\FolderQuery;
|
||||||
use Thelia\Model\Map\ContentTableMap;
|
use Thelia\Model\Map\ContentTableMap;
|
||||||
use Thelia\Model\ContentFolderQuery;
|
use Thelia\Model\ContentFolderQuery;
|
||||||
@@ -88,12 +86,8 @@ class Content extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = ContentQuery::create();
|
$search = ContentQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\CountryQuery;
|
use Thelia\Model\CountryQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
@@ -70,12 +68,8 @@ class Country extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = CountryQuery::create();
|
$search = CountryQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\CurrencyQuery;
|
use Thelia\Model\CurrencyQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
@@ -69,12 +67,8 @@ class Currency extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = CurrencyQuery::create();
|
$search = CurrencyQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale(), array('NAME'));
|
$this->configureI18nProcessing($search, array('NAME'));
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\CategoryQuery;
|
use Thelia\Model\Base\CategoryQuery;
|
||||||
use Thelia\Model\Base\ProductCategoryQuery;
|
use Thelia\Model\Base\ProductCategoryQuery;
|
||||||
use Thelia\Model\Base\FeatureQuery;
|
use Thelia\Model\Base\FeatureQuery;
|
||||||
@@ -84,12 +82,8 @@ class Feature extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = FeatureQuery::create();
|
$search = FeatureQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\FeatureAvQuery;
|
use Thelia\Model\Base\FeatureAvQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
@@ -77,12 +75,8 @@ class FeatureAvailability extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = FeatureAvQuery::create();
|
$search = FeatureAvQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\FeatureProductQuery;
|
use Thelia\Model\Base\FeatureProductQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Model\Map\FeatureAvTableMap;
|
use Thelia\Model\Map\FeatureAvTableMap;
|
||||||
@@ -70,7 +68,8 @@ class FeatureValue extends BaseLoop
|
|||||||
new Type\EnumListType(array('alpha', 'alpha_reverse', 'manual', 'manual_reverse'))
|
new Type\EnumListType(array('alpha', 'alpha_reverse', 'manual', 'manual_reverse'))
|
||||||
),
|
),
|
||||||
'manual'
|
'manual'
|
||||||
)
|
),
|
||||||
|
Argument::createIntTypeArgument('lang')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,10 +83,8 @@ class FeatureValue extends BaseLoop
|
|||||||
$search = FeatureProductQuery::create();
|
$search = FeatureProductQuery::create();
|
||||||
|
|
||||||
/* manage featureAv translations */
|
/* manage featureAv translations */
|
||||||
ModelCriteriaTools::getFrontEndI18n(
|
$this->configureI18nProcessing(
|
||||||
$search,
|
$search,
|
||||||
ConfigQuery::read("default_lang_without_translation", 1),
|
|
||||||
$this->request->getSession()->getLocale(),
|
|
||||||
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
|
||||||
FeatureAvTableMap::TABLE_NAME,
|
FeatureAvTableMap::TABLE_NAME,
|
||||||
'FEATURE_AV_ID'
|
'FEATURE_AV_ID'
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\FolderQuery;
|
use Thelia\Model\FolderQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
@@ -80,12 +78,8 @@ class Folder extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = FolderQuery::create();
|
$search = FolderQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -207,16 +207,8 @@ class Image extends BaseLoop
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* manage translations */
|
||||||
* \Criteria::INNER_JOIN in second parameter for joinWithI18n exclude query without translation.
|
$this->configureI18nProcessing($search);
|
||||||
*
|
|
||||||
* @todo : verify here if we want results for row without translations.
|
|
||||||
*/
|
|
||||||
|
|
||||||
$search->joinWithI18n(
|
|
||||||
$this->request->getSession()->getLocale(),
|
|
||||||
(ConfigQuery::read("default_lang_without_translation", 1)) ? Criteria::LEFT_JOIN : Criteria::INNER_JOIN
|
|
||||||
);
|
|
||||||
|
|
||||||
$results = $this->search($search, $pagination);
|
$results = $this->search($search, $pagination);
|
||||||
|
|
||||||
@@ -295,6 +287,7 @@ class Image extends BaseLoop
|
|||||||
),
|
),
|
||||||
'manual'
|
'manual'
|
||||||
),
|
),
|
||||||
|
Argument::createIntTypeArgument('lang'),
|
||||||
|
|
||||||
Argument::createIntTypeArgument('width'),
|
Argument::createIntTypeArgument('width'),
|
||||||
Argument::createIntTypeArgument('height'),
|
Argument::createIntTypeArgument('height'),
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
|||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\CategoryQuery;
|
use Thelia\Model\CategoryQuery;
|
||||||
use Thelia\Model\Map\FeatureProductTableMap;
|
use Thelia\Model\Map\FeatureProductTableMap;
|
||||||
use Thelia\Model\Map\ProductPriceTableMap;
|
use Thelia\Model\Map\ProductPriceTableMap;
|
||||||
@@ -138,12 +136,8 @@ class Product extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = ProductQuery::create();
|
$search = ProductQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale());
|
$this->configureI18nProcessing($search);
|
||||||
|
|
||||||
$attributeNonStrictMatch = $this->getAttribute_non_strict_match();
|
$attributeNonStrictMatch = $this->getAttribute_non_strict_match();
|
||||||
$isPSELeftJoinList = array();
|
$isPSELeftJoinList = array();
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
|
|
||||||
use Thelia\Model\Tools\ModelCriteriaTools;
|
|
||||||
|
|
||||||
use Thelia\Model\CustomerTitleQuery;
|
use Thelia\Model\CustomerTitleQuery;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
@@ -67,12 +65,8 @@ class Title extends BaseLoop
|
|||||||
{
|
{
|
||||||
$search = CustomerTitleQuery::create();
|
$search = CustomerTitleQuery::create();
|
||||||
|
|
||||||
$backendContext = $this->getBackend_context();
|
|
||||||
|
|
||||||
$lang = $this->getLang();
|
|
||||||
|
|
||||||
/* manage translations */
|
/* manage translations */
|
||||||
ModelCriteriaTools::getI18n($backendContext, $lang, $search, ConfigQuery::read("default_lang_without_translation", 1), $this->request->getSession()->getLocale(), array('SHORT', 'LONG'));
|
$this->configureI18nProcessing($search, array('SHORT', 'LONG'));
|
||||||
|
|
||||||
$id = $this->getId();
|
$id = $this->getId();
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Category extends BaseCategory
|
|||||||
->findOne()
|
->findOne()
|
||||||
;
|
;
|
||||||
|
|
||||||
return $last->getPosition() + 1;
|
return $last != null ? $last->getPosition() + 1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,6 +74,4 @@ class Category extends BaseCategory
|
|||||||
return $countProduct;
|
return $countProduct;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ use Propel\Runtime\ActiveQuery\Criteria;
|
|||||||
use Propel\Runtime\ActiveQuery\Join;
|
use Propel\Runtime\ActiveQuery\Join;
|
||||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
use Thelia\Model\Base\LangQuery;
|
use Thelia\Model\Base\LangQuery;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ModelCriteriaTools
|
* Class ModelCriteriaTools
|
||||||
@@ -17,13 +18,12 @@ class ModelCriteriaTools
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param ModelCriteria $search
|
* @param ModelCriteria $search
|
||||||
* @param $defaultLangWithoutTranslation
|
* @param $requestedLocale
|
||||||
* @param $askedLocale
|
|
||||||
* @param array $columns
|
* @param array $columns
|
||||||
* @param null $foreignTable
|
* @param null $foreignTable
|
||||||
* @param string $foreignKey
|
* @param string $foreignKey
|
||||||
*/
|
*/
|
||||||
public static function getFrontEndI18n(ModelCriteria &$search, $defaultLangWithoutTranslation, $askedLocale, $columns = array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'), $foreignTable = null, $foreignKey = 'ID')
|
public static function getFrontEndI18n(ModelCriteria &$search, $requestedLocale, $columns, $foreignTable, $foreignKey)
|
||||||
{
|
{
|
||||||
if($foreignTable === null) {
|
if($foreignTable === null) {
|
||||||
$foreignTable = $search->getTableMap()->getName();
|
$foreignTable = $search->getTableMap()->getName();
|
||||||
@@ -32,21 +32,24 @@ class ModelCriteriaTools
|
|||||||
$aliasPrefix = $foreignTable . '_';
|
$aliasPrefix = $foreignTable . '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
$askedLocaleI18nAlias = 'asked_locale_i18n';
|
$defaultLangWithoutTranslation = ConfigQuery::read("default_lang_without_translation", 1);
|
||||||
|
|
||||||
|
$requestedLocaleI18nAlias = 'requested_locale_i18n';
|
||||||
$defaultLocaleI18nAlias = 'default_locale_i18n';
|
$defaultLocaleI18nAlias = 'default_locale_i18n';
|
||||||
|
|
||||||
if($defaultLangWithoutTranslation == 0) {
|
if (!$defaultLangWithoutTranslation == 0) {
|
||||||
$askedLocaleJoin = new Join();
|
|
||||||
$askedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $askedLocaleI18nAlias);
|
|
||||||
$askedLocaleJoin->setJoinType(Criteria::INNER_JOIN);
|
|
||||||
|
|
||||||
$search->addJoinObject($askedLocaleJoin, $askedLocaleI18nAlias)
|
$requestedLocaleJoin = new Join();
|
||||||
->addJoinCondition($askedLocaleI18nAlias ,'`' . $askedLocaleI18nAlias . '`.LOCALE = ?', $askedLocale, null, \PDO::PARAM_STR);
|
$requestedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $requestedLocaleI18nAlias);
|
||||||
|
$requestedLocaleJoin->setJoinType(Criteria::INNER_JOIN);
|
||||||
|
|
||||||
$search->withColumn('NOT ISNULL(`' . $askedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
$search->addJoinObject($requestedLocaleJoin, $requestedLocaleI18nAlias)
|
||||||
|
->addJoinCondition($requestedLocaleI18nAlias ,'`' . $requestedLocaleI18nAlias . '`.LOCALE = ?', $requestedLocale, null, \PDO::PARAM_STR);
|
||||||
|
|
||||||
|
$search->withColumn('NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
||||||
|
|
||||||
foreach($columns as $column) {
|
foreach($columns as $column) {
|
||||||
$search->withColumn('`' . $askedLocaleI18nAlias . '`.`' . $column . '`', $aliasPrefix . 'i18n_' . $column);
|
$search->withColumn('`' . $requestedLocaleI18nAlias . '`.`' . $column . '`', $aliasPrefix . 'i18n_' . $column);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$defaultLocale = LangQuery::create()->findOneById($defaultLangWithoutTranslation)->getLocale();
|
$defaultLocale = LangQuery::create()->findOneById($defaultLangWithoutTranslation)->getLocale();
|
||||||
@@ -58,24 +61,24 @@ class ModelCriteriaTools
|
|||||||
$search->addJoinObject($defaultLocaleJoin, $defaultLocaleI18nAlias)
|
$search->addJoinObject($defaultLocaleJoin, $defaultLocaleI18nAlias)
|
||||||
->addJoinCondition($defaultLocaleI18nAlias ,'`' . $defaultLocaleI18nAlias . '`.LOCALE = ?', $defaultLocale, null, \PDO::PARAM_STR);
|
->addJoinCondition($defaultLocaleI18nAlias ,'`' . $defaultLocaleI18nAlias . '`.LOCALE = ?', $defaultLocale, null, \PDO::PARAM_STR);
|
||||||
|
|
||||||
$askedLocaleJoin = new Join();
|
$requestedLocaleJoin = new Join();
|
||||||
$askedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $askedLocaleI18nAlias);
|
$requestedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $requestedLocaleI18nAlias);
|
||||||
$askedLocaleJoin->setJoinType(Criteria::LEFT_JOIN);
|
$requestedLocaleJoin->setJoinType(Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
$search->addJoinObject($askedLocaleJoin, $askedLocaleI18nAlias)
|
$search->addJoinObject($requestedLocaleJoin, $requestedLocaleI18nAlias)
|
||||||
->addJoinCondition($askedLocaleI18nAlias ,'`' . $askedLocaleI18nAlias . '`.LOCALE = ?', $askedLocale, null, \PDO::PARAM_STR);
|
->addJoinCondition($requestedLocaleI18nAlias ,'`' . $requestedLocaleI18nAlias . '`.LOCALE = ?', $requestedLocale, null, \PDO::PARAM_STR);
|
||||||
|
|
||||||
$search->withColumn('NOT ISNULL(`' . $askedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
$search->withColumn('NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
||||||
|
|
||||||
$search->where('NOT ISNULL(`' . $askedLocaleI18nAlias . '`.ID)')->_or()->where('NOT ISNULL(`' . $defaultLocaleI18nAlias . '`.ID)');
|
$search->where('NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.ID)')->_or()->where('NOT ISNULL(`' . $defaultLocaleI18nAlias . '`.ID)');
|
||||||
|
|
||||||
foreach($columns as $column) {
|
foreach($columns as $column) {
|
||||||
$search->withColumn('CASE WHEN NOT ISNULL(`' . $askedLocaleI18nAlias . '`.ID) THEN `' . $askedLocaleI18nAlias . '`.`' . $column . '` ELSE `' . $defaultLocaleI18nAlias . '`.`' . $column . '` END', $aliasPrefix . 'i18n_' . $column);
|
$search->withColumn('CASE WHEN NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.ID) THEN `' . $requestedLocaleI18nAlias . '`.`' . $column . '` ELSE `' . $defaultLocaleI18nAlias . '`.`' . $column . '` END', $aliasPrefix . 'i18n_' . $column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBackEndI18n(ModelCriteria &$search, $askedLocale, $columns = array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'), $foreignTable = null, $foreignKey = 'ID')
|
public static function getBackEndI18n(ModelCriteria &$search, $requestedLocale, $columns, $foreignTable, $foreignKey)
|
||||||
{
|
{
|
||||||
if($foreignTable === null) {
|
if($foreignTable === null) {
|
||||||
$foreignTable = $search->getTableMap()->getName();
|
$foreignTable = $search->getTableMap()->getName();
|
||||||
@@ -84,35 +87,44 @@ class ModelCriteriaTools
|
|||||||
$aliasPrefix = $foreignTable . '_';
|
$aliasPrefix = $foreignTable . '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
$askedLocaleI18nAlias = 'asked_locale_i18n';
|
$requestedLocaleI18nAlias = 'requested_locale_i18n';
|
||||||
|
|
||||||
$askedLocaleJoin = new Join();
|
$requestedLocaleJoin = new Join();
|
||||||
$askedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $askedLocaleI18nAlias);
|
$requestedLocaleJoin->addExplicitCondition($search->getTableMap()->getName(), $foreignKey, null, $foreignTable . '_i18n', 'ID', $requestedLocaleI18nAlias);
|
||||||
$askedLocaleJoin->setJoinType(Criteria::LEFT_JOIN);
|
$requestedLocaleJoin->setJoinType(Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
$search->addJoinObject($askedLocaleJoin, $askedLocaleI18nAlias)
|
$search->addJoinObject($requestedLocaleJoin, $requestedLocaleI18nAlias)
|
||||||
->addJoinCondition($askedLocaleI18nAlias ,'`' . $askedLocaleI18nAlias . '`.LOCALE = ?', $askedLocale, null, \PDO::PARAM_STR);
|
->addJoinCondition($requestedLocaleI18nAlias ,'`' . $requestedLocaleI18nAlias . '`.LOCALE = ?', $requestedLocale, null, \PDO::PARAM_STR);
|
||||||
|
|
||||||
$search->withColumn('NOT ISNULL(`' . $askedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
$search->withColumn('NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.`ID`)', $aliasPrefix . 'IS_TRANSLATED');
|
||||||
|
|
||||||
foreach($columns as $column) {
|
foreach($columns as $column) {
|
||||||
$search->withColumn('`' . $askedLocaleI18nAlias . '`.`' . $column . '`', $aliasPrefix . 'i18n_' . $column);
|
$search->withColumn('`' . $requestedLocaleI18nAlias . '`.`' . $column . '`', $aliasPrefix . 'i18n_' . $column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getI18n($backendContext, $lang, ModelCriteria &$search, $defaultLangWithoutTranslation, $currentLocale, $columns = array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'), $foreignTable = null, $foreignKey = 'ID')
|
public static function getI18n($backendContext, $requestedLangId, ModelCriteria &$search, $currentLocale, $columns, $foreignTable, $foreignKey)
|
||||||
{
|
{
|
||||||
if($lang !== null) {
|
// If a lang has been requested, find the related Lang object, and get the locale
|
||||||
$localeSearch = LangQuery::create()->findOneById($lang);
|
if ($requestedLangId !== null) {
|
||||||
if($localeSearch === null) {
|
$localeSearch = LangQuery::create()->findOneById($requestedLangId);
|
||||||
throw new \InvalidArgumentException('Incorrect lang argument given in attribute loop');
|
|
||||||
}
|
if ($localeSearch === null) {
|
||||||
|
throw new \InvalidArgumentException(sprintf('Incorrect lang argument given in attribute loop: lang ID %d not found', $requestedLangId));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($backendContext) {
|
$locale = $localeSearch->getLocale();
|
||||||
self::getBackEndI18n($search, $lang === null ? $currentLocale : $localeSearch->getLocale(), $columns, $foreignTable, $foreignKey);
|
}
|
||||||
|
else {
|
||||||
|
// Use the currently defined locale
|
||||||
|
$locale = $currentLocale;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the proper method depending on the context: front or back
|
||||||
|
if ($backendContext) {
|
||||||
|
self::getBackEndI18n($search, $locale, $columns, $foreignTable, $foreignKey);
|
||||||
} else {
|
} else {
|
||||||
self::getFrontEndI18n($search, $defaultLangWithoutTranslation, $lang === null ? $currentLocale : $localeSearch->getLocale(), $columns, $foreignTable, $foreignKey);
|
self::getFrontEndI18n($search, $locale, $columns, $foreignTable, $foreignKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
a.editable-click,
|
a.editable-click,
|
||||||
a.editable-click:hover {
|
a.editable-click:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-bottom: dashed 1px #0088cc;
|
border-bottom: dotted 1px #0088cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editable-click.editable-disabled,
|
.editable-click.editable-disabled,
|
||||||
@@ -203,3 +203,454 @@ a.editable-click.editable-disabled:hover {
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Datepicker for Bootstrap
|
||||||
|
*
|
||||||
|
* Copyright 2012 Stefan Petre
|
||||||
|
* Improvements by Andrew Rowls
|
||||||
|
* Licensed under the Apache License v2.0
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.datepicker {
|
||||||
|
padding: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
direction: ltr;
|
||||||
|
/*.dow {
|
||||||
|
border-top: 1px solid #ddd !important;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
.datepicker-inline {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl table tr td span {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 7px solid transparent;
|
||||||
|
border-right: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid #ccc;
|
||||||
|
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
left: 6px;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:after {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 6px solid transparent;
|
||||||
|
border-right: 6px solid transparent;
|
||||||
|
border-bottom: 6px solid #ffffff;
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
left: 7px;
|
||||||
|
}
|
||||||
|
.datepicker > div {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.datepicker.days div.datepicker-days {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.months div.datepicker-months {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.years div.datepicker-years {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker table {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.datepicker td,
|
||||||
|
.datepicker th {
|
||||||
|
text-align: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.table-striped .datepicker table tr td,
|
||||||
|
.table-striped .datepicker table tr th {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.day:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.old,
|
||||||
|
.datepicker table tr td.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.disabled,
|
||||||
|
.datepicker table tr td.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today,
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover {
|
||||||
|
background-color: #fde19a;
|
||||||
|
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||||
|
border-color: #fdf59a #fdf59a #fbed50;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today:hover:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today:hover.disabled,
|
||||||
|
.datepicker table tr td.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.today[disabled],
|
||||||
|
.datepicker table tr td.today:hover[disabled],
|
||||||
|
.datepicker table tr td.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.today.disabled:hover[disabled] {
|
||||||
|
background-color: #fdf59a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active {
|
||||||
|
background-color: #fbf069 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today.active:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range,
|
||||||
|
.datepicker table tr td.range:hover,
|
||||||
|
.datepicker table tr td.range.disabled,
|
||||||
|
.datepicker table tr td.range.disabled:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today,
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover {
|
||||||
|
background-color: #f3d17a;
|
||||||
|
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
|
||||||
|
border-color: #f3e97a #f3e97a #edde34;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today:hover:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today[disabled],
|
||||||
|
.datepicker table tr td.range.today:hover[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled:hover[disabled] {
|
||||||
|
background-color: #f3e97a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active {
|
||||||
|
background-color: #efe24b \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected,
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover {
|
||||||
|
background-color: #9e9e9e;
|
||||||
|
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
|
||||||
|
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
|
||||||
|
border-color: #808080 #808080 #595959;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected:hover:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected:hover.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.selected[disabled],
|
||||||
|
.datepicker table tr td.selected:hover[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled:hover[disabled] {
|
||||||
|
background-color: #808080;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active {
|
||||||
|
background-color: #666666 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active,
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active:hover:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active:hover.disabled,
|
||||||
|
.datepicker table tr td.active.disabled.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.active[disabled],
|
||||||
|
.datepicker table tr td.active:hover[disabled],
|
||||||
|
.datepicker table tr td.active.disabled[disabled],
|
||||||
|
.datepicker table tr td.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span {
|
||||||
|
display: block;
|
||||||
|
width: 23%;
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
float: left;
|
||||||
|
margin: 1%;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.disabled,
|
||||||
|
.datepicker table tr td span.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active,
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active:hover:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active:hover.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td span.active[disabled],
|
||||||
|
.datepicker table tr td span.active:hover[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.old,
|
||||||
|
.datepicker table tr td span.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker th.datepicker-switch {
|
||||||
|
width: 145px;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th,
|
||||||
|
.datepicker tfoot tr th {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th:hover,
|
||||||
|
.datepicker tfoot tr th:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker .cw {
|
||||||
|
font-size: 10px;
|
||||||
|
width: 12px;
|
||||||
|
padding: 0 2px 0 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th.cw {
|
||||||
|
cursor: default;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.input-append.date .add-on i,
|
||||||
|
.input-prepend.date .add-on i {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.input-daterange input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.input-daterange input:first-child {
|
||||||
|
-webkit-border-radius: 3px 0 0 3px;
|
||||||
|
-moz-border-radius: 3px 0 0 3px;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
.input-daterange input:last-child {
|
||||||
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
|
-moz-border-radius: 0 3px 3px 0;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
|
.input-daterange .add-on {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
min-width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 4px 5px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 1px 0 #ffffff;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-left: -5px;
|
||||||
|
margin-right: -5px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -34,75 +34,6 @@
|
|||||||
box-shadow: @shadow;
|
box-shadow: @shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gradients
|
|
||||||
#gradient {
|
|
||||||
.horizontal(@startColor: #555, @endColor: #333) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
|
|
||||||
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down
|
|
||||||
}
|
|
||||||
.vertical(@startColor: #555, @endColor: #333) {
|
|
||||||
background-color: mix(@startColor, @endColor, 60%);
|
|
||||||
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
|
|
||||||
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down
|
|
||||||
}
|
|
||||||
.directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10
|
|
||||||
}
|
|
||||||
.horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
|
|
||||||
background-color: mix(@midColor, @endColor, 80%);
|
|
||||||
background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
|
|
||||||
background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
|
|
||||||
}
|
|
||||||
|
|
||||||
.vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
|
|
||||||
background-color: mix(@midColor, @endColor, 80%);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
|
|
||||||
background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
|
|
||||||
}
|
|
||||||
.radial(@innerColor: #555, @outerColor: #333) {
|
|
||||||
background-color: @outerColor;
|
|
||||||
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
|
|
||||||
background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
|
|
||||||
background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
|
|
||||||
background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
.striped(@color: #555, @angle: 45deg) {
|
|
||||||
background-color: @color;
|
|
||||||
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
|
|
||||||
background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
|
||||||
background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- Base styling ------------------------------------------------------------
|
// -- Base styling ------------------------------------------------------------
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
@@ -158,13 +89,37 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary, .btn-large {
|
.btn-primary, .btn-large {
|
||||||
#gradient > .vertical(rgb(243,153,34), rgb(227,83,11));
|
background: #e9730f;
|
||||||
|
background-image: linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -o-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -moz-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -webkit-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -ms-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -webkit-gradient(
|
||||||
|
linear,
|
||||||
|
left bottom,
|
||||||
|
left top,
|
||||||
|
color-stop(0, rgb(227,83,11)),
|
||||||
|
color-stop(1, rgb(243,153,34))
|
||||||
|
);
|
||||||
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.5), 0px 1px 3px rgba(0,0,0,0.2);
|
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.5), 0px 1px 3px rgba(0,0,0,0.2);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-large:hover, .btn-primary:hover {
|
.btn-large:hover, .btn-primary:hover {
|
||||||
#gradient > .vertical(rgb(243,153,34), rgb(227,83,11));
|
background: #e9730f;
|
||||||
|
background-image: linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -o-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -moz-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -webkit-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -ms-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||||
|
background-image: -webkit-gradient(
|
||||||
|
linear,
|
||||||
|
left bottom,
|
||||||
|
left top,
|
||||||
|
color-stop(0, rgb(227,83,11)),
|
||||||
|
color-stop(1, rgb(243,153,34))
|
||||||
|
);
|
||||||
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.8), 0px 1px 3px rgba(0,0,0,0.2);
|
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.8), 0px 1px 3px rgba(0,0,0,0.2);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -763,120 +718,3 @@ label {
|
|||||||
padding: 20px 20px 0 20px;
|
padding: 20px 20px 0 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Editable tweaks ---------------------------------------------------------
|
|
||||||
|
|
||||||
.editable-click, a.editable-click, a.editable-click:hover {
|
|
||||||
border-bottom: 1px dotted #0088CC;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- Boostrap datepicker -----------------------------------------------------
|
|
||||||
.datepicker {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 4px;
|
|
||||||
margin-top: 1px;
|
|
||||||
.rounded(4px);
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
border-left: 7px solid transparent;
|
|
||||||
border-right: 7px solid transparent;
|
|
||||||
border-bottom: 7px solid #ccc;
|
|
||||||
border-bottom-color: rgba(0,0,0,.2);
|
|
||||||
position: absolute;
|
|
||||||
top: -7px;
|
|
||||||
left: 6px;
|
|
||||||
}
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
border-left: 6px solid transparent;
|
|
||||||
border-right: 6px solid transparent;
|
|
||||||
border-bottom: 6px solid @white;
|
|
||||||
position: absolute;
|
|
||||||
top: -6px;
|
|
||||||
left: 7px;
|
|
||||||
}
|
|
||||||
>div {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
table{
|
|
||||||
width: 100%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
td,
|
|
||||||
th{
|
|
||||||
text-align: center;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
.rounded(4px);
|
|
||||||
}
|
|
||||||
td {
|
|
||||||
&.day:hover {
|
|
||||||
background: @grayLighter;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
&.day.disabled {
|
|
||||||
color: @grayLighter;
|
|
||||||
}
|
|
||||||
&.old,
|
|
||||||
&.new {
|
|
||||||
color: @grayLight;
|
|
||||||
}
|
|
||||||
&.active,
|
|
||||||
&.active:hover {
|
|
||||||
#gradient > .vertical(rgb(243,153,34), rgb(227,83,11));
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
|
||||||
}
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
width: 47px;
|
|
||||||
height: 54px;
|
|
||||||
line-height: 54px;
|
|
||||||
float: left;
|
|
||||||
margin: 2px;
|
|
||||||
cursor: pointer;
|
|
||||||
.rounded(4px);
|
|
||||||
&:hover {
|
|
||||||
background: @grayLighter;
|
|
||||||
}
|
|
||||||
&.active {
|
|
||||||
#gradient > .vertical(rgb(243,153,34), rgb(227,83,11));
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
|
||||||
}
|
|
||||||
&.old {
|
|
||||||
color: @grayLight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
&.switch {
|
|
||||||
width: 145px;
|
|
||||||
}
|
|
||||||
&.next,
|
|
||||||
&.prev {
|
|
||||||
font-size: @baseFontSize * 1.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
thead tr:first-child th {
|
|
||||||
cursor: pointer;
|
|
||||||
&:hover{
|
|
||||||
background: @grayLighter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.input-append,
|
|
||||||
.input-prepend {
|
|
||||||
&.date {
|
|
||||||
.add-on span {
|
|
||||||
display: block;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
{if $action == 'edit'}
|
{if $action == 'edit'}
|
||||||
{intl l='Editing %cat' cat="{$TITLE}"}
|
{intl l='Editing %cat' cat="{$TITLE}"}
|
||||||
{else}
|
{else}
|
||||||
{$TITLE} <a href="{url path="admin/catalog/category/edit/$ID"}" title="{intl l='Edit this category'}">{intl l="(edit)"}</a>
|
{$TITLE} <a href="{url path='admin/catalog/category' id="$ID" action='edit'}" title="{intl l='Edit this category'}">{intl l="(edit)"}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
{else}
|
{else}
|
||||||
<li><a href="{url path="admin/catalog/category/browse/$ID"}">{$TITLE}</a> <span class="divider">/</span></li>
|
<li><a href="{url path='admin/catalog/category' id="$ID" action='browse'}">{$TITLE}</a> <span class="divider">/</span></li>
|
||||||
{/if}
|
{/if}
|
||||||
{/loop}
|
{/loop}
|
||||||
{/ifloop}
|
{/ifloop}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
{loop name="lang_list" type="lang" default_only={$default_only}}
|
{loop name="lang_list" type="lang" default_only={$default_only}}
|
||||||
<li {if $IS_DEFAULT}class="active"{/if}>
|
<li {if $IS_DEFAULT}class="active"{/if}>
|
||||||
<a href="#" title="{intl l="Edit information for %lng" lng=$TITLE}">
|
<a href="#" title="{intl l="Edit information in %lng" lng=$TITLE}">
|
||||||
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user