Remove TreeDropdownField placeholder support (see #2364)

It breaks the semantics of getValue(), leading to a broken field.
Regression from 8b5f89f. In the end, placeholder support is
considered "progressive enhancement", the search box should
be pretty obvious to IE8/IE9 users either way, given the main
field label is called "choose or search".
This commit is contained in:
Ingo Schommer 2013-08-30 09:47:37 +02:00
parent 20b49e215c
commit 93ea066f53

View File

@ -296,25 +296,10 @@
cancelSearch: function() {
this.closePanel();
this.loadTree();
},
getValue: function(title){
//Provide value for IE8 and 9 as they don't support placeholders
return ($.browser.msie && parseInt($.browser.version, 10) <= 9) ? title:'';
}
});
$('.TreeDropdownField.searchable input.search').entwine({
onfocusin: function(){
//IE placeholder support
this.val('');
},
onfocusout: function(){
//IE placeholder support
var value = this.closest('.TreeDropdownField').getValue(this.attr('placeholder'));
if(this.val() === ''){
this.val(value);
}
},
onkeydown: function(e) {
var field = this.getField();
if(e.keyCode == 13) {