From abcb687cccc36c3d6d82a4a1d6102923cde92f42 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Fri, 18 Dec 2009 07:23:14 +0000 Subject: [PATCH] - Fixed the support of Internet Explorer (tested on IE7 and IE8) - Cleanup of the generated HTML to have page that are XHTML compliant (not yet complete) SVN:trunk[198] --- application/cmdbabstract.class.inc.php | 10 +++++----- application/itopwebpage.class.inc.php | 14 +++++++------- application/ui.linkswidget.class.inc.php | 4 ++-- application/uilinkswizard.class.inc.php | 4 +++- application/uiwizard.class.inc.php | 18 +++++++++--------- core/cmdbsource.class.inc.php | 2 +- css/jqModal.css | 24 +++++++++++------------- js/wizard.utils.js | 3 ++- 8 files changed, 40 insertions(+), 39 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index f6230114d..a707dff3e 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -587,12 +587,12 @@ abstract class cmdbAbstractObject extends CMDBObject $sHtml .= " \n"; $sHtml .= "\n"; $sHtml .= "\n"; - $sHtml .= "\n"; + $sHtml .= "\n"; foreach($aExtraParams as $sName => $sValue) { - $sHtml .= "\n"; + $sHtml .= "\n"; } - $sHtml .= "\n"; + $sHtml .= "\n"; $sHtml .= "\n"; $sHtml .= "\n"; return $sHtml; @@ -654,7 +654,7 @@ abstract class cmdbAbstractObject extends CMDBObject { // too many choices, use an autocomplete // The input for the auto complete - $sHTMLValue = ""; + $sHTMLValue = ""; // another hidden input to store & pass the object's Id $sHTMLValue .= "\n"; $oPage->add_ready_script("\$('#label_$iInputId').autocomplete('./ajax.render.php', { minChars:3, onItemSelect:selectItem, onFindValue:findValue, formatItem:formatItem, autoFill:true, keyHolder:'#$iInputId', extraParams:{operation:'autocomplete', sclass:'$sClass',attCode:'".$sAttCode."'}});"); @@ -675,7 +675,7 @@ abstract class cmdbAbstractObject extends CMDBObject } else { - $sHTMLValue = ""; + $sHTMLValue = ""; } break; } diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 068a4b9ae..c183fae54 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -134,7 +134,7 @@ EOF { // Combo box to select the organization $this->AddToMenu("
-
\n"); // List of visible Organizations $oContext = new UserContext(); $oSearchFilter = $oContext->NewFilter("bizOrganization"); @@ -255,7 +255,7 @@ EOF } echo "\n"; } - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -275,13 +275,13 @@ EOF } $sUserName = UserRights::GetUser(); $sIsAdmin = UserRights::IsAdministrator() ? '(Administrator)' : ''; - echo "
Logged in as '$sUserName' $sIsAdmin  "; + echo "
Logged in as '$sUserName' $sIsAdmin  "; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; - echo "
-
\n"; + echo "
+
\n"; echo "
\n"; echo "
\n"; diff --git a/application/ui.linkswidget.class.inc.php b/application/ui.linkswidget.class.inc.php index e95277411..a51d132b6 100644 --- a/application/ui.linkswidget.class.inc.php +++ b/application/ui.linkswidget.class.inc.php @@ -80,7 +80,7 @@ class UILinksWidget $sHTMLValue .= "\n"; $sHTMLValue .= $this->GetObjectPickerDialog($oPage, $sTargetClass, 'oLinkWidget'.$this->m_iInputId.'.OnOk'); $sHTMLValue .= $this->GetLinkObjectDialog($oPage, $this->m_iInputId); - $sHTMLValue .= "m_iInputId}\" size=\"35\" name=\"\" value=\"\" title=\"Type the first 3 characters\"/>"; + $sHTMLValue .= "m_iInputId}\" size=\"35\" value=\"\" title=\"Type the first 3 characters\"/>"; $sHTMLValue .= "m_iInputId}\" value=\" Add... \" class=\"action\" onClick=\"oLinkWidget{$this->m_iInputId}.AddObject();\"/>"; $sHTMLValue .= " m_iInputId', '$sExtKeyToRemote');\"/>"; // another hidden input to store & pass the object's Id @@ -275,7 +275,7 @@ EOF; $sHTML = "
\n"; $sHTML .= "
\n"; $sHTML .= "

".MetaModel::GetName($sLinkedClass)." attributes

\n"; - $sHTML .= "
\n"; + $sHTML .= "\n"; $index = 0; $aAttrsMap = array(); $aDetails = array(); diff --git a/application/uilinkswizard.class.inc.php b/application/uilinkswizard.class.inc.php index 7fdc3a508..db57e2075 100644 --- a/application/uilinkswizard.class.inc.php +++ b/application/uilinkswizard.class.inc.php @@ -117,6 +117,8 @@ class UILinksWizard $('#ModalDlg').html(data); dlgWidth = $(document).width() - 100; $('#ModalDlg').css('width', dlgWidth); + $('#ModalDlg').css('left', 50); + $('#ModalDlg').css('top', 50); $('#ModalDlg').jqmShow(); }, 'html' @@ -355,7 +357,7 @@ class UILinksWizard $oP->add("  "); $oP->Add("
\n"); $oP->Add("\n"); - $oP->add_ready_script("$('div#SearchFormToAdd form').attr('onSubmit', 'var the_form = this; return SearchObjectsToAdd(the_form.id);');"); + $oP->add_ready_script("$('div#SearchFormToAdd form').bind('submit', function() {var the_form = this; SearchObjectsToAdd(the_form.id); return false;});"); } public function SearchObjectsToAdd(web_page $oP, UserContext $oContext) diff --git a/application/uiwizard.class.inc.php b/application/uiwizard.class.inc.php index f49228dbc..307bdb50a 100644 --- a/application/uiwizard.class.inc.php +++ b/application/uiwizard.class.inc.php @@ -80,12 +80,12 @@ class UIWizard $sDisabled = $bFinishEnabled ? '' : 'disabled'; $nbSteps = count($this->m_aWizardSteps['mandatory']) + count($this->m_aWizardSteps['optional']); $this->m_oPage->add("
- - - + + +
\n"); $this->m_oPage->add(" -\n"); $this->m_oPage->add("
\n"); $this->m_oPage->add("
\n"); - $this->m_oPage->add("m_sClass)."\">\n"); + $this->m_oPage->add("m_sClass)."\" />\n"); $this->m_oPage->add("\n"); $this->m_oPage->add("
\n"); } diff --git a/core/cmdbsource.class.inc.php b/core/cmdbsource.class.inc.php index cdf31ab80..3474033fa 100644 --- a/core/cmdbsource.class.inc.php +++ b/core/cmdbsource.class.inc.php @@ -41,7 +41,7 @@ class CMDBSource self::$m_sDBName = $sSource; if (!self::$m_resDBLink = @mysql_pconnect($sServer, $sUser, $sPwd)) { - throw new MySQLException('Could not connect to the DB server', array('host'=>$sServer, 'user'=>$sUser)); + throw new MySQLException('Could not connect to the DB server', array('host'=>$sServer)); } if (!empty($sSource)) { diff --git a/css/jqModal.css b/css/jqModal.css index 288981f2a..41e059343 100644 --- a/css/jqModal.css +++ b/css/jqModal.css @@ -2,32 +2,30 @@ Brice Burgess */ /* The Window's CSS z-index value is respected (takes priority). If none is supplied, - the Window's z-index value will be set to 3000 by default (in jqModal.js). You - can change this value by either; - a) supplying one via CSS - b) passing the "zIndex" parameter. E.g. (window).jqm({zIndex: 500}); */ + the Window's z-index value will be set to 3000 by default (via jqModal.js). */ .jqmWindow { display: none; position: fixed; - top: 25px; - left: 25px; + no.top: 17%; + no.left: 50%; - nomargin-left: 25px; - nomargin-right: 25px; - nowidth: 800px; + no.margin-left: -300px; + no.width: 700px; - background-color: #FFF; + background-color: #EEE; color: #333; border: 1px solid black; padding: 12px; + + z-index:9999; } -.jqmOverlay { background-color: #333; } +.jqmOverlay { background-color: #000; } /* Background iframe styling for IE6. Prevents ActiveX bleed-through (