Skip to content

Commit

Permalink
removed unnecessary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bastian-f committed Oct 30, 2017
1 parent 038c528 commit 5fd839b
Show file tree
Hide file tree
Showing 18 changed files with 1,986 additions and 680 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ resize to fill the height of the browser so it looks clean.</td></tr><tr valign=
and inits them.</td></tr><tr valign="top"><td>getBillboard</td><td>function</td><td>function () <br><br>Returns the billboard HTML, CSS, and Javascript for this Workspace. The billboard
is used by the home page, the workspace picker, and the fork pulldown to show a
consistent name/image/description tag for the workspace throughout the ChiliPeppr ecosystem.</td></tr><tr valign="top"><td>addBillboardToWorkspaceMenu</td><td>function</td><td>function () <br><br>Inject the billboard into the Workspace upper right corner pulldown which
follows the standard template for workspace pulldown menus.</td></tr><tr valign="top"><td>setupResize</td><td>function</td><td>function () <br><br>Listen to window resize event.</td></tr><tr valign="top"><td>onResize</td><td>function</td><td>function () <br><br>When browser window resizes, forcibly resize the Console window</td></tr><tr valign="top"><td>loadTemplateWidget</td><td>function</td><td>function (callback) <br><br>Load the Template widget via chilipeppr.load() so folks have a sample
widget they can fork as a starting point for their own.</td></tr><tr valign="top"><td>loadSpjsWidget</td><td>function</td><td>function (callback) <br><br>Load the Serial Port JSON Server widget via chilipeppr.load()</td></tr><tr valign="top"><td>loadCustSpjsWidget</td><td>function</td><td>function (callback) <br><br>Load the Serial Port JSON Server widget via chilipeppr.load()</td></tr><tr valign="top"><td>loadSenscapeBootloaderWidget</td><td>function</td><td>function (callback) <br><br>Load Senscape Bootloader Widget via chilipeppr.load()</td></tr><tr valign="top"><td>loadWorkspaceMenu</td><td>function</td><td>function (callback) <br><br>Load the workspace menu and show the pubsubviewer and fork links using
our pubsubviewer widget that makes those links for us.</td></tr>
follows the standard template for workspace pulldown menus.</td></tr><tr valign="top"><td>setupResize</td><td>function</td><td>function () <br><br>Listen to window resize event.</td></tr><tr valign="top"><td>onResize</td><td>function</td><td>function () <br><br>When browser window resizes, forcibly resize the Console window</td></tr><tr valign="top"><td>loadCustSpjsWidget</td><td>function</td><td>function (callback) <br><br>Load the custom Serial Port JSON Server widget via chilipeppr.load()</td></tr><tr valign="top"><td>loadSenscapeBootloaderWidget</td><td>function</td><td>function (callback) <br><br>Load Senscape Bootloader Widget via chilipeppr.load()</td></tr>
</tbody>
</table>

Expand Down
132 changes: 47 additions & 85 deletions auto-generated-workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,49 @@
display: block;
border-bottom: 1px solid #ddd;
}

.navbar {
background-color:#444d5d;
padding-top: 0;
padding-bottom: 0;
}

.logo-img{
float: left;
margin: 0px 0px 0px 0px; /* fixed the spacing. */
}

.navbar-nav > li .active > a {
margin-right: 2px;
}

.navbar-default .navbar-nav > li > a {
color: #b2bbbd;
margin-right: 2px;
}

.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
margin-top:10px;
line-height: 0px;
border-radius:3px;
margin-right: 2px;
}

.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: #FFF;
}

.navbar-default .navbar-nav > li > a:hover {
margin-top:10px;
line-height: 0px;
border-radius:3px;
}

.navbar-default .navbar-nav > li > a:focus {
margin-top:10px;
line-height: 0px;
border-radius:3px;
}
</style>

<script type='text/javascript'>
Expand Down Expand Up @@ -137,7 +180,7 @@
ws.init();

// Do some niceties for testing like margins on widget and title for browser
$('title').html("bastianf2 Workspace");
$('title').html("JMA - Senscape Bootloader");
$('body').css('padding', '10px');

} /*end_test*/ );
Expand Down Expand Up @@ -184,9 +227,9 @@
// this.loadDropTestWidget();

// Create our workspace upper right corner triangle menu
this.loadWorkspaceMenu();
// this.loadWorkspaceMenu();
// Add our billboard to the menu (has name, url, picture of workspace)
this.addBillboardToWorkspaceMenu();
// this.addBillboardToWorkspaceMenu();

// Setup an event to react to window resize. This helps since
// some of our widgets have a manual resize to cleanly fill
Expand Down Expand Up @@ -229,62 +272,7 @@
if (this.widgetConsole) this.widgetConsole.resize();
},
/**
* Load the Template widget via chilipeppr.load() so folks have a sample
* widget they can fork as a starting point for their own.
*/
loadTemplateWidget: function(callback) {

chilipeppr.load(
"#com-chilipeppr-widget-template-instance",
"http://raw.githubusercontent.com/chilipeppr/widget-template/master/auto-generated-widget.html",
function() {
// Callback after widget loaded into #myDivWidgetTemplate
// Now use require.js to get reference to instantiated widget
cprequire(
["inline:com-chilipeppr-widget-template"], // the id you gave your widget
function(myObjWidgetTemplate) {
// Callback that is passed reference to the newly loaded widget
console.log("Widget / Template just got loaded.", myObjWidgetTemplate);
myObjWidgetTemplate.init();
}
);
}
);
},
/**
* Load the Serial Port JSON Server widget via chilipeppr.load()
*/
loadSpjsWidget: function(callback) {

var that = this;

chilipeppr.load(
"#com-chilipeppr-widget-serialport-instance",
"http://fiddle.jshell.net/chilipeppr/vetj5fvx/show/light/",
function() {
console.log("mycallback got called after loading spjs module");
cprequire(["inline:com-chilipeppr-widget-serialport"], function(spjs) {
//console.log("inside require of " + fm.id);
spjs.setSingleSelectMode();
spjs.init({
isSingleSelectMode: true,
defaultBuffer: "default",
defaultBaud: 115200,
bufferEncouragementMsg: 'For your device please choose the "default" buffer in the pulldown and a 115200 baud rate before connecting.'
});
//spjs.showBody();
//spjs.consoleToggle();

that.widgetSpjs - spjs;

if (callback) callback(spjs);

});
}
);
},
/**
* Load the Serial Port JSON Server widget via chilipeppr.load()
* Load the custom Serial Port JSON Server widget via chilipeppr.load()
*/
loadCustSpjsWidget: function(callback) {

Expand Down Expand Up @@ -337,32 +325,6 @@
}
);
},
/**
* Load the workspace menu and show the pubsubviewer and fork links using
* our pubsubviewer widget that makes those links for us.
*/
loadWorkspaceMenu: function(callback) {
// Workspace Menu with Workspace Billboard
var that = this;
chilipeppr.load(
"http://fiddle.jshell.net/chilipeppr/zMbL9/show/light/",
function() {
require(['inline:com-chilipeppr-elem-pubsubviewer'], function(pubsubviewer) {

var el = $('#' + that.id + ' .com-chilipeppr-ws-menu .dropdown-menu-ws');
console.log("got callback for attachto menu for workspace. attaching to el:", el);

pubsubviewer.attachTo(
el,
that,
"Workspace"
);

if (callback) callback();
});
}
);
},
}
});
//]]>
Expand Down
Binary file added bin.zip
Binary file not shown.
Binary file added img.zip
Binary file not shown.
Binary file modified img/logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo_90.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo_canvas_90.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo_canvas_95.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo_old.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 45 additions & 92 deletions index-es.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,45 @@

.navbar {
background-color:#444d5d;
padding-top: 0;
padding-bottom: 0;
}

.logo-img{
float: left;
margin: 0px 0px 0px 0px; /* fixed the spacing. */
}

.navbar-nav > li .active > a {
margin-right: 2px;
}

.navbar-default .navbar-nav > li > a {
color: #b2bbbd;
margin-right: 2px;
}

.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
margin-top:10px;
line-height: 0px;
border-radius:3px;
margin-right: 2px;
}

.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: #FFF;
}

.navbar-default .navbar-nav > li > a:hover {
margin-top:10px;
line-height: 0px;
border-radius:3px;
}

.navbar-default .navbar-nav > li > a:focus {
margin-top:10px;
line-height: 0px;
border-radius:3px;
}
</style>

Expand Down Expand Up @@ -141,7 +180,7 @@
ws.init();

// Do some niceties for testing like margins on widget and title for browser
$('title').html("bastianf2 Workspace");
$('title').html("JMA - Senscape Bootloader");
$('body').css('padding', '10px');

} /*end_test*/ );
Expand Down Expand Up @@ -188,9 +227,9 @@
// this.loadDropTestWidget();

// Create our workspace upper right corner triangle menu
this.loadWorkspaceMenu();
// this.loadWorkspaceMenu();
// Add our billboard to the menu (has name, url, picture of workspace)
this.addBillboardToWorkspaceMenu();
// this.addBillboardToWorkspaceMenu();

// Setup an event to react to window resize. This helps since
// some of our widgets have a manual resize to cleanly fill
Expand Down Expand Up @@ -233,62 +272,7 @@
if (this.widgetConsole) this.widgetConsole.resize();
},
/**
* Load the Template widget via chilipeppr.load() so folks have a sample
* widget they can fork as a starting point for their own.
*/
loadTemplateWidget: function(callback) {

chilipeppr.load(
"#com-chilipeppr-widget-template-instance",
"http://raw.githubusercontent.com/chilipeppr/widget-template/master/auto-generated-widget.html",
function() {
// Callback after widget loaded into #myDivWidgetTemplate
// Now use require.js to get reference to instantiated widget
cprequire(
["inline:com-chilipeppr-widget-template"], // the id you gave your widget
function(myObjWidgetTemplate) {
// Callback that is passed reference to the newly loaded widget
console.log("Widget / Template just got loaded.", myObjWidgetTemplate);
myObjWidgetTemplate.init();
}
);
}
);
},
/**
* Load the Serial Port JSON Server widget via chilipeppr.load()
*/
loadSpjsWidget: function(callback) {

var that = this;

chilipeppr.load(
"#com-chilipeppr-widget-serialport-instance",
"http://fiddle.jshell.net/chilipeppr/vetj5fvx/show/light/",
function() {
console.log("mycallback got called after loading spjs module");
cprequire(["inline:com-chilipeppr-widget-serialport"], function(spjs) {
//console.log("inside require of " + fm.id);
spjs.setSingleSelectMode();
spjs.init({
isSingleSelectMode: true,
defaultBuffer: "default",
defaultBaud: 115200,
bufferEncouragementMsg: 'For your device please choose the "default" buffer in the pulldown and a 115200 baud rate before connecting.'
});
//spjs.showBody();
//spjs.consoleToggle();

that.widgetSpjs - spjs;

if (callback) callback(spjs);

});
}
);
},
/**
* Load the Serial Port JSON Server widget via chilipeppr.load()
* Load the custom Serial Port JSON Server widget via chilipeppr.load()
*/
loadCustSpjsWidget: function(callback) {

Expand Down Expand Up @@ -341,32 +325,6 @@
}
);
},
/**
* Load the workspace menu and show the pubsubviewer and fork links using
* our pubsubviewer widget that makes those links for us.
*/
loadWorkspaceMenu: function(callback) {
// Workspace Menu with Workspace Billboard
var that = this;
chilipeppr.load(
"http://fiddle.jshell.net/chilipeppr/zMbL9/show/light/",
function() {
require(['inline:com-chilipeppr-elem-pubsubviewer'], function(pubsubviewer) {

var el = $('#' + that.id + ' .com-chilipeppr-ws-menu .dropdown-menu-ws');
console.log("got callback for attachto menu for workspace. attaching to el:", el);

pubsubviewer.attachTo(
el,
that,
"Workspace"
);

if (callback) callback();
});
}
);
},
}
});
//]]>
Expand Down Expand Up @@ -414,16 +372,14 @@
<!-- <button type="submit" class="btn btn-default">Submit</button> -->
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="index-es.html?forcerefresh=true">English</a></li>
<li><a href="index.html?forcerefresh=true">English</a></li>
<li class="active"><a href="#">Castellano <span class="sr-only">(current)</span></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Descargar servidor de puerto de serie<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="binaries/serial-port-json-server">Linux</a></li>
<li><a href="#">Mac</a></li>
<li><a href="binaries/serial-port-json-server.exe">Windows</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
Expand All @@ -433,9 +389,6 @@






<!-- <div id="com-chilipeppr-widget-flash-instance"></div> -->

<div id="com-chilipeppr-workspace-bastianf2" class="xhidden">
Expand Down Expand Up @@ -514,4 +467,4 @@ <h4 class="billboard-title" style="">Sample Workspace</h4>

</body>

</html>`
</html>
Loading

0 comments on commit 5fd839b

Please sign in to comment.