/* ===========================================================
 * trumbowyg.upload.js
 * Upload plugin for Trumbowyg
 * http://alex-d.github.com/Trumbowyg
 * ===========================================================
 * Author : Alexandre Demode (Alex-D)
 *          Twitter : @AlexandreDemode
 *          Website : alex-d.fr
 */


/**
 *
 * /!\ IN DEV - NOT FUNCTIONAL /!\
 * This plugin is in developement, do not use it
 * 
 */
(function($){
	$.extend(true, $.trumbowyg, {
		langs: {
			en: {
				upload: "Upload",
				file: 	"File"
			},
			fr: {
				upload: "Envoi",
				file: 	"Fichier"
			}
		},

		opts: {
			btnsDef: {
				insertImage: { dropdown: ['insertImage', 'upload'] },
				upload: {
					func: function(params, tbw){
						tbw.openModalInsert(
							// Title
							tbw.lang['upload'],

							// Fields
							{
								file: {
									type: 'file',
									required: true
								},
								alt: {
									label: 'description'
								}
							},

							// Callback
							function(values){
								console.log(values);
							}
						);
					}
				}
			}
		}
	});
})(jQuery);
@@ -439,17 +439,20 @@
 ion($)%7B%0A
-%09
+    
 $.extend
@@ -473,18 +473,24 @@
 owyg, %7B%0A
-%09%09
+        
 langs: %7B
@@ -494,21 +494,42 @@
 : %7B%0A
-%09%09%09en: %7B%0A%09%09%09%09
+            en: %7B%0A                
 uplo
@@ -546,45 +546,88 @@
 d%22,%0A
-%09%09%09%09
+                
 file: 
-%09
+  
 %22File%22%0A
-%09%09%09%7D,%0A%09%09%09fr: %7B%0A%09%09%09%09
+            %7D,%0A            fr: %7B%0A                
 uplo
@@ -643,19 +643,32 @@
 i%22,%0A
-%09%09%09%09
+                
 file: 
-%09
+  
 %22Fic
@@ -677,500 +677,1019 @@
 er%22%0A
-%09%09%09%7D%0A%09%09%7D,%0A%0A%09%09opts: %7B%0A%09%09%09btnsDef: %7B%0A%09%09%09%09insertImage: %7B dropdown: %5B'insertImage', 'upload'%5D %7D,%0A%09%09%09%09upload: %7B%0A%09%09%09%09%09func: function(params, tbw)%7B%0A%09%09%09%09%09%09tbw.openModalInsert(%0A%09%09%09%09%09%09%09// Title%0A%09%09%09%09%09%09%09tbw.lang%5B'upload'%5D,%0A%0A%09%09%09%09%09%09%09// Fields%0A%09%09%09%09%09%09%09%7B%0A%09%09%09%09%09%09%09%09file: %7B%0A%09%09%09%09%09%09%09%09%09type: 'file',%0A%09%09%09%09%09%09%09%09%09required: true%0A%09%09%09%09%09%09%09%09%7D,%0A%09%09%09%09%09%09%09%09alt: %7B%0A%09%09%09%09%09%09%09%09%09label: 'description'%0A%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%7D,%0A%0A%09%09%09%09%09%09%09// Callback%0A%09%09%09%09%09%09%09function(values)%7B%0A%09%09%09%09%09%09%09%09console.log(values);%0A%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09);%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09
+            %7D%0A        %7D,%0A%0A        opts: %7B%0A            btnsDef: %7B%0A                insertImage: %7B dropdown: %5B'insertImage', 'upload'%5D %7D,%0A                upload: %7B%0A                    func: function(params, tbw)%7B%0A                        tbw.openModalInsert(%0A                            // Title%0A                            tbw.lang%5B'upload'%5D,%0A%0A                            // Fields%0A                            %7B%0A                                file: %7B%0A                                    type: 'file',%0A                                    required: true%0A                                %7D,%0A                                alt: %7B%0A                                    label: 'description'%0A                                %7D%0A                            %7D,%0A%0A                            // Callback%0A                            function(values)%7B%0A                                console.log(values);%0A                            %7D%0A                        );%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A    
 %7D);%0A

Indent using spaces