From b5eed0d2fbd0cd4809452af5fc637423f1c8a135 Mon Sep 17 00:00:00 2001 From: Cobub Date: Mon, 3 Dec 2012 14:11:50 +0800 Subject: [PATCH] v0.3.1 fix some display error. --- web/application/controllers/manage/event.php | 16 +- web/application/models/event/userevent.php | 9 + .../views/conversionrate/modify.php | 4 +- .../views/events/eventchartdetailview.php | 3 + web/application/views/manage/funnel.php | 7 +- .../views/widgets/channelmarket.php | 2 +- web/application/views/widgets/conversions.php | 8 +- web/application/views/widgets/userremain.php | 178 ++++++++++++------ web/application/views/widgets/versionview.php | 2 +- 9 files changed, 155 insertions(+), 74 deletions(-) diff --git a/web/application/controllers/manage/event.php b/web/application/controllers/manage/event.php index 78270f2e..7ec71e70 100644 --- a/web/application/controllers/manage/event.php +++ b/web/application/controllers/manage/event.php @@ -65,12 +65,18 @@ function modifyEvent() $productId = $product->id; $eventId = $_POST['eventId']; $eventName = $_POST['eventName']; - $isUnique=$this->event->isUnique($productId,$eventId); - if(!empty($isUnique)){ - echo false; - }else{ + $isUniqueid=$this->event->isUnique($productId,$eventId); + if(!empty($isUniqueid)){ + foreach ($isUniqueid as $row){ + $currentid=$row->event_id; + } + if($currentid!=$id){ + echo false; + return; + } + } $this->event->modifyEvent($id,$eventId,$eventName); - echo true;} + echo true; } function stopEvent($id) diff --git a/web/application/models/event/userevent.php b/web/application/models/event/userevent.php index e16eacf4..070514a0 100644 --- a/web/application/models/event/userevent.php +++ b/web/application/models/event/userevent.php @@ -137,6 +137,15 @@ function isUnique($productId,$event_id){ } + function isUniqueData($productId,$event_id,$event_name){ + $this->db->from('event_defination'); + $this->db->where('product_id',$productId); + $this->db->where('event_identifier',$event_id); + $this->db->where('event_name',$event_name); + $r = $this->db->get(); + return $r->result(); + } + function addEvent($event_id,$event_name) { $userId = $this->common->getUserId(); diff --git a/web/application/views/conversionrate/modify.php b/web/application/views/conversionrate/modify.php index fe33c6ff..79a47a67 100644 --- a/web/application/views/conversionrate/modify.php +++ b/web/application/views/conversionrate/modify.php @@ -18,7 +18,7 @@ }
- sequence?> + title="Remove">sequence?> % : '+ event); + alert(':'+eventName); con=false; }}); if(!con){return false;} diff --git a/web/application/views/widgets/channelmarket.php b/web/application/views/widgets/channelmarket.php index 7ea6311b..c51b4186 100644 --- a/web/application/views/widgets/channelmarket.php +++ b/web/application/views/widgets/channelmarket.php @@ -60,7 +60,7 @@ var category=[]; var tooltipmarkevent=[]; var tooltipdata=new Array(new Array(),new Array()); -var tooltipname=new Array(new Array(),new Array()); +var tooltipname=[]; var colors=['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92','#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92']; diff --git a/web/application/views/widgets/conversions.php b/web/application/views/widgets/conversions.php index e57e73d9..523960ef 100644 --- a/web/application/views/widgets/conversions.php +++ b/web/application/views/widgets/conversions.php @@ -120,13 +120,15 @@ var length=this.points.length; for(i=0;i:'+point.series.name +','+''+':'+point.y+","+":"+unitprice+'
'; + if(!markEventIndex.content(point.series.index)){ + var unitprice=point.total==null?0:point.total; + msg+=':'+point.series.name +','+''+':'+point.y+","+":"+unitprice+'
'; + } } } }else{//mean compare var length=this.points.length; - + msg+=':'+this.x+'
'; for(i=0;i:'+point.series.name+'
'; diff --git a/web/application/views/widgets/userremain.php b/web/application/views/widgets/userremain.php index aaac9a7c..b155d909 100644 --- a/web/application/views/widgets/userremain.php +++ b/web/application/views/widgets/userremain.php @@ -91,6 +91,9 @@
+ + +