sumatra-rails 0.0.4.1 → 0.0.5

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 (30) hide show
  1. data/Gemfile.lock +4 -5
  2. data/lib/sumatra/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/sumatra.js.coffee +122 -1
  4. metadata +19 -30
  5. checksums.yaml +0 -15
  6. data/vendor/assets/javascripts/sumatra/.env.example +0 -1
  7. data/vendor/assets/javascripts/sumatra/.gitignore +0 -2
  8. data/vendor/assets/javascripts/sumatra/Cakefile +0 -27
  9. data/vendor/assets/javascripts/sumatra/LICENSE.md +0 -20
  10. data/vendor/assets/javascripts/sumatra/README.md +0 -183
  11. data/vendor/assets/javascripts/sumatra/component.json +0 -30
  12. data/vendor/assets/javascripts/sumatra/docs/docco.css +0 -500
  13. data/vendor/assets/javascripts/sumatra/docs/index.html +0 -177
  14. data/vendor/assets/javascripts/sumatra/docs/index.md +0 -0
  15. data/vendor/assets/javascripts/sumatra/docs/plugin.js.html +0 -207
  16. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-bold.eot +0 -0
  17. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-bold.ttf +0 -0
  18. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-bold.woff +0 -0
  19. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-light.eot +0 -0
  20. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-light.ttf +0 -0
  21. data/vendor/assets/javascripts/sumatra/docs/public/fonts/aller-light.woff +0 -0
  22. data/vendor/assets/javascripts/sumatra/docs/public/fonts/fleurons.eot +0 -0
  23. data/vendor/assets/javascripts/sumatra/docs/public/fonts/fleurons.ttf +0 -0
  24. data/vendor/assets/javascripts/sumatra/docs/public/fonts/fleurons.woff +0 -0
  25. data/vendor/assets/javascripts/sumatra/docs/public/fonts/novecento-bold.eot +0 -0
  26. data/vendor/assets/javascripts/sumatra/docs/public/fonts/novecento-bold.ttf +0 -0
  27. data/vendor/assets/javascripts/sumatra/docs/public/fonts/novecento-bold.woff +0 -0
  28. data/vendor/assets/javascripts/sumatra/docs/public/images/gray.png +0 -0
  29. data/vendor/assets/javascripts/sumatra/docs/public/stylesheets/normalize.css +0 -375
  30. data/vendor/assets/javascripts/sumatra/docs/runtime.js.html +0 -111
@@ -1,111 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <title>runtime.js.coffee</title>
6
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
7
- <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
8
- <link rel="stylesheet" media="all" href="docco.css" />
9
- </head>
10
- <body>
11
- <div id="container">
12
- <div id="background"></div>
13
-
14
- <ul class="sections">
15
-
16
- <li id="title">
17
- <div class="annotation">
18
- <h1>runtime.js.coffee</h1>
19
- </div>
20
- </li>
21
-
22
-
23
-
24
- <li id="section-1">
25
- <div class="annotation">
26
-
27
- <div class="pilwrap for-h2">
28
- <a class="pilcrow" href="#section-1">&#182;</a>
29
- </div>
30
- <h2>SumatraRuntime</h2>
31
-
32
- </div>
33
-
34
- </li>
35
-
36
-
37
- <li id="section-2">
38
- <div class="annotation">
39
-
40
- <div class="pilwrap ">
41
- <a class="pilcrow" href="#section-2">&#182;</a>
42
- </div>
43
- <p>Defines a jQuery plugin using a service object with a nice,
44
- consistent, CoffeeScript-style interface. Plugins can extend
45
- <code>SumatraPlugin</code>, a prototype that makes defining plugins with
46
- Sumatra easier.</p>
47
- <p>The runtime function returns the generated jQuery plugin to the
48
- global scope so it can be used in your application code.</p>
49
- <p>Arguments:</p>
50
- <ul>
51
- <li><strong>plugin_name:</strong> The jQuery plugin name, called like <code>$(&#39;div&#39;).myPlugin();</code></li>
52
- <li><strong>plugin_code:</strong> A function that will be executed immediately and must return
53
- a single object that takes 3 parameters in its constructor. These parameters
54
- are the <code>element</code> being targeted by jQuery, the <code>index</code> at which it appears
55
- in the query, and the <code>options</code> hash passed during the instantiation of the
56
- jQuery plugin.</li>
57
- </ul>
58
- <p>Example:</p>
59
- <pre><code>sumatra &#39;myPlugin&#39;, -&gt;
60
- class MyPlugin extends SumatraPlugin
61
- action: null
62
- initialize:
63
- alert &#39;loaded&#39;</code></pre>
64
-
65
- </div>
66
-
67
- <div class="content"><div class="highlight"><pre><span class="property">@sumatra</span> = (plugin_name, plugin_code) -&gt;</pre></div></div>
68
-
69
- </li>
70
-
71
-
72
- <li id="section-3">
73
- <div class="annotation">
74
-
75
- <div class="pilwrap ">
76
- <a class="pilcrow" href="#section-3">&#182;</a>
77
- </div>
78
- <p>Instantiate a PluginHelper and apply the current scope. This can
79
- be any object that responds to 3 parameters in its constructor
80
- and will be set to whatever is returned by <code>plugin_code()</code>.</p>
81
-
82
- </div>
83
-
84
- <div class="content"><div class="highlight"><pre>PluginHelper = plugin_code.apply <span class="keyword">this</span>
85
-
86
- jQuery.fn[plugin_name] = (options={}) -&gt;
87
- <span class="property">@each</span> (index, element) -&gt;</pre></div></div>
88
-
89
- </li>
90
-
91
-
92
- <li id="section-4">
93
- <div class="annotation">
94
-
95
- <div class="pilwrap ">
96
- <a class="pilcrow" href="#section-4">&#182;</a>
97
- </div>
98
- <p>For each element, create a <code>PluginHelper</code> instance
99
- of the passed-in <code>plugin_code</code> and apply the jQuery
100
- plugin parameters to the constructor. </p>
101
-
102
- </div>
103
-
104
- <div class="content"><div class="highlight"><pre><span class="keyword">new</span> PluginHelper(element, index, options)</pre></div></div>
105
-
106
- </li>
107
-
108
- </ul>
109
- </div>
110
- </body>
111
- </html>