modularis 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +2 -2
- data/README.md +2 -4
- data/lib/modularis/version.rb +1 -1
- metadata +1 -91
- data/docs/CHANGELOG.md +0 -260
- data/docs/Capfile +0 -4
- data/docs/Gemfile +0 -13
- data/docs/Gemfile.lock +0 -45
- data/docs/Procfile +0 -2
- data/docs/README.md +0 -1
- data/docs/_sidebar-components.html.erb +0 -115
- data/docs/_sidebar.html.erb +0 -115
- data/docs/changelog.html.erb +0 -33
- data/docs/compile.rb +0 -34
- data/docs/components/alert-boxes.html.erb +0 -204
- data/docs/components/block-grid.html.erb +0 -132
- data/docs/components/breadcrumbs.html.erb +0 -156
- data/docs/components/button-groups.html.erb +0 -230
- data/docs/components/buttons.html.erb +0 -222
- data/docs/components/clearing.html.erb +0 -152
- data/docs/components/custom-forms.html.erb +0 -309
- data/docs/components/dropdown-buttons.html.erb +0 -235
- data/docs/components/dropdown.html.erb +0 -188
- data/docs/components/flex-video.html.erb +0 -95
- data/docs/components/forms.html.erb +0 -477
- data/docs/components/global.html.erb +0 -92
- data/docs/components/grid.html.erb +0 -366
- data/docs/components/inline-lists.html.erb +0 -91
- data/docs/components/joyride.html.erb +0 -183
- data/docs/components/keystrokes.html.erb +0 -76
- data/docs/components/kitchen-sink.html.erb +0 -870
- data/docs/components/labels.html.erb +0 -102
- data/docs/components/magellan.html.erb +0 -86
- data/docs/components/orbit.html.erb +0 -276
- data/docs/components/pagination.html.erb +0 -183
- data/docs/components/panels.html.erb +0 -123
- data/docs/components/pricing-tables.html.erb +0 -156
- data/docs/components/progress-bars.html.erb +0 -123
- data/docs/components/reveal.html.erb +0 -162
- data/docs/components/section.html.erb +0 -496
- data/docs/components/side-nav.html.erb +0 -124
- data/docs/components/split-buttons.html.erb +0 -220
- data/docs/components/sub-nav.html.erb +0 -122
- data/docs/components/switch.html.erb +0 -290
- data/docs/components/tables.html.erb +0 -125
- data/docs/components/thumbnails.html.erb +0 -89
- data/docs/components/tooltips.html.erb +0 -75
- data/docs/components/top-bar.html.erb +0 -283
- data/docs/components/type.html.erb +0 -396
- data/docs/components/visibility.html.erb +0 -110
- data/docs/config/deploy.rb +0 -36
- data/docs/config.ru +0 -12
- data/docs/controller.rb +0 -53
- data/docs/css/_coderay.scss +0 -116
- data/docs/css/_settings.scss +0 -1
- data/docs/css/docs.scss +0 -185
- data/docs/css/normalize.scss +0 -396
- data/docs/css/qunit-composite.css +0 -13
- data/docs/css/qunit.css +0 -235
- data/docs/faq.html.erb +0 -63
- data/docs/img/demos/demo1-th.jpg +0 -0
- data/docs/img/demos/demo1.jpg +0 -0
- data/docs/img/demos/demo2-th.jpg +0 -0
- data/docs/img/demos/demo2.jpg +0 -0
- data/docs/img/demos/demo3-th.jpg +0 -0
- data/docs/img/demos/demo3.jpg +0 -0
- data/docs/img/demos/demo4-th.jpg +0 -0
- data/docs/img/demos/demo4.jpg +0 -0
- data/docs/img/demos/demo5-th.jpg +0 -0
- data/docs/img/demos/demo5.jpg +0 -0
- data/docs/index.html.erb +0 -285
- data/docs/javascript.html.erb +0 -134
- data/docs/js/docs.js +0 -3
- data/docs/js/qunit-composite.js +0 -105
- data/docs/js/qunit.js +0 -1977
- data/docs/js/tests/tabs/simple_tabs.html +0 -57
- data/docs/js/tests/tabs/simple_tabs.js +0 -54
- data/docs/js/tests/tooltips/tooltips.html +0 -39
- data/docs/js/tests/tooltips/tooltips.js +0 -11
- data/docs/layout.html.erb +0 -128
- data/docs/media-queries.html.erb +0 -96
- data/docs/rails.html.erb +0 -76
- data/docs/rtl.html.erb +0 -53
- data/docs/sass.html.erb +0 -1295
- data/docs/support.html.erb +0 -143
- data/docs/test/_test-scripts.html.erb +0 -36
- data/docs/test/cards.html.erb +0 -77
- data/docs/test/flexbox-grid.html.erb +0 -68
- data/docs/test/flip-nav.html.erb +0 -54
- data/docs/test/layout.html.erb +0 -15
- data/docs/test/off-canvas1.html.erb +0 -64
- data/docs/test/off-canvas2.html.erb +0 -75
- data/docs/test/off-canvas3.html.erb +0 -65
- data/docs/test_layout.html.erb +0 -128
data/docs/javascript.html.erb
DELETED
@@ -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
data/docs/js/qunit-composite.js
DELETED
@@ -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> ";
|
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 ) );
|