summaryrefslogtreecommitdiffstats
path: root/acf
diff options
context:
space:
mode:
Diffstat (limited to 'acf')
-rw-r--r--acf/model/field.lua7
-rw-r--r--acf/model/init.lua1
2 files changed, 5 insertions, 3 deletions
diff --git a/acf/model/field.lua b/acf/model/field.lua
index 362c7ab..707cde3 100644
--- a/acf/model/field.lua
+++ b/acf/model/field.lua
@@ -173,6 +173,11 @@ end
M.TreeNode = class(M.Field)
+function M.TreeNode:init(params)
+ if not params.widget then params.widget = 'link' end
+ super(self, M.TreeNode):init(params)
+end
+
function M.TreeNode:topology(context)
local res = super(self, M.TreeNode):topology(context)
res[1].type = 'table'
@@ -224,9 +229,7 @@ function M.Model:init(params)
assert(self.model)
self.itype = self.model
-
self.dtype = 'model'
- self.widget = self.dtype
end
diff --git a/acf/model/init.lua b/acf/model/init.lua
index 0254fce..2a80b1a 100644
--- a/acf/model/init.lua
+++ b/acf/model/init.lua
@@ -153,7 +153,6 @@ function M.Collection:init(params, itype)
}
self.dtype = 'collection'
- self.widget = self.dtype
end
function M.Collection:auto_ui_name(name)