From 5f5f16460158bc8680511775bfa567123ca7b8de Mon Sep 17 00:00:00 2001 From: bastian Date: Thu, 29 Jun 2017 15:00:43 +0000 Subject: [PATCH] Made some changes to ChiliPeppr myWorkspace using Cloud9 --- README.md | 2 +- auto-generated-workspace.html | 29 +++++++++++++++++++++++++++-- workspace.html | 4 ++++ workspace.js | 25 +++++++++++++++++++++++-- 4 files changed, 55 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1860bc4..1d892f4 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ and inits them.getBillboardfunction 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.addBillboardToWorkspaceMenufunctionfunction ()

Inject the billboard into the Workspace upper right corner pulldown which follows the standard template for workspace pulldown menus.setupResizefunctionfunction ()

Listen to window resize event.onResizefunctionfunction ()

When browser window resizes, forcibly resize the Console windowloadTemplateWidgetfunctionfunction (callback)

Load the Template widget via chilipeppr.load() so folks have a sample -widget they can fork as a starting point for their own.loadSpjsWidgetfunctionfunction (callback)

Load the Serial Port JSON Server widget via chilipeppr.load()loadLuaEditorWidgetfunctionfunction (callback)

Load the Lua Editor Widget widget via chilipeppr.load()loadConsoleWidgetfunctionfunction (callback)

Load the Console widget via chilipeppr.load()loadWorkspaceMenufunctionfunction (callback)

Load the workspace menu and show the pubsubviewer and fork links using +widget they can fork as a starting point for their own.loadSpjsWidgetfunctionfunction (callback)

Load the Serial Port JSON Server widget via chilipeppr.load()loadSenscapeBootloaderWidgetfunctionfunction (callback)

Load Senscape Bootloader Wedget via chilipeppr.load()loadLuaEditorWidgetfunctionfunction (callback)

Load the Lua Editor Widget widget via chilipeppr.load()loadConsoleWidgetfunctionfunction (callback)

Load the Console widget via chilipeppr.load()loadWorkspaceMenufunctionfunction (callback)

Load the workspace menu and show the pubsubviewer and fork links using our pubsubviewer widget that makes those links for us. diff --git a/auto-generated-workspace.html b/auto-generated-workspace.html index ac65cbb..aa78712 100644 --- a/auto-generated-workspace.html +++ b/auto-generated-workspace.html @@ -161,7 +161,7 @@ }); this.loadTemplateWidget(); - + this.loadSenscapeBootloaderWidget(); this.loadLuaEditorWidget(); // Create our workspace upper right corner triangle menu @@ -264,7 +264,28 @@ } ); }, - /** + /** + * Load Senscape Bootloader Wedget via chilipeppr.load() + */ + loadSenscapeBootloaderWidget: function(callback) { + chilipeppr.load( + "#com-senscape-widget-bootloader-instance", + "http://raw.githubusercontent.com/bastian-f/widget-senscape-bootlader/master/auto-generated-widget.html", + function() { + // Callback after widget loaded into #myDivComSenscapeWidgetBootloader + // Now use require.js to get reference to instantiated widget + cprequire( + ["inline:com-senscape-widget-bootloader"], // the id you gave your widget + function(myObjComSenscapeWidgetBootloader) { + // Callback that is passed reference to the newly loaded widget + console.log("Widget / Senscape Bootloader just got loaded.", myObjComSenscapeWidgetBootloader); + myObjComSenscapeWidgetBootloader.init(); + } + ); + } + ); + }, + /** * Load the Lua Editor Widget widget via chilipeppr.load() */ loadLuaEditorWidget: function(callback) { @@ -394,6 +415,10 @@

Widget 1 goes here

+
+

Senscape Bootloader Widget goes here

+
+

Template Widget goes here

diff --git a/workspace.html b/workspace.html index 08fee3b..f50be20 100644 --- a/workspace.html +++ b/workspace.html @@ -75,6 +75,10 @@

Widget 1 goes here

+
+

Senscape Bootloader Widget goes here

+
+

Template Widget goes here

diff --git a/workspace.js b/workspace.js index 088c7fc..b043ab5 100644 --- a/workspace.js +++ b/workspace.js @@ -69,7 +69,7 @@ cpdefine("inline:com-chilipeppr-workspace-bastianf2", ["chilipeppr_ready"], func }); this.loadTemplateWidget(); - + this.loadSenscapeBootloaderWidget(); this.loadLuaEditorWidget(); // Create our workspace upper right corner triangle menu @@ -172,7 +172,28 @@ cpdefine("inline:com-chilipeppr-workspace-bastianf2", ["chilipeppr_ready"], func } ); }, - /** + /** + * Load Senscape Bootloader Wedget via chilipeppr.load() + */ + loadSenscapeBootloaderWidget: function(callback) { + chilipeppr.load( + "#com-senscape-widget-bootloader-instance", + "http://raw.githubusercontent.com/bastian-f/widget-senscape-bootlader/master/auto-generated-widget.html", + function() { + // Callback after widget loaded into #myDivComSenscapeWidgetBootloader + // Now use require.js to get reference to instantiated widget + cprequire( + ["inline:com-senscape-widget-bootloader"], // the id you gave your widget + function(myObjComSenscapeWidgetBootloader) { + // Callback that is passed reference to the newly loaded widget + console.log("Widget / Senscape Bootloader just got loaded.", myObjComSenscapeWidgetBootloader); + myObjComSenscapeWidgetBootloader.init(); + } + ); + } + ); + }, + /** * Load the Lua Editor Widget widget via chilipeppr.load() */ loadLuaEditorWidget: function(callback) {