Add a “success uploaded file” message + translation “search”
-
Hi,
I’d like to add a success message when a file is uploaded.
I never use backbone, but i watch your code, and i try something quickly.in buddydrive-views.js , i add this :
this.listenTo( buddydrive.Uploader.filesUploaded, 'add', this.displaySuccess );
displaySuccess: function( file ) { var message = 'File uploaded !'; if(BP_Uploader.strings.feedback_messages[2] != undefined) { message = BP_Uploader.strings.feedback_messages[2]; } this.views.add( '#buddydrive-status', new buddydrive.Views.Feedback( { value: message } ) ); setTimeout(function(currentInstance){ currentInstance.cleanViews( '#buddydrive-status' ); }, 3000, this); },
i know, this is not clean, but it works for now.
I don’t master Buddypress + Buddydrive. I just retrieve the project.
Have you a solution cleaner than mine ?Problem if we update the plugin, the code’ll be remove.
But i’ve no choice for now :/And i’ve an issue with translation. In SearchForm View, we’ve a placeholder “Search”, but the website is French, so, i’ve momentarily replace “Search” by “Recherche”.
Thanks for your feedback,
- The topic ‘Add a “success uploaded file” message + translation “search”’ is closed to new replies.