[svn r18191] FS#2867 - FCKEditor, simple file manager: A logical improvement of the listed items in the resource selector box.

skala
Ivan Tcholakov 16 years ago
parent 2c02997685
commit c40c89999d
  1. 9
      main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.html
  2. 25
      main/inc/lib/fckeditor/editor/filemanager/browser/default/frmresourcetype.html

@ -90,13 +90,10 @@ if ( sServerPath.length > 0 )
oConnector.ResourceType = GetUrlParam( 'Type' ) ;
// Modified by Ivan Tcholakov.
//oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
oConnector.ShowAllTypes = true ;
oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
// Disabled by Ivan Tcholakov.
//if ( oConnector.ShowAllTypes )
// oConnector.ResourceType = 'File' ;
if ( oConnector.ShowAllTypes )
oConnector.ResourceType = 'File' ;
oConnector.SendCommand = function( command, params, callBackFunction )
{

@ -36,10 +36,8 @@ function SetResourceType( type )
var aTypes = [
// Modified by Ivan Tcholakov.
//['File','File'],
['File','All files'],
['Audio','Audio'],
['Images','Images'],
['Flash','Flash'],
['Video','Video'],
@ -50,20 +48,25 @@ window.onload = function()
{
var oCombo = document.getElementById('cmbType') ;
oCombo.innerHTML = '' ;
for ( var i = 0 ; i < aTypes.length ; i++ )
if ( oConnector.ShowAllTypes )
{
if ( oConnector.ShowAllTypes || aTypes[i][0] == oConnector.ResourceType )
AddSelectOption( oCombo, aTypes[0][1], aTypes[0][0], true ) ;
for ( var i = 1 ; i < aTypes.length ; i++ )
{
AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ;
}
}
else
{
AddSelectOption( oCombo, aTypes[0][1], aTypes[0][0] ) ;
for ( var i = 1 ; i < aTypes.length ; i++ )
{
// Modified by Ivan Tcholakov.
//AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ;
if ( aTypes[i][0] == oConnector.ResourceType )
{
AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0], true ) ;
}
else
{
AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ;
}
}
}
}

Loading…
Cancel
Save