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

Commit

Permalink
Merge pull request #13 from Polymer/master
Browse files Browse the repository at this point in the history
8/15 master -> stable
  • Loading branch information
dfreedm committed Aug 15, 2013
2 parents e809e78 + 85044e5 commit 81014b5
Show file tree
Hide file tree
Showing 27 changed files with 128 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Animation/animation-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// proxied animation properties
targetSelector: ''
},
ready: function() {
created: function() {
this.super();
this.animationTypeChanged();
},
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap/elements/bs-navbar-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>
<script>
Polymer('bs-navbar-button', {
ready: function() {
created: function() {
this.setAttribute('data-toggle', 'collapse');
}
});
Expand Down
18 changes: 9 additions & 9 deletions Bootstrap/elements/bs-simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</template>
<script>
Polymer('bp-btn-navbar', {
ready: function() {
created: function() {
this.classList.add('btn', 'btn-navbar');
this.setAttribute('data-toggle', 'collapse');
this.setAttribute('data-target', '.nav-collapse');
Expand All @@ -37,7 +37,7 @@
<polymer-element name="bp-icon-bar">
<script>
Polymer('bp-icon-bar', {
ready: function() {
created: function() {
this.classList.add('icon-bar');
}
});
Expand All @@ -47,7 +47,7 @@
<polymer-element name="bp-brand" extends="a">
<script>
Polymer('bp-brand', {
ready: function() {
created: function() {
this.classList.add('brand');
}
});
Expand All @@ -57,7 +57,7 @@
<polymer-element name="bp-nav-collapse" extends="p">
<script>
Polymer('bp-nav-collapse', {
ready: function() {
created: function() {
this.classList.add('nav-collapse', 'collapse');
}
});
Expand All @@ -67,7 +67,7 @@
<polymer-element name="bp-navbar-text-right" extends="p">
<script>
Polymer('bp-navbar-text-right', {
ready: function() {
created: function() {
this.classList.add('navbar-text', 'pull-right');
}
});
Expand All @@ -77,7 +77,7 @@
<polymer-element name="bp-navbar-link" extends="a">
<script>
Polymer('bp-navbar-link', {
ready: function() {
created: function() {
this.classList.add('navbar-link');
}
});
Expand All @@ -91,7 +91,7 @@
<script>
Polymer('bp-nav', {
selectedClass: 'active',
ready: function() {
created: function() {
this.super();
this.classList.add('nav');
}
Expand All @@ -106,7 +106,7 @@
</template>
<script>
this.component && this.component({
ready: function() {
created: function() {
this.nameChanged();
},
nameChanged: function() {
Expand All @@ -121,7 +121,7 @@
</template>
<script>
this.component && this.component({
ready: function() {
created: function() {
this.nameChanged();
},
nameChanged: function() {
Expand Down
2 changes: 1 addition & 1 deletion ace-element/ace-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
wrap: false,
// allow styling from the outside world!
applyAuthorStyles: true,
ready: function() {
created: function() {
ace.config.set('basePath', this.resolvePath('src-min-noconflict/'));
this.editor = ace.edit(this.$.editor);
this.editor.focus();
Expand Down
4 changes: 2 additions & 2 deletions chart-js/chart-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
options: null,
color: '#AABBDD',
dataString: '28,48,40,19,96,27,100',
inserted: function() {
enteredDocument: function() {
this.$.chart.width = Math.max(this.offsetWidth, 100);
this.$.chart.height = Math.max(this.offsetHeight, 100);
//Get the context of the canvas element we want to select
Expand All @@ -43,7 +43,7 @@
] : [0, 0, 0];
},
updateChart: function() {
if (this.data) {
if (this.data && this.ctx) {
console.log(this.data);
var chart = new Chart(this.ctx);
var kind = this.kind;
Expand Down
2 changes: 1 addition & 1 deletion code-mirror/code-mirror.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<script>
Polymer('code-mirror', {
skin: '',
ready: function() {
created: function() {
this.mirror = CodeMirror(this.shadowRoot, {
value: "<polymer-element name=\"my-element\">\n\t<template></template>\n\t<script>\n\t\tPolymer('my-element', {\n\t\t});\n\t</scr" + 'ipt>\n</polymer-element>',
mode: 'htmlmixed',
Expand Down
4 changes: 2 additions & 2 deletions cool-clock/cool-clock.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<script>
Polymer('cool-clock', {
skin: '', //'Babosa',
ready: function() {
created: function() {

},
skinChanged: function() {
this.canvas.className = 'CoolClock:' + this.skin;
},
inserted: function() {
enteredDocument: function() {
// TODO(sorvell): create the canvas element manually becase ios
// does not render the canvas element if it is not created in the
// main document (component templates are created in a
Expand Down
19 changes: 19 additions & 0 deletions flatiron-director/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2011 Nodejitsu Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
7 changes: 7 additions & 0 deletions flatiron-director/director.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions flatiron-director/flatiron-director.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<script src="director.min.js"></script>

<polymer-element name="flatiron-director" attributes="route autoHash">
<script>
(function() {
var private_router;
Polymer('flatiron-director', {
autoHash: false,
created: function() {
this.router.on(/(\w*)/, function(route) {
this.route = route;
}.bind(this));
var initialRoute = this.router.getRoute(0);
this.route = initialRoute || '';
},
get router() {
if (!private_router) {
private_router = new Router();
private_router.init();
}
return private_router;
},
routeChanged: function() {
if (this.autoHash) {
window.location.hash = this.route;
}
this.fire('director-route', this.route);
}
});
})();
</script>
</polymer-element>
28 changes: 28 additions & 0 deletions flatiron-director/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>Director</title>
<script src="../../polymer/polymer.js"></script>
<link rel="import" href="flatiron-director.html">
</head>
<body>
<polymer-element name="x-test">
<template>
<flatiron-director route="{{route}}" autoHash></flatiron-director>
hash: <input value="{{route}}">
</template>
<script>
Polymer('x-test', {
route: 'hello'
});
</script>
</polymer-element>

<x-test></x-test>
</body>
</html>
2 changes: 1 addition & 1 deletion g-kratu/g-kratu.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
data: null,
definition: null,
pending: 0,
ready: function() {
created: function() {
// Instantiate a new Kratu object
this.kratu = new Kratu();
// Tell Kratu where to render our report
Expand Down
4 changes: 2 additions & 2 deletions google-map/google-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
longitude: '150.644',
zoom: 10,
showCenterMarker: false,
ready: function() {
created: function() {
var options = {
zoom: this.zoom,
center: new google.maps.LatLng(this.latitude, this.longitude)
};
this.map = new google.maps.Map(this, options);
},
inserted: function() {
enteredDocument: function() {
this.resize();
},
resize: function() {
Expand Down
2 changes: 1 addition & 1 deletion js-beautify/js-beautify.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Polymer('js-beautify', {
html: '',
options: null,
ready: function() {
created: function() {
this.html = this.innerHTML;
},
htmlChanged: function() {
Expand Down
3 changes: 3 additions & 0 deletions marked-js/marked-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<script>
Polymer('marked-js', {
text: '',
created: function() {
this.text = this.textContent;
},
textChanged: function () {
this.text = this.text.replace(/\\n/g, '\n');
this.innerHTML = marked(this.text);
Expand Down
2 changes: 1 addition & 1 deletion pdf-js/pdf-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
page: 1,
src: '',
label: '',
ready: function() {
created: function() {
},
prev: function() {
if (this.page > 0) {
Expand Down
2 changes: 1 addition & 1 deletion pixi-js/pixi-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
count: 40,
speed: 1,
playing: false,
ready: function () {
created: function () {
this.asyncMethod(function () {
this.animator = this.animate.bind(this);
this.prepare();
Expand Down
2 changes: 1 addition & 1 deletion polymer-more/polymer-ui-clock/polymer-ui-clock.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
seconds: -1,
minutes: -1,
hours: -1,
inserted: function() {
enteredDocument: function() {
// when we are inserted into DOM, start watching the time
this.updateTime();
this.interval = setInterval(this.updateTime.bind(this), 1000);
Expand Down
2 changes: 1 addition & 1 deletion polymer-more/polymer-ui-stock/polymer-ui-stock.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
timeData: null,
autoupdate: false,
updateinterval: 60000,
ready: function() {
created: function() {
//this.$.ajax.url = this.resolvePath('mock/polymer-ui-stock-test-data.json');
if (this.symbols === '') {
this.symbols = '.INX,NDAQ,.DJI';
Expand Down
2 changes: 1 addition & 1 deletion polymer-more/polymer-ui-weather/polymer-ui-weather.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
},
icons: ['clear', 'cloudy', 'rainy', 'sunny', 'mostlysunny', 'partlycloudy'],
ready: function() {
created: function() {
this.loadFromStorage();
},
loadFromStorage: function() {
Expand Down
2 changes: 1 addition & 1 deletion polymer-stock/polymer-stock.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
updateinterval: 60000,
jsonpResponse: null,
queryMatches: false,
ready: function() {
created: function() {
this.queryMatchesChanged()
},
go: function() {
Expand Down
Loading

0 comments on commit 81014b5

Please sign in to comment.