Last active
August 29, 2015 13:57
-
-
Save jbeast/9666387 to your computer and use it in GitHub Desktop.
S2's Future
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"components/Manifest" | |
// Plus lots of other components | |
], function() { | |
var components = {}; | |
_.each(arguments, registerComponent); | |
function registerComponent(component) { | |
// Code to setup and register component | |
} | |
function getComponent(name) { | |
return components.name; | |
} | |
return { | |
get: getComponent | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"s2_core" // or something like this... | |
], function(S2Core) { | |
// Do manifest component | |
var manifest = S2Core.ComponentFactory.get("manifest"); | |
manifest.on("error", [S2Core.log, S2Core.showErrorMessage]); | |
manifest.on("finish", [S2Core.showSuccess, S2Core.reset]); | |
// Do re-racking component | |
var reRacking = S2Core.ComponentFactory.get("re-racking"); | |
reRacking.on("new_label_printed", S2.showSuccessMessage("Label printed!")) | |
reRacking.on("error", [S2Core.log, S2Core.showErrorMessage]); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment