Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ src/phoenix/virtualfs.js.map
# Thirdparty libs
!/src/thirdparty/licences
/src/thirdparty/less.*
/src/thirdparty/emmet.*
/src/thirdparty/CodeMirror
/src/thirdparty/acorn
/src/thirdparty/tern
Expand Down
15 changes: 9 additions & 6 deletions docs/API-Reference/widgets/NotificationUI.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The `createFromTemplate` API can be configured with numerous options. See API op
* [.API](#module_widgets/NotificationUI..API)
* [.NOTIFICATION_STYLES_CSS_CLASS](#module_widgets/NotificationUI..NOTIFICATION_STYLES_CSS_CLASS) : <code>enum</code>
* [.CLOSE_REASON](#module_widgets/NotificationUI..CLOSE_REASON) : <code>enum</code>
* [.createFromTemplate(template, [elementID], [options])](#module_widgets/NotificationUI..createFromTemplate) ⇒ <code>Notification</code>
* [.createFromTemplate(title, template, [elementID], [options])](#module_widgets/NotificationUI..createFromTemplate) ⇒ <code>Notification</code>
* [.createToastFromTemplate(title, template, [options])](#module_widgets/NotificationUI..createToastFromTemplate) ⇒ <code>Notification</code>

<a name="module_widgets/NotificationUI..API"></a>
Expand Down Expand Up @@ -89,15 +89,16 @@ Closing notification reason.

<a name="module_widgets/NotificationUI..createFromTemplate"></a>

### widgets/NotificationUI.createFromTemplate(template, [elementID], [options]) ⇒ <code>Notification</code>
### widgets/NotificationUI.createFromTemplate(title, template, [elementID], [options]) ⇒ <code>Notification</code>
Creates a new notification popup from given template.
The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.

Creating a notification popup

```js
// note that you can even provide an HTML Element node with
// custom event handlers directly here instead of HTML text.
let notification1 = NotificationUI.createFromTemplate(
```js
"<div>Click me to locate the file in file tree</div>", "showInfileTree",{
allowedPlacements: ['top', 'bottom'],
dismissOnClick: false,
Expand All @@ -110,9 +111,10 @@ let notification1 = NotificationUI.createFromTemplate(

| Param | Type | Description |
| --- | --- | --- |
| title | <code>string</code> | The title for the notification. |
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
| [elementID] | <code>String</code> | optional id string if provided will show the notification pointing to the element. If no element is specified, it will be managed as a generic notification. |
| [options] | <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). |
| [options] | <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |

<a name="module_widgets/NotificationUI..createToastFromTemplate"></a>

Expand All @@ -121,10 +123,11 @@ Creates a new toast notification popup from given title and html message.
The message can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.

Creating a toast notification popup

```js
// note that you can even provide an HTML Element node with
// custom event handlers directly here instead of HTML text.
let notification1 = NotificationUI.createToastFromTemplate( "Title here",
```js
"<div>Click me to locate the file in file tree</div>", {
dismissOnClick: false,
autoCloseTimeS: 300 // auto close the popup after 5 minutes
Expand All @@ -138,5 +141,5 @@ let notification1 = NotificationUI.createToastFromTemplate( "Title here",
| --- | --- | --- |
| title | <code>string</code> | The title for the notification. |
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
| [options] | <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |
| [options] | <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. * `instantOpen` - To instantly open the popup without any open animation delays |

4 changes: 4 additions & 0 deletions gulpfile.js/thirdparty-lib-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ let copyThirdPartyLibs = series(
// lessjs
copyFiles.bind(copyFiles, ['node_modules/less/dist/less.min.js', 'node_modules/less/dist/less.min.js.map'],
'src/thirdparty'),
// emmet
copyFiles.bind(copyFiles, ['node_modules/emmet/dist/emmet.es.js'],
'src/thirdparty'),
copyLicence.bind(copyLicence, 'node_modules/emmet/LICENSE', 'emmet'),
// bugsnag
copyFiles.bind(copyFiles, ['node_modules/@bugsnag/browser/dist/bugsnag.min.js',
'node_modules/@bugsnag/browser/dist/bugsnag.min.js.map'], 'src/thirdparty'),
Expand Down
Loading
Loading