Browse files

Fix three minor filepicker bugs: 1. use language string in search dia…

…log 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
  • Loading branch information...
1 parent 56babbc commit e4e9e853d285825ea6ff7141af390896565249d2 @dcai dcai committed Mar 21, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 repository/filepicker.js
View
9 repository/filepicker.js
@@ -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,

0 comments on commit e4e9e85

Please sign in to comment.