mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
comunication between components
This commit is contained in:
@@ -36,6 +36,14 @@ Or [download as ZIP](https://github.com/eromano/alfresco-file-list/archive/maste
|
||||
<alfresco-file-list></alfresco-file-list>
|
||||
```
|
||||
|
||||
# publish-subscribe functionality
|
||||
Add the code below to the main index.html in order to refresh the file list when a file is uploaded.
|
||||
|
||||
<template is="dom-bind" id="alfresco-app">
|
||||
<iron-signals on-iron-signal-uploaded="uploadedSignal"></iron-signals>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
Attribute | Options | Default | Description
|
||||
|
@@ -9,6 +9,7 @@
|
||||
<link rel="import" href="../../../bower_components/paper-badge/paper-badge.html">
|
||||
<link rel="import" href="../../../bower_components/paper-item/paper-item.html">
|
||||
<link rel="import" href="../../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
|
||||
<link rel="import" href="../../../bower_components/iron-signals/iron-signals.html">
|
||||
|
||||
<style>
|
||||
.pad {
|
||||
@@ -140,7 +141,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div lass="dropdowm menu">
|
||||
<paper-dropdown-menu class="custom" label="Actions" no-label-float>
|
||||
<paper-dropdown-menu class="custom pull-right" label="Actions" no-label-float>
|
||||
<paper-listbox class="dropdown-content">
|
||||
<paper-item>Download as Zip</paper-item>
|
||||
<paper-item>View Details</paper-item>
|
||||
@@ -187,6 +188,12 @@
|
||||
ready: function() {
|
||||
var initialFolder = 'swsdp/documentLibrary';
|
||||
this.fetchFolderFolder(initialFolder);
|
||||
var self = this;
|
||||
if(document.querySelector("#alfresco-app")) {
|
||||
document.querySelector("#alfresco-app").uploadedSignal = function (e, detail, sender) {
|
||||
self.fetchFolderFolder(initialFolder);
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
fetchFolderFolder: function(slug) {
|
||||
|
Reference in New Issue
Block a user