MDL-35934 Filemanager: update set focus attribute.

Also limit the display string for the dialog header to fit nicely on mobile devices
This commit is contained in:
Rossiani Wijaya
2013-08-09 10:01:36 +08:00
parent 7f60308a35
commit 26489591ab
+9 -1
View File
@@ -1017,9 +1017,17 @@ M.form_filemanager.init = function(Y, options) {
}
}, false);
}
// update dialog header
var nodename = node.fullname;
// Limit the string length so it fits nicely on mobile devices
var namelength = 50;
if (nodename.length > namelength) {
nodename = nodename.substring(0, namelength) + '...';
}
Y.one('#fm-dialog-label_'+selectnode.get('id')).setContent(Y.Escape.html(M.str.moodle.edit+' '+nodename));
// show panel
this.selectui.show();
document.getElementById(this.selectui.get('id')).focus();
Y.one('#'+selectnode.get('id')).focus();
},
render: function() {
this.print_path();