Fix three minor filepicker bugs: 1. use language string in search dialog instead of hard code filepicker MDL-26915 2. search dialog now response to enter key MDL-26919 3. search dialog should be modal mode MDL-26918

This commit is contained in:
Dongsheng Cai
2011-03-21 20:56:36 +08:00
parent 56babbcb76
commit e4e9e853d2
+8 -1
View File
@@ -1117,7 +1117,7 @@ M.core_filepicker.init = function(Y, options) {
var dlg_title = document.createElement('DIV');
dlg_title.className = 'hd';
dlg_title.innerHTML = 'filepicker';
dlg_title.innerHTML = M.str.repository.search;
var dlg_body = document.createElement('DIV');
dlg_body.className = 'bd';
@@ -1147,11 +1147,18 @@ M.core_filepicker.init = function(Y, options) {
}, true);
search_dialog.cancel();
}
Y.one('#fp-search-form').on('keydown', function(e){
if (e.keyCode == 13) {
dialog_handler();
e.preventDefault();
}
}, this);
search_dialog = new YAHOO.widget.Dialog("fp-search-dlg", {
postmethod: 'async',
draggable: true,
width : "30em",
modal: true,
fixedcenter : true,
zindex: 9999991,
visible : false,