Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "elcodi/bamboo",
"name": "mwsimple/bamboo",
"description": "Bamboo, an e-commerce suite built with Elcodi",
"keywords": [
"elcodi",
Expand Down Expand Up @@ -70,7 +70,7 @@
"mmoreram/http-headers-bundle": "1.0.0",
"mmoreram/symfony-bundle-dependencies": "^1.1.1",

"elcodi/elcodi": "^2.0.2",
"mwsimple/elcodi": "^2.0.2",
"paymentsuite/paymentsuite": "^2.0.3"
},
"replace": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// ParsleyConfig definition if not already set
window.ParsleyConfig = window.ParsleyConfig || {};
window.ParsleyConfig.i18n = window.ParsleyConfig.i18n || {};

window.ParsleyConfig.i18n.es = $.extend(window.ParsleyConfig.i18n.es || {}, {
defaultMessage: "Este valor parece ser inválido.",
type: {
email: "Este valor debe ser un correo válido.",
url: "Este valor debe ser una URL válida.",
number: "Este valor debe ser un número válido.",
integer: "Este valor debe ser un número válido.",
digits: "Este valor debe ser un dígito válido.",
alphanum: "Este valor debe ser alfanumérico."
},
notblank: "Este valor no debe estar en blanco.",
required: "Este valor es requerido.",
pattern: "Este valor es incorrecto.",
min: "Este valor no debe ser menor que %s.",
max: "Este valor no debe ser mayor que %s.",
range: "Este valor debe estar entre %s y %s.",
minlength: "Este valor es muy corto. La longitud mínima es de %s caracteres.",
maxlength: "Este valor es muy largo. La longitud máxima es de %s caracteres.",
length: "La longitud de este valor debe estar entre %s y %s caracteres.",
mincheck: "Debe seleccionar al menos %s opciones.",
maxcheck: "Debe seleccionar %s opciones o menos.",
check: "Debe seleccionar entre %s y %s opciones.",
equalto: "Este valor debe ser idéntico."
});

// If file is loaded after Parsley main file, auto-load locale
if ('undefined' !== typeof window.ParsleyValidator)
window.ParsleyValidator.addCatalog('es', window.ParsleyConfig.i18n.es, true);
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ FrontendCore.define('upload-single', [ oGlobalSettings.sPathJs + '../components/

},
updateSelect : function( oContainer, nId , nodeName ) {
var formType = oContainer.getAttribute('formType');
if (!formType)
formType = 'elcodi_admin_product_form_type_manufacturer';

if (nodeName === 'SELECT') {
$('option', oContainer ).filter(function() {
Expand All @@ -24,29 +27,32 @@ FrontendCore.define('upload-single', [ oGlobalSettings.sPathJs + '../components/
});

if (nId !== undefined ) {
$('input[id=elcodi_admin_product_form_type_manufacturer_'+ nId +']', oContainer).click();
$('input[id=' + formType + '_'+ nId +']', oContainer).click();

}
}

},
addImageToGallery : function( oContainer, nId) {
var formType = oContainer.getAttribute('formType');
if (!formType)
formType = 'elcodi_admin_product_form_type_manufacturer';

var self = this,
oOption;

if (oContainer.nodeName === 'SELECT') {
oOption = document.createElement('option');
oOption.id = 'elcodi_admin_product_form_type_manufacturer_' + nId;
oOption.id = formType + '_' + nId;
oOption.value = nId;
oOption.innerHTML = nId;

} else if ($('#elcodi_admin_product_form_type_manufacturer_images_' + nId , oContainer).length === 0) {
} else if ($('#elcodi_admin_product_form_type_' + formType + '_images_' + nId , oContainer).length === 0) {

oOption = document.createElement('input');
oOption.type = 'checkbox';
oOption.name = 'elcodi_admin_product_form_type_manufacturer[images][]';
oOption.id = 'elcodi_admin_product_form_type_manufacturer_' + nId;
oOption.name = formType + '[images][]';
oOption.id = formType + '_' + nId;

}

Expand Down
Loading