Prevent admin cosole to upload into default category

Last post 06-23-2011, 1:31 AM by honzas. 3 replies.
Sort Posts: Previous Next
  •  06-22-2011, 8:47 AM 68090

    Prevent admin cosole to upload into default category

    Is there way how to prevent admin console for dowloading files until a category is selected?
    When the Admin console is opened, no category is selected and files are uploaded into default category.
     
    The best solution I'd like would be to disable the "Upload files" button untill some category is selected.
    Filed under: ,
  •  06-22-2011, 9:22 PM 68095 in reply to 68090

    Re: Prevent admin cosole to upload into default category

    Hi honzas,
     
    Try this way
     
    1. Open file "\CuteSoft_Client\Gallery\Editor\Explorer\Code.js"
     
    2. Find section below
     
    var uploadbtn=CreateEditorButton("Images/standard-upload.png",GalleryLocalize.CLICK_UPLOADFILES);
     
    3. Change to
     
    var uploadbtn=CreateEditorButton("Images/standard-upload.png",GalleryLocalize.CLICK_UPLOADFILES);
    uploadbtn.style.display="none";
     
    4. Find section below
     
    var div=null;
     
    5.  Change to
     
    uploadbtn.style.display="";
    var div=null;
     
    6. Now, the upload button will not be displayed until you select a category.
     
    Regards,
     
    ken
     
     
  •  06-22-2011, 9:23 PM 68096 in reply to 68090

    Re: Prevent admin cosole to upload into default category

    Hi honzas,
     
    You can achieve it by the following code.
     
    Find file 'CuteSoft_Client/Gallery/Editor/Explorer/Code.js'
     
    Find about line 59, add 
    1. uploadbtn.style.display = "none";  
     then about line 193 in function ShowAllPhotos(), add
    1. if(uploadbtn.style.display=="")  
    2.     uploadbtn.style.display = "none";  
     then about  line 214, at the end of function SelectCategory(category), add
    1. if(uploadbtn.style.display=="none")  
    2.      uploadbtn.style.display = "";  
     
      
    Regards,
    Jeff 
  •  06-23-2011, 1:31 AM 68101 in reply to 68095

    Re: Prevent admin cosole to upload into default category

    Thanks Ken, it is exactly I needed.
     
    Jan.
View as RSS news feed in XML