Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:Polymer/labs
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Oct 2, 2013
2 parents 52f967b + 48378a9 commit d2e473a
Show file tree
Hide file tree
Showing 26 changed files with 1,594 additions and 297 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "x-tags/core"]
path = x-tags/core
url = https://github.com/x-tag/core.git
[submodule "x-tags/spinner"]
path = x-tags/spinner
url = https://github.com/x-tag/spinner.git
8 changes: 7 additions & 1 deletion shiny/Contacts-v2/components/contacts-app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<link href="../../../../polymer-elements/polymer-flex-layout/polymer-flex-layout.html" rel="import">
<link href="../../../../polymer-ui-elements/polymer-ui-pages/polymer-ui-pages.html" rel="import">
<link href="contacts-create.html" rel="import">
<link href="contacts-detail.html" rel="import">
<link href="contacts-icon.html" rel="import">
<link href="contacts-list.html" rel="import">
Expand Down Expand Up @@ -36,7 +37,7 @@
</style>
<mock-data id="mock"></mock-data>
<polymer-ui-pages selected="{{page}}">
<contacts-list selectedModel="{{selectedContact}}">
<contacts-list selectedModel="{{selectedContact}}" on-contacts-list-add="addContactAction">
<template repeat="{{alpha in $.mock.alphabetized}}">
<div class="contactItem header">
{{alpha.letter}}
Expand All @@ -52,6 +53,8 @@
</contacts-list>
<contacts-detail contact="{{selectedContact.contact}}" on-contacts-detail-shrink="detailShrinkAction">
</contacts-detail>
<contacts-create>
</contacts-create>
</polymer-ui-pages>
</template>
<script>
Expand All @@ -62,6 +65,9 @@
console.log('selectedContact', this.selectedContact);
this.page = 1;
},
addContactAction: function() {
this.page = 2;
},
detailShrinkAction: function() {
this.page = 0;
}
Expand Down
31 changes: 31 additions & 0 deletions shiny/Contacts-v2/components/contacts-create-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<link href="../../../../polymer-elements/polymer-flex-layout/polymer-flex-layout.html" rel="import">
<link href="../../../../polymer-ui-elements/polymer-ui-icon-button/polymer-ui-icon-button.html" rel="import">
<polymer-element name="contacts-create-item" noscript attributes="icon label value">
<template>
<style>
/* @polyfill @host */
:host {
padding: 0 20px;
border-color: rgba(0, 0, 0, 0.14902);
border-width: 0 1px 1px;
border-style: solid;
}
input {
margin-left: 20px;
border: none;
font-size: 18px;
font-family: 'Helvetica Neue Medium', HelveticaNeue-Medium, Helvetica, sans-serif;
box-sizing: border-box;
height: 60px;
}
input:focus {
outline: none;
}
</style>
<polymer-flex-layout align="center"></polymer-flex-layout>
<polymer-ui-icon-button icon="{{icon}}"></polymer-ui-icon-button>
<div flex>
<input value="{{value}}" placeholder="{{label}}">
</div>
</template>
</polymer-element>
41 changes: 41 additions & 0 deletions shiny/Contacts-v2/components/contacts-create.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<link href="../../../../polymer-ui-elements/polymer-ui-toolbar/polymer-ui-toolbar.html" rel="import">
<link href="contacts-create-item.html" rel="import">
<polymer-element name="contacts-create">
<template>
<style>
polymer-ui-toolbar {
background: transparent none !important;
}
button {
background: transparent none;
border: 0;
font-family: 'Helvetica Neue Medium', HelveticaNeue-Medium, Helvetica, sans-serif;
font-size: 16px;
color: #999;
padding: 10px;
margin: 20px;
}
button:focus {
outline: none;
}
button:active {
outline: none;
border: 1px solid #ccc;
border-radius: 3px;
}
</style>
<polymer-ui-toolbar>
<button on-tap="cancelAction">Cancel</button>
<div flex></div>
<button on-tap="createAction"></button>
</polymer-ui-toolbar>
<contacts-create-item icon="account" label="Name"></contacts-create-item>
<contacts-create-item icon="briefcase" label="Phone"></contacts-create-item>
<contacts-create-item icon="gplus" label="Email"></contacts-create-item>
<contacts-create-item icon="stream" label="Address"></contacts-create-item>
<contacts-create-item icon="dialog" label="Handle"></contacts-create-item>
</template>
<script>
Polymer('contacts-create');
</script>
</polymer-element>
1 change: 1 addition & 0 deletions shiny/Contacts-v2/components/contacts-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<script>
Polymer('contacts-list', {
addAction: function() {
this.fire('contacts-list-add');
}
})
</script>
Expand Down
17 changes: 17 additions & 0 deletions sjmiles/Designer/designer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html>
<head>
<title></title>
<script src="../../../polymer/polymer.js"></script>
<link rel="import" href="../x-elements/x-designer/x-designer.html">
<style>
body {
font-family: Neue Helvetica, Roboto, Arial;
}
</style>
</head>
<body>
<link rel="import" href="../../../polymer-ui-elements/metadata.html">
<x-designer></x-designer>
</body>
</html>
69 changes: 69 additions & 0 deletions sjmiles/Designer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!doctype html>
<html>
<head>
<title></title>
<script src="../../../polymer/polymer.js"></script>
<link rel="import" href="../../../polymer-elements/elements.html">
<link rel="import" href="../x-elements/x-inspector/x-inspector.html">
<style>
html {
position: relative;
height: 100%;
}
body {
font-family: Neue Helvetica, Roboto, Arial;
height: 100%;
margin: 0;
overflow: hidden;
}
x-foo {
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
}
</style>
</head>
<body>
<x-foo></x-foo>
<polymer-element name="x-foo">
<template>
<style>
frame {
}
iframe {
width: 100%;
height: 100%;
border: none;
}
x-inspector {
width: 520px;
}
</style>
<polymer-layout></polymer-layout>
<div flex>
<iframe id="frame" src="designer.html"></iframe>
</div>
<x-inspector id="inspector"></x-inspector>
</template>
<script>
Polymer('x-foo', {
ready: function() {
window.designWindow = this.$.frame.contentWindow;
designWindow.addEventListener('design-change', function(event) {
self.designChange(event.target);
});
var self = this;
},
designChange: function(designer) {
this.$.inspector.sourceElement = designer.selected;
this.$.inspector.update();
}
});
</script>
</polymer-element>
</body>
</html>
Loading

0 comments on commit d2e473a

Please sign in to comment.