diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-11-06 17:11:41 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-11-06 17:11:41 +0000 |
commit | 2e726d532bf7fe8b1e4f5f3912db32f5f0ba6c32 (patch) | |
tree | 486b0f135a0ae47d1c0cd23b9c2c8c8700644614 | |
parent | 75a7e7783b59b41832fd0610e593b9adbd4aaf36 (diff) | |
download | acf-core-2e726d532bf7fe8b1e4f5f3912db32f5f0ba6c32.tar.bz2 acf-core-2e726d532bf7fe8b1e4f5f3912db32f5f0ba6c32.tar.xz |
Rename ajax viewtype to json to be more accurate
-rw-r--r-- | app/Makefile | 2 | ||||
-rw-r--r-- | app/template-json.lsp (renamed from app/template-ajax.lsp) | 1 | ||||
-rwxr-xr-x | lua/mvc.lua | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/app/Makefile b/app/Makefile index a3da5bc..b8862c7 100644 --- a/app/Makefile +++ b/app/Makefile @@ -25,7 +25,7 @@ APP_DIST= \ acf_www-controller.lua\ acf_cli-controller.lua\ menuhints.menu\ - template-ajax.lsp\ + template-json.lsp\ template-html.lsp\ template-stream.lsp\ dispatcherror-html.lsp\ diff --git a/app/template-ajax.lsp b/app/template-json.lsp index bb7fc9f..03dd5bf 100644 --- a/app/template-ajax.lsp +++ b/app/template-json.lsp @@ -1,5 +1,4 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("json") %> Status: 200 OK Content-Type: "application/json" <% io.write("\n") %> diff --git a/lua/mvc.lua b/lua/mvc.lua index 3c7ec54..5524c5b 100755 --- a/lua/mvc.lua +++ b/lua/mvc.lua @@ -345,7 +345,7 @@ auto_view = function(viewtable, viewlibrary, pageinfo, session) if pageinfo.viewtype == "html" then require("htmlviewfunctions") htmlviewfunctions.displayitem(viewtable, 1, pageinfo) - elseif pageinfo.viewtype == "ajax" then + elseif pageinfo.viewtype == "json" then require("json") print(json.encode(viewtable)) elseif pageinfo.viewtype == "stream" then |