Skip to content

Commit

Permalink
Made some changes to ChiliPeppr myWorkspace using Cloud9
Browse files Browse the repository at this point in the history
  • Loading branch information
bastian-f committed Sep 26, 2017
1 parent e843a91 commit c5d8424
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 165 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ and inits them.</td></tr><tr valign="top"><td>getBillboard</td><td>function</td>
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>loadSenscapeBootloaderWidget</td><td>function</td><td>function (callback) <br><br>Load Senscape Bootloader Wedget via chilipeppr.load()</td></tr><tr valign="top"><td>loadDropTestWidget</td><td>function</td><td>function (callback) <br><br>Load Senscape Bootloader Wedget via chilipeppr.load()</td></tr><tr valign="top"><td>loadLuaEditorWidget</td><td>function</td><td>function (callback) <br><br>Load the Lua Editor Widget widget via chilipeppr.load()</td></tr><tr valign="top"><td>loadConsoleWidget</td><td>function</td><td>function (callback) <br><br>Load the Console 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
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>loadSenscapeBootloaderWidget</td><td>function</td><td>function (callback) <br><br>Load Senscape Bootloader Wedget 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>
</tbody>
</table>
Expand Down
82 changes: 0 additions & 82 deletions auto-generated-workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,7 @@
// Most workspaces will instantiate the Serial Port JSON Server widget
this.loadSpjsWidget();
// Most workspaces will instantiate the Serial Port Console widget
this.loadConsoleWidget(function() {
setTimeout(function() { $(window).trigger('resize'); }, 100);
});

this.loadTemplateWidget();
this.loadSenscapeBootloaderWidget();
this.loadLuaEditorWidget();
this.loadDropTestWidget();

// Create our workspace upper right corner triangle menu
Expand Down Expand Up @@ -290,82 +284,6 @@
);
}
);
},
/**
* Load Senscape Bootloader Wedget via chilipeppr.load()
*/
loadDropTestWidget: function(callback) {
chilipeppr.load(
"#drop-test-instance",
"http://raw.githubusercontent.com/chilipeppr/elem-dragdrop/master/auto-generated-widget.html",
function() {
// Callback after widget loaded into #myDivElemDragdrop
// Now use require.js to get reference to instantiated widget
cprequire(
["inline:drop-test"], // the id you gave your widget
function(myObjElemDragdrop) {
// Callback that is passed reference to the newly loaded widget
console.log("Element / Drag Drop just got loaded.", myObjElemDragdrop);
myObjElemDragdrop.init();
}
);
}
);
},
/**
* Load the Lua Editor Widget widget via chilipeppr.load()
*/
loadLuaEditorWidget: function(callback) {

var that = this;

chilipeppr.load(
"#com-chilipeppr-luaeditor-instance",
"http://raw.githubusercontent.com/chilipeppr/widget-luaeditor/master/auto-generated-widget.html",
function() {
// Callback after widget loaded into #myDivWidgetLuaeditor
// Now use require.js to get reference to instantiated widget
cprequire(
["inline:com-chilipeppr-widget-luaeditor"], // the id you gave your widget
function(myObjWidgetLuaeditor) {
// Callback that is passed reference to the newly loaded widget
console.log("Widget / Lua Editor just got loaded.", myObjWidgetLuaeditor);
myObjWidgetLuaeditor.init();
}
);
}
);
},
/**
* Load the Console widget via chilipeppr.load()
*/
loadConsoleWidget: function(callback) {
var that = this;
chilipeppr.load(
"#com-chilipeppr-widget-spconsole-instance",
"http://fiddle.jshell.net/chilipeppr/rczajbx0/show/light/",
function() {
// Callback after widget loaded into #com-chilipeppr-widget-spconsole-instance
cprequire(
["inline:com-chilipeppr-widget-spconsole"], // the id you gave your widget
function(mywidget) {
// Callback that is passed reference to your newly loaded widget
console.log("My Console widget just got loaded.", mywidget);
that.widgetConsole = mywidget;

// init the serial port console
// 1st param tells the console to use "single port mode" which
// means it will only show data for the green selected serial port
// rather than for multiple serial ports
// 2nd param is a regexp filter where the console will filter out
// annoying messages you don't generally want to see back from your
// device, but that the user can toggle on/off with the funnel icon
that.widgetConsole.init(true, /myfilter/);
if (callback) callback(mywidget);
}
);
}
);
},
/**
* Load the workspace menu and show the pubsubviewer and fork links using
Expand Down
Loading

0 comments on commit c5d8424

Please sign in to comment.