ember-paper
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -24,4 +24,4 @@ import Ember from 'ember'; | ||
return typeof this.get('bubbles') == 'undefined' || this.get('bubbles') == true; | ||
return typeof this.get('bubbles') === 'undefined' || this.get('bubbles') === true; | ||
} | ||
}); |
import Ember from 'ember'; | ||
import FlexMixin from '../mixins/flex-mixin'; | ||
export default Ember.Component.extend({ | ||
export default Ember.Component.extend(FlexMixin, { | ||
tagName:'md-content', | ||
classNames:['md-content'], | ||
attributeBindings:['flexAttr:flex','flex-layout:layout'], | ||
/* | ||
* Not binding boolean values in Ember 1.8.1? | ||
* https://github.com/emberjs/ember.js/issues/9595 | ||
*/ | ||
flexAttr:function(){ | ||
return this.get('flex') ? 'flex' : null; | ||
}.property('flex') | ||
classNames:['paper-content'] | ||
}); |
@@ -6,6 +6,33 @@ import Ember from 'ember'; | ||
classNames: ['paper-icon'], | ||
classNameBindings: ['iconClass'], | ||
classNameBindings: ['iconClass', 'sizeClass', 'spinClass'], | ||
spin: false, | ||
reverseSpin: false, | ||
iconClass: function(){ | ||
return 'ic-'+this.get('icon'); | ||
}.property('icon') | ||
}.property('icon'), | ||
spinClass: function(){ | ||
if(this.get('spin')){ | ||
return ' md-spin'; | ||
} else if (this.get('reverseSpin')){ | ||
return ' md-spin-reverse'; | ||
} | ||
}.property('spin','reverseSpin'), | ||
sizeClass : function(){ | ||
switch(this.get('size')){ | ||
case 'lg': | ||
return ' md-lg'; | ||
case 2: | ||
return ' md-2x'; | ||
case 3: | ||
return ' md-3x'; | ||
case 4: | ||
return ' md-4x'; | ||
case 5: | ||
return ' md-5x'; | ||
} | ||
}.property('size') | ||
}); |
@@ -5,3 +5,6 @@ import Ember from 'ember'; | ||
tagName:'md-item-content', | ||
classNames:['paper-item'] | ||
classNames:['paper-item'], | ||
click: function() { | ||
this.sendAction('action', this.get('param')); | ||
} | ||
}); |
import Ember from 'ember'; | ||
import FlexMixin from '../mixins/flex-mixin'; | ||
export default Ember.Component.extend({ | ||
export default Ember.Component.extend(FlexMixin, { | ||
tagName: 'md-nav-container', | ||
classNames:['paper-nav-container'], | ||
classNameBindings: ['active:sidenav-expanded'], | ||
classNameBindings: ['open:sidenav-expanded'], | ||
active: false, | ||
open: false, | ||
@@ -13,12 +14,12 @@ // Custom events | ||
toggleSidenav: function(){ | ||
this.toggleProperty('active'); | ||
this.toggleProperty('open'); | ||
}, | ||
expandSidenav: function(){ | ||
this.set('active', true); | ||
this.set('open', true); | ||
}, | ||
collapseSidenav: function(){ | ||
this.set('active', false); | ||
this.set('open', false); | ||
} | ||
}); |
import Ember from 'ember'; | ||
import FlexMixin from '../mixins/flex-mixin'; | ||
export default Ember.Component.extend({ | ||
export default Ember.Component.extend(FlexMixin, { | ||
tagName: 'md-sidenav', | ||
classNames:['paper-sidenav'] | ||
}); |
{ | ||
"name": "ember-paper", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"directories": { | ||
@@ -5,0 +5,0 @@ "doc": "doc", |
@@ -30,2 +30,2 @@ import Ember from 'ember'; | ||
}] | ||
}) | ||
}); |
@@ -11,2 +11,3 @@ import Ember from 'ember'; | ||
this.route('button'); | ||
this.route('card'); | ||
this.route('checkbox'); | ||
@@ -18,3 +19,3 @@ this.route('radio'); | ||
this.route('divider'); | ||
this.route('navigation'); | ||
this.route('sidenav'); | ||
this.route('textfield'); | ||
@@ -21,0 +22,0 @@ this.route('toolbar'); |
@@ -13,4 +13,7 @@ import Ember from 'ember'; | ||
alert('You pressed a target button. -from route'); | ||
}, | ||
willTransition: function() { | ||
this.controller.set('drawerOpen',false); | ||
} | ||
} | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
438761
160
3021