campos dependientes en grillas funcionando

This commit is contained in:
Alvaro Campos
2011-02-07 16:32:57 +00:00
parent ef7bd22d41
commit 70dced295d
3 changed files with 11 additions and 3 deletions

View File

@@ -1851,6 +1851,8 @@ function removeValue(id){
function datePicker4(obj, id, mask, startDate, endDate, showTIme){
//alert('->'+id);
if(showTIme=='false')
showTIme=false;
new Calendar({
inputField: id,
dateFormat: mask,

View File

@@ -164,7 +164,7 @@ var G_Grid = function(oForm, sGridName) {
newID = aObjects[0].id.replace(/\[1\]/g, '\[' + (this.oGrid.rows.length - 2) + '\]');
aObjects[0].setAttribute('id', newID);
aObjects[0].setAttribute('value', '');
//aObjects[0].setAttribute('value', '');
aObjects[0].name = newID;
if (/*@cc_on!@*/0) { // Internet Explorer test (needs to be modified for IE8)
aObjects[0].mergeAttributes(document.createElement("<INPUT id='" + newID + "' name='" + newID + "'/>"), false);
@@ -178,7 +178,12 @@ var G_Grid = function(oForm, sGridName) {
if(attributes.defaultvalue!= undefined)
attributDefaultValue=attributes.defaultvalue;
} else {
attributDefaultValue='';
scriptTags = oNewRow.getElementsByTagName('td')[i].getElementsByTagName('script');
attributes = elementAttributesNS(aObjects[0]);
if(attributes.value != undefined)
attributDefaultValue=attributes.value;
else
attributDefaultValue='';
}
if (aObjects[0].type != 'checkbox' ) {
@@ -276,7 +281,7 @@ var G_Grid = function(oForm, sGridName) {
if (/*@cc_on!@*/0) {
oNewRow.getElementsByTagName('td')[i].innerHTML = aux;
}
// alert(oNewRow.getElementsByTagName('td')[i].innerHTML);
//alert(oNewRow.getElementsByTagName('td')[i].innerHTML);
break;
case 'select':
aObjects = oNewRow.getElementsByTagName('td')[i].getElementsByTagName('select');

View File

@@ -3023,6 +3023,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
$endDate = G::replaceDataField ( $this->endDate, $owner->values );
$beforeDate = G::replaceDataField ( $this->beforeDate, $owner->values );
$afterDate = G::replaceDataField ( $this->afterDate, $owner->values );
$value=$this->defaultValue;
if ($startDate != '') {
if (! $this->verifyDateFormat ( $startDate ))