-});
-
-
-Ext.form.MessageTargets = {
- 'qtip' : {
- mark: function(field, msg){
- field.el.addClass(field.invalidClass);
- field.el.dom.qtip = msg;
- field.el.dom.qclass = 'x-form-invalid-tip';
- if(Ext.QuickTips){ // fix for floating editors interacting with DND
- Ext.QuickTips.enable();
- }
- },
- clear: function(field){
- field.el.removeClass(field.invalidClass);
- field.el.dom.qtip = '';
- }
- },
- 'title' : {
- mark: function(field, msg){
- field.el.addClass(field.invalidClass);
- field.el.dom.title = msg;
- },
- clear: function(field){
- field.el.dom.title = '';
- }
- },
- 'under' : {
- mark: function(field, msg){
- field.el.addClass(field.invalidClass);
- if(!field.errorEl){
- var elp = field.getErrorCt();
- if(!elp){ // field has no container el
- field.el.dom.title = msg;
- return;
- }
- field.errorEl = elp.createChild({cls:'x-form-invalid-msg'});
- field.errorEl.setWidth(elp.getWidth(true)-20);
- }
- field.errorEl.update(msg);
- Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field);
- },
- clear: function(field){
- field.el.removeClass(field.invalidClass);
- if(field.errorEl){
- Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field);
- }else{
- field.el.dom.title = '';
- }
- }
- },
- 'side' : {
- mark: function(field, msg){
- field.el.addClass(field.invalidClass);
- if(!field.errorIcon){
- var elp = field.getErrorCt();
- if(!elp){ // field has no container el
- field.el.dom.title = msg;
- return;
- }
- field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
- }
- field.alignErrorIcon();
- field.errorIcon.dom.qtip = msg;
- field.errorIcon.dom.qclass = 'x-form-invalid-tip';
- field.errorIcon.show();
- field.on('resize', field.alignErrorIcon, field);
- },
- clear: function(field){
- field.el.removeClass(field.invalidClass);
- if(field.errorIcon){
- field.errorIcon.dom.qtip = '';
- field.errorIcon.hide();
- field.un('resize', field.alignErrorIcon, field);
- }else{
- field.el.dom.title = '';
- }
- }
- }
-};
-
-// anything other than normal should be considered experimental
-Ext.form.Field.msgFx = {
- normal : {
- show: function(msgEl, f){
- msgEl.setDisplayed('block');
- },
-
- hide : function(msgEl, f){
- msgEl.setDisplayed(false).update('');
- }
- },