javascript/general.js
// See SELECTIONPARAMNAME and SELECTIONPARAMDELIMITER in ListModuleTagBase.java.

See SELECTIONPARAMNAME and SELECTIONPARAMDELIMITER in ListModuleTagBase.java.
See SELECTIONPARAMNAME and SELECTIONPARAMDELIMITER in ListModuleTagBase . java .
function MM_doButtonAction(action, selectedItems) {
		var SELECTIONPARAMNAME = 'id';
		var SELECTIONPARAMDELIMITER = '**';
		if ((action.indexOf('javascript') == 0) || (action.indexOf('Javascript') == 0)) {
			eval(action);
		} else {
			var okay = true;
			if ((action.indexOf('function:') == 0)) {
				okay = false;
				var idx = action.indexOf(":");
				if(idx + 1 < action.length) {
					action = action.substr(idx+1);
					idx = action.indexOf(",");
					if(idx + 1 < action.length) {
						var fxn = action.substr(0, idx);
						action = action.substr(idx+1);
						fxn = eval(fxn);
						if(typeof(fxn) == "function") {
							okay = fxn(selectedItems);
						}
					}
				}
			}
			if(okay) {
				var params = new String();
				if (selectedItems) {
					for (i = 0; i < selectedItems.length; i++) {
						if (i > 0)
							params = params.concat("**");
						params = params.concat(selectedItems[i]);
					}
				}
				var url = action;
				if (params.length > 0) {
					if (url.indexOf('?') == -1)
						url = url + '?';
					else
						url = url + '&';
					url = url + 'id=' + params;
				}
				window.location = url;
			}
		}
	}
function MM_doButtonAction ( action , selectedItems ) { var SELECTIONPARAMNAME = 'id' ; var SELECTIONPARAMDELIMITER = '**' ; if ( ( action . indexOf ( 'javascript' ) == 0 ) || ( action . indexOf ( 'Javascript' ) == 0 ) ) { eval ( action ) ; } else { var okay = true ; if ( ( action . indexOf ( 'function:' ) == 0 ) ) { okay = false ; var idx = action . indexOf ( ":" ) ; if ( idx + 1 < action . length ) { action = action . substr ( idx + 1 ) ; idx = action . indexOf ( "," ) ; if ( idx + 1 < action . length ) { var fxn = action . substr ( 0 , idx ) ; action = action . substr ( idx + 1 ) ; fxn = eval ( fxn ) ; if ( typeof ( fxn ) == "function" ) { okay = fxn ( selectedItems ) ; } } } } if ( okay ) { var params = new String ( ) ; if ( selectedItems ) { for ( i = 0 ; i < selectedItems . length ; i ++ ) { if ( i > 0 ) params = params . concat ( "**" ) ; params = params . concat ( selectedItems [ i ] ) ; } } var url = action ; if ( params . length > 0 ) { if ( url . indexOf ( '?' ) == - 1 ) url = url + '?' ; else url = url + '&' ; url = url + 'id=' + params ; } window . location = url ; } } }
See SELECTIONPARAMNAME and SELECTIONPARAMDELIMITER in ListModuleTagBase.java.
See SELECTIONPARAMNAME and SELECTIONPARAMDELIMITER in ListModuleTagBase . java .
// THESE MUST BE IN SYNC WITH ListModuleTagBase.java
 // If the action is a javascript action (starts with 'javascript')
 // then execute it immediately.
 // if action starts with "function:" call the function on the selection to see
 // if we can continue
