File: aws_action_js.tjs

package info (click to toggle)
libaws 2.2dfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,624 kB
  • ctags: 1,173
  • sloc: ada: 61,829; ansic: 6,483; makefile: 1,282; xml: 196; sh: 119; java: 112; python: 66; sed: 40
file content (20 lines) | stat: -rw-r--r-- 481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

@@-- $1 action to register, default onclick
@@-- $2 the tag node ID to handle in the DOM tree
@@-- $3 the name of the javascript routine to execute

@@SET@@ ACTION = $1
@@SET@@ ID = $2
@@SET@@ ROUTINE = $3

<script>
   var rule_@_ID_@ = {
      @@IF@@ @_ROUTINE_@ = ""
	'#@_ID_@' : function(el) {el.@_ACTION_@ = call_@_ACTION_@_@_ID_@;}
      @@ELSE@@
	'#@_ID_@' : function(el) {el.@_ACTION_@ = @_ROUTINE_@;}
      @@END_IF@@
   };

   Behaviour.register (rule_@_ID_@);
</script>