w2tags 0.9.55 → 0.9.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/Manifest.txt +31 -0
  2. data/lib/w2tags/parser.rb +2 -5
  3. data/lib/w2tags/try/public/css/csscolors.css +47 -0
  4. data/lib/w2tags/try/public/css/jquery.cluetip.css +130 -0
  5. data/lib/w2tags/try/public/css/jscolors.css +55 -0
  6. data/lib/w2tags/try/public/css/rubycolors.css +82 -0
  7. data/lib/w2tags/try/public/css/xmlcolors.css +51 -0
  8. data/lib/w2tags/try/public/img/loading.gif +0 -0
  9. data/lib/w2tags/try/public/js/codemirror.js +308 -0
  10. data/lib/w2tags/try/public/js/editor.js +1340 -0
  11. data/lib/w2tags/try/public/js/highlight.js +68 -0
  12. data/lib/w2tags/try/public/js/jquery.cluetip.js +470 -0
  13. data/lib/w2tags/try/public/js/jquery.js +4376 -0
  14. data/lib/w2tags/try/public/js/mirrorframe.js +81 -0
  15. data/lib/w2tags/try/public/js/parsecss.js +155 -0
  16. data/lib/w2tags/try/public/js/parsehtmlmixed.js +74 -0
  17. data/lib/w2tags/try/public/js/parsejavascript.js +350 -0
  18. data/lib/w2tags/try/public/js/parsew2tags.js +157 -0
  19. data/lib/w2tags/try/public/js/parsexml.js +292 -0
  20. data/lib/w2tags/try/public/js/select.js +607 -0
  21. data/lib/w2tags/try/public/js/stringstream.js +140 -0
  22. data/lib/w2tags/try/public/js/tokenize.js +57 -0
  23. data/lib/w2tags/try/public/js/tokenizejavascript.js +175 -0
  24. data/lib/w2tags/try/public/js/undo.js +404 -0
  25. data/lib/w2tags/try/public/js/util.js +134 -0
  26. data/lib/w2tags/try/public/w2/basic.w2erb +8 -2
  27. data/lib/w2tags/try/public/w2/erb_base.hot.html +167 -0
  28. data/lib/w2tags/try/public/w2/erb_rails.hot.html +59 -0
  29. data/lib/w2tags/try/public/w2/html.hot.html +1 -0
  30. data/lib/w2tags/try/public/w2/rails.hot.html +37 -0
  31. data/lib/w2tags/try/public/w2/try.rb.hot.html +50 -0
  32. data/lib/w2tags/try/try.rb +3 -2
  33. data/lib/w2tags/try/views/index.erb +85 -15
  34. data/lib/w2tags/try/views/layout.erb +4 -5
  35. data/lib/w2tags/try/views/parse.erb +1 -0
  36. data/tasks/setup.rb +1 -1
  37. metadata +58 -2
@@ -6,7 +6,8 @@ get '/' do
6
6
  erb :index
7
7
  end
8
8
 
9
- post '/' do
9
+ post '/parse' do
10
10
  @result= W2.parse_line("%initialize\n"<<params[:input]).join('')
11
- erb :index
11
+ erb :parse, :layout => false
12
12
  end
13
+
@@ -1,4 +1,5 @@
1
1
  <style>
2
+ .h{display:none;}
2
3
  #content a{font-size:1em;
3
4
  }
4
5
  #tryit td{
@@ -18,23 +19,46 @@ textarea.in2{
18
19
  height:535px;
19
20
  background-color:#EEEEEE;
20
21
  }
22
+ #ifr{
23
+ width:600px;
24
+ height:535px;
25
+ }
26
+ td.i2{
27
+ border:2px inset;
28
+ }
21
29
 
22
30
  </style>
31
+ <img id="load" class="h" src="/img/loading.gif" style="position:absolute;top:15px;left:510px;">
23
32
  <div id="content">
24
- <a href="#" class="load2" loc="html">html.hot</a>
33
+ <a href="#" class="load2" loc="try.rb">try.rb</a> -
34
+ <a href="#" class="load2" loc="rails">rails.hot</a> -
35
+ <a href="#" class="load2" id="curr" loc="html">html.hot</a> -
36
+ <a href="#" class="load2" loc="erb_base">erb_base.hot</a> -
37
+ <a href="#" class="load2" loc="erb_rails">erb_rails.hot</a><br/>
38
+ <strong>
39
+ You like w2tags, please <a href="http://rubytrends.com/project/trends/w2tags-552">vote for it on RubyTrends</a>,
40
+ Available on <a href="http://gemcutter.org/gems/w2tags">gemcutter</a>
41
+ </strong>
25
42
  <table id="tryit">
26
43
  <tr>
27
44
  <td>
28
45
  <form id="try" method="post">
29
- <textarea wrap="off" name="input" class="in1"><% if params[:input] %><%= params[:input] %><% else %>%xhtml
46
+ <textarea wrap="off" name="input" id="code1" class="in1"><% if params[:input] %><%= params[:input] %><% else %>
47
+ -# Left: Html Page code in w2tags
48
+ -# Right: file (HOT.tag) from "html.hot"
49
+ -# Pay attention on ">>xhtml", and Press
50
+ -# "Render" to see the Html tag created.
51
+ %xhtml
30
52
  %head
53
+ -utf-8
31
54
  %title Myspace
32
55
  %body
33
56
  %h1 I am the international space station
34
- %p Sign my guestbook<% end %></textarea><br/>
57
+ %p Sign my guestbook<% end %></textarea>
35
58
  <input type="submit" value="Render"/><a href="/">Home</a>
59
+ </form>
36
60
  <table border=1><tr>
37
- <td><a href="#" class="load" loc="basic" >Simple Page</a><br/>
61
+ <td><a href="#" class="load" loc="basic" title="Simple Page~No Fancy w2tags commands fgsdf fsdf sdfsdf sdfsdf dfsdf dsfsdf">Simple Page</a><br/>
38
62
  <a href="#" class="load" loc="basic1">Basic 1</a><br/>
39
63
  <a href="#" class="load" loc="basic2">Basic 2</a><br/>
40
64
  <a href="#" class="load" loc="basic3">Basic 3</a><br/>
@@ -57,26 +81,72 @@ textarea.in2{
57
81
  </td>
58
82
  <td><a href="#" class="load" loc="upload">Upload</a>
59
83
  </td>
60
- </tr></table>
61
- </form>
84
+ </tr>
85
+ </table>
86
+ </td>
87
+ <td class="i2 h">
88
+ <textarea wrap="off" id="code2" class="ln- in2"><%= @result %></textarea>
62
89
  </td>
63
- <td class="i2">
64
- <textarea wrap="off" class="ln- in2">
65
- <%= @result %>
66
- </textarea>
90
+ <td class="i3">
91
+ <iframe frameborder="0" src="/w2/html.hot.html" id="ifr"></iframe>
67
92
  </td>
68
93
  </tr>
69
94
  </table>
70
95
  </div>
71
- <script>
96
+ <script type="text/javascript">
97
+ var editor1 = null;
98
+ var editor2 = null;
72
99
  $(function(){
73
100
  $('a.load').live('click',function(){
74
101
  var loc= "/w2/"+$(this).attr('loc')+".w2erb";
75
- $('textarea.in1').load(loc);
102
+ $.get(loc, function(data){
103
+ //$('#code1').html(data);
104
+ editor1.setCode(data);
105
+ });
76
106
  });
107
+
77
108
  $('a.load2').live('click',function(){
78
- var loc= "/w2/"+$(this).attr('loc')+".hot.html";
79
- $('td.i2').load(loc);
109
+ var src= '/w2/'+$(this).attr('loc')+'.hot.html'
110
+ $('#ifr').attr('src',src);
111
+ $('td.i2').hide();
112
+ $('td.i3').show();
113
+ });
114
+
115
+ $('input[type=submit]').live('click',function(){
116
+ //var ser= $('form#try').serialize();
117
+ $('#load').show();
118
+ $.post('/parse',{input : editor1.getCode()},function(data){
119
+ editor2.setCode(data);
120
+ $('td.i3').hide();
121
+ $('td.i2').show();
122
+ $('#load').hide();
123
+ });
124
+ return false;
125
+ });
126
+
127
+ $('a.load').cluetip({splitTitle: '~'});
128
+
129
+ editor1 = CodeMirror.fromTextArea('code1', {
130
+ parserfile: ["tokenize.js", "parsew2tags.js"],
131
+ stylesheet: "/css/rubycolors.css",
132
+ path: "../js/",
133
+ lineNumbers: false,
134
+ textWrapping: false,
135
+ indentUnit: 4,
136
+ parserConfig: {},
137
+ height: '400px'
138
+ });
139
+
140
+ editor2 = CodeMirror.fromTextArea('code2', {
141
+ parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js", "parsehtmlmixed.js"],
142
+ stylesheet: ["css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css"],
143
+ path: "../js/",
144
+ lineNumbers: false,
145
+ textWrapping: false,
146
+ indentUnit: 4,
147
+ parserConfig: {},
148
+ width: '600px',
149
+ height: '535px'
80
150
  });
81
151
  });
82
- </script>
152
+ </script>
@@ -4,13 +4,12 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=utf-8" http-equiv="Content-type"/>
6
6
  <title>W2tags Try</title>
7
- <script type="text/javascript" src="/javascripts/jquery.js" > </script>
7
+ <link rel="stylesheet" href="/css/jquery.cluetip.css" type="text/css" />
8
+ <script type="text/javascript" src="/js/codemirror.js" > </script>
9
+ <script type="text/javascript" src="/js/jquery.js" > </script>
10
+ <script type="text/javascript" src="/js/jquery.cluetip.js" > </script>
8
11
  </head>
9
12
  <body>
10
- <strong>
11
- You like w2tags, please <a href="http://rubytrends.com/project/trends/w2tags-552">vote for it on RubyTrends</a><br/>
12
- Available on <a href="http://gemcutter.org/gems/w2tags">gemcutter</a>
13
- </strong>
14
13
  <%= yield %>
15
14
  </body>
16
15
  </html>
@@ -0,0 +1 @@
1
+ <%= @result %>
data/tasks/setup.rb CHANGED
@@ -17,7 +17,7 @@ PROJ = OpenStruct.new(
17
17
  :authors => 'Widi Harsojo',
18
18
  :email => 'wharsojo@gmail.com',
19
19
  :url => "\000",
20
- :version => ENV['VERSION'] || '0.9.55',
20
+ :version => ENV['VERSION'] || '0.9.56',
21
21
  :exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/),
22
22
  :release_name => ENV['RELEASE'],
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w2tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.55
4
+ version: 0.9.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - widi harsojo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-29 00:00:00 -08:00
12
+ date: 2009-11-10 00:00:00 +07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,7 +28,30 @@ extra_rdoc_files:
28
28
  - doc/History.rdoc
29
29
  - doc/HOT.rdoc
30
30
  - bin/w2tags
31
+ - lib/w2tags/try/public/css/csscolors.css
32
+ - lib/w2tags/try/public/css/jquery.cluetip.css
33
+ - lib/w2tags/try/public/css/jscolors.css
34
+ - lib/w2tags/try/public/css/rubycolors.css
35
+ - lib/w2tags/try/public/css/xmlcolors.css
36
+ - lib/w2tags/try/public/img/loading.gif
31
37
  - lib/w2tags/try/public/javascripts/jquery.js
38
+ - lib/w2tags/try/public/js/codemirror.js
39
+ - lib/w2tags/try/public/js/editor.js
40
+ - lib/w2tags/try/public/js/highlight.js
41
+ - lib/w2tags/try/public/js/jquery.cluetip.js
42
+ - lib/w2tags/try/public/js/jquery.js
43
+ - lib/w2tags/try/public/js/mirrorframe.js
44
+ - lib/w2tags/try/public/js/parsecss.js
45
+ - lib/w2tags/try/public/js/parsehtmlmixed.js
46
+ - lib/w2tags/try/public/js/parsejavascript.js
47
+ - lib/w2tags/try/public/js/parsew2tags.js
48
+ - lib/w2tags/try/public/js/parsexml.js
49
+ - lib/w2tags/try/public/js/select.js
50
+ - lib/w2tags/try/public/js/stringstream.js
51
+ - lib/w2tags/try/public/js/tokenize.js
52
+ - lib/w2tags/try/public/js/tokenizejavascript.js
53
+ - lib/w2tags/try/public/js/undo.js
54
+ - lib/w2tags/try/public/js/util.js
32
55
  - lib/w2tags/try/public/w2/basic.w2erb
33
56
  - lib/w2tags/try/public/w2/basic1.w2erb
34
57
  - lib/w2tags/try/public/w2/basic2.w2erb
@@ -39,6 +62,8 @@ extra_rdoc_files:
39
62
  - lib/w2tags/try/public/w2/diet1.w2erb
40
63
  - lib/w2tags/try/public/w2/each.w2erb
41
64
  - lib/w2tags/try/public/w2/each2.w2erb
65
+ - lib/w2tags/try/public/w2/erb_base.hot.html
66
+ - lib/w2tags/try/public/w2/erb_rails.hot.html
42
67
  - lib/w2tags/try/public/w2/html.hot.html
43
68
  - lib/w2tags/try/public/w2/if.w2erb
44
69
  - lib/w2tags/try/public/w2/layout.w2erb
@@ -49,9 +74,12 @@ extra_rdoc_files:
49
74
  - lib/w2tags/try/public/w2/params.w2erb
50
75
  - lib/w2tags/try/public/w2/popup.w2erb
51
76
  - lib/w2tags/try/public/w2/popup2.w2erb
77
+ - lib/w2tags/try/public/w2/rails.hot.html
78
+ - lib/w2tags/try/public/w2/try.rb.hot.html
52
79
  - lib/w2tags/try/public/w2/upload.w2erb
53
80
  - lib/w2tags/try/views/index.erb
54
81
  - lib/w2tags/try/views/layout.erb
82
+ - lib/w2tags/try/views/parse.erb
55
83
  files:
56
84
  - Manifest.txt
57
85
  - README.rdoc
@@ -76,7 +104,30 @@ files:
76
104
  - lib/w2tags/block/remark.rb
77
105
  - lib/w2tags/block/sass.rb
78
106
  - lib/w2tags/try/try.rb
107
+ - lib/w2tags/try/public/css/csscolors.css
108
+ - lib/w2tags/try/public/css/jquery.cluetip.css
109
+ - lib/w2tags/try/public/css/jscolors.css
110
+ - lib/w2tags/try/public/css/rubycolors.css
111
+ - lib/w2tags/try/public/css/xmlcolors.css
112
+ - lib/w2tags/try/public/img/loading.gif
79
113
  - lib/w2tags/try/public/javascripts/jquery.js
114
+ - lib/w2tags/try/public/js/codemirror.js
115
+ - lib/w2tags/try/public/js/editor.js
116
+ - lib/w2tags/try/public/js/highlight.js
117
+ - lib/w2tags/try/public/js/jquery.cluetip.js
118
+ - lib/w2tags/try/public/js/jquery.js
119
+ - lib/w2tags/try/public/js/mirrorframe.js
120
+ - lib/w2tags/try/public/js/parsecss.js
121
+ - lib/w2tags/try/public/js/parsehtmlmixed.js
122
+ - lib/w2tags/try/public/js/parsejavascript.js
123
+ - lib/w2tags/try/public/js/parsew2tags.js
124
+ - lib/w2tags/try/public/js/parsexml.js
125
+ - lib/w2tags/try/public/js/select.js
126
+ - lib/w2tags/try/public/js/stringstream.js
127
+ - lib/w2tags/try/public/js/tokenize.js
128
+ - lib/w2tags/try/public/js/tokenizejavascript.js
129
+ - lib/w2tags/try/public/js/undo.js
130
+ - lib/w2tags/try/public/js/util.js
80
131
  - lib/w2tags/try/public/w2/basic.w2erb
81
132
  - lib/w2tags/try/public/w2/basic1.w2erb
82
133
  - lib/w2tags/try/public/w2/basic2.w2erb
@@ -87,6 +138,8 @@ files:
87
138
  - lib/w2tags/try/public/w2/diet1.w2erb
88
139
  - lib/w2tags/try/public/w2/each.w2erb
89
140
  - lib/w2tags/try/public/w2/each2.w2erb
141
+ - lib/w2tags/try/public/w2/erb_base.hot.html
142
+ - lib/w2tags/try/public/w2/erb_rails.hot.html
90
143
  - lib/w2tags/try/public/w2/html.hot.html
91
144
  - lib/w2tags/try/public/w2/if.w2erb
92
145
  - lib/w2tags/try/public/w2/layout.w2erb
@@ -97,9 +150,12 @@ files:
97
150
  - lib/w2tags/try/public/w2/params.w2erb
98
151
  - lib/w2tags/try/public/w2/popup.w2erb
99
152
  - lib/w2tags/try/public/w2/popup2.w2erb
153
+ - lib/w2tags/try/public/w2/rails.hot.html
154
+ - lib/w2tags/try/public/w2/try.rb.hot.html
100
155
  - lib/w2tags/try/public/w2/upload.w2erb
101
156
  - lib/w2tags/try/views/index.erb
102
157
  - lib/w2tags/try/views/layout.erb
158
+ - lib/w2tags/try/views/parse.erb
103
159
  - hot/erb.hot
104
160
  - hot/erb_base.hot
105
161
  - hot/erb_form.hot