MDL-33920 filepicker: hide 'save as' field when not applicable

This commit is contained in:
Marina Glancy
2014-01-31 16:56:13 +08:00
parent 183515da23
commit 4e3663365b
+1 -2
View File
@@ -1101,8 +1101,7 @@ M.core_filepicker.init = function(Y, options) {
for (var linktype in filelink) {
var el = selectnode.one('.fp-linktype-'+linktype);
el.addClassIf('uneditable', !(filelink[linktype] && filelinkcount>1));
el.one('input').set('disabled', (filelink[linktype] && filelinkcount>1) ? '' : 'disabled').
set('checked', (firstfilelink == linktype) ? 'checked' : '').simulate('change')
el.one('input').set('checked', (firstfilelink == linktype) ? 'checked' : '').simulate('change');
}
// TODO MDL-32532: attributes 'hasauthor' and 'haslicense' need to be obsolete,