N°3566 Hub connector migrate to UiBlock : launch page

Reset some iTop core styles to get back the previous rendering
Also use iTop classes for title and buttons
This commit is contained in:
Pierre Goiffon
2021-03-10 17:57:25 +01:00
parent 3ef307fada
commit bd7837b14c
2 changed files with 19 additions and 4 deletions

View File

@@ -169,11 +169,12 @@
#hub_launch_content button {
cursor: pointer;
font-weight: bold;
box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
border: 0;
background-color: #E0E1E2;
height: 40px;
vertical-align: middle;
margin: 1.2rem 0;
padding: 0;
}
#hub_launch_content button.positive {
@@ -197,6 +198,7 @@
background-color: rgb(221, 113, 27);
}
#hub_launch_content button > img {
box-sizing: revert;
width: 16px;
height: 16px;
vertical-align: middle;
@@ -207,3 +209,7 @@
display: inline-block;
width: 1.5em;
}
#hub_launch_content label {
cursor: pointer;
}

View File

@@ -320,9 +320,18 @@ try {
$oPage->add('<div id="hub_launch_image">');
$oPage->add(file_get_contents(__DIR__.'/images/rocket.svg'));
$oPage->add('</div>');
$oPage->add('<h1><img src="'.$sLogoUrl.'"><span>'.$sTitle.'</span></h1>');
$oPage->add('<h1 class="ibo-title--text title is-size-3"><img src="'.$sLogoUrl.'"><span>'.$sTitle.'</span></h1>');
$oPage->add($sText);
$oPage->add('<p><button type="button" id="CancelBtn" title="Go back to iTop"><img src="'.$sCloseUrl.'"><span>'.Dict::S('iTopHub:CloseBtn').'</span></button><span class="horiz-spacer"> </span><button class="positive" type="button" id="GoToHubBtn" title="'.Dict::S('iTopHub:GoBtn:Tooltip').'"><span>'.Dict::S('iTopHub:GoBtn').'</span><img src="'.$sArrowUrl.'"></button></p>');
$sButtonLabelClose = Dict::S('iTopHub:CloseBtn');
$sButtonLabelGo = Dict::S('iTopHub:GoBtn');
$oPage->add(<<<HTML
<p>
<button type="button" class="ibo-button" id="CancelBtn" title="Go back to iTop"><img src="$sCloseUrl"><span class="ibo-button--label">$sButtonLabelClose</span></button>
<span class="horiz-spacer"></span>
<button type="button" class="ibo-button positive" id="GoToHubBtn" title="Dict::S('iTopHub:GoBtn:Tooltip')"><span class="ibo-button--label">$sButtonLabelGo</span><img src="$sArrowUrl"></button>
</p>
HTML
);
$sFormTarget = appUserPreferences::GetPref('itophub_open_in_new_window', 1) ? 'target="_blank"' : '';
$oPage->add('<form '.$sFormTarget.' id="hub_launch_form" action="'.$sHubUrl.'" method="post">');
$oPage->add('<input type="hidden" name="json" value="'.htmlentities(json_encode($aDataToPost), ENT_QUOTES, 'UTF-8').'">');
@@ -332,7 +341,7 @@ try {
// Beware the combination auto-submit and open in new window (cf above) is blocked by (some) browsers (namely Chrome)
$sAutoSubmitChecked = appUserPreferences::GetPref('itophub_auto_submit', 0) == 1 ? 'checked' : '';
$oPage->add('<input type="checkbox" class="userpref" id="itophub_auto_submit" '.$sAutoSubmitChecked.'><label for="itophub_auto_submit">'.Dict::S('iTopHub:AutoSubmit').'</label></p>');
$oPage->add('<label><input type="checkbox" class="userpref" id="itophub_auto_submit" '.$sAutoSubmitChecked.'>&nbsp;'.Dict::S('iTopHub:AutoSubmit').'</label></p>');
$oPage->add('</form>');
$oPage->add('<div style="clear:both"></div>');
$oPage->add('</div>');