summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-03-05 19:30:31 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-03-05 19:30:31 +0200
commitb60274fad4a7cfdb1ab383bd9f822ef75caa285a (patch)
tree2d2f20f434b66e4b15afcf0fc192bfd6d0474aeb /indra/newview
parenteeb6e89e60df4c61c299c6ac344e32c7d3040d04 (diff)
WIP on EXT-5687 (Classifieds are missing the clickthrough data).
Updating classieifed click stats when user presses "Teleport" or "Map" button in the picks/classifieds list side panel. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelclassified.cpp32
-rw-r--r--indra/newview/llpanelclassified.h8
-rw-r--r--indra/newview/llpanelpicks.cpp8
3 files changed, 42 insertions, 6 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 49614348d0..03c4da93c4 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -1548,17 +1548,25 @@ void LLPanelClassifiedInfo::stretchSnapshot()
mSnapshotStreched = true;
}
-void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)
+// static
+// *TODO: move out of the panel
+void LLPanelClassifiedInfo::sendClickMessage(
+ const std::string& type,
+ bool from_search,
+ const LLUUID& classified_id,
+ const LLUUID& parcel_id,
+ const LLVector3d& global_pos,
+ const std::string& sim_name)
{
// You're allowed to click on your own ads to reassure yourself
// that the system is working.
LLSD body;
body["type"] = type;
- body["from_search"] = fromSearch();
- body["classified_id"] = getClassifiedId();
- body["parcel_id"] = getParcelId();
- body["dest_pos_global"] = getPosGlobal().getValue();
- body["region_name"] = getSimName();
+ body["from_search"] = from_search;
+ body["classified_id"] = classified_id;
+ body["parcel_id"] = parcel_id;
+ body["dest_pos_global"] = global_pos.getValue();
+ body["region_name"] = sim_name;
std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
llinfos << "Sending click msg via capability (url=" << url << ")" << llendl;
@@ -1566,6 +1574,18 @@ void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)
LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder());
}
+
+void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)
+{
+ sendClickMessage(
+ type,
+ fromSearch(),
+ getClassifiedId(),
+ getParcelId(),
+ getPosGlobal(),
+ getSimName());
+}
+
void LLPanelClassifiedInfo::onMapClick()
{
sendClickMessage("map");
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 04dea00e5f..31f585e9cc 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -266,6 +266,14 @@ public:
S32 profile,
bool from_new_table);
+ static void sendClickMessage(
+ const std::string& type,
+ bool from_search,
+ const LLUUID& classified_id,
+ const LLUUID& parcel_id,
+ const LLVector3d& global_pos,
+ const std::string& sim_name);
+
void setExitCallback(const commit_callback_t& cb);
void setEditClassifiedCallback(const commit_callback_t& cb);
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 59642c6a67..f0860e7027 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -578,7 +578,11 @@ void LLPanelPicks::onClickTeleport()
if(pick_item)
pos = pick_item->getPosGlobal();
else if(c_item)
+ {
pos = c_item->getPosGlobal();
+ LLPanelClassifiedInfo::sendClickMessage("teleport", false,
+ c_item->getClassifiedId(), LLUUID::null, pos, LLStringUtil::null);
+ }
if (!pos.isExactlyZero())
{
@@ -597,7 +601,11 @@ void LLPanelPicks::onClickMap()
if (pick_item)
pos = pick_item->getPosGlobal();
else if(c_item)
+ {
+ LLPanelClassifiedInfo::sendClickMessage("map", false,
+ c_item->getClassifiedId(), LLUUID::null, pos, LLStringUtil::null);
pos = c_item->getPosGlobal();
+ }
LLFloaterWorldMap::getInstance()->trackLocation(pos);
LLFloaterReg::showInstance("world_map", "center");