Skip to content

Commit

Permalink
removed unnecessary targets
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Nov 6, 2024
1 parent eee22f6 commit 3216409
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 99 deletions.
3 changes: 1 addition & 2 deletions components/ILIAS/COPage/classes/class.ilPageObjectGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,7 @@ public function executeCommand(): string
$this->tabs_gui->addNonTabbedLink(
"pres_view",
$this->getViewPageText(),
$this->getViewPageLink(),
$this->getViewPageTarget()
$this->getViewPageLink()
);
}
$ret = $this->$cmd();
Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Container/classes/class.ilContainerGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,7 @@ public function setPageEditorTabs(): void
// back to upper context
$this->tabs_gui->setBackTarget(
$this->lng->txt("obj_cat"),
$this->ctrl->getLinkTarget($this, ""),
ilFrameTargetInfo::_getFrame("MainContent")
$this->ctrl->getLinkTarget($this, "")
);

$this->tabs_gui->addTarget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,7 @@ public function getTabs(): void
$this->tabs_gui->addNonTabbedLink(
"editing_view",
$lng->txt("glo_editing_view"),
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $this->requested_ref_id,
"_top"
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $this->requested_ref_id
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Glossary/Term/class.ilGlossaryTermGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ public function getTabs(): void
ILIAS_HTTP_PATH .
"/goto.php?target=" .
"git" .
"_" . $term_id . "_" . $this->request->getRefId() . "&client_id=" . CLIENT_ID,
"_top"
"_" . $term_id . "_" . $this->request->getRefId() . "&client_id=" . CLIENT_ID
);
}

Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Glossary/classes/class.ilObjGlossaryGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,7 @@ protected function getTabs(): void
$this->tabs_gui->addNonTabbedLink(
"presentation_view",
$this->lng->txt("glo_presentation_view"),
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->object->getRefId(),
"_top"
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->object->getRefId()
);
}

Expand Down
17 changes: 0 additions & 17 deletions components/ILIAS/Glossary/classes/class.ilObjGlossaryListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,4 @@ public function getCommandLink(string $cmd): string

return $cmd_link;
}

public function getCommandFrame(string $cmd): string
{
switch ($cmd) {
case "view":
case "edit":
case "properties":
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;

default:
$frame = "";
break;
}

return $frame;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,15 @@ protected function render(bool $top = true): string
if (!$this->offline) {
$prev_href =
$this->linker->getLink("layout", $pre_id);
$prev_target = 'target="' . ilFrameTargetInfo::_getFrame("MainContent") . '" ';
} else {
$prev_href =
$this->linker->getLink("layout", $pre_id);
$prev_target = 'target="_top" ';
}
}

$tpl->setCurrentBlock("ilLMNavigation_Prev");
$tpl->setVariable("IMG_PREV", $prev_img);
$tpl->setVariable("HREF_PREV", $prev_href);
$tpl->setVariable("FRAME_PREV", $prev_target);
$tpl->setVariable("TXT_PREV", $prev_title);
$tpl->setVariable("ALT_PREV", $this->lng->txt("previous"));
$tpl->setVariable("SPACER_PREV", $this->offline
Expand Down Expand Up @@ -221,18 +218,15 @@ protected function render(bool $top = true): string
if (!$this->offline) {
$succ_href =
$this->linker->getLink("layout", $succ_id);
$succ_target = ' target="' . ilFrameTargetInfo::_getFrame("MainContent") . '" ';
} else {
$succ_href =
$this->linker->getLink("layout", $succ_id);
$succ_target = ' target="_top" ';
}
}

$tpl->setCurrentBlock("ilLMNavigation_Next");
$tpl->setVariable("IMG_SUCC", $succ_img);
$tpl->setVariable("HREF_SUCC", $succ_href);
$tpl->setVariable("FRAME_SUCC", $succ_target);
$tpl->setVariable("TXT_SUCC", $succ_title);
$tpl->setVariable("ALT_SUCC", $this->lng->txt("next"));
$tpl->setVariable("SPACER_SUCC", $this->offline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ public function ilLMSubMenu(): void
return;
}

$buttonTarget = ilFrameTargetInfo::_getFrame("MainContent");

$tpl_menu = new ilTemplate("tpl.lm_sub_menu.html", true, true, "components/ILIAS/LearningModule");

Expand All @@ -794,7 +793,6 @@ public function ilLMSubMenu(): void
"&obj_id=" . $page_id . "&to_page=1"
);
$tpl_menu->setVariable("EDIT_TXT", $this->lng->txt("edit_page"));
$tpl_menu->setVariable("EDIT_TARGET", $buttonTarget);
$tpl_menu->parseCurrentBlock();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ public function getLinkXML(
} else {
$href = ILIAS_HTTP_PATH . "/goto.php?target=" . $obj_type . "_" . $target_id . "&client_id=" . CLIENT_ID;
}
$ltarget = ilFrameTargetInfo::_getFrame("MainContent");
if ($this->embed_mode) {
$ltarget = "_blank";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ public function getLinkXML(array $a_int_links): string
$obj_type = ilObject::_lookupType((int) $target_id, true);
$obj_id = ilObject::_lookupObjId((int) $target_id);
$href = "./goto.php?target=" . $obj_type . "_" . $target_id;
$t_frame = ilFrameTargetInfo::_getFrame("MainContent", $obj_type);
$ltarget = $t_frame;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,7 @@ public function addTabs(string $a_act = ""): void
$ilTabs->addNonTabbedLink(
"pres_mode",
$lng->txt("cont_presentation_view"),
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId(),
"_top"
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->lm->getRefId()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,26 +126,6 @@ public function getCommandLink(string $cmd): string
return $cmd_link;
}

public function getCommandFrame(string $cmd): string
{
switch ($cmd) {
case "view":
case "continue":
case "properties":
case "infoScreen":
case "edit":
case 'list':
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;

default:
$frame = "";
break;
}

return $frame;
}

public function getProperties(): array
{
$lng = $this->lng;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ public function setTabs(): void
$ilTabs->addNonTabbedLink(
"pres_mode",
$lng->txt("cont_presentation_view"),
ILIAS_HTTP_PATH . "/goto.php?target=st_" . $this->obj->getId(),
"_top"
ILIAS_HTTP_PATH . "/goto.php?target=st_" . $this->obj->getId()
);
}

Expand Down
11 changes: 0 additions & 11 deletions components/ILIAS/MediaCast/classes/class.ilObjMediaCastListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ public function init(): void
$this->commands = ilObjMediaCastAccess::_getCommands();
}

public function getCommandFrame(string $cmd): string
{
switch ($cmd) {
default:
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
}

return $frame;
}

public function getCommandLink(string $cmd): string
{
$this->ctrl->setParameterByClass(ilMediaCastHandlerGUI::class, "ref_id", $this->ref_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,6 @@ public function init(): void
$this->commands = ilObjSurveyQuestionPoolAccess::_getCommands();
}

public function getCommandFrame(string $cmd): string
{
$frame = "";
switch ($cmd) {
case "":
case "questions":
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;

default:
}

return $frame;
}

public function getCommandLink(string $cmd): string
{
return "ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" . $this->ref_id . "&cmd=$cmd";
Expand Down
13 changes: 1 addition & 12 deletions components/ILIAS/Wiki/classes/class.ilObjWikiListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ public function init(): void
// general commands array
$this->commands = ilObjWikiAccess::_getCommands();
}

public function getCommandFrame(string $cmd): string
{
switch ($cmd) {
default:
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
}

return $frame;
}


public function getProperties(): array
{
$lng = $this->lng;
Expand Down

0 comments on commit 3216409

Please sign in to comment.