HomeHelpTrac

Changeset 15850 for trunk/inc


Ignore:
Timestamp:
01/08/12 00:16:40 (5 months ago)
Author:
Alexander Trofimov
Message:

Form - clear input button

Location:
trunk/inc/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/js/classes/BxDolGrid.js

    r15841 r15850  
    302302    else 
    303303        elements = eElement.find('*[bx_grid_action_single]'); 
    304     console.log(elements.size()) 
    305304 
    306305    elements.bind('click', function () { 
  • trunk/inc/js/jquery.webForms.js

    r15848 r15850  
    264264                if ('relative' != eWrapper.css('position') && 'absolute' != eWrapper.css('position')) 
    265265                    eWrapper.css('position', 'relative'); 
    266                 eWrapper.append('<a href="javascript:void(0);"><div class="bx-form-input-btn-cross"></div></a>'); 
    267                 eInput.css('padding-right', parseInt(eInput.css('padding-right')) + 10 + 'px'); 
    268                 var eBtnCross = eWrapper.find('.bx-form-input-btn-cross');                 
    269                 var iLeft = eInput.outerWidth() - eBtnCross.outerWidth() - 8; 
    270                 eBtnCross.css('left', iLeft + 'px').on('click', function () { 
     266 
     267                eWrapper.append('<a href="javascript:void(0);"><div style="display:none;" class="bx-form-input-btn-cross"></div></a>'); 
     268 
     269                var eBtnCross = eWrapper.find('.bx-form-input-btn-cross'); 
     270                var eLink = eWrapper.find('a'); 
     271 
     272                eInput.css('padding-right', parseInt(eInput.css('padding-right')) + 16 + 'px'); 
     273 
     274                eBtnCross.fadeIn(50, function () { // delay is needed here for dynamically displayed forms 
     275                    $(this).position({ 
     276                        of: eInput, 
     277                        my: 'right top', 
     278                        at: 'right top', 
     279                        collision: 'none none', 
     280                        offset: '-8 11' 
     281                    }); 
     282                }); 
     283 
     284                eBtnCross.on('click', function () { 
    271285                    eInput.val(''); 
    272286                    if (!eInput.hasClass('bx-form-input-datetime') && !eInput.hasClass('bx-form-input-datepicker')) 
    273287                        eInput.focus(); 
    274288                }); 
     289 
    275290            } 
    276291 
Note: See TracChangeset for help on using the changeset viewer.