$()

in taverna-server-webapp/src/main/resources/static/admin.js [509:566]


$(function() {
	// Must be done in this order because the accordion is inside a tab
	$("#a-worker").accordion({
		collapsible : true,
		fillSpace : true,
		autoHeight : false
	});
	$("#body").tabs({
		selected : 0
	});
	$("#saveWorkflows").button({
		disabled : true
	}).click(function(event) {
		saveWorkflows();
		event.preventDefault();
	});
	$("#refreshWorkflows").button({
		disabled : true
	}).click(function(event) {
		refreshWorkflows();
		event.preventDefault();
	});
	$("#emptyWorkflows").button({
                disabled : true
        }).click(function(event) {
                emptyWorkflows();
                event.preventDefault();
        });

	// Make the link to the list of usage records point correctly
	// Original plan called for browsable table, but that's too slow
	$("#ur").attr("href", where("usageRecords"));

	connectButtonsAndEntries();
	updateRO();
	setInterval(updateRO, 30000);
	refreshUsers();
	refreshWorkflows();
	$("#newEnabled").button();
	$("#newAdmin").button({
		icons : {
			primary : "ui-icon-alert"
		}
	});
	$("#makeNewUser").button().click(function() {
		makeNewUser();
	});
	$("#extra-prop-add").button().click(function() {
		addExtraArg("#dialog-property", "-D", "#prop-key", "#prop-value");
	});
	$("#extra-env-add").button().click(function() {
		addExtraArg("#dialog-environment", "-E", "#env-key", "#env-value");
	});
	$("#extra-run-add").button().click(function() {
		addExtraArg("#dialog-runtime", "-J", "#runtime-value");
	});
	loadExtraArgs();
});