modularis 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile.lock +2 -2
  3. data/README.md +2 -4
  4. data/lib/modularis/version.rb +1 -1
  5. metadata +1 -91
  6. data/docs/CHANGELOG.md +0 -260
  7. data/docs/Capfile +0 -4
  8. data/docs/Gemfile +0 -13
  9. data/docs/Gemfile.lock +0 -45
  10. data/docs/Procfile +0 -2
  11. data/docs/README.md +0 -1
  12. data/docs/_sidebar-components.html.erb +0 -115
  13. data/docs/_sidebar.html.erb +0 -115
  14. data/docs/changelog.html.erb +0 -33
  15. data/docs/compile.rb +0 -34
  16. data/docs/components/alert-boxes.html.erb +0 -204
  17. data/docs/components/block-grid.html.erb +0 -132
  18. data/docs/components/breadcrumbs.html.erb +0 -156
  19. data/docs/components/button-groups.html.erb +0 -230
  20. data/docs/components/buttons.html.erb +0 -222
  21. data/docs/components/clearing.html.erb +0 -152
  22. data/docs/components/custom-forms.html.erb +0 -309
  23. data/docs/components/dropdown-buttons.html.erb +0 -235
  24. data/docs/components/dropdown.html.erb +0 -188
  25. data/docs/components/flex-video.html.erb +0 -95
  26. data/docs/components/forms.html.erb +0 -477
  27. data/docs/components/global.html.erb +0 -92
  28. data/docs/components/grid.html.erb +0 -366
  29. data/docs/components/inline-lists.html.erb +0 -91
  30. data/docs/components/joyride.html.erb +0 -183
  31. data/docs/components/keystrokes.html.erb +0 -76
  32. data/docs/components/kitchen-sink.html.erb +0 -870
  33. data/docs/components/labels.html.erb +0 -102
  34. data/docs/components/magellan.html.erb +0 -86
  35. data/docs/components/orbit.html.erb +0 -276
  36. data/docs/components/pagination.html.erb +0 -183
  37. data/docs/components/panels.html.erb +0 -123
  38. data/docs/components/pricing-tables.html.erb +0 -156
  39. data/docs/components/progress-bars.html.erb +0 -123
  40. data/docs/components/reveal.html.erb +0 -162
  41. data/docs/components/section.html.erb +0 -496
  42. data/docs/components/side-nav.html.erb +0 -124
  43. data/docs/components/split-buttons.html.erb +0 -220
  44. data/docs/components/sub-nav.html.erb +0 -122
  45. data/docs/components/switch.html.erb +0 -290
  46. data/docs/components/tables.html.erb +0 -125
  47. data/docs/components/thumbnails.html.erb +0 -89
  48. data/docs/components/tooltips.html.erb +0 -75
  49. data/docs/components/top-bar.html.erb +0 -283
  50. data/docs/components/type.html.erb +0 -396
  51. data/docs/components/visibility.html.erb +0 -110
  52. data/docs/config/deploy.rb +0 -36
  53. data/docs/config.ru +0 -12
  54. data/docs/controller.rb +0 -53
  55. data/docs/css/_coderay.scss +0 -116
  56. data/docs/css/_settings.scss +0 -1
  57. data/docs/css/docs.scss +0 -185
  58. data/docs/css/normalize.scss +0 -396
  59. data/docs/css/qunit-composite.css +0 -13
  60. data/docs/css/qunit.css +0 -235
  61. data/docs/faq.html.erb +0 -63
  62. data/docs/img/demos/demo1-th.jpg +0 -0
  63. data/docs/img/demos/demo1.jpg +0 -0
  64. data/docs/img/demos/demo2-th.jpg +0 -0
  65. data/docs/img/demos/demo2.jpg +0 -0
  66. data/docs/img/demos/demo3-th.jpg +0 -0
  67. data/docs/img/demos/demo3.jpg +0 -0
  68. data/docs/img/demos/demo4-th.jpg +0 -0
  69. data/docs/img/demos/demo4.jpg +0 -0
  70. data/docs/img/demos/demo5-th.jpg +0 -0
  71. data/docs/img/demos/demo5.jpg +0 -0
  72. data/docs/index.html.erb +0 -285
  73. data/docs/javascript.html.erb +0 -134
  74. data/docs/js/docs.js +0 -3
  75. data/docs/js/qunit-composite.js +0 -105
  76. data/docs/js/qunit.js +0 -1977
  77. data/docs/js/tests/tabs/simple_tabs.html +0 -57
  78. data/docs/js/tests/tabs/simple_tabs.js +0 -54
  79. data/docs/js/tests/tooltips/tooltips.html +0 -39
  80. data/docs/js/tests/tooltips/tooltips.js +0 -11
  81. data/docs/layout.html.erb +0 -128
  82. data/docs/media-queries.html.erb +0 -96
  83. data/docs/rails.html.erb +0 -76
  84. data/docs/rtl.html.erb +0 -53
  85. data/docs/sass.html.erb +0 -1295
  86. data/docs/support.html.erb +0 -143
  87. data/docs/test/_test-scripts.html.erb +0 -36
  88. data/docs/test/cards.html.erb +0 -77
  89. data/docs/test/flexbox-grid.html.erb +0 -68
  90. data/docs/test/flip-nav.html.erb +0 -54
  91. data/docs/test/layout.html.erb +0 -15
  92. data/docs/test/off-canvas1.html.erb +0 -64
  93. data/docs/test/off-canvas2.html.erb +0 -75
  94. data/docs/test/off-canvas3.html.erb +0 -65
  95. data/docs/test_layout.html.erb +0 -128
@@ -1,134 +0,0 @@
1
- <% @side_nav = "using" %>
2
-
3
- <div class="row">
4
- <div class="large-9 push-3 columns">
5
- <% @page_title = "Javascript" %>
6
- <div class="row">
7
- <div class="large-12 columns">
8
- <h2><%= @page_title %></h2>
9
- <h4 class="subheader">Modularis 4 streamlines the implementation of the Modularis plugins by combining them all into a single plugin under the <code>$.fn.modularis()</code> Zepto/jQuery namespace.</h4>
10
- <hr>
11
-
12
- <h2>Installation</h2>
13
- <p>Modularis JavaScript was designed to work with <a href="http://zeptojs.com/" title="Zepto Docs">Zepto</a> and <a href="http://jquery.com/" title="jQuery Docs">jQuery</a> right out of the gate. Zepto is not supported by all browsers, so as suggested in the Zepto documentation, you should test for compatibility and load Zepto or jQuery as necessary.</p>
14
-
15
- <h5>Include Libraries</h5>
16
- <p>In the <code>head</code> section of your page add Modernizr. Modernizr acts as a shim for HTML5 elements for older browsers as well as detection for mobile devices.</p>
17
-
18
- <%= code_example '
19
- <script src="/js/custom.modernizr.js"></script>
20
- ', :html %>
21
-
22
- <p>Before the closing <code>body</code> tag, insert the following JavaScript.</p>
23
-
24
- <%= code_example "
25
- <!-- Check for Zepto support, load jQuery if necessary -->
26
- <script>
27
- document.write('<script src=/js/vendor/'
28
- + ('__proto__' in {} ? 'zepto' : 'jquery')
29
- + '.js><\\\/script>');
30
- </script>
31
- ", :html %>
32
-
33
- <p>Then include either <code>modularis.min.js</code>, which includes Modularis Core and all JavaScript plugins or you can load them individually. The minified version is not available in the Compass version.</p>
34
-
35
- <%= code_example '
36
- <script src="/js/modularis.min.js"></script>
37
-
38
- <!-- or individually -->
39
-
40
- <script src="/js/modularis.js"></script>
41
- ', :html %>
42
-
43
- <h5>Initialize Modularis</h5>
44
- <p>After you have included the Modularis JavaScript, just add a simple call to initialize all plugins on your page.</p>
45
- <p>It is recommended that you initialize on document ready</p>
46
-
47
- <%= code_example '
48
- <script>
49
- $(function(){
50
- $(document).modularis();
51
- })
52
- </script>
53
- ', :html %>
54
-
55
- <p><strong>Note:</strong> We include tested versions of jQuery and Zepto in the Modularis repo to get you started quickly. If you want to build your own version of Zepto, Modularis employs the <i>event</i>, <i>fx_methods</i>, <i>assets</i>, <i>data</i>, <i>selector</i>, and <i>stack</i> modules.</p>
56
-
57
- <hr>
58
-
59
- <h2>Configuration</h2>
60
-
61
- <p>Modularis accepts a myriad of options for initialization. By default, calling <code>$('#scope').modularis();</code> will initialize all available plugins on the page. Alternatively, you can pass individual plugins along with configuration options and a callback. This will allow you to select specific plugins to start on your page, even if their source is included. You can take a look at the call here:</p>
62
-
63
- <%= code_example "
64
- $(document).modularis('section', {deep_linking: true}, function (response) {
65
- console.log(response.errors);
66
- });
67
- ", :js %>
68
-
69
- <p>The call will initialize the Section plugin on the page with deep linking enabled and pass back a response object with any errors that may have occurred.</p>
70
-
71
- <p>You can initialize multiple libraries within the same call as well. Here are a few ways this can be done:</p>
72
-
73
- <%= code_example "
74
- $(document).modularis('section dropdown alerts', {callback: myCallbackFunction}, function (response) {
75
- console.log(response.errors);
76
- });
77
-
78
- // alternative, no configuration
79
-
80
- $(document).modularis('section dropdown alerts', function (response) {
81
- console.log(response.errors);
82
- });
83
-
84
- // alternative, all plugins, only callback
85
-
86
- $(document).modularis(function (response) {
87
- console.log(response.errors);
88
- });
89
-
90
- // alternative, only plugin, no config or callback
91
-
92
- $(document).modularis('section');
93
- ", :js %>
94
-
95
- <p>Keep in mind, if you initialize multiple plugins at one time and pass a configuration object that object will get passed to all plugins that were initialized. So in the first example: section, dropdown, and alerts will all get passed the <code>myCallbackFunction</code> on initialization.</p>
96
-
97
- <p>What if you wanted to pass the <code>myCallbackFunction</code> only to Section and still initialize the other plugins as well? You could do the following.</p>
98
-
99
- <%= code_example "
100
- $(document)
101
- .modularis('dropdown alerts')
102
- .modularis('section', {callback: myCallbackFunction});
103
- ", :js %>
104
-
105
- <hr>
106
-
107
- <h2>Calling Internal Methods</h2>
108
-
109
- <p>Modularis 4 JavaScript allows you call call internal plugin methods by passing the method name as the second argument. This is necessary for plugins like Joyride, since they are not initialized on page load by default.</p>
110
-
111
- <p>This will fire the <code>start</code> method on Joyride:</p>
112
-
113
- <%= code_example "
114
- $(document).modularis('joyride', 'start');
115
- ", :js %>
116
-
117
- <h5>Unbind Events</h5>
118
-
119
- <p>All plugins can be unbound from the DOM by firing the <code>off</code> event either on that plugin or globally to unbind all Modularis events.</p>
120
-
121
- <%= code_example "
122
- $(document).modularis('tooltips', 'off');
123
-
124
- // or globally
125
-
126
- $(document).modularis('off');
127
- ", :js %>
128
- </div>
129
- </div>
130
- </div>
131
- <div class="large-3 pull-9 columns">
132
- <%= render "_sidebar.html.erb" %>
133
- </div>
134
- </div>
data/docs/js/docs.js DELETED
@@ -1,3 +0,0 @@
1
- /*
2
- =require modularis
3
- */
@@ -1,105 +0,0 @@
1
- (function( QUnit ) {
2
-
3
- QUnit.extend( QUnit, {
4
- testSuites: function( suites ) {
5
- QUnit.begin(function() {
6
- QUnit.initIframe();
7
- });
8
-
9
- for ( var i = 0; i < suites.length; i++ ) {
10
- QUnit.runSuite( suites[i] );
11
- }
12
-
13
- QUnit.done(function() {
14
- this.iframe.style.display = "none";
15
- });
16
- },
17
-
18
- runSuite: function( suite ) {
19
- asyncTest( suite, function() {
20
- QUnit.iframe.setAttribute( "src", suite );
21
- });
22
- },
23
-
24
- initIframe: function() {
25
- var body = document.body,
26
- iframe = this.iframe = document.createElement( "iframe" ),
27
- iframeWin;
28
-
29
- iframe.className = "qunit-subsuite";
30
- body.appendChild( iframe );
31
-
32
- function onIframeLoad() {
33
- var module, test,
34
- count = 0;
35
-
36
- if (iframe.src === "") {
37
- return;
38
- }
39
-
40
- iframeWin.QUnit.moduleStart(function( data ) {
41
- // capture module name for messages
42
- module = data.name;
43
- });
44
-
45
- iframeWin.QUnit.testStart(function( data ) {
46
- // capture test name for messages
47
- test = data.name;
48
- });
49
- iframeWin.QUnit.testDone(function() {
50
- test = null;
51
- });
52
-
53
- iframeWin.QUnit.log(function( data ) {
54
- if (test === null) {
55
- return;
56
- }
57
- // pass all test details through to the main page
58
- var message = module + ": " + test + ": " + data.message;
59
- expect( ++count );
60
- QUnit.push( data.result, data.actual, data.expected, message );
61
- });
62
-
63
- iframeWin.QUnit.done(function() {
64
- // start the wrapper test from the main page
65
- start();
66
- });
67
- }
68
- QUnit.addEvent( iframe, "load", onIframeLoad );
69
-
70
- iframeWin = iframe.contentWindow;
71
- }
72
- });
73
-
74
- QUnit.testStart(function( data ) {
75
- // update the test status to show which test suite is running
76
- QUnit.id( "qunit-testresult" ).innerHTML = "Running " + data.name + "...<br>&nbsp;";
77
- });
78
-
79
- QUnit.testDone(function() {
80
- var i,
81
- current = QUnit.id( this.config.current.id ),
82
- children = current.children,
83
- src = this.iframe.src;
84
-
85
- // undo the auto-expansion of failed tests
86
- for ( i = 0; i < children.length; i++ ) {
87
- if ( children[i].nodeName === "OL" ) {
88
- children[i].style.display = "none";
89
- }
90
- }
91
-
92
- QUnit.addEvent(current, "dblclick", function( e ) {
93
- var target = e && e.target ? e.target : window.event.srcElement;
94
- if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
95
- target = target.parentNode;
96
- }
97
- if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
98
- window.location = src;
99
- }
100
- });
101
-
102
- current.getElementsByTagName('a')[0].href = src;
103
- });
104
-
105
- }( QUnit ) );