Skip to content

Commit

Permalink
Fix compatibility with iTop 2.6 (jQuery 3+)
Browse files Browse the repository at this point in the history
  • Loading branch information
Molkobain committed Nov 21, 2018
1 parent ecd5185 commit 1933746
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Compatible with iTop 2.3+
### Installation
* Unzip the extension
* Copy the ``dist/molkobain-console-tooltip`` folder under ``<PATH_TO_ITOP>/extensions`` folder of your iTop
* Run iTop setup & select extension *Console: Tooltips on object's properties*
* Run iTop setup & select extension *Attributes description tooltip*

*Your folders should look like this*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@

namespace Molkobain\iTop\Console\Tooltips\Extension;

use utils;
use MetaModel;
use DBObjectSet;
use WebPage;
use iApplicationUIExtension;
use MetaModel;
use utils;
use WebPage;

/**
* Class ConsoleUIExtension
* Class UIExtension
*
* @package Molkobain\iTop\Console\Tooltips\Extension
*/
class ConsoleUIExtension implements iApplicationUIExtension
class UIExtension implements iApplicationUIExtension
{
const DEFAULT_ENABLED = true;
const DEFAULT_DECORATION_CLASS = 'mct-decoration-question';
Expand Down Expand Up @@ -53,16 +53,16 @@ public function OnDisplayProperties($oObject, WebPage $oPage, $bEditMode = false
var oDecorationElem = $('<span></span>')
.addClass('mct-decoration')
.addClass('$sDecorationClass');
// Attach to label
oDecorationElem.appendTo($(this));
// Create tooltip
oDecorationElem.qtip( { content: $(this).attr('title'), show: 'mouseover', hide: 'mouseout', style: { name: 'dark', tip: 'bottomCenter' }, position: { corner: { target: 'topCenter', tooltip: 'bottomCenter' }, adjust: { y: -15}} } );
var sContent = $('<div />').text($(this).attr('title')).html();
oDecorationElem.qtip( { content: sContent, show: 'mouseover', hide: 'mouseout', style: { name: 'dark', tip: 'bottomMiddle' }, position: { corner: { target: 'topCenter', tooltip: 'bottomMiddle' }, adjust: { y: -15}} } );
// Remove native title
$(this).attr('title', '');
// Attach to label
oDecorationElem.appendTo($(this));
});
EOF
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'visible' => true,
// Components
'datamodel' => array(
'console/consoleuiextension.class.inc.php',
'console/uiextension.class.inc.php',
),
'webservice' => array(
//'webservices.itop-portal-base.php',
Expand Down

0 comments on commit 1933746

Please sign in to comment.