lpio
Version:
The last dashboard app you'll ever need
48 lines (37 loc) • 1.22 kB
HTML
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<script>
window.ApiBehaviors = window.ApiBehaviors || {};
/**
*
* @polymerBehavior ApiBehaviors.App
*
**/
ApiBehaviors.AppImpl = {
setLoading: function(key){
var k = key || 'app';
this.dispatch({key:k,type:'setLoading'});
},
setLoadingDone: function(key){
var k = key || 'app';
this.dispatch({key:k,type:'setLoadingDone'});
},
setSaving: function(key){
var k = key || 'app';
this.dispatch({key:k,type:'setSaving'});
},
setSavingDone: function(key){
var k = key || 'app';
this.dispatch({key:k,type:'setSavingDone'});
},
setError: function(msg){
this.dispatch({key:'app',type:'error',msg:msg});
},
setOnline: function(online){
this.dispatch({key:'app',type:'setOnline',value:online});
},
setDashboard: function(dashboardId){
this.dispatch({key:'app',type:'setCurrentDashboard',id:dashboardId});
}
};
ApiBehaviors.App = [ApiBehaviors.AppImpl];
</script>