diff --git a/clients/js/openresty.js b/clients/js/openresty.js
index 0b9e36e..bdf6db5 100644
--- a/clients/js/openresty.js
+++ b/clients/js/openresty.js
@@ -263,7 +263,7 @@ $ClientP.post = function (url) {
// if (!formId) throw "No form specified.";
if (this.session) args._session = this.session;
- if (!this.session && !args._user)
+ if (!this.session && !args._user && this.user)
args._user = this.user;
args._last_response = this.genId();
@@ -353,7 +353,7 @@ $ClientP.get = function (url, args) {
//if (!this.user) throw "No user specified for OpenResty.";
if (this.session) args._session = this.session;
- if (!this.session && !args._user)
+ if (!this.session && !args._user && this.user)
args._user = this.user;
//args.password = this.password || '';
diff --git a/demo/Blog/js/blog.js b/demo/Blog/js/blog.js
index 25ab5c8..be45118 100644
--- a/demo/Blog/js/blog.js
+++ b/demo/Blog/js/blog.js
@@ -1,6 +1,6 @@
var account = 'agentzh';
-//var host = 'http://10.32.24.13:1984';
-var host = 'http://localhost:1984';
+//var host = 'http://10.32.24.16:8080';
+var host = 'http://localhost:8080';
//var host = 'http://api.eeeeworks.org';
//var host = 'http://api.openresty.org';
//var host = 'http://10.62.136.86';
@@ -42,6 +42,7 @@ function debug (msg) {
$("#copyright").append(msg + "
");
}
+
$.fn.postprocess = function (className, options) {
return this.find("a[@href*='#']").each( function () {
//debug("HERE!");
diff --git a/demo/Blog/misc/mysql/init-db.sql b/demo/Blog/misc/mysql/init-db.sql
index 70bf2f7..f5daec4 100644
--- a/demo/Blog/misc/mysql/init-db.sql
+++ b/demo/Blog/misc/mysql/init-db.sql
@@ -2,7 +2,7 @@
drop table if exists posts;
create table posts (
id serial,
- title varchar(128) not null,
+ title text not null,
content text not null,
author varchar(64) not null,
created timestamp(0) default now() not null,
diff --git a/demo/Blog/template/sidebar.tt b/demo/Blog/template/sidebar.tt
index d5c54c8..2c99d09 100644
--- a/demo/Blog/template/sidebar.tt
+++ b/demo/Blog/template/sidebar.tt
@@ -73,7 +73,7 @@
Compiled form (.tar.gz)