Merge remote branch 'upstream/master' into BUG-10852

This commit is contained in:
Hector Cortez
2013-04-22 09:10:41 -04:00
8 changed files with 229 additions and 42 deletions

View File

@@ -76,6 +76,7 @@
.cm-s-default .cm-error {color: #f00;} .cm-s-default .cm-error {color: #f00;}
.cm-s-default .cm-qualifier {color: #555;} .cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;} .cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-PMbuiltin {color: white; background: #38A;}
.cm-s-default .cm-bracket {color: #997;} .cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;} .cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;} .cm-s-default .cm-attribute {color: #00c;}

File diff suppressed because one or more lines are too long

View File

@@ -509,6 +509,10 @@ class Form extends XmlForm
$values[$k] = $this->fields[$k]->maskValue( $newValues[$k], $this ); $values[$k] = $this->fields[$k]->maskValue( $newValues[$k], $this );
} }
} }
} else {
if ($v->type == 'checkgroup') {
$values[$k] = null;
}
} }
} else { } else {
if (isset( $_FILES["form"]["name"][$k] )) { if (isset( $_FILES["form"]["name"][$k] )) {

View File

@@ -4520,9 +4520,9 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
$isRequired = '0'; $isRequired = '0';
} }
if ($this->editable != "0") { if ($this->editable != "0") {
$html = '<input pm:required="' . $isRequired . '" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '" pm:end="' . $endDate . '" pm:time="' . $Time . '" ' . $onchange . ' class="module_app_input___gray" size="' . $sizeend . '" value="' . $value . '" pm:defaultvalue="' . $defaultValue . '" />' . '<a onclick="removeValue(\'' . $pID . '\'); return false;" style="position:relative;left:-17px;top:5px;" >' . ' <img src="/images/icons_silk/calendar_x_button.png" />' . '</a>' . '<a id="' . $pID . '[btn]" style="position:relative;left:-22px;top:0px;" >' . ' <img src="/images/pmdateicon.png" border="0" width="12" height="14" />' . '</a>' . '<script>datePicker4("", \'' . $pID . '\', \'' . $mask . '\', \'' . $startDate . '\', \'' . $endDate . '\',' . $Time . ')</script>'; $html = '<input pm:required="' . $isRequired . '" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '" pm:end="' . $endDate . '" pm:time="' . $Time . '" ' . $onchange . ' class="module_app_input___gray" size="' . $sizeend . '" value="' . $value . '" pm:defaultvalue="' . $defaultValue . '" />' . '<a onclick="removeValue(\'' . $pID . '\'); return false;" style="position:relative;left:-17px;top:2px;" >' . ' <img src="/images/icons_silk/calendar_x_button.png" />' . '</a>' . '<a id="' . $pID . '[btn]" style="position:relative;left:-17px;top:2px;" >' . ' <img src="/images/pmdateicon.png" border="0" width="12" height="14" />' . '</a>' . '<script>datePicker4("", \'' . $pID . '\', \'' . $mask . '\', \'' . $startDate . '\', \'' . $endDate . '\',' . $Time . ')</script>';
} else { } else {
$html = '<input pm:required="' . $isRequired . '" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '" pm:end="' . $endDate . '" pm:time="' . $Time . '" ' . $onchange . ' class="module_app_input___gray" size="' . $sizeend . '" value="' . $value . '" pm:defaultvalue="' . $defaultValue . '" readonly="readonly" />' . '<a onclick="removeValue(\'' . $pID . '\'); return false;" style="position:relative;left:-17px;top:5px;" >' . ' <img src="/images/icons_silk/calendar_x_button.png" />' . '</a>' . '<a id="' . $pID . '[btn]" style="position:relative;left:-22px;top:0px;" >' . ' <img src="/images/pmdateicon.png" border="0" width="12" height="14" />' . '</a>' . '<script>datePicker4("", \'' . $pID . '\', \'' . $mask . '\', \'' . $startDate . '\', \'' . $endDate . '\',' . $Time . ')</script>'; $html = '<input pm:required="' . $isRequired . '" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '" pm:end="' . $endDate . '" pm:time="' . $Time . '" ' . $onchange . ' class="module_app_input___gray" size="' . $sizeend . '" value="' . $value . '" pm:defaultvalue="' . $defaultValue . '" readonly="readonly" />' . '<a onclick="removeValue(\'' . $pID . '\'); return false;" style="position:relative;left:-17px;top:2px;" >' . ' <img src="/images/icons_silk/calendar_x_button.png" />' . '</a>' . '<a id="' . $pID . '[btn]" style="position:relative;left:-17px;top:2px;" >' . ' <img src="/images/pmdateicon.png" border="0" width="12" height="14" />' . '</a>' . '<script>datePicker4("", \'' . $pID . '\', \'' . $mask . '\', \'' . $startDate . '\', \'' . $endDate . '\',' . $Time . ')</script>';
} }
} else { } else {
$html = "<span style='border:1;border-color:#000;width:100px;' name='" . $pID . "'>$value</span>" . '<input type="hidden" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '"' . 'pm:end="' . $endDate . '" ' . $onchange . ' class="module_app_input___gray" value="' . $value . '"/>'; $html = "<span style='border:1;border-color:#000;width:100px;' name='" . $pID . "'>$value</span>" . '<input type="hidden" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '"' . 'pm:end="' . $endDate . '" ' . $onchange . ' class="module_app_input___gray" value="' . $value . '"/>';

View File

@@ -479,6 +479,8 @@ class Configurations // extends Configuration
$arrayFormat[] = array("id" => "m.d.y", "name" => G::LoadTranslation("ID_DATE_FORMAT_7")); //"m.d.y" i.e: "11.17.10" $arrayFormat[] = array("id" => "m.d.y", "name" => G::LoadTranslation("ID_DATE_FORMAT_7")); //"m.d.y" i.e: "11.17.10"
$arrayFormat[] = array("id" => "j, n, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_8")); //"j, n, Y" i.e: "17,11,2010" $arrayFormat[] = array("id" => "j, n, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_8")); //"j, n, Y" i.e: "17,11,2010"
$arrayFormat[] = array("id" => "D M j G:i:s T Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_9")); //"D M j G:i:s T Y" i.e: "Thu Nov 17 10:48:18 BOT 2010" $arrayFormat[] = array("id" => "D M j G:i:s T Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_9")); //"D M j G:i:s T Y" i.e: "Thu Nov 17 10:48:18 BOT 2010"
$arrayFormat[] = array("id" => "M d, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_15")); //"M d, Y" i.e: "November 15, 2010"
$arrayFormat[] = array("id" => "m D, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_16")); //"D M, Y" i.e: "Thu 01, 2010"
$arrayFormat[] = array("id" => "D d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_10")); //"D d M, Y" i.e: "Thu 17 Nov, 2010" $arrayFormat[] = array("id" => "D d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_10")); //"D d M, Y" i.e: "Thu 17 Nov, 2010"
$arrayFormat[] = array("id" => "D M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_11")); //"D M, Y" i.e: "Thu Nov, 2010" $arrayFormat[] = array("id" => "D M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_11")); //"D M, Y" i.e: "Thu Nov, 2010"
$arrayFormat[] = array("id" => "d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_12")); //"d M, Y" i.e: "17 Nov, 2010" $arrayFormat[] = array("id" => "d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_12")); //"d M, Y" i.e: "17 Nov, 2010"
@@ -506,8 +508,10 @@ class Configurations // extends Configuration
public function getSystemDate($dateTime) public function getSystemDate($dateTime)
{ {
$oConf = new Configurations(); $oConf = new Configurations();
$dateFormat = 'M d, Y';
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', ''); $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
$creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : ''; $creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : '';
$creationDateMask = ($creationDateMask == '') ? $dateFormat : $creationDateMask;
if ($creationDateMask != '') { if ($creationDateMask != '') {
if (strpos($dateTime, ' ') !== false) { if (strpos($dateTime, ' ') !== false) {
list ($date, $time) = explode(' ', $dateTime); list ($date, $time) = explode(' ', $dateTime);
@@ -517,7 +521,7 @@ class Configurations // extends Configuration
} else { } else {
list ($y, $m, $d) = explode('-', $dateTime); list ($y, $m, $d) = explode('-', $dateTime);
$newCreation = ''; $newCreation = '';
$maskTime = array('d' => '%d', 'D' => '%a', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%h', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S'); $maskTime = array('d' => '%d', 'D' => '%A', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%B', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
$creationDateMask = trim($creationDateMask); $creationDateMask = trim($creationDateMask);
for ($i = 0; $i < strlen($creationDateMask); $i++) { for ($i = 0; $i < strlen($creationDateMask); $i++) {
if ($creationDateMask[$i] != ' ' && isset($maskTime[$creationDateMask[$i]])) { if ($creationDateMask[$i] != ' ' && isset($maskTime[$creationDateMask[$i]])) {
@@ -540,7 +544,6 @@ class Configurations // extends Configuration
$dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y))); $dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y)));
} }
} }
return $dateTime; return $dateTime;
} }

View File

@@ -158,6 +158,12 @@ Ext.onReady(function(){
} }
} }
if (navigator.userAgent.toLowerCase().indexOf("chrome") != -1){
if (_columns.length > 7) {
_columns.push({header:"", dataIndex:"", width: 30, menuDisabled: true, hideable: false});
}
}
smodel = new Ext.grid.CheckboxSelectionModel({ smodel = new Ext.grid.CheckboxSelectionModel({
listeners:{ listeners:{
selectionchange : function(sm){ selectionchange : function(sm){

View File

@@ -105,6 +105,9 @@ var fieldSeparator=getField("PME_COMMA_SEPARATOR",fieldForm);
var fieldMask=getField("PME_MASK",fieldForm); var fieldMask=getField("PME_MASK",fieldForm);
var savedFieldName=fieldName.value; var savedFieldName=fieldName.value;
var pme_validating; var pme_validating;
var separatorOld;
var separatorNew;
fieldName.focus(); fieldName.focus();
fieldName.select(); fieldName.select();
leimnud.event.add(fieldName, 'change', {method:dynaformVerifyFieldName, instance:fieldName, event:true}); leimnud.event.add(fieldName, 'change', {method:dynaformVerifyFieldName, instance:fieldName, event:true});
@@ -135,9 +138,7 @@ function replaceAll( text, search, change ) {
return text; return text;
} }
function checkSeparator() { function selectSeparator() {
var separatorOld;
var separatorNew;
switch (fieldSeparator.value) { switch (fieldSeparator.value) {
case '.': case '.':
separatorOld = ','; separatorOld = ',';
@@ -152,42 +153,34 @@ function checkSeparator() {
separatorNew = '.'; separatorNew = '.';
break; break;
} }
var mask = fieldMask.value;
if (fieldVal.value !== 'Int'){
var amount = fieldMask.value.length;
var separator = mask.substring(amount-3, amount-2);
mask = mask.substring(0, amount-3);
} }
mask = replaceAll(mask , separatorNew, separatorOld); function changeVal (positionSeparator) {
if (fieldVal.value !== 'Int'){ var maskDecimal = '';
mask = mask.concat(separatorNew, '##'); var maskInteger = fieldMask.value;
if (positionSeparator > 0) {
maskDecimal = fieldMask.value.substring(positionSeparator + 1, fieldMask.value.length);
maskInteger = fieldMask.value.substring(0, positionSeparator);
} }
fieldMask.value = mask; maskInteger = replaceAll(maskInteger , separatorNew, separatorOld);
if (fieldVal.value === 'Int'){
fieldMask.value = maskInteger;
}
if (fieldVal.value === 'Real'){
if (maskDecimal == '' || (maskDecimal.length > 6)) {
maskDecimal = '######';
}
fieldMask.value = maskInteger + separatorNew + maskDecimal;
}
}
function checkSeparator() {
selectSeparator();
changeVal (fieldMask.value.indexOf(separatorOld));
} }
function checkVal() { function checkVal() {
if (fieldVal.value === 'Int'){ selectSeparator();
aux = fieldMask.value; changeVal (fieldMask.value.indexOf(separatorNew));
aux = aux.replace('.000','');
var amount = fieldMask.value.length;
var sw = 0;
var i = 0;
while (sw == 0) {
if(aux.charAt(amount - i - 1) == ',' || aux.charAt(amount - i - 1) == '.') {
sw = 1;
} else {
i++;
}
}
if (i <= 2) {
aux = aux.substring(0, amount - i - 1);
}
fieldMask.value = aux;
}
if (fieldVal.value === 'Real'){
fieldMask.value = fieldMask.value+'.##';
}
checkSeparator();
} }
]]></PME_JS> ]]></PME_JS>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB