diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index e19a985b6..8a20df278 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -4292,7 +4292,7 @@ EOF $('.ui-layout-content').prepend('
'+data.message+'
'); $('
'+data.popup_message+'
').dialog({title: $sJSTitle, modal: true, autoOpen: true, buttons:[ {text: $sJSOk, click: function() { $(this).dialog('close'); } }], close: function() { $(this).remove(); }}); } - $('.wizContainer form button.action:not(.cancel)').attr('disabled', 'disabled'); + $('.wizContainer form button.action:not(.cancel)').prop('disabled', true); } else if ((data.operation == 'lost') || (data.operation == 'expired')) { @@ -4301,7 +4301,7 @@ EOF $('.ui-layout-content').prepend('
'+data.message+'
'); $('
'+data.popup_message+'
').dialog({title: $sJSTitle, modal: true, autoOpen: true, buttons:[ {text: $sJSOk, click: function() { $(this).dialog('close'); } }], close: function() { $(this).remove(); }}); } - $('.wizContainer form button.action:not(.cancel)').attr('disabled', 'disabled'); + $('.wizContainer form button.action:not(.cancel)').prop('disabled', true); } }, 'json'); }, $iInterval); diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index ca4563f56..7fc9a176e 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -73,7 +73,6 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage $this->add_linked_stylesheet("../css/jquery.treeview.css"); $this->add_linked_stylesheet("../css/jquery.autocomplete.css"); $this->add_linked_stylesheet("../css/jquery-ui-timepicker-addon.css"); - $this->add_linked_stylesheet("../css/fg.menu.css"); $this->add_linked_stylesheet("../css/jquery.multiselect.css"); $this->add_linked_stylesheet("../css/magnific-popup.css"); $this->add_linked_stylesheet("../css/c3.min.css"); @@ -93,7 +92,6 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage $this->add_linked_script("../js/ckeditor/adapters/jquery.js"); $this->add_linked_script("../js/jquery.qtip-1.0.min.js"); $this->add_linked_script('../js/property_field.js'); - $this->add_linked_script('../js/fg.menu.js'); $this->add_linked_script('../js/icon_select.js'); $this->add_linked_script('../js/raphael-min.js'); $this->add_linked_script('../js/d3.js'); @@ -361,7 +359,7 @@ EOF return; } ui.panel.html('
'); - ui.jqXHR.success(function() { + ui.jqXHR.done(function() { ui.tab.data( "loaded", true ); }); } diff --git a/application/nicewebpage.class.inc.php b/application/nicewebpage.class.inc.php index b3c023aaf..63227e88d 100644 --- a/application/nicewebpage.class.inc.php +++ b/application/nicewebpage.class.inc.php @@ -37,8 +37,8 @@ class NiceWebPage extends WebPage { parent::__construct($s_title, $bPrintable); $this->m_aReadyScripts = array(); - $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-1.12.4.min.js'); - $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate-1.4.1.min.js'); // Needed since many other plugins still rely on oldies like $.browser + $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-3.3.1.min.js'); + $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate-3.0.1.min.js'); // Needed since many other plugins still rely on oldies like $.browser $this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/ui-lightness/jquery-ui-1.11.4.custom.css'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-1.11.4.custom.min.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js'); diff --git a/application/ui.htmleditorwidget.class.inc.php b/application/ui.htmleditorwidget.class.inc.php index 683e372db..0aafec101 100644 --- a/application/ui.htmleditorwidget.class.inc.php +++ b/application/ui.htmleditorwidget.class.inc.php @@ -101,7 +101,7 @@ class UIHTMLEditorWidget $oPage->add_ready_script( <<add_ready_script("$('#{$this->iId}_confirm').bind('keyup change', function(evt, sFormId) { return ValidatePasswordField('$this->iId', sFormId) } );"); // Bind to a custom event: validate $oPage->add_ready_script("$('#{$this->iId}').bind('update', function(evt, sFormId) { - if ($(this).attr('disabled')) + if ($(this).prop('disabled')) { - $('#{$this->iId}_confirm').attr('disabled', 'disabled'); - $('#{$this->iId}_changed').attr('disabled', 'disabled'); - $('#{$this->iId}_reset').attr('disabled', 'disabled'); + $('#{$this->iId}_confirm').prop('disabled', true); + $('#{$this->iId}_changed').prop('disabled', true); + $('#{$this->iId}_reset').prop('disabled', true); } else { - $('#{$this->iId}_confirm').removeAttr('disabled'); - $('#{$this->iId}_changed').removeAttr('disabled'); - $('#{$this->iId}_reset').removeAttr('disabled'); + $('#{$this->iId}_confirm').prop('disabled', false); + $('#{$this->iId}_changed').prop('disabled', false); + $('#{$this->iId}_reset').prop('disabled', false); } } );"); // Bind to a custom event: update to handle enabling/disabling diff --git a/css/fg.menu.css b/css/fg.menu.css deleted file mode 100755 index 39a5a2e14..000000000 --- a/css/fg.menu.css +++ /dev/null @@ -1,115 +0,0 @@ -/* Styles for jQuery menu widget -Author: Maggie Wachs, maggie@filamentgroup.com -Date: September 2008 -*/ - - -/* REQUIRED STYLES - the menus will only render correctly with these rules */ - -.positionHelper { z-index: 2999; } -.fg-menu-container { position: absolute; top:0; left:-999px; padding: .4em; overflow: hidden; } -.fg-menu-container.fg-menu-flyout { overflow: visible; } - -.fg-menu, .fg-menu ul { list-style-type:none; padding: 0; margin:0; } - -.fg-menu { position:relative; } -.fg-menu-flyout .fg-menu { position:static; } - -.fg-menu ul { position:absolute; top:0; } -.fg-menu ul ul { top:-1px; } - -.fg-menu-container.fg-menu-ipod .fg-menu-content, -.fg-menu-container.fg-menu-ipod .fg-menu-content ul { background: none !important; } - -.fg-menu.fg-menu-scroll, -.fg-menu ul.fg-menu-scroll { overflow: scroll; overflow-x: hidden; } - -.fg-menu li { clear:both; float:left; width:100%; margin: 0; padding:0; border: 0; } -.fg-menu li li { font-size:1em; } /* inner li font size must be reset so that they don't blow up */ - -.fg-menu-flyout ul ul { padding: .4em; } -.fg-menu-flyout li { position:relative; } - -.fg-menu-scroll { overflow: scroll; overflow-x: hidden; } - -.fg-menu-breadcrumb { margin: 0; padding: 0; } - -.fg-menu-footer { margin-top: .4em; padding: .4em; } -.fg-menu-header { margin-bottom: .4em; padding: .4em; } - -.fg-menu-breadcrumb li { float: left; list-style: none; margin: 0; padding: 0 .2em; font-size: .9em; opacity: .7; } -.fg-menu-breadcrumb li.fg-menu-prev-list, -.fg-menu-breadcrumb li.fg-menu-current-crumb { clear: left; float: none; opacity: 1; } -.fg-menu-breadcrumb li.fg-menu-current-crumb { padding-top: .2em; } - -.fg-menu-breadcrumb a, -.fg-menu-breadcrumb span { float: left; } - -.fg-menu-footer a:link, -.fg-menu-footer a:visited { float:left; width:100%; text-decoration: none; } -.fg-menu-footer a:hover, -.fg-menu-footer a:active { } - -.fg-menu-footer a span { float:left; cursor: pointer; } - -.fg-menu-breadcrumb .fg-menu-prev-list a:link, -.fg-menu-breadcrumb .fg-menu-prev-list a:visited, -.fg-menu-breadcrumb .fg-menu-prev-list a:hover, -.fg-menu-breadcrumb .fg-menu-prev-list a:active { background-image: none; text-decoration:none; } - -.fg-menu-breadcrumb .fg-menu-prev-list a { float: left; padding-right: .4em; } -.fg-menu-breadcrumb .fg-menu-prev-list a .ui-icon { float: left; } - -.fg-menu-breadcrumb .fg-menu-current-crumb a:link, -.fg-menu-breadcrumb .fg-menu-current-crumb a:visited, -.fg-menu-breadcrumb .fg-menu-current-crumb a:hover, -.fg-menu-breadcrumb .fg-menu-current-crumb a:active { display:block; background-image:none; font-size:1.3em; text-decoration:none; } - - - -/* REQUIRED LINK STYLES: links are "display:block" by default; if the menu options are split into - selectable node links and 'next' links, the script floats the node links left and floats the 'next' links to the right */ - -.fg-menu a:link, -.fg-menu a:visited, -.fg-menu a:hover, -.fg-menu a:active { float:left; width:92%; padding:.3em 3%; text-decoration:none; outline: 0 !important; } - -.fg-menu a { border: 1px dashed transparent; } - -.fg-menu a.ui-state-default:link, -.fg-menu a.ui-state-default:visited, -.fg-menu a.ui-state-default:hover, -.fg-menu a.ui-state-default:active, -.fg-menu a.ui-state-hover:link, -.fg-menu a.ui-state-hover:visited, -.fg-menu a.ui-state-hover:hover, -.fg-menu a.ui-state-hover:active, - .fg-menu a.ui-state-active:link, - .fg-menu a.ui-state-active:visited, - .fg-menu a.ui-state-active:hover, -.fg-menu a.ui-state-active:active { border-style: solid; font-weight: normal; } - -.fg-menu a span { display:block; cursor:pointer; } - - - /* SUGGESTED STYLES - for use with jQuery UI Themeroller CSS */ - -.fg-menu-indicator span { float:left; } -.fg-menu-indicator span.ui-icon { float:right; } - -.fg-menu-content.ui-widget-content, -.fg-menu-content ul.ui-widget-content { border:0; } - - -/* ICONS AND DIVIDERS */ - -.fg-menu.fg-menu-has-icons a:link, -.fg-menu.fg-menu-has-icons a:visited, -.fg-menu.fg-menu-has-icons a:hover, -.fg-menu.fg-menu-has-icons a:active { padding-left:20px; } - -.fg-menu .horizontal-divider hr, .fg-menu .horizontal-divider span { padding:0; margin:5px .6em; } -.fg-menu .horizontal-divider hr { border:0; height:1px; } -.fg-menu .horizontal-divider span { font-size:.9em; text-transform: uppercase; padding-left:.2em; } - diff --git a/css/light-grey.css b/css/light-grey.css index 062946973..f8d1c8e4f 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -2840,3 +2840,13 @@ table.listResults .originColor { #ds_flash { margin-bottom: 5px; } +.menu-icon-select { + max-height: 300px; + position: absolute; + z-index: 201; + overflow-x: hidden; + overflow-y: auto; +} +.menu-icon-select > .ui-menu-item { + padding: 0.3em 3%; +} diff --git a/css/light-grey.scss b/css/light-grey.scss index 4c83fa55e..c347d71f9 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -3230,4 +3230,17 @@ table.listResults .originColor{ //Impact analysis filter #ds_flash{ margin-bottom: 5px; +} + +///////// +// Icon select +.menu-icon-select{ + max-height : 300px; + position : absolute; + z-index : 201; + overflow-x : hidden; + overflow-y : auto; +} +.menu-icon-select > .ui-menu-item{ + padding: .3em 3%; } \ No newline at end of file diff --git a/datamodels/2.x/itop-backup/status.php b/datamodels/2.x/itop-backup/status.php index 58c3eec6c..b6ccfa4d4 100644 --- a/datamodels/2.x/itop-backup/status.php +++ b/datamodels/2.x/itop-backup/status.php @@ -374,7 +374,7 @@ function LaunchRestoreNow(sBackupFile, sConfirmationMessage) } else { - $('button.restore').attr('disabled', 'disabled'); + $('button.restore').prop('disabled', true); $.unblockUI(); } }); @@ -385,7 +385,7 @@ EOF if (MetaModel::GetConfig()->Get('demo_mode')) { - $oP->add_ready_script("$('button').attr('disabled', 'disabled').attr('title', 'Disabled in demonstration mode')"); + $oP->add_ready_script("$('button').prop('disabled', true).attr('title', 'Disabled in demonstration mode')"); } } catch(Exception $e) diff --git a/datamodels/2.x/itop-config/config.php b/datamodels/2.x/itop-config/config.php index 0ea260951..2f981ba4d 100644 --- a/datamodels/2.x/itop-config/config.php +++ b/datamodels/2.x/itop-config/config.php @@ -245,8 +245,8 @@ var EditorUtils = (function() { var updateConfigEditorButtonState = function(editor) { var isSameContent = (editor.getValue() == $('#prev_config').val()); var hasNoError = $.isEmptyObject(editor.getSession().getAnnotations()); - $('#cancel_button').attr('disabled', isSameContent); - $('#submit_button').attr('disabled', isSameContent || !hasNoError); + $('#cancel_button').prop('disabled', isSameContent); + $('#submit_button').prop('disabled', isSameContent || !hasNoError); }; return { diff --git a/datamodels/2.x/itop-portal-base/portal/src/views/layout.html.twig b/datamodels/2.x/itop-portal-base/portal/src/views/layout.html.twig index d9a237208..a63a81eaa 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/views/layout.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/src/views/layout.html.twig @@ -79,8 +79,8 @@ {% endblock %} {% block pPageScripts %} - - + + diff --git a/js/datatable.js b/js/datatable.js index 08a09a19e..27fcf9dd6 100644 --- a/js/datatable.js +++ b/js/datatable.js @@ -221,13 +221,13 @@ $(function() $('#datatable_dlg_'+sListId).find('input[name=scope]').each(function() { if ($(this).attr('stay-disabled') != 'true') { - $(this).removeAttr('disabled'); + $(this).prop('disabled', false); } }); } else { - $('#datatable_dlg_'+sListId).find('input[name=scope]').attr('disabled', 'disabled'); + $('#datatable_dlg_'+sListId).find('input[name=scope]').prop('disabled', true); } }, // events bound via _bind are removed automatically diff --git a/js/extkeywidget.js b/js/extkeywidget.js index 6ab23e0cc..9d58634bf 100644 --- a/js/extkeywidget.js +++ b/js/extkeywidget.js @@ -35,7 +35,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper this.Init = function() { // make sure that the form is clean - $('#'+this.id+'_btnRemove').prop('disabled','disabled'); + $('#'+this.id+'_btnRemove').prop('disabled',true); $('#'+this.id+'_linksToRemove').val(''); }; @@ -142,11 +142,11 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper var okBtn = $('#btn_ok_'+me.id); if ($('#count_'+me.id).val() > 0) { - okBtn.removeAttr('disabled'); + okBtn.prop('disabled', false); } else { - okBtn.prop('disabled', 'disabled'); + okBtn.prop('disabled', true); } }; @@ -467,7 +467,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper } else { - $('#label_'+me.id).removeAttr('disabled'); + $('#label_'+me.id).prop('disabled', false); $('#label_'+me.id).css({'background': '#fff url(../images/ac-background.gif) no-repeat right'}); $('#mini_add_'+me.id).show(); $('#mini_tree_'+me.id).show(); diff --git a/js/fg.menu.js b/js/fg.menu.js deleted file mode 100755 index 2c22fc97e..000000000 --- a/js/fg.menu.js +++ /dev/null @@ -1,653 +0,0 @@ -/*-------------------------------------------------------------------- -Scripts for creating and manipulating custom menus based on standard