Skip to content

Commit 911259d

Browse files
author
Thomas Hourlier
committed
Squash commit. Rename component.
1 parent 70a848c commit 911259d

File tree

8 files changed

+54
-35
lines changed

8 files changed

+54
-35
lines changed

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 WID
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# app-drawer-menu
1+
# wid-drawer-menu
22

33
An element providing a starting point for your own reusable Polymer elements.
44

@@ -28,13 +28,13 @@ And you can run it via:
2828
polyserve
2929

3030
Once running, you can preview your element at
31-
`http://localhost:8080/components/app-drawer-menu/`, where `app-drawer-menu` is the name of the directory containing it.
31+
`http://localhost:8080/components/wid-drawer-menu/`, where `wid-drawer-menu` is the name of the directory containing it.
3232

3333

3434
## Testing Your Element
3535

3636
Simply navigate to the `/test` directory of your element to run its tests. If
37-
you are using Polyserve: `http://localhost:8080/components/app-drawer-menu/test/`
37+
you are using Polyserve: `http://localhost:8080/components/wid-drawer-menu/test/`
3838

3939
### web-component-tester
4040

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "app-drawer-menu",
2+
"name": "wid-drawer-menu",
33
"version": "1.0.0",
44
"authors": [
55
"Thomas Hourlier"
@@ -12,7 +12,7 @@
1212
"menu",
1313
"drawer"
1414
],
15-
"main": "app-drawer-menu.html",
15+
"main": "wid-drawer-menu.html",
1616
"license": "http://polymer.github.io/LICENSE.txt",
1717
"homepage": "https://github.com/<USERNAME>/seed-element/",
1818
"ignore": [

demo/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
<head>
1313
<meta charset="utf-8">
1414
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
15-
<title>app-drawer-menu Demo</title>
15+
<title>wid-drawer-menu Demo</title>
1616
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
17-
<link rel="import" href="../app-drawer-menu.html">
17+
<link rel="import" href="../wid-drawer-menu.html">
1818
</head>
1919
<body>
2020

21-
<p>An example of <code>&lt;app-drawer-menu&gt;</code>:</p>
21+
<p>An example of <code>&lt;wid-drawer-menu&gt;</code>:</p>
2222

2323
<template id="app" is="dom-bind">
2424

25-
<app-drawer-menu
25+
<wid-drawer-menu
2626
current-route="[[route]]"
2727
menu-items="[[menuItems]]">
28-
</app-drawer-menu>
28+
</wid-drawer-menu>
2929

3030
</template>
3131

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var gulp = require('gulp'),
44
ps = require('ps-node');
55

66
var POLYSERVE_PORT = 8080,
7-
elementName = 'app-drawer-menu';
7+
elementName = 'wid-drawer-menu';
88

99
var browserSyncConfig = function(path, cb) {
1010
bs.init({

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "app-drawer-menu",
2+
"name": "wid-drawer-menu",
33
"version": "1.0.0",
44
"authors": [
55
"Thomas Hourlier <hourliert@gmail.com>"
@@ -12,7 +12,7 @@
1212
"menu",
1313
"drawer"
1414
],
15-
"main": "app-drawer-menu.html",
15+
"main": "wid-drawer-menu.html",
1616
"license": "MIT",
1717
"homepage": "https://github.com/hourliert/login-polyform/",
1818
"ignore": [

test/basic-test.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020

2121
<!-- Step 1: import the element to test -->
2222
<link rel="import" href="../../test-fixture/test-fixture.html">
23-
<link rel="import" href="../app-drawer-menu.html">
23+
<link rel="import" href="../wid-drawer-menu.html">
2424
</head>
2525
<body>
2626

2727
<!-- You can use the document as a place to set up your fixtures. -->
28-
<test-fixture id="app-drawer-menu">
28+
<test-fixture id="wid-drawer-menu">
2929
<template>
3030

31-
<app-drawer-menu>
32-
</app-drawer-menu>
31+
<wid-drawer-menu>
32+
</wid-drawer-menu>
3333

3434
</template>
3535
</test-fixture>
3636

3737

3838
<script>
39-
suite('<app-drawer-menu>', function() {
39+
suite('<wid-drawer-menu>', function() {
4040
var c1,
4141
menus = [
4242
{
@@ -66,7 +66,7 @@
6666
];
6767

6868
setup(function() {
69-
c1 = fixture('app-drawer-menu');
69+
c1 = fixture('wid-drawer-menu');
7070
c1.menuItems = menus;
7171

7272
c1.currentRoute = '/work';
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@
1212
<link rel="import" href="../paper-item/paper-item.html">
1313
<link rel="import" href="../iron-icons/iron-icons.html">
1414
<link rel="import" href="../iron-icons/communication-icons.html">
15-
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
1615

1716
<!--
1817
Display a simple menu. This menu should be used in a drawer.
1918
2019
Example:
2120
22-
<app-drawer-menu
21+
<wid-drawer-menu
2322
current-route="[[route]]"
2423
menu-items="[[menuItems]]">
25-
</app-drawer-menu>
24+
</wid-drawer-menu>
2625
2726
@demo
2827
-->
29-
<dom-module id="app-drawer-menu">
28+
<dom-module id="wid-drawer-menu">
3029

3130
<style>
3231
:host {
@@ -44,15 +43,17 @@
4443
}
4544
</style>
4645
<template>
47-
48-
<paper-menu class="list" attr-for-selected="data-route" selected="[[currentRoute]]" on-iron-select="_onMenuSelect">
46+
47+
<paper-menu class="list" attr-for-selected="data-route" selected="[[currentRoute]]">
4948
<template is="dom-repeat" items="[[menuItems]]">
50-
<paper-item data-route$="[[item.routeName]]" class="layout vertical center-center">
51-
<a href="[[item.route]]" class="flex layout horizontal start-center">
52-
<iron-icon icon="[[item.icon]]"></iron-icon>
53-
<span>[[item.title]]</span>
54-
</a>
49+
50+
<a href="[[item.route]]" data-route$="[[item.routeName]]">
51+
<paper-item>
52+
<iron-icon icon="[[item.icon]]"></iron-icon>
53+
<span>[[item.title]]</span>
5554
</paper-item>
55+
</a>
56+
5657
</template>
5758
</paper-menu>
5859

@@ -64,7 +65,7 @@
6465

6566
Polymer({
6667

67-
is: 'app-drawer-menu',
68+
is: 'wid-drawer-menu',
6869

6970
properties: {
7071

@@ -86,10 +87,6 @@
8687
currentRoute: {
8788
type: String
8889
}
89-
},
90-
91-
_onMenuSelect: function(event) {
92-
this.fire('iron-select', event.detail);
9390
}
9491
});
9592

0 commit comments

Comments
 (0)