protected function lblArray_Click($strFormId, $strControlId, $strParameter)
{
// Is the Label being clicked already selected?
if ($this->lblArray[$strParameter]->Selected) {
// It's already selected -- go ahead and replace it with the textbox
$this->lblArray[$strParameter]->Visible = false;
$this->txtArray[$strParameter]->Visible = true;
$this->txtArray[$strParameter]->Text = html_entity_decode($this->lblArray[$strParameter]->Text, ENT_COMPAT, QApplication::$EncodingType);
QApplication::ExecuteJavaScript(sprintf("document.getElementById('%s').select(); document.getElementById('%s').focus();", $this->txtArray[$strParameter]->ControlId, $this->txtArray[$strParameter]->ControlId));
} else {
// Nope -- not yet selected
// First, unselect everything else
for ($intIndex = 0; $intIndex < 10; $intIndex++) {
if ($this->lblArray[$intIndex]->Selected) {
$this->lblArray[$intIndex]->Selected = false;
$this->lblArray[$intIndex]->CssClass = 'renamer_item';
}
}
// Now, make this item selected
$this->lblArray[$strParameter]->Selected = true;
$this->lblArray[$strParameter]->CssClass = 'renamer_item renamer_item_selected';
}
}