ember-paper
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -5,5 +5,5 @@ import Ember from 'ember'; | ||
tagName: 'md-backdrop', | ||
classNames:['paper-backdrop','md-opaque','md-default-theme'], | ||
classNames: ['paper-backdrop', 'md-opaque', 'md-default-theme'], | ||
click: function(evt){ | ||
click: function(evt) { | ||
Ember.$(evt.target).trigger('collapseSidenav'); | ||
@@ -10,0 +10,0 @@ return false; |
@@ -6,28 +6,29 @@ import BaseFocusable from './base-focusable'; | ||
export default BaseFocusable.extend(RippleMixin,{ | ||
tagName:'md-checkbox', | ||
classNames:['md-checkbox','md-default-theme'], | ||
classNameBindings:['checked:md-checked'], | ||
export default BaseFocusable.extend(RippleMixin, { | ||
tagName: 'md-checkbox', | ||
classNames: ['md-checkbox', 'md-default-theme'], | ||
classNameBindings: ['checked:md-checked'], | ||
/* RippleMixin overrides */ | ||
center: true, | ||
dimBackground: false, | ||
rippleContainerSelector:'.md-container', | ||
//Alow element to be focusable by supplying a tabindex 0 | ||
attributeBindings:['tabindex'], | ||
tabindex:function(){ | ||
attributeBindings: ['tabindex'], | ||
tabindex: function() { | ||
return this.get('disabled') ? '-1' : '0'; | ||
}.property('disabled'), | ||
checked:false, | ||
toggle:true, | ||
checked: false, | ||
toggle: true, | ||
click:function(){ | ||
if(!this.get('disabled')){ | ||
/* RippleMixin overrides */ | ||
center: true, | ||
dimBackground: false, | ||
rippleContainerSelector: '.md-container', | ||
click: function() { | ||
if (!this.get('disabled')) { | ||
this.toggleProperty('checked'); | ||
} | ||
}, | ||
keyPress:function(ev){ | ||
if(ev.which === KEY_CODE_SPACE) { | ||
keyPress: function(ev) { | ||
if (ev.which === KEY_CODE_SPACE) { | ||
this.click(); | ||
@@ -34,0 +35,0 @@ } |
@@ -6,3 +6,3 @@ import Ember from 'ember'; | ||
tagName: 'md-nav-container', | ||
classNames:['paper-nav-container'], | ||
classNames: ['paper-nav-container'], | ||
classNameBindings: ['open:sidenav-expanded'], | ||
@@ -13,14 +13,13 @@ | ||
// Custom events | ||
toggleSidenav: function(){ | ||
toggleSidenav: function() { | ||
this.toggleProperty('open'); | ||
}, | ||
expandSidenav: function(){ | ||
expandSidenav: function() { | ||
this.set('open', true); | ||
}, | ||
collapseSidenav: function(){ | ||
collapseSidenav: function() { | ||
this.set('open', false); | ||
} | ||
}); |
@@ -5,10 +5,11 @@ import Ember from 'ember'; | ||
export default BaseFocusable.extend(RippleMixin,{ | ||
tagName:'md-radio-button', | ||
classNames:['md-radio-button','md-default-theme'], | ||
classNameBindings:['checked:md-checked'], | ||
toggle:false, | ||
export default BaseFocusable.extend(RippleMixin, { | ||
tagName: 'md-radio-button', | ||
classNames: ['md-radio-button', 'md-default-theme'], | ||
classNameBindings: ['checked:md-checked'], | ||
toggle: false, | ||
selected: null, | ||
center: true, | ||
rippleContainerSelector:'.md-container', | ||
rippleContainerSelector: '.md-container', | ||
@@ -19,4 +20,4 @@ checked: function() { | ||
checkedDidChange: Ember.observer('checked',function() { | ||
if(this.get('checked')){ | ||
checkedDidChange: Ember.observer('checked', function() { | ||
if (this.get('checked')) { | ||
this.set('selected', this.get('value')); | ||
@@ -26,5 +27,5 @@ } | ||
click:function(){ | ||
if(this.toggle){ | ||
this.set('selected', this.get('checked')?null:this.get('value')); | ||
click: function() { | ||
if (this.get('toggle')) { | ||
this.set('selected', this.get('checked') ? null : this.get('value')); | ||
} else { | ||
@@ -31,0 +32,0 @@ this.set('selected', this.get('value')); |
@@ -5,6 +5,6 @@ import Ember from 'ember'; | ||
tagName: 'md-sidenav-toggle', | ||
classNames:['paper-sidenav-toggle'], | ||
toggle:true, | ||
classNames: ['paper-sidenav-toggle'], | ||
toggle: true, | ||
click: function(evt){ | ||
click: function(evt) { | ||
var eventName; | ||
@@ -11,0 +11,0 @@ if (this.get('toggle')) { |
@@ -6,3 +6,3 @@ import Ember from 'ember'; | ||
tagName: 'md-sidenav', | ||
classNames:['paper-sidenav'] | ||
classNames: ['paper-sidenav'] | ||
}); |
export function initialize(container, application) { | ||
var customEvents = application.get('customEvents') || {}; | ||
Ember.String.w('toggle expand collapse').forEach(function (prefix) { | ||
var name = Ember.String.fmt("%@Sidenav", prefix); | ||
Ember.String.w('toggle expand collapse').forEach(function(prefix) { | ||
var name = Ember.String.fmt('%@Sidenav', prefix); | ||
customEvents[name] = name; | ||
@@ -6,0 +6,0 @@ }); |
11
index.js
'use strict'; | ||
var path = require('path'); | ||
var autoprefixer = require('broccoli-autoprefixer'); | ||
@@ -14,2 +13,3 @@ | ||
AutoprefixerPreprocessor.prototype.toTree = function(tree) { | ||
console.log('I\'m running!!!!!!!!!', tree); | ||
return autoprefixer(tree, { browsers: ['last 2 versions'] }); | ||
@@ -32,6 +32,9 @@ }; | ||
}, | ||
setupPreprocessorRegistry: function(type, registry){ | ||
registry.add('css', new AutoprefixerPreprocessor()); | ||
if (registry.remove) registry.remove('css', 'broccoli-autoprefixer'); | ||
postprocessTree: function(type, tree){ | ||
if (type === 'all' || type === 'styles') { | ||
tree = autoprefixer(tree, this.options); | ||
} | ||
return tree; | ||
} | ||
}; |
{ | ||
"name": "ember-paper", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"directories": { | ||
@@ -5,0 +5,0 @@ "doc": "doc", |
@@ -1,3 +0,4 @@ | ||
# Ember Paper | ||
# Ember Paper [![Build Status](https://travis-ci.org/miguelcobain/ember-paper.svg)](https://travis-ci.org/miguelcobain/ember-paper) | ||
[![Join the chat at https://gitter.im/miguelcobain/ember-paper](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/miguelcobain/ember-paper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
@@ -9,2 +10,4 @@ | ||
Temporary workaround. For now you need to run `$ npm install --save-dev broccoli-autoprefixer` before installing ember-paper. | ||
Install the ember-cli addon in your ember-cli project: | ||
@@ -11,0 +14,0 @@ |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
6602364
77939
39
110