// Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap

Conflicts:
	.gitignore
	admin-dev/themes/default/css/admin.css
	admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl
	admin-dev/themes/default/template/controllers/customers/helpers/list/list_header.tpl
	admin-dev/themes/default/template/controllers/modules/list.tpl
	admin-dev/themes/default/template/controllers/modules/page.tpl
	admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
	admin-dev/themes/default/template/controllers/orders/_documents.tpl
	admin-dev/themes/default/template/controllers/orders/_shipping.tpl
	admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/payment/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/payment/restrictions.tpl
	admin-dev/themes/default/template/controllers/products/images.tpl
	admin-dev/themes/default/template/controllers/products/informations.tpl
	admin-dev/themes/default/template/header.tpl
	admin-dev/themes/default/template/helpers/form/form.tpl
	admin-dev/themes/default/template/helpers/modules_list/list.tpl
	classes/Tools.php
	controllers/admin/AdminCartRulesController.php
	controllers/admin/AdminProductsController.php
	css/admin.css
This commit is contained in:
Kevin Granger
2013-07-24 17:01:23 +02:00
603 changed files with 14577 additions and 11364 deletions
+18 -13
View File
@@ -75,16 +75,15 @@ class AdminScenesControllerCore extends AdminController
$images_types = ImageType::getImagesTypes('scenes');
foreach ($images_types as $k => $image_type)
{
if ($image_type['name'] == 'scene_default' && isset($_FILES['image']))
{
if ($image_type['name'] == 'scene_default' AND isset($_FILES['image']) AND isset($_FILES['image']['tmp_name']) AND !$_FILES['image']['error'])
ImageManager::resize(
$base_img_path,
_PS_SCENE_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg',
(int)$image_type['width'],
(int)$image_type['height']
);
(int)$image_type['height']);
else if ($image_type['name'] == 'm_scene_default')
{
{
if (isset($_FILES['thumb']) && !$_FILES['thumb']['error'])
$base_thumb_path = _PS_SCENE_THUMB_IMG_DIR_.$obj->id.'.jpg';
else
@@ -93,8 +92,7 @@ class AdminScenesControllerCore extends AdminController
$base_thumb_path,
_PS_SCENE_THUMB_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg',
(int)$image_type['width'],
(int)$image_type['height']
);
(int)$image_type['height']);
}
}
}
@@ -207,20 +205,20 @@ class AdminScenesControllerCore extends AdminController
$this->addJqueryPlugin('imgareaselect');
$this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' );
$image_to_map_desc .= '<br /><img id="large_scene_image" alt="" src="'.
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg" /><br />';
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg?rand='.(int)rand().'" /><br />';
$image_to_map_desc .= '
<div id="ajax_choose_product" style="display:none; padding:6px; padding-top:2px; width:600px;">
'.$this->l('Begin typing the first few letters of the product name, then select the product you are looking for from the drop-down list:').'
<br /><input type="text" value="" id="product_autocomplete_input" />
<br /><input type="text" value="" id="product_autocomplete_input" style="width: 450px"/>
<input type="button" class="button" value="'.$this->l('OK').'" onclick="$(this).prev().search();" />
<input type="button" class="button" value="'.$this->l('Delete').'" onclick="undoEdit();" />
</div>
';
if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.'thumbs/'.$obj->id.'-thumb_scene.jpg'))
if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg'))
$image_to_map_desc .= '<br/>
<img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'._THEME_SCENE_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg" />
<img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'._THEME_SCENE_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg?rand='.(int)rand().'" />
<br />';
$img_alt_desc = '';
@@ -229,7 +227,7 @@ class AdminScenesControllerCore extends AdminController
.$this->l('File size:').' '.(Tools::getMaxUploadSize() / 1024).''.$this->l('Kb max.').' '
.sprintf($this->l('Automatically resized to %1$d x %2$dpx (width x height).'),
$thumb_scene_image_type['width'], $thumb_scene_image_type['height']).'.<br />'
.$this->l('Note: To change image dimensions, please change the \'thumb_scene\' image type settings to the desired size (in Back Office > Preferences > Images).');
.$this->l('Note: To change image dimensions, please change the \'m_scene_default\' image type settings to the desired size (in Back Office > Preferences > Images).');
$input_img_alt = array(
'type' => 'file',
@@ -312,7 +310,14 @@ class AdminScenesControllerCore extends AdminController
if (!Tools::isSubmit('zones') || !count(Tools::getValue('zones')))
$this->errors[] = Tools::displayError('You should create at least one zone.');
}
if (Tools::isSubmit('delete'.$this->table))
{
if (Validate::isLoadedObject($object = $this->loadObject()))
$object->deleteImage(false);
else
return false;
}
parent::postProcess();
}
}