diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 8e0245c451c15ab82dbbed0811290ad948b8f920..6bf13475148c84edd1a4141ad2f26c1896976ce9 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -66,8 +66,12 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
  , mAutoScrolling( false )
  , mAutoScrollRate( 0.f )
  , mSelectedTab( NULL )
+ , mTabComparator( NULL )
+ , mNoVisibleTabsHelpText(NULL)
 {
-  mSingleExpansion = params.single_expansion;
+	initNoTabsWidget(params.empty_accordion_text);
+
+	mSingleExpansion = params.single_expansion;
 	if(mFitParent && !mSingleExpansion)
 	{
 		llinfos << "fit_parent works best when combined with single_expansion" << llendl;
@@ -78,7 +82,10 @@ LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
  , mAutoScrolling( false )
  , mAutoScrollRate( 0.f )
  , mSelectedTab( NULL )
+ , mNoVisibleTabsHelpText(NULL)
 {
+	initNoTabsWidget(LLTextBox::Params());
+
 	mSingleExpansion = false;
 	mFitParent = false;
 	LLUICtrlFactory::getInstance()->buildPanel(this, "accordion_parent.xml");	
@@ -168,6 +175,8 @@ BOOL LLAccordionCtrl::postBuild()
 		}
 	}
 
+	updateNoTabsHelpTextVisibility();
+
 	return TRUE;
 }
 
@@ -187,8 +196,15 @@ void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
 	rcLocal.mRight = rcLocal.mLeft + width;
 	rcLocal.mTop = rcLocal.mBottom + height;
 
+	// get textbox a chance to reshape its content
+	mNoVisibleTabsHelpText->reshape(width, height, called_from_parent);
+
 	setRect(rcLocal);
 
+	// assume that help text is always fit accordion.
+	// necessary text paddings can be set via h_pad and v_pad
+	mNoVisibleTabsHelpText->setRect(getLocalRect());
+
 	arrange();
 }
 
@@ -359,6 +375,31 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
 	}
 }
 
+void	LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)
+{
+	LLTextBox::Params tp = tb_params;
+	tp.rect(getLocalRect());
+	mNoVisibleTabsOrigString = tp.initial_value().asString();
+	mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this);
+}
+
+void	LLAccordionCtrl::updateNoTabsHelpTextVisibility()
+{
+	bool visible_exists = false;
+	std::vector<LLAccordionCtrlTab*>::const_iterator it = mAccordionTabs.begin();
+	const std::vector<LLAccordionCtrlTab*>::const_iterator it_end = mAccordionTabs.end();
+	for (; it != it_end; ++it)
+	{
+		if ((*it)->getVisible())
+		{
+			visible_exists = true;
+			break;
+		}
+	}
+
+	mNoVisibleTabsHelpText->setVisible(!visible_exists);
+}
+
 void	LLAccordionCtrl::arrangeSinge()
 {
 	S32 panel_left = BORDER_MARGIN;	  // Margin from left side of Splitter
@@ -737,6 +778,20 @@ S32	LLAccordionCtrl::notifyParent(const LLSD& info)
 		}
 		return 1;
 	}
+	else if (info.has("child_visibility_change"))
+	{
+		BOOL new_visibility = info["child_visibility_change"];
+		if (new_visibility)
+		{
+			// there is at least one visible tab
+			mNoVisibleTabsHelpText->setVisible(FALSE);
+		}
+		else
+		{
+			// it could be the latest visible tab, check all of them
+			updateNoTabsHelpTextVisibility();
+		}
+	}
 	return LLPanel::notifyParent(info);
 }
 void	LLAccordionCtrl::reset		()
@@ -745,6 +800,28 @@ void	LLAccordionCtrl::reset		()
 		mScrollbar->setDocPos(0);
 }
 
+void LLAccordionCtrl::sort()
+{
+	if (!mTabComparator)
+	{
+		llwarns << "No comparator specified for sorting accordion tabs." << llendl;
+		return;
+	}
+
+	std::sort(mAccordionTabs.begin(), mAccordionTabs.end(), LLComparatorAdaptor(*mTabComparator));
+	arrange();
+}
+
+void	LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
+{
+	LLStringUtil::format_map_t args;
+	args["[SEARCH_TERM]"] = LLURI::escape(filter_string);
+	std::string text = mNoVisibleTabsOrigString;
+	LLStringUtil::format(text, args);
+
+	mNoVisibleTabsHelpText->setValue(text);
+}
+
 S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */)
 {
 	if(tab_index < 0)
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index a029201c90de9c4973f9bb3b0264aff64ad20794..fc6f2d896c72521e849687b216b1c9ec5c74ce26 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -34,6 +34,7 @@
 #define LL_ACCORDIONCTRL_H
 
 #include "llpanel.h"
+#include "lltextbox.h"
 #include "llscrollbar.h"
 
 #include <vector>
@@ -56,6 +57,19 @@ class LLAccordionCtrl: public LLPanel
 
 
 public:
+	/**
+	 * Abstract comparator for accordion tabs.
+	 */
+	class LLTabComparator
+	{
+	public:
+		LLTabComparator() {};
+		virtual ~LLTabComparator() {};
+
+		/** Returns true if tab1 < tab2, false otherwise */
+		virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
+	};
+
 	struct Params 
 		: public LLInitParam::Block<Params, LLPanel::Params>
 	{
@@ -64,10 +78,12 @@ class LLAccordionCtrl: public LLPanel
 								accordion tabs are responsible for scrolling their content.
 								*NOTE fit_parent works best when combined with single_expansion.
 								Accordion view should implement getRequiredRect() and provide valid height*/
+		Optional<LLTextBox::Params>	empty_accordion_text;
 
 		Params()
 			: single_expansion("single_expansion",false)
 			, fit_parent("fit_parent", false)
+			, empty_accordion_text("empty_accordion_text")
 		{};
 	};
 
@@ -105,7 +121,18 @@ class LLAccordionCtrl: public LLPanel
 
 	void	reset		();
 
+	void	setComparator(const LLTabComparator* comp) { mTabComparator = comp; }
+	void	sort();
+
+	/**
+	 * Sets filter substring as a search_term for help text when there are no any visible tabs.
+	 */
+	void	setFilterSubString(const std::string& filter_string);
+
 private:
+	void	initNoTabsWidget(const LLTextBox::Params& tb_params);
+	void	updateNoTabsHelpTextVisibility();
+
 	void	arrangeSinge();
 	void	arrangeMultiple();
 
@@ -123,6 +150,21 @@ class LLAccordionCtrl: public LLPanel
 
 	BOOL	autoScroll				(S32 x, S32 y);
 
+	/**
+	 * An adaptor for LLTabComparator
+	 */
+	struct LLComparatorAdaptor
+	{
+		LLComparatorAdaptor(const LLTabComparator& comparator) : mComparator(comparator) {};
+
+		bool operator()(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2)
+		{
+			return mComparator.compare(tab1, tab2);
+		}
+
+		const LLTabComparator& mComparator;
+	};
+
 private:
 	LLRect			mInnerRect;
 	LLScrollbar*	mScrollbar;
@@ -130,7 +172,11 @@ class LLAccordionCtrl: public LLPanel
 	bool			mFitParent;
 	bool			mAutoScrolling;
 	F32				mAutoScrollRate;
-	LLAccordionCtrlTab* mSelectedTab;
+	LLTextBox*		mNoVisibleTabsHelpText;
+	std::string		mNoVisibleTabsOrigString;
+
+	LLAccordionCtrlTab*		mSelectedTab;
+	const LLTabComparator*	mTabComparator;
 };
 
 
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 83e67980a3c63124d0bd741d4cc2f8b126b450b2..1bc8086a2768296a78ca98a7282559ef8acfd5a9 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -409,6 +409,13 @@ void LLAccordionCtrlTab::changeOpenClose(bool is_open)
 	}
 }
 
+void LLAccordionCtrlTab::handleVisibilityChange(BOOL new_visibility)
+{
+	LLUICtrl::handleVisibilityChange(new_visibility);
+
+	notifyParent(LLSD().with("child_visibility_change", new_visibility));
+}
+
 BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask)
 {
 	if(mCollapsible && mHeaderVisible && mCanOpenClose)
@@ -466,7 +473,7 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel)
 	addChild(panel,0);
 }
 
-std::string LLAccordionCtrlTab::getTitle()
+std::string LLAccordionCtrlTab::getTitle() const
 {
 	LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
 	if (header)
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 83a9024a74a984115976813e2ccc5110a6dc8784..82e0234bfc32f6990ca6be6fa0ac3f86b604a5a7 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -115,7 +115,7 @@ class LLAccordionCtrlTab : public LLUICtrl
 	void		setAccordionView(LLView* panel);
 	LLView*		getAccordionView() { return mContainerPanel; };
 
-	std::string getTitle();
+	std::string getTitle() const;
 
 	// Set text and highlight substring in LLAccordionCtrlTabHeader
 	void setTitle(const std::string& title, const std::string& hl = LLStringUtil::null);
@@ -154,6 +154,11 @@ class LLAccordionCtrlTab : public LLUICtrl
 	// Call reshape after changing size
 	virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
+	/**
+	 * Raises notifyParent event with "child_visibility_change" = new_visibility
+	 */
+	void handleVisibilityChange(BOOL new_visibility);
+
 	// Changes expand/collapse state and triggers expand/collapse callbacks
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7dbe650625ad07c81ee6d6f92ca6a38744ce0e3d..3b1c49edd36791b6cfac06d13839d879a55d46c0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -306,6 +306,7 @@ set(viewer_SOURCE_FILES
     llnotificationstorage.cpp
     llnotificationtiphandler.cpp
     lloutfitslist.cpp
+    lloutfitobserver.cpp
     lloutputmonitorctrl.cpp
     llpanelavatar.cpp
     llpanelavatartag.cpp
@@ -822,6 +823,7 @@ set(viewer_HEADER_FILES
     llnotificationmanager.h
     llnotificationstorage.h
     lloutfitslist.h
+    lloutfitobserver.h
     lloutputmonitorctrl.h
     llpanelavatar.h
     llpanelavatartag.h
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 7a3eddf7a62a90dbc26f6148a72f4299242df2ff..41f5fe64a13b1b4926741cc785eb8fba48b258b6 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -203,7 +203,9 @@ LLBottomTray::~LLBottomTray()
 	// override effect of save_visibility=true.
 	// this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly:
 	//		i.g when floater changes its visibility - button changes its toggle state.
+	getChild<LLUICtrl>("build_btn")->setControlValue(false);
 	getChild<LLUICtrl>("search_btn")->setControlValue(false);
+	getChild<LLUICtrl>("world_map_btn")->setControlValue(false);
 }
 
 // *TODO Vadim: why void* ?
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 7ac3d14c72c9a17884645d52b3521f2e7a9e2261..916d53da3c73700b82629994d3b3443ee98d1119 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -387,13 +387,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory
 	item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable);
 	
 	//turning on gray separator line for the last item in the items group of the same wearable type
-	if (last)
-	{
-		LLRect rect = item_panel->getRect();
-		item_panel->reshape(rect.getWidth(), rect.getHeight() +
-		item_panel->getChild<LLView>("wearable_type_separator_icon")->getRect().getHeight());
-		item_panel->childSetVisible("wearable_type_separator_icon", true);
-	}
+	item_panel->childSetVisible("wearable_type_separator_icon", last);
 
 	return item_panel;
 }
@@ -427,7 +421,7 @@ LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLView
 	llassert(item);
 	if (!item) return NULL;
 
-	LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item);
+	LLPanelAttachmentListItem* item_panel = LLPanelAttachmentListItem::create(item);
 	if (!item_panel) return NULL;
 
 	//setting callbacks
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 3aa9d75bc0faf15d6939bf2fbb2ca6e91966f8cf..967f38bfd2c36e55f153e16279f60493a18c2c17 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -60,8 +60,14 @@
 #include "llinventorymodel.h"
 #include "llrootview.h"
 #include "llspeakers.h"
+#include "llsidetray.h"
 
 
+static const S32 RECT_PADDING_NOT_INIT = -1;
+static const S32 RECT_PADDING_NEED_RECALC = -2;
+
+S32 LLIMFloater::sAllowedRectRightPadding = RECT_PADDING_NOT_INIT;
+
 LLIMFloater::LLIMFloater(const LLUUID& session_id)
   : LLTransientDockableFloater(NULL, true, session_id),
 	mControlPanel(NULL),
@@ -444,19 +450,44 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
 	return floater;
 }
 
+//static
+bool LLIMFloater::resetAllowedRectPadding(const LLSD& newvalue)
+{
+	//reset allowed rect right padding if "SidebarCameraMovement" option 
+	//or sidebar state changed
+	sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC ;
+	return true;
+}
+
 void LLIMFloater::getAllowedRect(LLRect& rect)
 {
+	if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized
+	{
+		gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2));
+
+		LLSideTray*	side_bar = LLSideTray::getInstance();
+		side_bar->getCollapseSignal().connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2));
+		sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC;
+	}
+
 	rect = gViewerWindow->getWorldViewRectScaled();
-	static S32 right_padding = 0;
-	if (right_padding == 0)
+	if (sAllowedRectRightPadding == RECT_PADDING_NEED_RECALC) //recalc allowed rect right padding
 	{
 		LLPanel* side_bar_tabs =
 				gViewerWindow->getRootView()->getChild<LLPanel> (
 						"side_bar_tabs");
-		right_padding = side_bar_tabs->getRect().getWidth();
+		sAllowedRectRightPadding = side_bar_tabs->getRect().getWidth();
 		LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs);
+
+		if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE)
+		{
+			LLSideTray*	side_bar = LLSideTray::getInstance();
+
+			if (side_bar->getVisible() && !side_bar->getCollapsed())
+				sAllowedRectRightPadding += side_bar->getRect().getWidth();
+		}
 	}
-	rect.mRight -= right_padding;
+	rect.mRight -= sAllowedRectRightPadding;
 }
 
 void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index fef178e3a248924fe69a54b4247afa5966f0b37c..f1e68a2b3d642c7f1f32ab5b396ad390a3cbf4a3 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -155,6 +155,10 @@ class LLIMFloater : public LLTransientDockableFloater
 
 	static void closeHiddenIMToasts();
 
+	static bool resetAllowedRectPadding(const LLSD& newvalue);
+	//need to keep this static for performance issues
+	static S32 sAllowedRectRightPadding;
+
 	static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response);
 
 	LLPanelChatControlPanel* mControlPanel;
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 0dd6f53be7a787d7f19a8244f4a1580d285d10d5..2c60d38cb53b07904203ab2d34c0f6b7aad5b6e2 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -177,7 +177,10 @@ class LLPanelInventoryListItemBase : public LLPanel
 	void setIconImage(const LLUIImagePtr& image);
 
 	/** Set item title - inventory item name usually */
-	void setTitle(const std::string& title, const std::string& highlit_text);
+	virtual void setTitle(const std::string& title, const std::string& highlit_text);
+
+
+	LLViewerInventoryItem* mItem;
 
 	// force not showing link icon on item's icon
 	bool mForceNoLinksOnIcons;
@@ -196,7 +199,6 @@ class LLPanelInventoryListItemBase : public LLPanel
 	/** reshape remaining widgets */
 	void reshapeMiddleWidgets();
 
-	LLViewerInventoryItem* mItem;
 
 	LLIconCtrl*		mIconCtrl;
 	LLTextBox*		mTitleCtrl;
diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..848b59561322b7c42e4d7a5ddea5fac3c076096f
--- /dev/null
+++ b/indra/newview/lloutfitobserver.cpp
@@ -0,0 +1,125 @@
+/**
+ * @file lloutfitobserver.cpp
+ * @brief Outfit observer facade.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llappearancemgr.h"
+#include "lloutfitobserver.h"
+#include "llinventorymodel.h"
+#include "llviewerinventory.h"
+
+LLOutfitObserver::LLOutfitObserver() :
+	mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
+{
+	gInventory.addObserver(this);
+}
+
+LLOutfitObserver::~LLOutfitObserver()
+{
+	if (gInventory.containsObserver(this))
+	{
+		gInventory.removeObserver(this);
+	}
+}
+
+void LLOutfitObserver::changed(U32 mask)
+{
+	if (!gInventory.isInventoryUsable())
+		return;
+
+	bool panel_updated = checkCOF();
+
+	if (!panel_updated)
+	{
+		checkBaseOutfit();
+	}
+}
+
+// static
+S32 LLOutfitObserver::getCategoryVersion(const LLUUID& cat_id)
+{
+	LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+	if (!cat)
+		return LLViewerInventoryCategory::VERSION_UNKNOWN;
+
+	return cat->getVersion();
+}
+
+bool LLOutfitObserver::checkCOF()
+{
+	LLUUID cof = LLAppearanceMgr::getInstance()->getCOF();
+	if (cof.isNull())
+		return false;
+
+	S32 cof_version = getCategoryVersion(cof);
+
+	if (cof_version == mCOFLastVersion)
+		return false;
+
+	mCOFLastVersion = cof_version;
+
+	LLAppearanceMgr::getInstance()->updateIsDirty();
+	mCOFChanged();
+
+	return true;
+}
+
+void LLOutfitObserver::checkBaseOutfit()
+{
+	LLUUID baseoutfit_id =
+			LLAppearanceMgr::getInstance()->getBaseOutfitUUID();
+
+	if (baseoutfit_id == mBaseOutfitId)
+	{
+		if (baseoutfit_id.isNull())
+			return;
+
+		const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id);
+
+		if (baseoutfit_ver == mBaseOutfitLastVersion)
+			return;
+	}
+	else
+	{
+		mBaseOutfitId = baseoutfit_id;
+		mBOFReplaced();
+
+		if (baseoutfit_id.isNull())
+			return;
+
+		mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId);
+	}
+
+	LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance();
+	app_mgr.updateIsDirty();
+	mBOFChanged();
+}
diff --git a/indra/newview/lloutfitobserver.h b/indra/newview/lloutfitobserver.h
new file mode 100644
index 0000000000000000000000000000000000000000..4cb40ead15544a6ad771306ceb5428c94035494b
--- /dev/null
+++ b/indra/newview/lloutfitobserver.h
@@ -0,0 +1,82 @@
+/**
+ * @file lloutfitobserver.h
+ * @brief Outfit observer facade.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_OUTFITOBSERVER_H
+#define LL_OUTFITOBSERVER_H
+
+#include "llsingleton.h"
+
+/**
+ * Outfit observer facade that provides simple possibility to subscribe on
+ * BOF(base outfit) replaced, BOF changed, COF(current outfit) changed events.
+ */
+class LLOutfitObserver: public LLInventoryObserver, public LLSingleton<LLOutfitObserver>
+{
+public:
+	virtual ~LLOutfitObserver();
+
+	friend class LLSingleton<LLOutfitObserver>;
+
+	virtual void changed(U32 mask);
+
+	typedef boost::signals2::signal<void (void)> signal_t;
+
+	void addBOFReplacedCallback(const signal_t::slot_type& cb) { mBOFReplaced.connect(cb); }
+
+	void addBOFChangedCallback(const signal_t::slot_type& cb) { mBOFChanged.connect(cb); }
+
+	void addCOFChangedCallback(const signal_t::slot_type& cb) { mCOFChanged.connect(cb); }
+
+protected:
+	LLOutfitObserver();
+
+	/** Get a version of an inventory category specified by its UUID */
+	static S32 getCategoryVersion(const LLUUID& cat_id);
+
+	bool checkCOF();
+
+	void checkBaseOutfit();
+
+	//last version number of a COF category
+	S32 mCOFLastVersion;
+
+	LLUUID mBaseOutfitId;
+
+	S32 mBaseOutfitLastVersion;
+
+private:
+	signal_t mBOFReplaced;
+	signal_t mBOFChanged;
+	signal_t mCOFChanged;
+};
+
+#endif /* LL_OUTFITOBSERVER_H */
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 77db280487f7fac5c0fc83ed249f56e334e9bfca..e20b2e26be6eb79e45b8533a7bdf2351da69d812 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -53,6 +53,20 @@
 
 static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
 
+static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR;
+
+/*virtual*/
+bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const
+{
+	std::string name1 = tab1->getTitle();
+	std::string name2 = tab2->getTitle();
+
+	LLStringUtil::toUpper(name1);
+	LLStringUtil::toUpper(name2);
+
+	return name1 < name2;
+}
+
 //////////////////////////////////////////////////////////////////////////
 
 class OutfitContextMenu : public LLListContextMenu
@@ -158,6 +172,7 @@ LLOutfitsList::~LLOutfitsList()
 BOOL LLOutfitsList::postBuild()
 {
 	mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
+	mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR);
 
 	return TRUE;
 }
@@ -328,7 +343,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
 		updateOutfitTab(*items_iter);
 	}
 
-	mAccordion->arrange();
+	mAccordion->sort();
 }
 
 void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl)
@@ -500,6 +515,8 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
 
 void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
 {
+	mAccordion->setFilterSubString(new_filter_substring);
+
 	for (outfits_map_t::iterator
 			 iter = mOutfitsMap.begin(),
 			 iter_end = mOutfitsMap.end();
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 44f6ec908b61863a7fea65e01f79cd2d72833c15..bb516446d2d12439dfdd3ae94ec4edb00c33a926 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -32,17 +32,33 @@
 #ifndef LL_LLOUTFITSLIST_H
 #define LL_LLOUTFITSLIST_H
 
+#include "llaccordionctrl.h"
 #include "llpanel.h"
 
 // newview
 #include "llinventorymodel.h"
 #include "llinventoryobserver.h"
 
-class LLAccordionCtrl;
 class LLAccordionCtrlTab;
 class LLWearableItemsList;
 class LLListContextMenu;
 
+/**
+ * @class LLOutfitTabNameComparator
+ *
+ * Comparator of outfit tabs.
+ */
+class LLOutfitTabNameComparator : public LLAccordionCtrl::LLTabComparator
+{
+	LOG_CLASS(LLOutfitTabNameComparator);
+
+public:
+	LLOutfitTabNameComparator() {};
+	virtual ~LLOutfitTabNameComparator() {};
+
+	/*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const;
+};
+
 /**
  * @class LLOutfitsList
  *
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 4982e98f8e0aa4eaff4727b93091464b935b2945..ea7410502d7e427acc670df007aac4ec438928d1 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -39,6 +39,7 @@
 #include "llagentcamera.h"
 #include "llagentwearables.h"
 #include "llappearancemgr.h"
+#include "lloutfitobserver.h"
 #include "llcofwearables.h"
 #include "llfilteredwearablelist.h"
 #include "llinventory.h"
@@ -143,100 +144,6 @@ class LLPanelOutfitEditGearMenu
 	}
 };
 
-class LLCOFObserver : public LLInventoryObserver
-{
-public:
-	LLCOFObserver(LLPanelOutfitEdit *panel) : mPanel(panel), 
-		mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
-	{
-		gInventory.addObserver(this);
-	}
-
-	virtual ~LLCOFObserver()
-	{
-		if (gInventory.containsObserver(this))
-		{
-			gInventory.removeObserver(this);
-		}
-	}
-	
-	virtual void changed(U32 mask)
-	{
-		if (!gInventory.isInventoryUsable()) return;
-	
-		bool panel_updated = checkCOF();
-
-		if (!panel_updated)
-		{
-			checkBaseOutfit();
-		}
-	}
-
-protected:
-
-	/** Get a version of an inventory category specified by its UUID */
-	static S32 getCategoryVersion(const LLUUID& cat_id)
-	{
-		LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
-		if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN;
-
-		return cat->getVersion();
-	}
-
-	bool checkCOF()
-	{
-		LLUUID cof = LLAppearanceMgr::getInstance()->getCOF();
-		if (cof.isNull()) return false;
-
-		S32 cof_version = getCategoryVersion(cof);
-
-		if (cof_version == mCOFLastVersion) return false;
-		
-		mCOFLastVersion = cof_version;
-
-		mPanel->update();
-
-		return true;
-	}
-
-	void checkBaseOutfit()
-	{
-		LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID();
-
-		if (baseoutfit_id == mBaseOutfitId)
-		{
-			if (baseoutfit_id.isNull()) return;
-
-			const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id);
-
-			if (baseoutfit_ver == mBaseOutfitLastVersion) return;
-		}
-		else
-		{
-			mBaseOutfitId = baseoutfit_id;
-			mPanel->updateCurrentOutfitName();
-
-			if (baseoutfit_id.isNull()) return;
-
-			mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId);
-		}
-
-		mPanel->updateVerbs();
-	}
-	
-
-
-
-	LLPanelOutfitEdit *mPanel;
-
-	//last version number of a COF category
-	S32 mCOFLastVersion;
-
-	LLUUID  mBaseOutfitId;
-
-	S32 mBaseOutfitLastVersion;
-};
-
 class LLCOFDragAndDropObserver : public LLInventoryAddItemByAssetObserver
 {
 public:
@@ -277,7 +184,6 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
 	mSearchFilter(NULL),
 	mCOFWearables(NULL),
 	mInventoryItemsPanel(NULL),
-	mCOFObserver(NULL),
 	mGearMenu(NULL),
 	mCOFDragAndDropObserver(NULL),
 	mInitialized(false),
@@ -288,7 +194,11 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
 	mSavedFolderState = new LLSaveFolderState();
 	mSavedFolderState->setApply(FALSE);
 	
-	mCOFObserver = new LLCOFObserver(this);
+
+	LLOutfitObserver& observer = LLOutfitObserver::instance();
+	observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this));
+	observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this));
+	observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this));
 	
 	mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES);
 	for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++)
@@ -303,7 +213,6 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
 {
 	delete mSavedFolderState;
 
-	delete mCOFObserver;
 	delete mCOFDragAndDropObserver;
 
 	delete mWearableListMaskCollector;
@@ -756,9 +665,6 @@ void LLPanelOutfitEdit::updateCurrentOutfitName()
 //private
 void LLPanelOutfitEdit::updateVerbs()
 {
-	//*TODO implement better handling of COF dirtiness
-	LLAppearanceMgr::getInstance()->updateIsDirty();
-
 	bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty();
 	bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull();
 
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 802386c57302ae8e8b16bd8d23b817655f9a7627..24ecf75c18a7b18a63cda6e928e900345cbae7d6 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -49,7 +49,7 @@ class LLButton;
 class LLCOFWearables;
 class LLTextBox;
 class LLInventoryCategory;
-class LLCOFObserver;
+class LLOutfitObserver;
 class LLCOFDragAndDropObserver;
 class LLInventoryPanel;
 class LLSaveFolderState;
@@ -153,7 +153,6 @@ class LLPanelOutfitEdit : public LLPanel
 	LLInventoryItemsList* 			mWearableItemsList;
 	LLPanel*						mWearableItemsPanel;
 
-	LLCOFObserver*	mCOFObserver;
 	LLCOFDragAndDropObserver* mCOFDragAndDropObserver;
 
 	std::vector<LLLookItemType> mLookItemTypes;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 5f67f3d98969791f58053042a2cfd619e5322bf3..8836672f91e39d3e0f496ae682c7769d2e77568d 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -50,6 +50,7 @@
 #include "lllineeditor.h"
 #include "llmodaldialog.h"
 #include "llnotificationsutil.h"
+#include "lloutfitobserver.h"
 #include "lloutfitslist.h"
 #include "llsaveoutfitcombobtn.h"
 #include "llsidepanelappearance.h"
@@ -204,6 +205,10 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
 	mSavedFolderState = new LLSaveFolderState();
 	mSavedFolderState->setApply(FALSE);
 	gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this));
+
+	LLOutfitObserver& observer = LLOutfitObserver::instance();
+	observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this));
+	observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this));
 }
 
 LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
@@ -522,7 +527,7 @@ void LLPanelOutfitsInventory::updateListCommands()
 	mListCommands->childSetEnabled("trash_btn", trash_enabled);
 	mListCommands->childSetEnabled("wear_btn", wear_enabled);
 	mListCommands->childSetVisible("wear_btn", wear_enabled);
-	mSaveComboBtn->setSaveBtnEnabled(make_outfit_enabled);
+	mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled);
 }
 
 void LLPanelOutfitsInventory::showGearMenu()
@@ -665,7 +670,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
 	}
 	if (command_name == "make_outfit")
 	{
-		return TRUE;
+		return LLAppearanceMgr::getInstance()->isOutfitDirty();
 	}
    
 	if (command_name == "edit" || 
@@ -789,6 +794,7 @@ void LLPanelOutfitsInventory::onWearablesLoaded()
 	setWearablesLoading(false);
 }
 
+// static
 LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
 {
 	static LLSidepanelAppearance* panel_appearance =
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index aff7839bcc1bea2f51b804742a58f9bb558fb8df..d58ae554b04921d6a2c8a14b64a5cb71bba04924 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -75,7 +75,7 @@ class LLPanelOutfitsInventory : public LLPanel
 	void setParent(LLSidepanelAppearance *parent);
 
 	LLFolderView* getRootFolder();
-	LLSidepanelAppearance* getAppearanceSP();
+	static LLSidepanelAppearance* getAppearanceSP();
 
 	static LLPanelOutfitsInventory* findInstance();
 
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 0a4af00f7829fb819b250f6b286c4f2ecfffb4b8..f16d1d8fda659208e99fb0120c5630e9758cd2a5 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1450,6 +1450,8 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded()
 		LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion");
 		accordion->arrange();
 
+		// *TODO: new empty_accordion_text attribute was implemented in accordion (EXT-7368).
+		// this code should be refactored to use it
 		// keep help text in a synchronization with accordions visibility.
 		updateFriendListHelpText();
 	}
diff --git a/indra/newview/llsaveoutfitcombobtn.cpp b/indra/newview/llsaveoutfitcombobtn.cpp
index b9b577084be9339458b7bbc96fcbe8a9d5a3ba0e..9518b0cbb32bd1134b599702cb656a5ca5cf325f 100644
--- a/indra/newview/llsaveoutfitcombobtn.cpp
+++ b/indra/newview/llsaveoutfitcombobtn.cpp
@@ -34,6 +34,7 @@
 
 #include "llappearancemgr.h"
 #include "llpaneloutfitsinventory.h"
+#include "llsidepanelappearance.h"
 #include "llsaveoutfitcombobtn.h"
 #include "llviewermenu.h"
 
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 872939c20983d7bd436a24427269a52a635ea723..e23643da0b5ca10b81e042dc3aeba3f7ae897bb6 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -42,6 +42,7 @@
 #include "llfloaterreg.h"
 #include "llfloaterworldmap.h"
 #include "llfoldervieweventlistener.h"
+#include "lloutfitobserver.h"
 #include "llpaneleditwearable.h"
 #include "llpaneloutfitsinventory.h"
 #include "llsidetray.h"
@@ -73,26 +74,6 @@ class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver
 	LLSidepanelAppearance *mPanel;
 };
 
-class LLWatchForOutfitRenameObserver : public LLInventoryObserver
-{
-public:
-	LLWatchForOutfitRenameObserver(LLSidepanelAppearance *panel) :
-		mPanel(panel)
-	{}
-	virtual void changed(U32 mask);
-	
-private:
-	LLSidepanelAppearance *mPanel;
-};
-
-void LLWatchForOutfitRenameObserver::changed(U32 mask)
-{
-	if (mask & LABEL)
-	{
-		mPanel->refreshCurrentOutfitName();
-	}
-}
-
 LLSidepanelAppearance::LLSidepanelAppearance() :
 	LLPanel(),
 	mFilterSubString(LLStringUtil::null),
@@ -101,12 +82,13 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
 	mCurrOutfitPanel(NULL),
 	mOpened(false)
 {
+	LLOutfitObserver& outfit_observer =  LLOutfitObserver::instance();
+	outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
+	outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
 }
 
 LLSidepanelAppearance::~LLSidepanelAppearance()
 {
-	gInventory.removeObserver(mOutfitRenameWatcher);
-	delete mOutfitRenameWatcher;
 }
 
 // virtual
@@ -160,8 +142,6 @@ BOOL LLSidepanelAppearance::postBuild()
 	
 	mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook");
 
-	mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
-	gInventory.addObserver(mOutfitRenameWatcher);
 
 	setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2));
 
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 30022ae37535698a85af778b318bc147ffe4f2cb..812d6362efe4c1a462596665d06230960d67755a 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -40,7 +40,6 @@
 
 class LLFilterEditor;
 class LLCurrentlyWornFetchObserver;
-class LLWatchForOutfitRenameObserver;
 class LLPanelEditWearable;
 class LLWearable;
 class LLPanelOutfitsInventory;
@@ -97,9 +96,6 @@ class LLSidepanelAppearance : public LLPanel
 	// Used to make sure the user's inventory is in memory.
 	LLCurrentlyWornFetchObserver* mFetchWorn;
 
-	// Used to update title when currently worn outfit gets renamed.
-	LLWatchForOutfitRenameObserver* mOutfitRenameWatcher;
-
 	// Search string for filtering landmarks and teleport
 	// history locations
 	std::string					mFilterSubString;
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 3c97f01887b1274743d71f91222b89fd00190340..9406f80b75b8f1be51620e743c4ef5cdde4bb8f1 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -469,6 +469,9 @@ void LLSideTray::reflectCollapseChange()
 	}
 
 	gFloaterView->refresh();
+	
+	LLSD new_value = mCollapsed;
+	mCollapseSignal(this,new_value);
 }
 
 void LLSideTray::arrange()
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index e8fdee94307f1c179719c4473a053f9775696134..e176ff5affa6a3f9d157ed0aaf8246f35806c4de 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -159,6 +159,8 @@ class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
 	
 	void		updateSidetrayVisibility();
 
+	commit_signal_t& getCollapseSignal() { return mCollapseSignal; }
+
 protected:
 	LLSideTrayTab* getTab		(const std::string& name);
 
@@ -187,6 +189,8 @@ class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
 	child_vector_t					mTabs;
 	LLSideTrayTab*					mActiveTab;	
 	
+	commit_signal_t					mCollapseSignal;
+
 	LLButton*						mCollapseButton;
 	bool							mCollapsed;
 	
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 6c4774ba5a2ce27fe434e05e6bd5b5499339b1fc..6c410cf7a51194038e3a316eb6e6e06de88f26bd 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -42,6 +42,7 @@
 #include "llmenugl.h" // for LLContextMenu
 #include "lltransutil.h"
 #include "llviewerattachmenu.h"
+#include "llvoavatarself.h"
 
 class LLFindOutfitItems : public LLInventoryCollectFunctor
 {
@@ -258,6 +259,31 @@ BOOL LLPanelDeletableWearableListItem::postBuild()
 }
 
 
+// static
+LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryItem* item)
+{
+	LLPanelAttachmentListItem* list_item = NULL;
+	if(item)
+	{
+		list_item = new LLPanelAttachmentListItem(item);
+		list_item->init();
+	}
+	return list_item;
+}
+
+void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text)
+{
+	std::string title_joint = title;
+
+	if (mItem && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(mItem->getLinkedUUID()))
+	{
+		std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(mItem->getLinkedUUID()));
+		title_joint = title + " (" + joint + ")";
+	}
+
+	LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text);
+}
+
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 2fdb8f0ab880d0bd368aa4d7e26826ff3118171d..f03336186ce08ef488d1b57330496d3b7272d5e1 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -116,6 +116,21 @@ class LLPanelDeletableWearableListItem : public LLPanelWearableListItem
 	/*virtual*/ void init();
 };
 
+/** Outfit list item for an attachment */
+class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem
+{
+	LOG_CLASS(LLPanelAttachmentListItem);
+public:
+	static LLPanelAttachmentListItem* create(LLViewerInventoryItem* item);
+	virtual ~LLPanelAttachmentListItem() {};
+
+	/** Set item title. Joint name is added to the title in parenthesis */
+	/*virtual*/ void setTitle(const std::string& title, const std::string& highlit_text);
+
+protected:
+	LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {};
+};
+
 /**
  * @class LLPanelClothingListItem
  *
diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
index a0bbc8f2ee32eecfb5b5158e12abe465eef3b498..4e5f594ffec352114d1f8ea444812cf4d86c2eb1 100644
--- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="wearable_item"
@@ -45,7 +45,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <panel
@@ -74,10 +74,10 @@
      name="btn_edit_panel"
      layout="topleft"
      follows="top|right"
-     top="0"
+     top="1"
      left_pad="3"
-     height="24"
-     width="27"
+     height="23"
+     width="26"
      tab_stop="false">
          <button 
           name="btn_edit"
@@ -86,8 +86,8 @@
           image_overlay="Edit_Wrench"
           top="0"
           left="0"
-          height="24"
-          width="24"
+          height="23"
+          width="23"
           tab_stop="false" />
       </panel>
     <icon
@@ -97,7 +97,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
index e41141f6bd07be08ceaa530a1b1585c1a83d66de..5d81aebbd518154d8a33afce190f4883a0c25009 100644
--- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
@@ -33,7 +33,7 @@
      follows="top|left"
      image_unselected="Toast_CloseBtn"
      image_selected="Toast_CloseBtn"
-     top="2"
+     top="3"
      left="0"
      height="18"
      width="18"
@@ -56,7 +56,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <button 
@@ -64,20 +64,20 @@
      layout="topleft"
      follows="top|right"
      image_overlay="UpArrow_Off"
-     top="0"
+     top="1"
      left="0"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <button 
      name="btn_move_down"
      layout="topleft"
      follows="top|right"
      image_overlay="DownArrow_Off"
-     top="0"
+     top="1"
      left_pad="3"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <panel
      background_visible="false"
@@ -107,18 +107,18 @@
      follows="top|right"
      top="0"
      left_pad="3"
-     height="24"
-     width="27"
+     height="23"
+     width="26"
      tab_stop="false">
         <button 
          name="btn_edit"
          layout="topleft"
          follows="top|right"
          image_overlay="Edit_Wrench"
-         top="0"
+         top="1"
          left="0"
-         height="24"
-         width="24"
+         height="23"
+         width="23"
          tab_stop="false" />
       </panel>
     <icon
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index 5f34c24bcaf74bbf07914350b20f51805379b954..d36c2a4e6fec18c09a5d3497ce2c2f79efbdc24a 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -11,7 +11,7 @@
     <accordion
      fit_parent="true"
      follows="all"
-     height="200"
+     height="198"
      layout="topleft"
      left="0"
      single_expansion="true"
@@ -28,6 +28,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
@@ -43,6 +44,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
@@ -58,6 +60,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
index b006d125eefe8be516a3c9b3aa53c64ee5e7982c..45031859f1d6939e8a8caf63e0e2768e97ad6b2f 100644
--- a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="deletable_wearable_item"
@@ -33,7 +33,7 @@
      follows="top|left"
      image_unselected="Toast_CloseBtn"
      image_selected="Toast_CloseBtn"
-     top="2"
+     top="3"
      left="0"
      height="18"
      width="18"
@@ -56,7 +56,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <icon
@@ -66,7 +66,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
index 6c43635d4994cec048a2bd06e5f3c204653256dc..20652df91861f86c8311bea665103bf9614ab010 100644
--- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="dummy_clothing_item"
@@ -56,8 +56,8 @@
      image_overlay="AddItem_Off"
      top="0"
      left="0"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <icon
      follows="left|right|top"
@@ -66,7 +66,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 67ff71cef172a21a96ec428f673d1eb7aef96674..8604f42e75e6a1519fd44fda27292ec317fb88d3 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -235,7 +235,7 @@ left="0"
 	 </panel>
 	 <panel
 		 follows="all"
-		 height="408"
+		 height="433"
 		 layout="topleft"
 		 left="0"
 		 name="edit_subpanel_container"
@@ -246,7 +246,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_shape.xml"
 			 follows="all"
-			 height="408"
+			 height="433"
 			 layout="topleft"
 			 left="0"
 			 name="edit_shape_panel"
@@ -256,7 +256,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_skin.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_skin_panel"
@@ -266,7 +266,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_hair.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_hair_panel"
@@ -276,7 +276,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_eyes.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_eyes_panel"
@@ -286,7 +286,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_shirt.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_shirt_panel"
@@ -296,7 +296,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_pants.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_pants_panel"
@@ -306,7 +306,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_shoes.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_shoes_panel"
@@ -316,7 +316,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_socks.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_socks_panel"
@@ -326,7 +326,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_jacket.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_jacket_panel"
@@ -336,7 +336,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_skirt.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_skirt_panel"
@@ -346,7 +346,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_gloves.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_gloves_panel"
@@ -356,7 +356,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_undershirt.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_undershirt_panel"
@@ -366,7 +366,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_underpants.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_underpants_panel"
@@ -376,7 +376,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_alpha.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_alpha_panel"
@@ -386,7 +386,7 @@ left="0"
 		 <panel
 			 filename="panel_edit_tattoo.xml"
 			 follows="all"
-			 height="400"
+			 height="425"
 			 layout="topleft"
 			 left="0"
 			 name="edit_tattoo_panel"
@@ -394,65 +394,7 @@ left="0"
 			 visible="false"
 			 width="333" />
 	 </panel>
-     <panel
-        follows="bottom|left|right"
-        height="25"
-        label="gear_buttom_panel"
-        layout="topleft"
-        left="0"
-        name="gear_buttom_panel"
-        top_pad="0"
-        width="333">
-        <button
-            follows="bottom|left"
-            tool_tip="Options"
-            height="25"
-            image_hover_unselected="Toolbar_Left_Over"
-            image_disabled="OptionsMenu_Disabled"
-            image_overlay="OptionsMenu_Off"
-            image_selected="Toolbar_Left_Selected"
-            image_unselected="Toolbar_Left_Off"
-            layout="topleft"
-            left="10"
-            name="friends_viewsort_btn"
-            top="0"
-            width="31" />
-        <button
-            follows="bottom|left"
-            height="25"
-            image_hover_unselected="Toolbar_Middle_Over"
-            image_overlay="AddItem_Off"
-            image_selected="Toolbar_Middle_Selected"
-            image_unselected="Toolbar_Middle_Off"
-            image_disabled="AddItem_Disabled"
-            layout="topleft"
-            left_pad="1"
-            name="add_btn"
-            tool_tip="TODO"
-            width="31" />
-        <icon
-            follows="bottom|left|right"
-            height="25"
-            image_name="Toolbar_Middle_Off"
-            layout="topleft"
-            left_pad="1"
-            name="dummy_right_icon"
-            width="218" >
-        </icon>
-        <button
-            follows="bottom|right"
-            height="25"
-            image_hover_unselected="Toolbar_Right_Over"
-            image_overlay="TrashItem_Off"
-            image_selected="Toolbar_Right_Selected"
-            image_unselected="Toolbar_Right_Off"
-            image_disabled="TrashItem_Disabled"
-            layout="topleft"
-            left_pad="1"
-            name="del_btn"
-            tool_tip="TODO"
-            width="31" />
-     </panel>
+
 	 <panel
 		 follows="bottom|left|right"
 		 height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 769f9b7bbf96139ac8320781fd749322cad59154..40f60d50fb46f12d11d2450a9787e9b2a6f3e100 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -256,15 +256,14 @@ It is calculated as border_size + 2*UIResizeBarOverlap
 		             background_image="TextField_Search_Off"
 		             enabled="true"
 		             follows="left|right|top"
-		             font="SansSerif"
-		             label="Filter"
+		             label="Filter Inventory Wearables"
 		             layout="topleft"
 		             left="5"
 		             width="290"
 		             height="25"
 		             name="look_item_filter"
+		             search_button_visible="true"
 		             text_color="black"
-		             text_pad_left="25"
 		             visible="true"/>
                     
                 </layout_panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index 5cf94c25d72a5f46d985a8b24d503be4169ebc55..5c9ae51a483e376418a43e2198a62e332f602282 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -14,6 +14,7 @@
      background_visible="true"
      bg_alpha_color="DkGray2"
      bg_opaque_color="DkGray2"
+     empty_accordion_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]."
      follows="all"
      height="400"
      layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index c9e41edd5a6b6354144ad4d5e60839dc5a58131c..59f1f6d6387c95187e127490b33ee336665055f9 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -2,7 +2,7 @@
 <panel
  background_visible="true"
  follows="all"
- height="570"
+ height="610"
  layout="topleft"
  left="0"
  min_height="350"
@@ -181,7 +181,7 @@
     <scroll_container
      color="DkGray2"
      follows="all"
-     height="532"
+     height="572"
      layout="topleft"
      left="9"
      name="place_scroll"
@@ -191,7 +191,7 @@
         <panel
          bg_alpha_color="DkGray2"
          follows="left|top|right"
-         height="540"
+         height="580"
          layout="topleft"
          left="0"
          min_height="300"
@@ -337,21 +337,22 @@
             <accordion
              fit_parent="true"
              follows="all"
-             height="223"
+             height="268"
              layout="topleft"
              single_expansion="true"
              left="0"
              name="advanced_info_accordion"
-             top_pad="10"
+             top_pad="5"
              width="313">
                 <accordion_tab
-                 height="170"
+                 fit_panel="false"
+                 height="175"
                  layout="topleft"
                  name="parcel_characteristics_tab"
                  title="Parcel">
                     <panel
                      follows="all"
-                     height="160"
+                     height="175"
                      layout="topleft"
                      left="0"
                      name="parcel_characteristics_panel"
@@ -548,8 +549,8 @@
                          name="about_land_btn"
                          right="-5"
                          tab_stop="false"
-                         top="138"
-                         width="90">
+                         top_pad="2"
+                         width="140">
                             <click_callback
                              function="Floater.Show"
                              parameter="about_land" />
@@ -558,7 +559,8 @@
                 </accordion_tab>
                 <accordion_tab
                  expanded="false"
-                 height="150"
+                 fit_panel="false"
+                 height="125"
                  layout="topleft"
                  name="region_information_tab"
                  title="Region">
@@ -677,7 +679,8 @@
                          name="region_info_btn"
                          right="-5"
                          tab_stop="false"
-                         width="105">
+                         top_pad="2"
+                         width="180">
                             <click_callback
                              function="Floater.Show"
                              parameter="region_info" />
@@ -686,13 +689,14 @@
                 </accordion_tab>
                 <accordion_tab
                  expanded="false"
-                 height="190"
+                 fit_panel="false"
+                 height="180"
                  layout="topleft"
                  name="estate_information_tab"
                  title="Estate">
                     <panel
                      follows="all"
-                     height="189"
+                     height="180"
                      layout="topleft"
                      left="0"
                      name="estate_information_panel"
@@ -775,13 +779,14 @@
                 </accordion_tab>
                 <accordion_tab
                  expanded="false"
-                 height="320"
+                 fit_panel="false"
+                 height="290"
                  layout="topleft"
                  name="sales_tab"
                  title="For Sale">
                     <panel
                      follows="all"
-                     height="300"
+                     height="290"
                      layout="topleft"
                      left="0"
                      name="sales_panel"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 3d7b0b7edc5a5d94b5ef3d9c85db49cb2af3014a..ae08a1379319feef195696a9201dc3bec95effc3 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -111,6 +111,7 @@ width="333">
    label="Filter Outfits"
    max_length="300"
    name="Filter"
+   search_button_visible="true"
    top_pad="10"
    width="303" />
    <panel
diff --git a/indra/newview/skins/default/xui/en/widgets/accordion.xml b/indra/newview/skins/default/xui/en/widgets/accordion.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b817ba56ca6ffb324c8176041c78f889a1cb7f78
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/accordion.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<accordion
+ height="100"
+ name="accordion"
+ width="200">
+    <empty_accordion_text
+     follows="all"
+     height="100"
+     h_pad="10"
+     name="no_visible_items_msg"
+     value="There are no visible content here."
+     v_pad="15"
+     width="200"
+     wrap="true "/>
+</accordion>
diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
index dfd301a770999f66e1472f19afc2d565d1d44d46..48b987d7e8639d399e4226629b04c407a5d5e96a 100644
--- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
+++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
@@ -4,5 +4,6 @@
               name="color_swatch">
   <color_swatch.caption_text name="caption"
                              halign="center"
-                             follows="left|right|bottom"/>
+                             follows="left|right|bottom"
+                             v_pad="2"/>
 </color_swatch>
diff --git a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
index 33c3475eb274c5de9e44de0ef0d0165c387b2e8d..757f0f49d1b028295cf43d90da9ae2ce0a0e14f2 100644
--- a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
+++ b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
@@ -3,7 +3,8 @@
   <multiselect_text font="SansSerifSmall"/>
   <caption_text text="Multiple" 
                 halign="center" 
-                font="SansSerifSmall"/>
+                font="SansSerifSmall"
+                v_pad="2"/>
   <border bevel_style="in"/>
 </texture_picker>