Sha256: 82886ba88d8e934a06caa505e3b2f802a6281d237d430d0f51e1c6f40a755db9

Contents?: true

Size: 1.77 KB

Versions: 5

Compression:

Stored size: 1.77 KB

Contents

function lucidSearchFrameLinks() {
	$('#feature_list_link').click(function() {
		toggleSearchFrame(this, '/' + library + '/features');
	});
	$('#tag_list_link').click(function() {
		toggleSearchFrame(this, '/' + library + '/tags');
	});
}

$(lucidSearchFrameLinks);

function toggleScenarioExample(id,example) {
	var element = $("#" + id + "Example" + example + "Steps")[0];

	$('#' + id + ' tr').each(function(index) {
		this.style.backgroundColor = (index % 2 == 0 ? '#FFFFFF' : '#F0F6F9' );
	});

	if (element.style.display != 'none') {
		element = $("#" + id + "Steps")[0];
	} else {
		$('#' + id + ' .outline * tr')[example].style.backgroundColor = '#FFCC80';
	}

	$('#' + id + ' .steps').each(function(index) {
		this.style.display = 'none';
	});

	element.style.display = 'block';
}

function determine_tags_used_in_formula(tag_string)  {
	tag_string = tag_string.replace(/^(\s+)|(\s+)$/,'').replace(/\s{2,}/,' ');

	var tags = tag_string.match(/@\w+/g);
	var return_tags = [];

	if (tags != null) {
		tags.forEach(function(tag, index, array) {
			//$("#tag_debug")[0].innerHTML += tag + " ";
			if (tag_list.indexOf(tag) != -1) { return_tags.push(tag); }
		});
	}
	return return_tags;
}

function display_example_command_line(tags) {
	$("#command_example")[0].innerHTML = "cucumber ";

	if (tags.length > 0)  {
		$("#command_example")[0].innerHTML += "--tags " + tags.join(" --tags ");
	}
}

function display_qualifying_features_and_scenarios(tags) {
	if (tags.length > 0) {
		$(".feature,.scenario").each(function(feature){
			this.style.display = "none";
		});

		$(".feature.\\" + tags.join(".\\") + ",.scenario.\\" + tags.join(".\\")).each(function(feature) {
			this.style.display = "block";
		});
	}  else {
		$(".feature,.scenario").each(function(feature){
			this.style.display = "block";
		});
	}
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yard-lucid-0.5.0 lib/docserver/default/fulldoc/html/js/lucid.js
yard-lucid-0.4.0 lib/docserver/default/fulldoc/html/js/lucid.js
yard-lucid-0.3.0 lib/docserver/default/fulldoc/html/js/lucid.js
yard-lucid-0.2.0 lib/docserver/default/fulldoc/html/js/lucid.js
yard-lucid-0.1.0 lib/docserver/default/fulldoc/html/js/lucid.js