diff --git a/addons/wiki/__openerp__.py b/addons/wiki/__openerp__.py
index ab9203a9afd..11477d535b6 100644
--- a/addons/wiki/__openerp__.py
+++ b/addons/wiki/__openerp__.py
@@ -53,5 +53,6 @@ Keep track of Wiki groups, pages, and history.
'certificate': '0086363630317',
'web': True,
'images': ['images/create_index.jpeg','images/page_history.jpeg','images/wiki_groups.jpeg','images/wiki_pages.jpeg'],
+ 'js': ['static/src/lib/wiky/wiky.js', 'static/src/js/wiki.js'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/wiki/static/src/js/wiki.js b/addons/wiki/static/src/js/wiki.js
new file mode 100644
index 00000000000..7b84ff5080c
--- /dev/null
+++ b/addons/wiki/static/src/js/wiki.js
@@ -0,0 +1,14 @@
+openerp.wiki = function (openerp) {
+ openerp.web.form.widgets.add(
+ 'text_wiki', 'openerp.web.form.FieldText');
+ openerp.web.page.readonly.add(
+ 'text_wiki', 'openerp.wiki.FieldWikiReadonly');
+ openerp.wiki = {};
+ openerp.wiki.FieldWikiReadonly = openerp.web.page.FieldCharReadonly.extend({
+ set_value: function (value) {
+ var show_value = wiky.process(value);
+ this.$element.find('div').html(show_value);
+ return show_value;
+ }
+ });
+};
diff --git a/addons/wiki/static/src/lib/wiky/Readme.md b/addons/wiki/static/src/lib/wiky/Readme.md
new file mode 100755
index 00000000000..5d9bfe175a6
--- /dev/null
+++ b/addons/wiki/static/src/lib/wiky/Readme.md
@@ -0,0 +1,41 @@
+Wiky.js - a javascript library to convert Wiki Markup language to HTML.
+=======================
+
+(It is buggy, please use with care)
+
+Wiky.js is a javascript library that converts Wiki Markup language to HTML.
+
+
+How to use it
+-------------------
+Include wiki.js into your HTML file. Wiky.js has only one function, which is wiky.process(wikitext).
+
+Please see index.html for an example.
+
+*wiky.js does not depend on jQuery, which is included for testing purpose.
+
+
+
+Supported Syntax
+-------------------
+* == Heading ==
+* === Subheading ===
+* [http://www.url.com Name of URLs]
+* [[File:http://www.url.com/image.png Alternative Text]]
+* -------------------- (Horizontal line)
+* : (Indentation)
+* # Ordered bullet point
+* * Unordered bullet point
+
+
+
+License
+------------------
+Creative Commons 3.0
+
+
+
+Contributors
+-------------------
+Tanin Na Nakorn
+Tanun Niyomjit (Designer)
\ No newline at end of file
diff --git a/addons/wiki/static/src/lib/wiky/autogit.sh b/addons/wiki/static/src/lib/wiky/autogit.sh
new file mode 100755
index 00000000000..79f59a51a8f
--- /dev/null
+++ b/addons/wiki/static/src/lib/wiky/autogit.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+git add --all
+git commit -a -m "prototype changed"
+git pull
+git mergetool
+git push
diff --git a/addons/wiki/static/src/lib/wiky/index.html b/addons/wiki/static/src/lib/wiky/index.html
new file mode 100755
index 00000000000..97992354fd6
--- /dev/null
+++ b/addons/wiki/static/src/lib/wiky/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ Untitled Document
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/wiki/static/src/lib/wiky/input_complete b/addons/wiki/static/src/lib/wiky/input_complete
new file mode 100755
index 00000000000..c7e860cccf9
--- /dev/null
+++ b/addons/wiki/static/src/lib/wiky/input_complete
@@ -0,0 +1,35 @@
+=== Heading ===
+Some content
+I would like to add another line
+
+== Subheading ==
+Some more content
+Some more lines1
+:A line with indent
+:: A 2-indented line
+:: more
+:back to 1-indented line
+
+This is Taeyeon.
+[[File:http://www.oknation.net/blog/home/blog_data/12/2012/images/ty4.jpg Taeyeon]]
+Taeyeon is so cute.
+
+This is a link:[http://www.google.com Google].
+This is a bold link:'''[http://www.google.com Google]'''.
+This is a bold-italic link:'''''[http://www.google.com Google]'''''.
+This is '''bold''', '''''bold-italic''''', and ''italic''
+
+
+# First
+# second
+## Second-First
+*** First Point
+*** Second Point
+#### z
+#### y
+#### x
+*** Third Point
+## Second-Second [ftp://www.facebook.com FacebookFTP]
+## Second-Third [http://www.google.com Google Here]
+# third
+
diff --git a/addons/wiki/static/src/lib/wiky/jquery-1.4.2.min.js b/addons/wiki/static/src/lib/wiky/jquery-1.4.2.min.js
new file mode 100755
index 00000000000..8060d0e5041
--- /dev/null
+++ b/addons/wiki/static/src/lib/wiky/jquery-1.4.2.min.js
@@ -0,0 +1,170 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b