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

Commit 7bdfa67

Browse files
author
Arthur Evans
committed
Merge pull request #26 from Polymer/update-0.3.5
Update components to 0.4.0.
2 parents 1823ac0 + e666cb3 commit 7bdfa67

File tree

270 files changed

+3078
-10976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+3078
-10976
lines changed

components/core-ajax/.bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "core-ajax",
33
"private": true,
44
"dependencies": {
5-
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
5+
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0"
66
},
77
"homepage": "https://github.com/Polymer/core-ajax",
8-
"version": "0.3.3",
9-
"_release": "0.3.3",
8+
"version": "0.4.0",
9+
"_release": "0.4.0",
1010
"_resolution": {
1111
"type": "version",
12-
"tag": "0.3.3",
13-
"commit": "b9cb6d8e2a5b91cbe752bdb89f5c58cadf92fad6"
12+
"tag": "0.4.0",
13+
"commit": "3b2d12b4d14b0401b3c323bd2d68d025e833b6e0"
1414
},
1515
"_source": "git://github.com/Polymer/core-ajax.git",
1616
"_target": "*",

components/core-ajax/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
core-ajax
22
=========
33

4-
See the [component page](http://polymer.github.io/core-ajax) for more information.
4+
See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-ajax) for more information.

components/core-ajax/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "core-ajax",
33
"private": true,
44
"dependencies": {
5-
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
5+
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0"
66
}
77
}

components/core-ajax/core-ajax.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@homepage github.io
3333
-->
3434
<link rel="import" href="core-xhr.html">
35-
<polymer-element name="core-ajax" attributes="url handleAs auto params response method headers body contentType withCredentials">
35+
<polymer-element name="core-ajax" hidden attributes="url handleAs auto params response method headers body contentType withCredentials">
3636
<script>
3737

3838
Polymer('core-ajax', {
@@ -238,6 +238,9 @@
238238
try {
239239
return JSON.parse(r);
240240
} catch (x) {
241+
console.warn('core-ajax caught an exception trying to parse response as JSON:');
242+
console.warn('url:', this.url);
243+
console.warn(x);
241244
return r;
242245
}
243246
},
@@ -300,8 +303,11 @@
300303
if (args.headers && typeof(args.headers) == 'string') {
301304
args.headers = JSON.parse(args.headers);
302305
}
303-
if (this.contentType) {
304-
args.headers['content-type'] = this.contentType;
306+
var hasContentType = Object.keys(args.headers).some(function (header) {
307+
return header.toLowerCase() === 'content-type';
308+
});
309+
if (!hasContentType && this.contentType) {
310+
args.headers['Content-Type'] = this.contentType;
305311
}
306312
if (this.handleAs === 'arraybuffer' || this.handleAs === 'blob' ||
307313
this.handleAs === 'document') {

components/core-ajax/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<head>
1212

1313
<script src="../platform/platform.js"></script>
14-
<link rel="import" href="../polymer/polymer.html">
1514
<link rel="import" href="../core-component-page/core-component-page.html">
1615

1716
</head>

components/core-ajax/metadata.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
@license
3+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
Code distributed by Google as part of the polymer project is also
8+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
-->
10+
<x-meta id="core-ajax" label="Ajax" group="Core">
11+
12+
<property name="handleAs" kind="select" options="json,text,xml,arraybuffer,blob,document"></property>
13+
<property name="method" kind="select" options="GET,POST,PUT,DELETE"></property>
14+
15+
<template>
16+
<core-ajax handleAs="json" method="GET"></core-ajax>
17+
</template>
18+
19+
<template id="imports">
20+
<link rel="import" href="core-ajax.html">
21+
</template>
22+
23+
</x-meta>

components/core-collapse/.bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "core-collapse",
33
"private": true,
44
"dependencies": {
5-
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
5+
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0"
66
},
77
"homepage": "https://github.com/Polymer/core-collapse",
8-
"version": "0.3.3",
9-
"_release": "0.3.3",
8+
"version": "0.4.0",
9+
"_release": "0.4.0",
1010
"_resolution": {
1111
"type": "version",
12-
"tag": "0.3.3",
13-
"commit": "358ad316615bd7a5bd40fef2f078973d46d4e8ee"
12+
"tag": "0.4.0",
13+
"commit": "dae7a5292bad21245c7c7824ffcebe7c9011dbaa"
1414
},
1515
"_source": "git://github.com/Polymer/core-collapse.git",
1616
"_target": ">=0.3.0 <1.0.0",

components/core-collapse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
core-collapse
22
=============
33

4-
See the [component page](http://polymer.github.io/core-collapse) for more information.
4+
See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-collapse) for more information.

components/core-collapse/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "core-collapse",
33
"private": true,
44
"dependencies": {
5-
"polymer": "Polymer/polymer#>=0.3.0 <1.0.0"
5+
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0"
66
}
77
}

components/core-collapse/core-collapse.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
<button on-click="{{toggle}}">toggle collapse</button>
1515
16-
<core-collapse id="collapse"></core-collapse>
16+
<core-collapse id="collapse">
1717
...
1818
</core-collapse>
1919
@@ -41,6 +41,19 @@
4141

4242
Polymer('core-collapse', {
4343

44+
/**
45+
* Fired when the `core-collapse`'s `opened` property changes.
46+
*
47+
* @event core-collapse-open
48+
*/
49+
50+
/**
51+
* Fired when the target element has been resized as a result of the opened
52+
* state changing.
53+
*
54+
* @event core-resize
55+
*/
56+
4457
/**
4558
* The target element.
4659
*
@@ -140,6 +153,7 @@
140153

141154
openedChanged: function() {
142155
this.update();
156+
this.fire('core-collapse-open', this.opened);
143157
},
144158

145159
/**
@@ -165,6 +179,7 @@
165179
}
166180
this.setTransitionDuration(null);
167181
this.toggleClosedClass(!this.opened);
182+
this.asyncFire('core-resize', null, this.target);
168183
},
169184

170185
toggleClosedClass: function(closed) {
@@ -214,6 +229,10 @@
214229
if (!this.fixedSize) {
215230
this.updateSize('auto', null);
216231
var s = this.calcSize();
232+
if (s == '0px') {
233+
this.transitionEnd();
234+
return;
235+
}
217236
this.updateSize(0, null);
218237
}
219238
this.async(function() {

0 commit comments

Comments
 (0)