Skip to content

Instantly share code, notes, and snippets.

@IntranetFactory
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save IntranetFactory/bd5368ef0001a2dd7e0d to your computer and use it in GitHub Desktop.

Select an option

Save IntranetFactory/bd5368ef0001a2dd7e0d to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../at-core-searchbox/at-core-searchbox.html">
<link rel="import" href="../at-core-activity/at-core-activity.html">
<link rel="import" href="../at-core-list/at-core-list.html">
<link rel="import" href="../at-chart-core/c3-import.html">
<link rel="import" href="../at-chart-core/at-chart-core.html">
<polymer-element name="toaster-policies" attributes="searchTerm">
<template>
<style>
:host {
display: block;
overflow-y: scroll;
height: 100%;
padding: 0px !important;
background-color: white !important;
}
#searchBoxFrame {
margin: 12px;
}
</style>
<div id="searchBoxFrame">
<at-core-searchbox searchterm="{{ searchTerm }}" placeholder="Search Toaster Intranet" id="at_core_searchbox"></at-core-searchbox>
</div>
<at-core-activity url="/Activity/adenin.GateKeeper.Connector/ServiceResult/IntelliEnterprise/Generic-search" response="{{ Data }}" id="activity"></at-core-activity>
<at-core-list items="{{ Data.items }}" itemcomponent="at-core-list/feed-item" id="list"></at-core-list>
<at-chart-core charttype="bar" legendposition="bottom" tooltip="default" id="at_chart_core">{
"data": {
"columns": [
["data1", 100, 200, 150, 300, 200],
["data2", 400, 500, 250, 700, 300]
]
}
}</at-chart-core>
</template>
<script>
Polymer({
searchTerm: '',
searchTermChanged: function () {
this.$.list.clear();
if (this.searchTerm) {
this.$.activity.params = { query: this.searchTerm };
this.$.activity.go();
}
},
ready: function () {
alert("aa");
var that = this;
if (this.refresh) {
setInterval(function () {
that.$.feed_data.go();
}, this.refresh);
}
},
viewReady: function (context) {
context.appFrame.caption = "Toaster Intranet";
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment