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 Jun 29, 2017
1 parent fa822b0 commit 5f5f164
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 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>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>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
our pubsubviewer widget that makes those links for us.</td></tr>
</tbody>
</table>
Expand Down
29 changes: 27 additions & 2 deletions auto-generated-workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
});

this.loadTemplateWidget();

this.loadSenscapeBootloaderWidget();
this.loadLuaEditorWidget();

// Create our workspace upper right corner triangle menu
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -394,6 +415,10 @@
<p class="sample">Widget 1 goes here</p>
</div>

<div id="com-senscape-widget-bootloader-instance">
<p class="sample">Senscape Bootloader Widget goes here</p>
</div>

<div id="com-chilipeppr-widget-template-instance">
<p class="sample">Template Widget goes here</p>
</div>
Expand Down
4 changes: 4 additions & 0 deletions workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
<p class="sample">Widget 1 goes here</p>
</div>

<div id="com-senscape-widget-bootloader-instance">
<p class="sample">Senscape Bootloader Widget goes here</p>
</div>

<div id="com-chilipeppr-widget-template-instance">
<p class="sample">Template Widget goes here</p>
</div>
Expand Down
25 changes: 23 additions & 2 deletions workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5f5f164

Please sign in to comment.