Files
aws/web_elements/javascripts/aws_action_js.tjs
2010-07-30 13:55:37 +00:00

26 lines
657 B
Plaintext

@@-- $1 action to register
@@-- $2 the tag node ID to handle in the DOM tree
@@-- $3 the name of the javascript routine to execute
@@-- $18 ID index to be added to $2 (index in table for unique id for ex)
@@SET@@ ACTION = $1
@@SET@@ ID = $2
@@SET@@ ROUTINE = $3
@@SET@@ ID_INDEX = $18
<script type="text/javascript">
<!--
var rule_@_ID_@@_ID_INDEX_@ = {
@@IF@@ @_ROUTINE_@ = ""
'#@_ID_@@_ID_INDEX_@' : function(el) {el.@_ACTION_@ = call_@_ACTION_@_@_ID_@@_ID_INDEX_@;}
@@ELSE@@
'#@_ID_@@_ID_INDEX_@' : function(el) {el.@_ACTION_@ = @_ROUTINE_@;}
@@END_IF@@
};
Behaviour.register (rule_@_ID_@@_ID_INDEX_@);
-->
</script>