diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Search.php | 10 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TWizard.php | 10 |
3 files changed, 12 insertions, 9 deletions
@@ -4,6 +4,7 @@ BUG: Ticket#264 - Typos in some exception throw statements (Knut) BUG: Ticket#268 - THttpResponse.redirect() may fail for some browsers (Qiang) BUG: Ticket#285 - NumberFormat Rounding Bug (Wei) BUG: Ticket#297 - THttpRequest::constructUrl() encoding bug about array GET parameters (Qiang) +BUG: Ticket#320 - Typo in calling TDataList::setSelectedItemIndex and a bug in inserting wizard steps (Qiang) BUG: TDataGrid may complain getting ItemType on a non-object if the grid is not data-bound (Qiang) BUG: TCheckBox.Value should be converted to string (Qiang) BUG: Ticket#302 - TDatePicker's bug with AutoPostBack set to "true" (Wei) diff --git a/demos/quickstart/protected/pages/Search.php b/demos/quickstart/protected/pages/Search.php index f1d07ffa..d2dfa7da 100644 --- a/demos/quickstart/protected/pages/Search.php +++ b/demos/quickstart/protected/pages/Search.php @@ -13,11 +13,11 @@ class Search extends TPage $hits_1 = $quickstart->find($text);
$this->quickstart_results->setDataSource($hits_1);
$this->quickstart_results->dataBind();
-
+
$this->emptyResult->setVisible(!count($hits_1));
}
}
-
+
public function highlightSearch($text)
{
$words = str_word_count($text, 1);
@@ -33,7 +33,7 @@ class Search extends TPage break;
}
}
-
+
$min = $where - 15 < 0 ? 0 : $where - 15;
$max = $where + 15 > $t ? $t : $where + 15;
$subtext = array_splice($words, $min, $max-$min);
@@ -41,13 +41,13 @@ class Search extends TPage $suffix = $max == $t ? '' : '...';
return $prefix.implode(' ', $subtext).$suffix;
}
-
+
protected function containsKeys($word, $keys)
{
foreach($keys as $key)
{
if(is_int(strpos($word, $key)))
- return true;
+ return true;
}
return false;
}
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index f92742e7..2d54afbe 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -716,9 +716,11 @@ class TWizard extends TWebControl implements INamingContainer }
/**
+ * Returns the multiview that holds the wizard steps.
+ * This method should only be used by control developers.
* @return TMultiView the multiview holding wizard steps
*/
- protected function getMultiView()
+ public function getMultiView()
{
if($this->_multiView===null)
{
@@ -741,7 +743,6 @@ class TWizard extends TWebControl implements INamingContainer if(($wizard=$step->getWizard())!==null)
$wizard->getWizardSteps()->remove($step);
$step->setWizard($this);
- $this->getMultiView()->getViews()->add($step);
$this->wizardStepsChanged();
}
@@ -753,7 +754,6 @@ class TWizard extends TWebControl implements INamingContainer */
public function removedWizardStep($step)
{
- $this->getMultiView()->getViews()->remove($step);
$step->setWizard(null);
$this->wizardStepsChanged();
}
@@ -1263,7 +1263,7 @@ class TWizard extends TWebControl implements INamingContainer if($this->_sideBarDataList!==null)
{
$this->_sideBarDataList->setDataSource($this->getWizardSteps());
- $this->_sideBarDataList->setSelectedIndex($this->getActiveStepIndex());
+ $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex());
$this->_sideBarDataList->dataBind();
}
}
@@ -1817,6 +1817,7 @@ class TWizardStepCollection extends TList if($item instanceof TWizardStep)
{
parent::insertAt($index,$item);
+ $this->_wizard->getMultiView()->getViews()->insertAt($index,$item);
$this->_wizard->addedWizardStep($item);
}
else
@@ -1831,6 +1832,7 @@ class TWizardStepCollection extends TList public function removeAt($index)
{
$step=parent::removeAt($index);
+ $this->_wizard->getMultiView()->getViews()->remove($step);
$this->_wizard->removedWizardStep($step);
return $step;
}
|