Demo entry 3624946

SbCustom

   

Submitted by anonymous on Feb 15, 2016 at 00:13
Language: JavaScript. Code size: 1.1 kB.

function SbCustomFlow(ref, stepcount) {
	this.Steps = new Object();
	this.Settings = new Object();
	for (var i = 1; i <= stepcount; i++) {
		this.Settings['S' + i] = new Object();
	}
	this.Initialise = function () {
		'use strict';
		var type = 'SbLookup';
		var tag = 'Widget';
		for (var i = 1; i <= stepcount; i++) {
			
			if (this.Settings['S' + i].SbType) {
				type = this.Settings['S' + i].SbType;
			}
			if (this.Settings['S' + i].MetaTag) {
				tag = this.Settings['S' + i].MetaTag;
			}
			this.Steps['Step' + i] = new SbStep(ref + '.Steps.Step' + i, type, tag);
		}
		this.Initialised = true;
	};
	this.Show = function (step) {
		'use strict';
		this.ActiveStep = step;
		if (this.Initialised) {
			this.Steps['Step' + step].Show();
		}
		else {
			setTimeout(ref + '.Show(' + step + ');', 50);
		}
	};
	this.Hide = function () {
		'use strict';
		for (var Step in this.Steps) {
			this.Steps[Step].Hide();
		}
	};
}
Sb.Imports.push('imp.CustomStep');
Sb.Scripts['imp.CustomFlow'].Loaded = true;
Sb.Exec();

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).