From e2149e3d8b87b382563a9def6f376a5f289754d3 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 12 May 2006 12:38:32 +0000 Subject: Merge from 3.0 branch till 1054. --- demos/quickstart/protected/application.xml | 7 +++-- demos/quickstart/protected/index/ZendSearch.php | 11 +++++--- demos/quickstart/protected/index/api/_0.cfs | Bin 0 -> 378721 bytes demos/quickstart/protected/index/api/deletable | Bin 0 -> 4 bytes demos/quickstart/protected/index/api/segments | Bin 0 -> 27 bytes demos/quickstart/protected/index/data/_0.cfs | Bin 329302 -> 0 bytes demos/quickstart/protected/index/data/deletable | Bin 4 -> 0 bytes demos/quickstart/protected/index/data/segments | Bin 27 -> 0 bytes demos/quickstart/protected/index/quickstart/_0.cfs | Bin 0 -> 329302 bytes .../protected/index/quickstart/deletable | Bin 0 -> 4 bytes .../quickstart/protected/index/quickstart/segments | Bin 0 -> 27 bytes .../Samples/LabeledTextBox2/LabeledTextBox.php | 2 +- demos/quickstart/protected/pages/Search.page | 29 +++++++++++++++++---- demos/quickstart/protected/pages/Search.php | 14 +++++++--- 14 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 demos/quickstart/protected/index/api/_0.cfs create mode 100644 demos/quickstart/protected/index/api/deletable create mode 100644 demos/quickstart/protected/index/api/segments delete mode 100644 demos/quickstart/protected/index/data/_0.cfs delete mode 100644 demos/quickstart/protected/index/data/deletable delete mode 100644 demos/quickstart/protected/index/data/segments create mode 100644 demos/quickstart/protected/index/quickstart/_0.cfs create mode 100644 demos/quickstart/protected/index/quickstart/deletable create mode 100644 demos/quickstart/protected/index/quickstart/segments (limited to 'demos/quickstart/protected') diff --git a/demos/quickstart/protected/application.xml b/demos/quickstart/protected/application.xml index abac1088..fed0ec22 100644 --- a/demos/quickstart/protected/application.xml +++ b/demos/quickstart/protected/application.xml @@ -10,9 +10,12 @@ --> - + IndexDataDirectory="Application.index.quickstart" /> + diff --git a/demos/quickstart/protected/index/ZendSearch.php b/demos/quickstart/protected/index/ZendSearch.php index 136004de..ec15729c 100644 --- a/demos/quickstart/protected/index/ZendSearch.php +++ b/demos/quickstart/protected/index/ZendSearch.php @@ -26,10 +26,13 @@ class ZendSearch extends TModule protected function importZendNamespace() { - $zendBase = !is_null($this->_ZF) ? $this->_ZF.'.*' : 'Application.index.*'; - $path = !is_null($this->_ZF) ? $this->_ZF.'.Zend.*' : 'Application.index.Zend.*'; - Prado::using($zendBase); - Prado::setPathOfAlias('Zend', Prado::getPathOfNamespace($path)); + if(is_null(Prado::getPathOfAlias('Zend'))) + { + $zendBase = !is_null($this->_ZF) ? $this->_ZF.'.*' : 'Application.index.*'; + $path = !is_null($this->_ZF) ? $this->_ZF.'.Zend.*' : 'Application.index.Zend.*'; + Prado::using($zendBase); + Prado::setPathOfAlias('Zend', Prado::getPathOfNamespace($path)); + } } protected function getZendSearch() diff --git a/demos/quickstart/protected/index/api/_0.cfs b/demos/quickstart/protected/index/api/_0.cfs new file mode 100644 index 00000000..b5eb219b Binary files /dev/null and b/demos/quickstart/protected/index/api/_0.cfs differ diff --git a/demos/quickstart/protected/index/api/deletable b/demos/quickstart/protected/index/api/deletable new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/demos/quickstart/protected/index/api/deletable differ diff --git a/demos/quickstart/protected/index/api/segments b/demos/quickstart/protected/index/api/segments new file mode 100644 index 00000000..da225127 Binary files /dev/null and b/demos/quickstart/protected/index/api/segments differ diff --git a/demos/quickstart/protected/index/data/_0.cfs b/demos/quickstart/protected/index/data/_0.cfs deleted file mode 100644 index f3cb1bfb..00000000 Binary files a/demos/quickstart/protected/index/data/_0.cfs and /dev/null differ diff --git a/demos/quickstart/protected/index/data/deletable b/demos/quickstart/protected/index/data/deletable deleted file mode 100644 index 593f4708..00000000 Binary files a/demos/quickstart/protected/index/data/deletable and /dev/null differ diff --git a/demos/quickstart/protected/index/data/segments b/demos/quickstart/protected/index/data/segments deleted file mode 100644 index 5509e664..00000000 Binary files a/demos/quickstart/protected/index/data/segments and /dev/null differ diff --git a/demos/quickstart/protected/index/quickstart/_0.cfs b/demos/quickstart/protected/index/quickstart/_0.cfs new file mode 100644 index 00000000..f3cb1bfb Binary files /dev/null and b/demos/quickstart/protected/index/quickstart/_0.cfs differ diff --git a/demos/quickstart/protected/index/quickstart/deletable b/demos/quickstart/protected/index/quickstart/deletable new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/demos/quickstart/protected/index/quickstart/deletable differ diff --git a/demos/quickstart/protected/index/quickstart/segments b/demos/quickstart/protected/index/quickstart/segments new file mode 100644 index 00000000..5509e664 Binary files /dev/null and b/demos/quickstart/protected/index/quickstart/segments differ diff --git a/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox2/LabeledTextBox.php b/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox2/LabeledTextBox.php index 5bbf4ce2..fc912003 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox2/LabeledTextBox.php +++ b/demos/quickstart/protected/pages/Controls/Samples/LabeledTextBox2/LabeledTextBox.php @@ -5,7 +5,7 @@ class LabeledTextBox extends TCompositeControl private $_label; private $_textbox; - protected function createChildControls() + public function createChildControls() { $this->_label=new TLabel; $this->_label->setID('Label'); diff --git a/demos/quickstart/protected/pages/Search.page b/demos/quickstart/protected/pages/Search.page index d2aee66e..d3391222 100644 --- a/demos/quickstart/protected/pages/Search.page +++ b/demos/quickstart/protected/pages/Search.page @@ -3,10 +3,29 @@ - + +
- Found <%# $this->Parent->Data->Count %> results. + Found <%# $this->Parent->Data->Count %> classes in API documentation. +
+
+ +
+ +
+
+
+ + + +
+ Found <%# $this->Parent->Data->Count %> results in quickstart tutorial.
@@ -20,9 +39,9 @@

<%# $this->Page->HighlightSearch($this->DataItem->text) %>

- - Unable to find "<%= htmlentities($this->Page->search->Text) %>". -
+ + No results available for "<%= htmlentities($this->Page->search->Text) %>". + \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Search.php b/demos/quickstart/protected/pages/Search.php index c7bdce89..297d2f50 100644 --- a/demos/quickstart/protected/pages/Search.php +++ b/demos/quickstart/protected/pages/Search.php @@ -9,9 +9,17 @@ class Search extends TPage { if(!$this->IsPostBack && strlen($text = $this->search->getText()) > 0) { - $search = $this->getApplication()->getModule("search"); - $this->results->setDataSource($search->find($text)); - $this->results->dataBind(); + $quickstart = $this->getApplication()->getModule("quickstart_search"); + $hits_1 = $quickstart->find($text); + $this->quickstart_results->setDataSource($hits_1); + $this->quickstart_results->dataBind(); + + $api = $this->getApplication()->getModule("api_search"); + $hits_2 = $api->find($text); + $this->api_results->setDataSource($hits_2); + $this->api_results->dataBind(); + + $this->emptyResult->setVisible(count($hits_1)+count($hits_2) == 0); } } -- cgit v1.2.3