I agree, it should be the default functionality, because the current solution is just a workaround, but meanwhile you can try it:
Open manager\media\browser\mcpuk\
frmresourcetype.html. In order to enable the Resource Browser to display all File Types (images, files, media, etc), comment line 46 and 47:
/* McCommented
if ( !bHasType || aTypes[i][0] == oConnector.ResourceType )
AddSelectOption( cmbTypeObj, aTypes[i][1], aTypes[i][0] ) ; */
And add the following lines after it:
/*McAdded */
/* http://modxcms.com/forums/index.php/topic,13450.msg181280.html#msg181280 */
// IF type is the same, we have to make the option ""selected""
if ( !bHasType || aTypes[i][0] == oConnector.ResourceType)
{
AddSelectOptionSelected( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
}
else // IF not, only add this option
{
AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
}
/* END McAdded */
Then, open manager\media\browser\mcpuk\js\
common.js, and to enable the Resource Browser to display all File Types, the following function has to be added at the beginning of everything:
/* McAdded */
/* http://modxcms.com/forums/index.php/topic,13450.msg181280.html#msg181280 */
function AddSelectOptionSelected( selectElement, optionText, optionValue, optionSelected )
{
var oOption = document.createElement("OPTION") ;
oOption.text = optionText ;
oOption.value = optionValue ;
oOption.setAttribute('selected', 'selected');
selectElement.options.add(oOption) ;
return oOption ;
}
/* End McAdded */
Hope it helps.
Mc