Commit 529e9151 authored by carlosperate's avatar carlosperate

Move examples into root folder and add new "Serial Repeat Game".

parent 8772a6ee
......@@ -63,19 +63,23 @@ Ardublockly.bindActionFunctions = function() {
$('.button-collapse').sideNav('hide');
});
Ardublockly.bindClick_('menu_example_1', function() {
Ardublockly.loadServerXmlFile('examples/blink.xml');
Ardublockly.loadServerXmlFile('../examples/blink.xml');
$('.button-collapse').sideNav('hide');
});
Ardublockly.bindClick_('menu_example_2', function() {
Ardublockly.loadServerXmlFile('examples/serial_print_ascii_.xml');
Ardublockly.loadServerXmlFile('../examples/serial_print_ascii_.xml');
$('.button-collapse').sideNav('hide');
});
Ardublockly.bindClick_('menu_example_3', function() {
Ardublockly.loadServerXmlFile('examples/servo_knob.xml');
Ardublockly.loadServerXmlFile('../examples/serial_repeat_game.xml');
$('.button-collapse').sideNav('hide');
});
Ardublockly.bindClick_('menu_example_4', function() {
Ardublockly.loadServerXmlFile('examples/stepper_knob.xml');
Ardublockly.loadServerXmlFile('../examples/servo_knob.xml');
$('.button-collapse').sideNav('hide');
});
Ardublockly.bindClick_('menu_example_5', function() {
Ardublockly.loadServerXmlFile('../examples/stepper_knob.xml');
$('.button-collapse').sideNav('hide');
});
......
......@@ -91,8 +91,9 @@
<ul>
<li id="menu_example_1"><a href="#!">Blink</a></li>
<li id="menu_example_2"><a href="#!">Serial print</a></li>
<li id="menu_example_3"><a href="#!">Servo knob</a></li>
<li id="menu_example_4"><a href="#!">Stepper knob</a></li>
<li id="menu_example_3"><a href="#!">Serial repeat game</a></li>
<li id="menu_example_4"><a href="#!">Servo knob</a></li>
<li id="menu_example_5"><a href="#!">Stepper knob</a></li>
</ul>
</div>
</li>
......
This diff is collapsed.
......@@ -236,25 +236,34 @@ var getExamplesMenuData = function() {
BrowserWindow.getFocusedWindow()
.webContents
.executeJavaScript(
'Ardublockly.loadServerXmlFile("examples/' +
'Ardublockly.loadServerXmlFile("../examples/' +
'blink.xml");');
}
}, {
label: 'Print Serial',
label: 'Serial Print',
click: function() {
BrowserWindow.getFocusedWindow()
.webContents
.executeJavaScript(
'Ardublockly.loadServerXmlFile("examples/' +
'Ardublockly.loadServerXmlFile("../examples/' +
'serial_print_ascii_.xml");');
}
}, {
label: 'Serial Repeat Game',
click: function() {
BrowserWindow.getFocusedWindow()
.webContents
.executeJavaScript(
'Ardublockly.loadServerXmlFile("../examples/' +
'serial_repeat_game.xml");');
}
}, {
label: 'Servo Knob',
click: function() {
BrowserWindow.getFocusedWindow()
.webContents
.executeJavaScript(
'Ardublockly.loadServerXmlFile("examples/' +
'Ardublockly.loadServerXmlFile("../examples/' +
'servo_knob.xml");');
}
}, {
......@@ -263,7 +272,7 @@ var getExamplesMenuData = function() {
BrowserWindow.getFocusedWindow()
.webContents
.executeJavaScript(
'Ardublockly.loadServerXmlFile("examples/' +
'Ardublockly.loadServerXmlFile("../examples/' +
'stepper_knob.xml");');
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment