mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-28 09:50:10 +00:00
now docs can be set directly on the action function...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9080ecd29c
commit
f0995f1676
@ -499,6 +499,7 @@ parseStringAction.callAction = function(context, action, ...args){
|
||||
return context[action.action] instanceof Function ?
|
||||
context[action.action]
|
||||
.apply(context, this.resolveArgs(context, action.arguments, args))
|
||||
// action not found or is not callable... (XXX)
|
||||
: undefined
|
||||
}
|
||||
parseStringAction.applyAction = function(context, action, args){
|
||||
@ -628,8 +629,12 @@ function Action(name, doc, ldoc, attrs, func){
|
||||
func = args.pop()
|
||||
last = args[args.length-1]
|
||||
attrs = last != null && typeof(last) != typeof('str') ? args.pop() : {}
|
||||
doc = typeof(args[0]) == typeof('str') ? args.shift() : null
|
||||
ldoc = typeof(args[0]) == typeof('str') ? args.shift() : null
|
||||
doc = typeof(args[0]) == typeof('str') ? args.shift()
|
||||
: func.doc ? func.doc
|
||||
: null
|
||||
ldoc = typeof(args[0]) == typeof('str') ? args.shift()
|
||||
: func.long_doc ? func.long_doc
|
||||
: null
|
||||
|
||||
// populate the action attributes...
|
||||
//meth.name = name
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-actions",
|
||||
"version": "3.15.0",
|
||||
"version": "3.16.0",
|
||||
"description": "",
|
||||
"main": "actions.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user