From 9b83ce6a8c537bb3420cc41e0857f8a370f71e5b Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 15 May 2014 09:27:41 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=86=B0=E5=B7=9D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=90=E9=9B=86=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/DataController.php | 36 +++- .../default/views/scripts/data/view.phtml | 4 +- .../glacier/view-glacier-selection.phtml | 192 ++++++++++++++++++ .../default/views/scripts/glacier/view.phtml | 31 +-- application/module/Order/Order.php | 7 +- .../lib/custom/models/dataservice.geodata.js | 35 ++++ 6 files changed, 273 insertions(+), 32 deletions(-) create mode 100644 application/default/views/scripts/glacier/view-glacier-selection.phtml create mode 100644 htdocs/js/lib/custom/models/dataservice.geodata.js diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 4ce0602e..6a9033f9 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1068,7 +1068,6 @@ class DataController extends Zend_Controller_Action $dataservice = new \data\DataService(); $info = $dataservice->get($uuid); - //暂时只有wsn { $this->_helper->layout->disableLayout(); @@ -1103,6 +1102,40 @@ class DataController extends Zend_Controller_Action } + public function glacierAction() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $uuid = $this->_getParam("uuid"); + $basin = $this->getParam("basin"); + $mountain = $this->getParam("mountain"); + + if(empty($basin) && empty($mountain)) + { + $this->jsonexit(array("error"=>'please select sub dataset')); + return true; + } + + $selections = array( + 'basin' => $basin, + 'mountain' => $mountain + ); + + $order = new Order(); + $state = $order->addOrder($uuid,$selections); + + if($state !== true) + { + $this->jsonexit(array("error"=>$state)); + return true; + }else{ + $this->jsonexit(array('success'=>'Success! You can add more dataset or submit your application.')); + return true; + //$this->view->msg = view::Msg('alert-success',"Success! You can add more dataset or submit your application."); + } + } + public function wsnAction() { $this->_helper->layout->disableLayout(); @@ -2191,6 +2224,7 @@ class DataController extends Zend_Controller_Action $wsn = $this->_request->getParam('wsn'); $pdf = $this->_request->getParam('pdf'); $selections = $this->_request->getParam('data'); + //if (empty($uuid)) $this->_redirect('/data'); $userid = view::User('id'); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 1855bd01..f22bfed8 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -500,8 +500,8 @@ var bound = {