Changeset 20536

Show
Ignore:
Timestamp:
03/08/10 08:35:49 (5 months ago)
Author:
nilesh
Message:

some changes in workplan inline editing process related to applying editing cell css and validation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/core/web/src/ScheduleMain.js

    r20531 r20536  
    457457        //use displayedValue if no value is specified. 
    458458        document.getElementById(currentCellID).innerHTML = (value ? value : displayedValue); 
     459        if(value) 
     460                currentCellObject.className += ' editedCell'; 
    459461        //Since we have made changes on cell padding for avoiding flicking, We need to again put those padding for making view as previous. 
    460462        applyCellStyles() 
     
    523525                                        }else{ 
    524526                                                (currentField == 'wc'? handleTaskWorkCompleteEditing(object.value): handleTaskWorkPercentCompleteEditing(object)); 
    525                                                 currentCellObject.className += ' editedCell'; 
    526527                                                removeEditor(object.value); 
    527528                                        }}, 
     
    530531                } else { 
    531532                        (currentField == 'wc'? handleTaskWorkCompleteEditing(object.value): handleTaskWorkPercentCompleteEditing(object)); 
    532                         currentCellObject.className += ' editedCell'; 
    533533                        removeEditor(object.value); 
    534534                         
     
    537537         
    538538        if(currentField != 'wc' && currentField != 'wpc'){ 
    539                 //Update current cell css as edited 
    540                 currentCellObject.className += ' editedCell'; 
    541539                //Remove editor finally. 
    542540                removeEditor(object.value); 
     
    587585        if(unit =='none'){ 
    588586                extAlert(errorAlertTitle, (currentField == 'd' ? invalidDurationUnitMsg : invalidWorkUnitMsg), Ext.MessageBox.ERROR); 
     587                removeEditor(); 
    589588                return; 
    590589        } 
    591590        //if work value is not valid show alert and return. 
    592         if(!isValidNumber(workValue, true)){ 
     591        if(!isValidNumber(workValue)){ 
    593592                extAlert(errorAlertTitle, (currentField == 'd' ? invalidDurationMsg : invalidWorkAmountMsg) ,Ext.MessageBox.ERROR); 
     593                removeEditor(); 
    594594                return; 
    595595        } 
     
    614614                unit = getWorkUnit(unit.trim()); 
    615615                if(unit !='none'){ 
    616                         if(isValidNumber(workValue, true)){ 
     616                        if(isValidNumber(workValue)){ 
    617617                                //We need actual old value for validation 
    618618                                var row = document.getElementById(currentEntryID); 
     
    14071407                return; 
    14081408        } 
    1409         if(!isValidNumber(workValue, true)){ 
     1409        if(!isValidNumber(workValue)){ 
    14101410                extAlert(errorAlertTitle, invalidWorkAmountMsg, Ext.MessageBox.ERROR); 
    14111411                workField.focus();