Mercurial > lada > lada-client
comparison app/view/widget/base/ComboBox.js @ 634:291ac2e2bcf5
Set translateable messages for the parent fieldset.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 16 Mar 2015 17:31:13 +0100 |
parents | fead63bb5fb4 |
children | bf15bfea2fca |
comparison
equal
deleted
inserted
replaced
633:1e1534482bfd | 634:291ac2e2bcf5 |
---|---|
64 this.down('combobox').invalidCls = 'x-lada-warning'; | 64 this.down('combobox').invalidCls = 'x-lada-warning'; |
65 this.down('combobox').markInvalid(''); | 65 this.down('combobox').markInvalid(''); |
66 img.show(); | 66 img.show(); |
67 var fieldset = this.up('fieldset[collapsible=true]'); | 67 var fieldset = this.up('fieldset[collapsible=true]'); |
68 if (fieldset) { | 68 if (fieldset) { |
69 fieldset.showWarnings(warnings); | 69 var i18n = Lada.getApplication().bundle; |
70 var warningText = i18n.getMsg(this.name) + ': ' + warnings; | |
71 fieldset.showWarningOrError(true, warningText); | |
70 } | 72 } |
71 }, | 73 }, |
72 | 74 |
73 showErrors: function(errors) { | 75 showErrors: function(errors) { |
74 var img = this.down('image[name=errorImg]'); | 76 var img = this.down('image[name=errorImg]'); |
81 this.down('combobox').invalidCls = 'x-lada-error'; | 83 this.down('combobox').invalidCls = 'x-lada-error'; |
82 this.down('combobox').markInvalid(''); | 84 this.down('combobox').markInvalid(''); |
83 img.show(); | 85 img.show(); |
84 var fieldset = this.up('fieldset[collapsible=true]'); | 86 var fieldset = this.up('fieldset[collapsible=true]'); |
85 if (fieldset) { | 87 if (fieldset) { |
86 fieldset.showErrors(); | 88 var i18n = Lada.getApplication().bundle; |
89 var errorText = i18n.getMsg(this.name) + ': ' + errors; | |
90 fieldset.showWarningOrError(false, '', true, errorText); | |
87 } | 91 } |
88 }, | 92 }, |
89 | 93 |
90 clearWarningOrError: function() { | 94 clearWarningOrError: function() { |
91 this.down('image[name=errorImg]').hide(); | 95 this.down('image[name=errorImg]').hide(); |