guest) { $redirectUrl = JRoute :: _('index.php?option=com_user&view=login&return=' . base64_encode(JRoute :: _('index.php?option=' . JRequest :: getVar('option') . '&view=claim1'))); JFactory::getApplication()->redirect($redirectUrl); } $document =& JFactory::getDocument(); $model = $this->getModel('claim'); $tipModel = $this->getModel('tooltip'); $document->addCustomTag(''); $document->addCustomTag(''); $document->addCustomTag(''); $document->addCustomTag(''); $document->addCustomTag(''); $document->addStyleSheet(JRoute :: _(JURI :: base() . 'media/system/css/calendar-jos.css')); $document->addStyleSheet(JRoute :: _(JURI :: base() . 'plugins/content/yoo_tooltip/yoo_tooltip.css.php')); $action = JRequest::getVar('action'); $projectId = JRequest::getVar('projectId'); $redirect = true; switch ($action) { case 'unselect': $id = JRequest::getVar('id'); $model->unselectDocument($id); if (count($model->getSelectedDocuments()) == 0) JFactory::getApplication()->redirect(JRoute :: _('index.php?option=' . JRequest :: getVar('option') . '&view=claim_results&Itemid=' . JRequest :: getVar('Itemid'))); break; case 'removeProject': $model->removeSelectedProject($projectId); break; default: $redirect = false; } if ($redirect) JFactory::getApplication()->redirect(JRoute :: _('index.php?option=' . JRequest :: getVar('option') . '&view=' . JRequest :: getVar('view') . '&Itemid=' . JRequest :: getVar('Itemid'))); $this->assignRef('selectedDocs', $model->getSelectedDocuments()); $selectedProjects = $model->getSelectedProjects(); $this->assignRef('selectedProjects', $selectedProjects); foreach($selectedProjects as $id=>$info) { $scriptText = "window.addEvent('domready', function() {"; $scriptText .= $tipModel->createProjectInfoTooltip($info, $id); $scriptText .= "});"; $document->addScriptDeclaration($scriptText); } $docs = $model->getSelectedDocuments(); for ($i = 0; $i < count($docs); $i++) { $scriptText = "window.addEvent('domready', function() {"; $scriptText .= $tipModel->createDocumentTooltip($docs[$i], "selected-".$i); $scriptText .= "});"; $document->addScriptDeclaration($scriptText); } parent::display($tpl); } } ?>