Index: src/webapp/components/uploader/js/Uploader.js
===================================================================
--- src/webapp/components/uploader/js/Uploader.js	(revision 7219)
+++ src/webapp/components/uploader/js/Uploader.js	(working copy)
@@ -869,14 +869,7 @@
         } else {
             // Instantiate the component.
             container.show();
-            var uploader = fluid.uploader(container, options);
-            
-            // Secretly add a clickToDegrade decorator. TODO: add this to options as a real decorator.
-            fluid.uploader.clickToDegrade(uploader, {
-                enhanceable: enhanceable
-            });
-            
-            return uploader;
+            return fluid.uploader(container, options);
         }
     };
     
@@ -910,6 +903,8 @@
         
         decorators: [{
             type: "fluid.swfUploadSetupDecorator"
+        }, {
+            type: "fluid.uploader.manuallyDegrade"
         }],
         
         uploadManager: {
@@ -1031,47 +1026,83 @@
         CANCELLED: -5
     };
     
-    // A little widget for allowing users to degrade to a non-Flash Uploader if desired.
-    var setupClickToDegrade = function (that) {
-        var degradeLink = that.renderDegradeLink();
-        degradeLink.click(that.toggle);
-        that.fluidUploader.after(degradeLink);    
+    /*******************
+     * ManuallyDegrade *
+     *******************/
+    
+    var renderLink = function (that, text, classes, appendBeside) {
+        var link = $("<a href='#'>" + text + "</a>");
+        link.addClass(classes);
+        
+        if (that.options.defaultRenderLocation === "before") {
+            appendBeside.before(link);
+        } else {
+            appendBeside.after(link);
+        }
+        
+        return link;
     };
-  
-	fluid.uploader.clickToDegrade = function (uploader, options) {
-	    var that = {};
+    
+    var toggleVisibility = function (toShow, toHide) {
+        toShow.show();
+        toHide.hide();    
+    };
+    
+    var defaultControlRenderer = function (that) {
+        var degradeLink = renderLink(that,
+                   that.options.strings.degradeLinkText,
+                   that.options.styles.degradeLinkClass,
+                   that.fluidUploader);
+        degradeLink.addClass("flc-uploader-manually-degrade");
+        
+        var enhanceLink = renderLink(that,
+                   that.options.strings.enhanceLinkText,
+                   that.options.styles.enhanceLinkClass,
+                   that.plainHtmlUploader);
+        enhanceLink.addClass("flc-uploader-manually-enhance");
+    };
+    
+    var fetchControls = function (that) {
+        that.degradeControl = that.locate("degradeControl");
+        that.enhanceControl = that.locate("enhanceControl");
+    };
+    
+    var setupManuallyDegrade = function (that) {
+        // If we don't have anything to degrade to, stop right here.
+        if (!that.plainHtmlUploader) {
+            return;
+        }
+        
+        // Render the controls if they're not already there.
+        fetchControls(that);
+        if (!that.degradeControl.length && !that.enhanceControl.length) {
+            that.options.defaultControlRenderer(that);
+            fetchControls(that);
+        }
+        
+        // Bind click handlers to them.
+        that.degradeControl.click(that.degrade);
+        that.enhanceControl.click(that.enhance);
+        
+        // Hide the enhance link to start.
+        that.enhanceControl.hide();
+    };
+    
+	fluid.uploader.manuallyDegrade = function (uploader, options) {
+	    var that = fluid.initView("fluid.uploader.manuallyDegrade", $("body"), options);
         var isDegraded = false;
-        
-        fluid.mergeComponentOptions(that, "fluid.uploader.clickToDegrade", options);
 	    that.fluidUploader = uploader.container;
-	    that.plainHtmlUploader = options.enhanceable;
-         
-        that.toggle = function () {
-	        var toggleFn = (that.isDegraded()) ? that.enhance : that.degrade;
-	        toggleFn();
-	    };
-         
-	    that.renderDegradeLink = function () {
-            that.link = $("<a href='#'></a>");
-            that.link.text(that.options.strings.degradeLinkText);
-            that.link.addClass(that.options.selectors.degradeLinkClass);
-             
-            return that.link;
-        };
+	    that.plainHtmlUploader = that.locate("enhanceable");
         
         that.degrade = function () {
-            that.link.text(that.options.strings.enhanceLinkText);
-            that.link.removeClass(that.options.selectors.degradeLinkClass).addClass(that.options.selectors.enhanceLinkClass);
-	        that.fluidUploader.hide();
-	        that.plainHtmlUploader.show();
+	        toggleVisibility(that.enhanceControl, that.degradeControl);
+	        toggleVisibility(that.plainHtmlUploader, that.fluidUploader);
 	        isDegraded = true;
         };
          
 	    that.enhance = function () {
-	        that.link.text(that.options.strings.degradeLinkText);
-	        that.link.removeClass(that.options.selectors.enhanceLinkClass).addClass(that.options.selectors.degradeLinkClass);
-	        that.plainHtmlUploader.hide();
-	        that.fluidUploader.show();
+	        toggleVisibility(that.degradeControl, that.enhanceControl);
+	        toggleVisibility(that.fluidUploader, that.plainHtmlUploader);
 	        isDegraded = false;
 	    };
          
@@ -1079,16 +1110,27 @@
 	        return isDegraded;
 	    };
          
-        setupClickToDegrade(that);
+        setupManuallyDegrade(that);
         return that;
     };
      
-    fluid.defaults("fluid.uploader.clickToDegrade", {
+    fluid.defaults("fluid.uploader.manuallyDegrade", {
+        defaultControlRenderer: defaultControlRenderer,
+        
+        defaultRenderLocation: "before",
+        
         strings: {
             degradeLinkText: "Switch to the standard single-file Uploader",
 	        enhanceLinkText: "Switch to the Flash-based multifile Uploader"
 	    },
+        
         selectors: {
+            enhanceable: ".fl-uploader.fl-ProgEnhance-basic",
+            degradeControl: ".flc-uploader-manually-degrade",
+            enhanceControl: ".flc-uploader-manually-enhance"
+        },
+        
+        styles: {
             degradeLinkClass: "fl-uploader-manually-degrade",
             enhanceLinkClass: "fl-uploader-manually-enhance"
         }
