mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Merge remote-tracking branch 'origin/support/3.2' into develop
This commit is contained in:
@@ -185,6 +185,7 @@ abstract class AbstractAttachmentsRenderer
|
||||
{
|
||||
$sClass = $this->sObjClass;
|
||||
$sId = $this->iObjKey;
|
||||
$sAppRootUrl = utils::GetAbsoluteUrlAppRoot();
|
||||
$iMaxUploadInBytes = AttachmentPlugIn::GetMaxUploadSize();
|
||||
$sMaxUploadLabel = AttachmentPlugIn::GetMaxUpload();
|
||||
$sFileTooBigLabel = Dict::Format('Attachments:Error:FileTooLarge', $sMaxUploadLabel);
|
||||
@@ -195,15 +196,15 @@ abstract class AbstractAttachmentsRenderer
|
||||
$oAddButton = FileSelectUIBlockFactory::MakeStandard('file', 'file');
|
||||
$oAddButton->SetShowFilename(false);
|
||||
$this->oPage->AddUiBlock($oAddButton);
|
||||
$this->oPage->add('<span style="display:none;" id="attachment_loading"><img src="../images/indicator.gif"></span> '.$sMaxUploadLabel);
|
||||
$this->oPage->add('<span style="display:none;" id="attachment_loading"><img src="' . $sAppRootUrl . 'images/indicator.gif"></span> ' . $sMaxUploadLabel);
|
||||
$this->oPage->add('</div>');
|
||||
$this->oPage->add('<div class="ibo-attachment--upload-file--drop-zone-hint ibo-svg-illustration--container">');
|
||||
$this->oPage->add(file_get_contents(APPROOT.'images/illustrations/undraw_upload.svg'));
|
||||
$this->oPage->add(Dict::S('UI:Attachments:DropYourFileHint').'</div>');
|
||||
|
||||
|
||||
$this->oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'node_modules/blueimp-file-upload/js/jquery.iframe-transport.js');
|
||||
$this->oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'node_modules/blueimp-file-upload/js/jquery.fileupload.js');
|
||||
$this->oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.iframe-transport.js');
|
||||
$this->oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.fileupload.js');
|
||||
|
||||
$this->oPage->add_ready_script(
|
||||
<<<JS
|
||||
@@ -342,7 +343,7 @@ abstract class AbstractAttachmentsRenderer
|
||||
$('.attachment a[href="'+sSrc+'"]').parent().addClass('image-in-use').find('img').wrap('<div class="image-in-use-wrapper" style="position:relative;display:inline-block;"></div>');
|
||||
});
|
||||
});
|
||||
$('.image-in-use-wrapper').append('<div style="position:absolute;top:0;left:0;"><img src="../images/transp-lock.png"></div>');
|
||||
$('.image-in-use-wrapper').append('<div style="position:absolute;top:0;left:0;"><img src="' + GetAbsoluteUrlModulesRoot() + 'images/transp-lock.png"></div>');
|
||||
}, 200 );
|
||||
JS
|
||||
);
|
||||
|
||||
@@ -110,10 +110,10 @@ ApplicationMenu::CheckMenuIdEnabled('ConfigEditor');
|
||||
$oP = new iTopWebPage(Dict::S('config-edit-title'));
|
||||
$oP->set_base(utils::GetAbsoluteUrlAppRoot().'pages/');
|
||||
$sAceDir = 'node_modules/ace-builds/src-min/';
|
||||
$oP->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sAceDir.'ace.js');
|
||||
$oP->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sAceDir.'mode-php.js');
|
||||
$oP->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sAceDir.'theme-eclipse.js');
|
||||
$oP->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sAceDir.'ext-searchbox.js');
|
||||
$oP->LinkScriptFromAppRoot($sAceDir.'ace.js');
|
||||
$oP->LinkScriptFromAppRoot($sAceDir.'mode-php.js');
|
||||
$oP->LinkScriptFromAppRoot($sAceDir.'theme-eclipse.js');
|
||||
$oP->LinkScriptFromAppRoot($sAceDir.'ext-searchbox.js');
|
||||
|
||||
try {
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
|
||||
@@ -17,7 +17,7 @@ class HubConnectorPage extends NiceWebPage
|
||||
$sModuleImagesDir = utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/images';
|
||||
|
||||
$sUserPrefs = appUserPreferences::GetAsJSON();
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
|
||||
$this->LinkScriptFromAppRoot('js/utils.js');
|
||||
$this->add_script(<<<JS
|
||||
var oUserPreferences = $sUserPrefs;
|
||||
JS
|
||||
|
||||
@@ -57,7 +57,7 @@ function DisplayStatus(WebPage $oPage)
|
||||
|
||||
function DoLanding(WebPage $oPage)
|
||||
{
|
||||
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/css/hub.css');
|
||||
$oPage->LinkStylesheetFromModule('itop-hub-connector/css/hub.css');
|
||||
$oPage->add('<table class="module-selection-banner"><tr>');
|
||||
$sBannerUrl = utils::GetAbsoluteUrlModulesRoot().'/itop-hub-connector/images/landing-extension.png';
|
||||
$oPage->add('<td><img style="max-height:72px; margin-right: 10px;" src="'.$sBannerUrl.'"/><td>');
|
||||
@@ -138,7 +138,7 @@ function DoInstall(WebPage $oPage)
|
||||
$sUID = hash('sha256', rand());
|
||||
file_put_contents(utils::GetDataPath().'hub/compile_authent', $sUID);
|
||||
|
||||
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/css/hub.css');
|
||||
$oPage->LinkStylesheetFromModule('itop-hub-connector/css/hub.css');
|
||||
$oPage->add('<table class="module-selection-banner"><tr>');
|
||||
$sBannerUrl = utils::GetAbsoluteUrlModulesRoot().'/itop-hub-connector/images/landing-extension.png';
|
||||
$oPage->add('<td><img style="max-height:72px; margin-right: 10px;" src="'.$sBannerUrl.'"/><td>');
|
||||
@@ -214,7 +214,7 @@ function DoInstall(WebPage $oPage)
|
||||
$oPage->add('</div>'); // module-selection-body
|
||||
|
||||
|
||||
$oPage->add_linked_stylesheet('../css/font-awesome/css/all.min.css');
|
||||
$oPage->LinkStylesheetFromAppRoot('css/font-awesome/css/all.min.css');
|
||||
|
||||
|
||||
$oPage->add('<div id="hub_installation_widget"></div>');
|
||||
@@ -263,8 +263,8 @@ try {
|
||||
}
|
||||
|
||||
$oPage = new SetupPage(''); // Title will be set later, depending on $sOperation
|
||||
$oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/js/hub.js');
|
||||
$oPage->add_linked_stylesheet('../css/font-combodo/font-combodo.css');
|
||||
$oPage->LinkScriptFromModule('itop-hub-connector/js/hub.js');
|
||||
$oPage->LinkStylesheetFromAppRoot('css/font-combodo/font-combodo.css');
|
||||
|
||||
$oPage->add_style(<<<CSS
|
||||
div.choice { margin: 0.5em;}
|
||||
|
||||
@@ -305,9 +305,9 @@ try {
|
||||
$sCloseUrl = utils::GetAbsoluteUrlModulesRoot().'/itop-hub-connector/images/black-close.svg';
|
||||
|
||||
$oPage = new HubConnectorPage(Dict::S('iTopHub:Connect'));
|
||||
$oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/js/hub.js');
|
||||
$oPage->add_linked_stylesheet('../css/font-combodo/font-combodo.css');
|
||||
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/css/hub.css');
|
||||
$oPage->LinkScriptFromModule('itop-hub-connector/js/hub.js');
|
||||
$oPage->LinkStylesheetFromAppRoot('css/font-combodo/font-combodo.css');
|
||||
$oPage->LinkStylesheetFromModule('itop-hub-connector/css/hub.css');
|
||||
|
||||
$aDataToPost = MakeDataToPost($sTargetRoute);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user