Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
test/javasource/
test/deployment/
test/.classpath
test/.project
test/theme/
test/userlib/
test/.classpath
test/.project
*.launch
*.tmp
*.lock
.idea/
node_modules/

dist/
test/*/deployment/
test/*/javasource/
test/*/javascriptsource/
test/*/resources/
test/mx-6/theme/
test/mx-7/theme/
test/*/userlib/
test/mx-6/widgets/
test/mx-7/widgets/
test/*/widgets/BootstrapTooltip.mpk
test/*/.classpath
test/*/.project
test/*/*.launch
test/*/*.lock
test/*/*.bak

node_modules/
.idea/
.vscode/
.editorconfig
*DS_Store*
.vscode/
*.bak
23 changes: 0 additions & 23 deletions .jshintrc

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist/
test/

*.xml
.gitignore
.prettierignore
.DS_Store
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tabWidth": 4,
"overrides": [
{
"files": ["*.json", ".prettierrc"],
"options": {
"tabWidth": 2
}
}
]
}
86 changes: 0 additions & 86 deletions Gulpfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright 2019 Mendix Technology B.V.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
83 changes: 69 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,86 @@
# Bootstrap Tooltip
This widget adds a tooltip to a user defined field, containing for example help text or extra information.

## Contributing
For more information on contributing to this repository visit [Contributing to a GitHub repository] (https://world.mendix.com/display/howto50/Contributing+to+a+GitHub+repository)
This widget adds a tooltip to an user defined field, containing for example help text or extra information.

## Typical usage scenario

Add helptext to an inputfield on focus.
Informative text for buttons on hover.

## Installation

Import the widget to your project and add the Bootstrap Tooltip on a page.
Import the widget to your project and add the Bootstrap Tooltip on a page.

## Configuration

Configure the properties to determine how the widget will behave in your application.

Tip: Locate the widget as close to the target element as possible. (Preferably next to it)
### Properties

#### Appearance

- _Target element classname_: The class name of the field to attach the tooltip to.
- _Render HTML_: Renders the tooltip content as HTML. Values: Yes, No
- _Tooltip position_: The location of the tooltip relative to the field. Values: Top, Left, Bottom, Right
- _Tooltip mode_: When to show the tooltip. Values: On hover/focus, On focus, On click

#### Data source

- _Default text_: Text being displayed when no data source microflow is defined.
- _Tooltip source microflow_: Microflow that returns the text to be displayed in the tooltip.

Extra for Bootstrap Tooltip (Context):

- _Tooltip source_: Text generated from microflow or object attribute
- _Tooltip source attribute_: Attribute that contains the text to be displayed in the tooltip.

### Tips

- Locate the widget as close to the target element as possible. (Preferably next to it)
- When an element has a tooltip attached to it and needs to be conditionally visible, put both element and tooltip together in a container and apply the visibility conditions to the container instead of the element.

## Features and limitations

- Based on Bootstrap's Tooltip.js

## Properties
- Based on Bootstrap's Tooltip.js

## Widget development

To start development on the Bootstrap Tooltip:

- Clone this repository
- Make sure you have Node.js installed on your computer
- Open a terminal in the root directory of the project

To install all project dependencies, execute the following comamnd in the terminal:

```
npm install
```

In order to test the widget with one of the supplied test projects, run the following command to generate and include an mpk file in every test project (and in a dist folder):

```
npm start
```

This command will also watch the source code files. When changes to these files have been saved, a new mpk file will be generated and included in the dist folder and in every test project. The dist folder will also contain an unpacked version of the mpk.

To keep source code formatting uniform across the project, run the following command to format all project source files (XML files are not supported):

```
npm run prettier:fix
```

## Widget releasing

To release the widget in the Mendix App Store, run the following command to build the widget:

```
npm run build
```

The command will optimize the source code for production environment and generate a new mpk that will be included in the dist folder and in every test project. The dist folder will also contain an unpacked version of the mpk.

## Contributing

* *Target element classname* The class name of the field to attach the tooltip to.
* *Default text* Text being displayed when no data source microflow is defined.
* *Tooltip position* The location of the tooltip relative to the field. Values: top, left, bottom, right
* *Tooltip mode* When to show the tooltip. Values: On hover, On click
* *Tooltip source microflow* Return value: Text to display in tooltip.
For more information on contributing to this repository visit [Contributing to a GitHub repository](https://world.mendix.com/display/howto50/Contributing+to+a+GitHub+repository)
Loading