~openerp-commiter/openobject-client-web/OOCRM

« back to all changes in this revision

Viewing changes to openerp/static/javascript/form_state.js

  • Committer: ksh (Axelor)
  • Date: 2010-03-11 12:18:57 UTC
  • mfrom: (2594.4.136 5.0)
  • Revision ID: ksh@axelor.com-20100311121857-yz35zlz2u5nevgl1
[MRG] eTiny5.0 till revno 2833

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        return Many2Many(field.id).setReadonly(readonly);
281
281
    }
282
282
 
 
283
        var type = MochiKit.DOM.getNodeAttribute(field, 'type');
 
284
 
283
285
    field.readOnly = readonly;
284
286
    field.disabled = readonly;
285
287
    
286
 
    if (readonly) {
 
288
    if (readonly && (type != 'button')) {
287
289
        MochiKit.DOM.addElementClass(field, 'readonlyfield');
288
290
    } else {
289
291
        MochiKit.DOM.removeElementClass(field, 'readonlyfield');