Skip to content
Permalink
Browse files

Moving around app examples

  • Loading branch information...
neyric committed Jul 13, 2014
1 parent 6341349 commit 5bc332da38350dec0e12202a99957bd11d7025a1
Showing with 192 additions and 459 deletions.
  1. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/clock_off.png
  2. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/clock_on.png
  3. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_and.png
  4. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_nand.png
  5. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_nor.png
  6. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_not.png
  7. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_or.png
  8. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/gate_xor.png
  9. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/lightbulb_off.png
  10. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/lightbulb_on.png
  11. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/switch_off.png
  12. BIN {sandbox/editor-examples/logicGates → app-examples/logic-gates}/images/switch_on.png
  13. +136 −1 sandbox/editor-examples/logicGates/logicGates.js → app-examples/logic-gates/index.html
  14. +41 −48 src/wireit-app/docs/5-app.html → app-examples/wireit-app/index.html
  15. +1 −1 build/wireit-app/wireit-app-coverage.js
  16. +5 −3 build/wireit-app/wireit-app-debug.js
  17. +5 −3 build/wireit-app/wireit-app.js
  18. +0 −133 sandbox/editor-examples/logicGates/index.html
  19. +4 −0 src/wireit-app/build.json
  20. +0 −270 src/wireit-app/js/wireit-app.js
@@ -1,3 +1,136 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>WireIt - LogicGates example</title>

<!-- YUI -->
<link rel="stylesheet" href="http://yui.yahooapis.com/combo?3.6.0/build/cssreset/reset-min.css&3.6.0/build/cssfonts/fonts-min.css">
<script src="http://yui.yahooapis.com/3.6.0/build/yui/yui.js"></script>

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../../../inputex/lib/inputex/css/inputEx.css' />

<!-- YUI-accordion CSS -->
<link rel="stylesheet" type="text/css" href="../../lib/accordionview/assets/skins/sam/accordionview.css" />

<!-- WireIt CSS -->
<link rel="stylesheet" type="text/css" href="../../../../assets/WireIt.css" />
<link rel="stylesheet" type="text/css" href="../../assets/WireItEditor.css" />

<style>
div.WireIt-Container-closebutton { top: -16px; }
div.WireIt-ImageContainer div.body { width: 85px; }
div.WiringEditor-module-Lightbulb { height:100px; width:55px; }
div.WiringEditor-module-Lightbulb div.body { height:70px; width:50px; }
div.WiringEditor-module-Clock { height:100px; width:80px; }
div.WiringEditor-module-Clock div.body { height:70px; width:50px; }
div.WiringEditor-module-Switch { height:60px; width:74px; }
div.WiringEditor-module-Switch div.body { height:45px; width:80px; }
.WiringEditor-module span { display: none; }
.WiringEditor-module { float: left; }
</style>



<!-- Libs -->
<script src="../../lib/accordionview/accordionview-min.js" type='text/javascript'></script>
<script type="text/javascript" src="../../../../lib/excanvas.js"></script>


<!-- WireIt -->
<script type="text/javascript" src="../../../../build/wireit-inputex-editor-min.js"></script>
<script type="text/javascript" src="../../js/adapters/json-rpc.js"></script>


</head>

<body class="yui-skin-sam">

<div id="top">
<div class="logo">WireIt WiringEditor - logic gates demo</a></div>
<div id="toolbar"></div>
<div class="topright">
<span>Hello there !</span> |
<a href="../..">back to WireIt</a>
</div>
</div>

<!-- Left panel-->
<div id="left">

<!-- Accordion for module categories-->
<ul id="modulesAccordionView">
<li>
<h2>Input Controls</h2>
<div>
<div id='module-category-input'></div>
</div>
</li>
<li>
<h2>Output Controls</h2>
<div>
<div id='module-category-output'></div>
</div>
</li>
<li>
<h2>Gates</h2>
<div>
<div id='module-category-gate'></div>
</div>
</li>
</ul>

</div>

<div id="right">
<ul id="accordionView">
<li>
<h2>Properties</h2>
<div>
<div id="propertiesForm"></div>
</div>
</li>
<li>
<h2>Minimap</h2>
<div style='position: relative;'>
<div id="layerMap"></div>
</div>
</li>
<li>
<h2>Infos</h2>
<div>
<div style="padding: 10px;">
<p>This example uses <i>ImageContainers</i> to represent logic gates.</p>
<br />
<p><b>Drag and drop modules from the Module list</b> on the left to the working layer in the middle.</p>
<br />
<p><a href="logicGates.js" target="_new">Click here to view the language definition for this editor.</a></p>
</div>
</div>
</li>
</div>

<div id="center">
</div>

<div id="helpPanel">
<div class="hd">logicGates (WiringEditor example)</div>
<div class="bd" style="text-align: left;">
<p>This example uses <i>ImageContainers</i> to represent logic gates.</p>
<br />
<p><b>Drag and drop modules from the Module list</b> on the left to the working layer in the middle.</p>
<br />
<p><a href="logicGates.js" target="_new">Click here to view the language definition for this editor.</a></p>
</div>
</div>


<script type="text/javascript">
var logicGatesLang = {
languageName: "logicGates",
modules: [
@@ -223,5 +356,7 @@
alert(ex);
}
});
</script>


</body>
</html>
@@ -3,26 +3,17 @@
<head>
<meta charset="utf-8">
<title>WireIt App demo</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="description" content="An Example for the WireIt">
<meta name="author" content="Eric Abouaf">

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Le styles -->
<!-- Bootstrap -->
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">

<style type="text/css">
#wireit-app h1 {
padding: 0;
}
#wireit-app .loading {
opacity: 0.5;
-webkit-transition: opacity 0.15s;
}
body {
margin-top: 60px;
}
.yui3-layer-content {
border: 1px solid black;
@@ -43,17 +34,16 @@
}
</style>

<script src="http://yui.yahooapis.com/3.6.0/build/yui/yui.js"></script>
<script type="text/javascript" src="../../../build/wireit-loader/wireit-loader-min.js"></script>
<script src="http://yui.yahooapis.com/3.17.2/build/yui/yui.js"></script>
<script type="text/javascript" src="../../build/wireit-all/wireit-all-min.js"></script>

</head>

<body class="yui3-skin-sam">

<div class="navbar navbar-default" role="navigation">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<a class="navbar-brand" href="#">WireIt App example</a>
<p class="pull-right">Logged in as <a href="#">username</a></p>
<span class="navbar-brand">WireIt App example</span>
</div>
</div>

@@ -112,47 +102,50 @@ <h2 class="no-toc">Wirings</h2>
{{/each}}
</ul>

<a id="wiring-add-link" href="#/wirings/new" class="btn primary">or create a new one</a>
<a id="wiring-add-link" href="#/wirings/new" class="btn btn-primary">or create a new one</a>

</div>
</div>
</script>

<script>
//YUI_config.groups.wireit.base = '../build/';
YUI_config.groups.wireit.base = '../../../build/';
YUI_config.groups.wireit.base = '../../build/';
YUI().use('wireit-app', 'image-container', function (Y) {
YUI({filter: 'raw', combine: false}).use('wireit-app', 'image-container', function (Y) {
window.Y = Y; //debug
var containerTypes = new Y.ContainerTypeList();
containerTypes.add({
name: "Fetch",
icon: "super.png",
config: {
type: 'ImageContainer',
children: Y.ContainerBase.FOUR_EDGES,
imageUrl: 'http://www.google.fr/images/logos/ps_logo2.png'
}
});
containerTypes.add({
name: "Loop",
icon: "super.png",
config: {
children: Y.ContainerBase.EIGHT_POINTS,
type: 'Container',
headerContent: 'Loop',
bodyContent: 'This is a much longer body content'
}
});
var containers_definitions = [
{
name: "Fetch",
icon: "super.png",
config: {
type: 'ImageContainer',
children: Y.ContainerBase.FOUR_EDGES,
imageUrl: 'http://www.google.fr/images/logos/ps_logo2.png'
}
},
{
name: "Loop",
icon: "super.png",
config: {
children: Y.ContainerBase.EIGHT_POINTS,
type: 'Container',
headerContent: 'Loop',
bodyContent: 'This is a much longer body content'
}
}
];
var wirings = new Y.WiringModelList();
wirings.load();
Y.wireitApp = new Y.WireItApp({
// We force this to false for this example app because there is no server.
serverRouting: false,
containerTypes: containerTypes,
containerTypes: new Y.ContainerTypeList({
items: containers_definitions
}),
modelList: wirings
});

Large diffs are not rendered by default.

@@ -99,9 +99,6 @@ function LocalStorageSync(key) {
};
}

/**
* @module wireit-app
*/

// -- WiringModel ---------------------------------------------------------------------
Y.WiringModel = Y.Base.create('wiringModel', Y.Model, [], {
@@ -374,6 +371,11 @@ Y.EditorView = Y.Base.create('editorView', Y.View, [], {
}
}
});
/**
* @module wireit-app
*/



// -- WireIt App ---------------------------------------------------------
Y.WireItApp = new Y.Base.create('contributorsApp', Y.App, [], {
@@ -99,9 +99,6 @@ function LocalStorageSync(key) {
};
}

/**
* @module wireit-app
*/

// -- WiringModel ---------------------------------------------------------------------
Y.WiringModel = Y.Base.create('wiringModel', Y.Model, [], {
@@ -374,6 +371,11 @@ Y.EditorView = Y.Base.create('editorView', Y.View, [], {
}
}
});
/**
* @module wireit-app
*/



// -- WireIt App ---------------------------------------------------------
Y.WireItApp = new Y.Base.create('contributorsApp', Y.App, [], {

0 comments on commit 5bc332d

Please sign in to comment.
You can’t perform that action at this time.