Author: sevein
Date: Thu Aug  9 11:04:02 2012
New Revision: 12059

Log:
Hide expand icon in the treeview when the server returns 404

Modified:
   trunk/js/treeView.js

Modified: trunk/js/treeView.js
==============================================================================
--- trunk/js/treeView.js        Thu Aug  9 11:03:25 2012        (r12058)
+++ trunk/js/treeView.js        Thu Aug  9 11:04:02 2012        (r12059)
@@ -455,8 +455,16 @@
             {
               this.setLoading(false, $element);
             },
-          error: function ()
+          error: function (fail)
             {
+              // Rare situation where any children is visible
+              // Hide the expand icon
+              if (404 == fail.status)
+              {
+                $element
+                  .removeClass('expand')
+                  .children('i').remove();
+              }
             }
           });
 
@@ -569,10 +577,6 @@
 
 })(window.jQuery);
 
-
-
-
-
 /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
  * Licensed under the MIT License (LICENSE.txt).
  *

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to