Plugin popup() api
Changes to JS API:
- popups have backdrop and is centered
- plugin.popup() takes a string custom element name
- plugin.popup() returns an API for closing and reopening the popup
- plugin.deprecated.popup() takes Element (similar to GWT Plugin JS API)
Recommended usage:
``` js
Gerrit.install(function(plugin) {
const popup = plugin.popup('my-plugin-popup-simple');;
// ... work
popup.close();
// ... more work
popup.open();
});
```
``` html
<dom-module id="my-plugin-popup-simple">
<template>
<div>popup popup popup popup popup </div>
</template>
<script>
Polymer({is: 'my-plugin-popup-simple'});
</script>
</dom-module>
```
Change-Id: Icb3f83d35f3c60915f12b77bc8a7d548d50d5695
This commit is contained in:
@@ -27,13 +27,15 @@ const EXTERN_NAMES = [
|
||||
'GrGerritAuth',
|
||||
'GrLinkTextParser',
|
||||
'GrPluginEndpoints',
|
||||
'GrPopupInterface',
|
||||
'GrRangeNormalizer',
|
||||
'GrReporting',
|
||||
'GrReviewerUpdatesParser',
|
||||
'GrThemeApi',
|
||||
'moment',
|
||||
'page',
|
||||
'util'];
|
||||
'util',
|
||||
];
|
||||
|
||||
fs.readdir('./polygerrit-ui/temp/behaviors/', (err, data) => {
|
||||
if (err) {
|
||||
@@ -102,4 +104,4 @@ fs.readdir('./polygerrit-ui/temp/behaviors/', (err, data) => {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user