Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
use core-* instead of deprecated polymer-*
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Apr 7, 2014
1 parent 3e6378a commit fd2f0e4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 50 deletions.
32 changes: 18 additions & 14 deletions elements/designer-element/designer-element.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<link rel="import" href="../../components/core-selector/core-selector.html">
<link rel="import" href="../../components/core-layout/core-layout.html">
<link rel="import" href="../../components/core-pages/core-pages.html">

<link rel="import" href="../../components/paper-appbar/paper-appbar.html">
<link rel="import" href="../../components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../../components/core-toolbar/core-toolbar.html">
<link rel="import" href="../../components/core-icon-button/core-icon-button.html">

<link rel="import" href="../../components/code-mirror/code-mirror.html">
<link rel="import" href="../../components/github-elements/github-elements.html">
Expand All @@ -19,35 +18,40 @@

<core-layout flow="v"></core-layout>

<paper-appbar id="appbar" theme="paper-light-theme">
<core-toolbar id="appbar" theme="paper-light-theme">

<paper-icon-button icon="maximize" on-tap="{{fullscreenAction}}"></paper-icon-button>
<core-icon-button icon="maximize" on-tap="{{fullscreenAction}}"></core-icon-button>

<core-selector id="viewSelector" selected="{{selected}}">
<paper-icon-button src="assets/design.png" name="design"></paper-icon-button>
<paper-icon-button src="assets/code.png" name="code"></paper-icon-button>
<core-icon-button src="assets/design.png" name="design"></core-icon-button>
<core-icon-button src="assets/code.png" name="code"></core-icon-button>
</core-selector>

<span style="padding-right: 24px;"></span>

<paper-icon-button icon="add" on-tap="{{saveAction}}"></paper-icon-button>
<!-- shareAction has to be triggered from on-click to allow opening a tab (otherwise can only open a floating window) -->
<paper-icon-button icon="shortcut" on-click="{{shareAction}}"></paper-icon-button>
<core-icon-button icon="add" on-tap="{{saveAction}}"></core-icon-button>
<!-- shareAction must be triggered from click to allow opening a tab (otherwise can only open a floating window) -->
<core-icon-button icon="shortcut" on-click="{{shareAction}}"></core-icon-button>

<span style="padding-right: 16px;"></span>

<paper-icon-button icon="left" on-tap="{{promoteElement}}"></paper-icon-button>
<paper-icon-button icon="right" on-tap="{{demoteElement}}"></paper-icon-button>
<core-icon-button icon="left" on-tap="{{promoteElement}}"></core-icon-button>
<core-icon-button icon="right" on-tap="{{demoteElement}}"></core-icon-button>

</paper-appbar>
</core-toolbar>

<core-pages core-flex selected="{{selected}}">

<core-layout name="design">

<div id="frameContainer" core-flex>

<iframe id="frame" src="designer.html"></iframe>

</div>

<x-inspector id="inspector" on-delete-element="{{deleteElement}}" on-parent-element="{{selectParentElement}}" on-bind-property="{{applyPropertyBinding}}"></x-inspector>

</core-layout>

<core-layout name="code">
Expand Down Expand Up @@ -83,7 +87,7 @@
designWindow.addEventListener('designer-ready', this.designerReady.bind(this));
designWindow.addEventListener('design-change', this.designChange.bind(this));
designWindow.document.addEventListener('keydown',
this.KeydownAndPromptForUnload.bind(this, designWindow));
this.KeydownAndPromptForUnload.bind(this, designWindow));
},

KeydownAndPromptForUnload: function(w, e) {
Expand Down
2 changes: 1 addition & 1 deletion elements/designer-element/designer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Polymer Designer</title>

<script src="../../components/platform-dev/platform.js"></script>
<script src="../../components/platform/platform.js"></script>
<script>
window.parent.postMessage('designer-loading', location.href);
</script>
Expand Down
10 changes: 5 additions & 5 deletions elements/x-designer/x-designer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="import" href="../../components/polymer-flex-layout/polymer-flex-layout.html">
<link rel="import" href="../../components/core-layout/core-layout.html">
<link rel="import" href="../../components/polymer-ui-splitter/polymer-ui-splitter.html">
<link rel="import" href="../x-designable/x-designable.html">
<link rel="import" href="../x-palette/x-palette.html">
Expand All @@ -11,16 +11,16 @@

<x-meta id="meta" categories="{{elements}}"></x-meta>

<polymer-flex-layout></polymer-flex-layout>
<core-layout></core-layout>

<section id="tools">
<polymer-flex-layout vertical></polymer-flex-layout>
<x-palette flex id="palette" elements="{{elements}}" canvas="{{$.canvas}}" on-palette-drag="{{paletteDrag}}" on-palette-create-drag-object="{{paletteCreateDragObject}}"></x-palette>
<core-layout flow="v"></core-layout>
<x-palette core-flex id="palette" elements="{{elements}}" canvas="{{$.canvas}}" on-palette-drag="{{paletteDrag}}" on-palette-create-drag-object="{{paletteCreateDragObject}}"></x-palette>
<polymer-ui-splitter direction="down"></polymer-ui-splitter>
<x-tree id="tree" canvas="{{$.canvas}}" selected="{{selected}}"></x-tree>
</section>

<x-designable flex id="canvas" tabIndex="-1" selected="{{selected}}" on-design-change="{{designChange}}"></x-designable>
<x-designable core-flex id="canvas" tabIndex="-1" selected="{{selected}}" on-design-change="{{designChange}}"></x-designable>

</template>
<script>
Expand Down
15 changes: 9 additions & 6 deletions elements/x-inspector/x-inspector.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<link rel="import" href="../../components/polymer-ui-icon-button/polymer-ui-icon-button.html">

<link rel="import" href="../../components/core-icon-button/core-icon-button.html">
<link rel="import" href="../../components/x-meta/x-meta.html">

<link rel="import" href="../x-property-inspector/x-property-inspector.html">
<link rel="import" href="../x-meta/x-meta.html">

<script src="reflection.js"></script>

<polymer-element name="x-style-inspector" attributes="sourceElement">
Expand Down Expand Up @@ -47,14 +50,14 @@

<div id="crumbList">
<template repeat="{{crumbs}}">
<polymer-ui-icon-button src="assets/ic_chevron_left_darkreg.png" on-click="{{selectParentElement}}" hidden="{{top}}"></polymer-ui-icon-button>
<core-icon-button src="assets/ic_chevron_left_darkreg.png" on-click="{{selectParentElement}}" hidden="{{top}}"></core-icon-button>
<b>{{name}}</b>
</template>
</div>

<polymer-ui-icon-button class="fright" src="assets/ic_delete_darkreg.png" on-click="{{deleteElement}}"></polymer-ui-icon-button>
<!--<polymer-ui-icon-button class="fright" icon="right"></polymer-ui-icon-button>
<polymer-ui-icon-button class="fright" icon="left"></polymer-ui-icon-button>-->
<core-icon-button class="fright" src="assets/ic_delete_darkreg.png" on-click="{{deleteElement}}"></core-icon-button>
<!--<core-icon-button class="fright" icon="right"></core-icon-button>
<core-icon-button class="fright" icon="left"></core-icon-button>-->

</div>

Expand Down
11 changes: 0 additions & 11 deletions elements/x-palette/x-palette.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
-ms-user-select: none;
}

.item {
font-weight: bold;
cursor: pointer;
padding: 12px;
margin: 4px 0;
background-color: white;
border: 1px solid #D3D2D2;
border-radius: 5px;
-webkit-transition: border 0.5s;
}

.group-item {
font-weight: 500;
}
Expand Down
19 changes: 8 additions & 11 deletions elements/x-palette/x-palette.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<link rel="import" href="../../components/polymer-ui-icon/polymer-ui-icon.html">
<link rel="import" href="../../components/polymer-ui-menu/polymer-ui-menu.html">
<link rel="import" href="../../components/polymer-ui-menu-item/polymer-ui-menu-item.html">
<link rel="import" href="../../components/polymer-ui-submenu-item/polymer-ui-submenu-item.html">
<link rel="import" href="../../components/core-icon/core-icon.html">
<link rel="import" href="../../components/core-item/core-item.html">
<link rel="import" href="../../components/core-menu/core-menu.html">
<link rel="import" href="../../components/core-menu/core-submenu.html">
<link rel="import" href="../../components/x-meta/x-meta.html">

<polymer-element name="x-palette" attributes="canvas drag">
Expand All @@ -14,21 +14,21 @@

<div id="list" on-trackstart="{{trackStart}}" on-track="{{track}}" on-trackend="{{trackEnd}}">

<polymer-ui-menu selectedClass="palette-selected">
<core-menu selectedClass="palette-selected">

<template repeat="{{categories}}">

<polymer-ui-submenu-item class="group-item" label="{{name}}">
<core-submenu class="group-item" label="{{name}}">

<template repeat="{{list}}">
<div class="simple-item" tag="{{id}}" loaded?="{{importsLoaded}}" ishidden?="{{isHidden}}">{{label}}</div>
</template>

</polymer-ui-submenu-item>
</core-submenu>

</template>

</polymer-ui-menu>
</core-menu>

</div>

Expand All @@ -39,9 +39,6 @@

categories: null,

ready: function() {
},

trackStart: function(event) {
event.stopPropagation();
var tag = event.target.getAttribute('tag');
Expand Down
1 change: 0 additions & 1 deletion elements/x-property-inspector/x-property-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<link rel="import" href="../../components/polymer/polymer.html">
<link rel="import" href="../x-editors/x-editors.html">

<polymer-element name="x-property-editor" attributes="editorTag">
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<title>Designer</title>

<script src="components/platform-dev/platform.js"></script>
<script src="components/platform/platform.js"></script>

<link rel="import" href="elements/designer-element/designer-element.html">

Expand Down

0 comments on commit fd2f0e4

Please sign in to comment.