summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelprofile.cpp47
1 files changed, 42 insertions, 5 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 00191b17bd..240f651eec 100644..100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -38,6 +38,16 @@
static const std::string PANEL_PICKS = "panel_picks";
static const std::string PANEL_PROFILE = "panel_profile";
+std::string getProfileURL(const std::string& agent_name)
+{
+ std::string url = gSavedSettings.getString("WebProfileURL");
+ LLSD subs;
+ subs["AGENT_NAME"] = agent_name;
+ url = LLWeb::expandURLSubstitutions(url,subs);
+ LLStringUtil::toLower(url);
+ return url;
+}
+
class LLProfileHandler : public LLCommandHandler
{
public:
@@ -50,11 +60,8 @@ public:
if (params.size() < 1) return false;
std::string agent_name = params[0];
llinfos << "Profile, agent_name " << agent_name << llendl;
- std::string url = gSavedSettings.getString("WebProfileURL");
- LLSD subs;
- subs["AGENT_NAME"] = agent_name;
- url = LLWeb::expandURLSubstitutions(url,subs);
- LLWeb::loadURL(url);
+ std::string url = getProfileURL(agent_name);
+ LLWeb::loadURLInternal(url);
return true;
}
@@ -198,6 +205,36 @@ void LLPanelProfile::onOpen(const LLSD& key)
picks->openClassifiedInfo(params);
}
}
+ else if (panel == "edit_classified")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ LLSD params = key;
+ params.erase("show_tab_panel");
+ params.erase("open_tab_name");
+ picks->openClassifiedEdit(params);
+ }
+ }
+ else if (panel == "create_pick")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->createNewPick();
+ }
+ }
+ else if (panel == "edit_pick")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ LLSD params = key;
+ params.erase("show_tab_panel");
+ params.erase("open_tab_name");
+ picks->openPickEdit(params);
+ }
+ }
}
}