Skip to content
Snippets Groups Projects
Commit dd1b70f7 authored by Brad Payne (Vir Linden)'s avatar Brad Payne (Vir Linden)
Browse files

SOCIAL-84, SOCIAL-85 WIP

parent 5ef8545f
No related branches found
No related tags found
No related merge requests found
......@@ -323,7 +323,7 @@ void LLAvatarActions::showProfile(const LLUUID& id)
std::string agent_name = first_name + "." + last_name;
llinfos << "opening web profile for " << agent_name << llendl;
std::string url = getProfileURL(agent_name);
LLWeb::loadURL(url);
LLWeb::loadURLInternal(url);
}
else
{
......
......@@ -70,6 +70,39 @@ static const std::string CLASSIFIED_NAME("classified_name");
static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks");
class LLPickHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
LLPickHandler() : LLCommandHandler("pick", UNTRUSTED_THROTTLE) { }
bool handle(const LLSD& params, const LLSD& query_map,
LLMediaCtrl* web)
{
if (params.size() < 1) return false;
const std::string verb = params[0];
if (verb == "create")
{
// Open "create pick" in side tab.
}
else if (verb == "edit")
{
// How to identify the pick?
llwarns << "how to identify pick?" << llendl;
}
else
{
llwarns << "unknown verb " << verb << llendl;
return false;
}
return true;
}
};
LLPickHandler gPickHandler;
class LLClassifiedHandler :
public LLCommandHandler,
public LLAvatarPropertiesObserver
......@@ -80,6 +113,8 @@ class LLClassifiedHandler :
std::set<LLUUID> mClassifiedIds;
std::string mRequestVerb;
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
// handle app/classified/create urls first
......@@ -107,6 +142,15 @@ class LLClassifiedHandler :
const std::string verb = params[1].asString();
if (verb == "about")
{
mRequestVerb = verb;
mClassifiedIds.insert(classified_id);
LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this);
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id);
return true;
}
else if (verb == "edit")
{
mRequestVerb = verb;
mClassifiedIds.insert(classified_id);
LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this);
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id);
......@@ -128,18 +172,25 @@ class LLClassifiedHandler :
void openClassified(LLAvatarClassifiedInfo* c_info)
{
// open the classified info panel on the Me > Picks sidetray
LLSD params;
params["id"] = c_info->creator_id;
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "classified_details";
params["classified_id"] = c_info->classified_id;
params["classified_creator_id"] = c_info->creator_id;
params["classified_snapshot_id"] = c_info->snapshot_id;
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
LLSideTray::getInstance()->showPanel("panel_profile_view", params);
if (mRequestVerb == "about")
{
// open the classified info panel on the Me > Picks sidetray
LLSD params;
params["id"] = c_info->creator_id;
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "classified_details";
params["classified_id"] = c_info->classified_id;
params["classified_creator_id"] = c_info->creator_id;
params["classified_snapshot_id"] = c_info->snapshot_id;
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
LLSideTray::getInstance()->showPanel("panel_profile_view", params);
}
else if (mRequestVerb == "edit")
{
llwarns << "edit in progress" << llendl;
}
}
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
......
......@@ -61,7 +61,7 @@ class LLProfileHandler : public LLCommandHandler
std::string agent_name = params[0];
llinfos << "Profile, agent_name " << agent_name << llendl;
std::string url = getProfileURL(agent_name);
LLWeb::loadURL(url);
LLWeb::loadURLInternal(url);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment