You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/02 11:19:44 UTC

[7/7] incubator-ponymail git commit: add a simple DOM test

add a simple DOM test


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/e3d0fc75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/e3d0fc75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/e3d0fc75

Branch: refs/heads/coffee-and-cake
Commit: e3d0fc75658ed38ee197e40a110cec840dd4bb54
Parents: bdbf65e
Author: Daniel Gruno <hu...@apache.org>
Authored: Fri Sep 2 13:18:58 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Fri Sep 2 13:18:58 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/test.coffee | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/e3d0fc75/site/js/coffee/test.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/test.coffee b/site/js/coffee/test.coffee
new file mode 100644
index 0000000..30a7cb1
--- /dev/null
+++ b/site/js/coffee/test.coffee
@@ -0,0 +1,11 @@
+testCoffee = () ->
+    ### Get main div from HTML ###
+    parent = get('testdiv')
+    # Make a paragraph with some text in it
+    p = mk('p', { onclick: 'testToggle(this);', class: "fooclass", style: { textAlign: 'center'}}, "Text goes here")
+    # Inject paragraph into div
+    parent.inject(p)
+    p.inject(". More text here")
+    
+testToggle = (div) ->
+    div.show()
\ No newline at end of file