mirror of https://github.com/apache/cloudstack.git
Add base install wizard scripts
This commit is contained in:
parent
771b27aa3d
commit
7eb51d65d0
|
|
@ -1391,6 +1391,8 @@
|
|||
<!-- CloudStack -->
|
||||
<script src="scripts/ui-custom/login.js" type="text/javascript"></script>
|
||||
<script src="scripts-test/cloudStack.js" type="text/javascript"></script>
|
||||
<script src="scripts-test/installWizard.js" type="text/javascript"></script>
|
||||
<script src="scripts/ui-custom/installWizard.js" type="text/javascript"></script>
|
||||
<script src="scripts/ui-custom/projects.js" type="text/javascript"></script>
|
||||
<script src="scripts-test/projects.js" type="text/javascript"></script>
|
||||
<script src="scripts-test/dashboard.js" type="text/javascript"></script>
|
||||
|
|
|
|||
|
|
@ -1399,6 +1399,8 @@
|
|||
<script src="scripts/ui-custom/login.js" type="text/javascript"></script>
|
||||
<script src="scripts/ui-custom/projects.js" type="text/javascript"></script>
|
||||
<script src="scripts/cloudStack.js" type="text/javascript"></script>
|
||||
<script src="scripts-test/installWizard.js" type="text/javascript"></script>
|
||||
<script src="scripts/ui-custom/installWizard.js" type="text/javascript"></script>
|
||||
<script src="scripts/projects.js" type="text/javascript"></script>
|
||||
<script src="scripts/dashboard.js" type="text/javascript"></script>
|
||||
<script src="scripts/ui-custom/instanceWizard.js" type="text/javascript"></script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
(function($, cloudStack, testData) {
|
||||
cloudStack.installWizard = {
|
||||
// Check if install wizard should be invoked
|
||||
check: function(args) {
|
||||
setTimeout(function() {
|
||||
args.response.success({
|
||||
doInstall: false
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
}(jQuery, cloudStack, testData));
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
(function($, cloudStack, testData) {
|
||||
cloudStack.uiCustom.installWizard = function(args) {
|
||||
var context = args.context;
|
||||
var $installWizard = $('<div>').addClass('install-wizard');
|
||||
var $container = args.$container;
|
||||
|
||||
var elems = {
|
||||
nextButton: function() {
|
||||
return $('<div>').addClass('button next').html('Next');
|
||||
}
|
||||
};
|
||||
|
||||
// Layout/behavior for each step in wizard
|
||||
var steps = {
|
||||
// Welcome screen
|
||||
welcome: function(args) {
|
||||
return $.merge(
|
||||
$('<h1>').html('Welcome screen'),
|
||||
$('<p>').html('Welcome text goes here.'),
|
||||
$('<div>').addClass('button next').html('Next'),
|
||||
elems.nextButton().click(args.nextStep)
|
||||
);
|
||||
},
|
||||
|
||||
addZone: function(args) {
|
||||
var $zoneWizard = $('#template').find('.multi-wizard.zone-wizard').clone();
|
||||
|
||||
return $.merge(
|
||||
$zoneWizard.find('.steps .setup-zone'),
|
||||
elems.nextButton().click(function() {
|
||||
args.nextStep({
|
||||
data: {
|
||||
zone: cloudStack.serializeForm
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
$installWizard.append(steps.addZone).appendTo($container);
|
||||
};
|
||||
}(jQuery, cloudStack, testData));
|
||||
Loading…
Reference in New Issue