Bootstrap completed

This commit is contained in:
Francesco Malagrino
2014-02-02 12:49:58 +01:00
parent 469ee5fb06
commit d81afb338c
297 changed files with 35853 additions and 322 deletions

296
css/ContextJS.htm Normal file
View File

@@ -0,0 +1,296 @@
<!DOCTYPE html>
<!-- saved from url=(0036)http://lab.jakiestfu.com/contextjs/# -->
<html lang="en"><!--
Have Fun!
Jacob
--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<title>ContextJS</title>
<link rel="stylesheet" type="text/css" href="./ContextJS_files/demo.css">
<link href="./ContextJS_files/css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./ContextJS_files/context.standalone.css">
<style type="text/css">#scripts{position:relative;z-index:9999;}.scripts-list{text-align:left;min-width:160px;margin:0;padding:0;display:none;position:absolute;top:0px;left:105%;list-style-type:none;border:1px solid rgba(0,0,0,0.2);background:#fefefe;padding-top:5px;padding-bottom:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);}.scripts-list a{text-shadow:none;font-family:HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;text-decoration:none;display:block;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;padding:3px 20px;}.scripts-list a:hover{background:#ddd;}</style></head>
<body>
<h1>context.js</h1>
<div id="download">Right Click to Demo <span class="amp">&amp;</span> Download</div>
<div class="description">
<h2>About</h2>
<p>ContextJS is a lightweight solution for contextual menus. Currently, there are two versions.</p> <p>The first is to be used <i>with</i> <a href="http://lab.jakiestfu.com/contextjs/twitter.github.com/bootstrap/" target="_blank">Twitters Bootstrap</a> (bootstrap.css specifically). If you do not use or want to use bootstrap.css, there is a standalone stylesheet to give the menu it's base styles.</p>
<h2>Features</h2>
<ul>
<li>Linted: Valid JS</li>
<li>Can be used with or without Twitters Bootstrap.css</li>
<li>Event Based Links</li>
<li>Anchor Links</li>
<li>Headers</li>
<li>Dividers</li>
<li>Recursive Menus (infinite depth)</li>
<li>Vertical Space Detection (turns into a "dropup")</li>
<li>Horizontal Space Detection (Drops to the left instead of right)</li>
<li>Add/Delete menus Dynamically</li>
<li>Even works on <a href="http://google.com/" class="inline-menu">Inline Links</a></li>
</ul>
<h2>Public API</h2>
<h3>Initializing</h3>
<pre>context.init({
fadeSpeed: 100,
filter: function ($obj){},
above: 'auto',
preventDoubleContext: true,
compress: false
});</pre>
<table border="1" cellpadding="6">
<thead>
<tr>
<th>Paramater</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>fadeSpeed</td>
<td>int</td>
<td>100</td>
<td>The speed in which the context menu fades in (in milliseconds)</td>
</tr>
<tr>
<td>filter</td>
<td>function</td>
<td>null</td>
<td>Function that each finished list element will pass through for extra modification.</td>
</tr>
<tr>
<td>above</td>
<td>string || boolean</td>
<td>'auto'</td>
<td>If set to 'auto', menu will appear as a "dropup" if there is not enough room below it. Settings to true will make the menu a "popup" by default.</td>
</tr>
<tr>
<td>preventDoubleContext</td>
<td>boolean</td>
<td>true</td>
<td>If set to true, browser-based context menus will not work on contextjs menus.</td>
</tr>
<tr>
<td>compress</td>
<td>boolean</td>
<td>false</td>
<td>If set to true, context menus will have less padding, making them (hopefully) more unobtrusive</td>
</tr>
</tbody>
</table>
<h3>Updating Settings</h3>
<pre>context.settings({initSettings});</pre>
<table border="1" cellpadding="6">
<thead>
<tr>
<th>Paramater</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>settings</td>
<td>object</td>
<td>null</td>
<td>The init settings can be placed in here to update context menus written to the DOM. Changing settings between attaching menus will give the menus their own options.</td>
</tr>
</tbody>
</table>
<h3>Attaching</h3>
<pre>context.attach('#download', [menuObjects]);</pre>
<table border="1" cellpadding="6">
<thead>
<tr>
<th>Paramater</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>selector</td>
<td>string</td>
<td>null</td>
<td>The jQuery (or css) selector of the element you want to apply the context menu to</td>
</tr>
<tr>
<td>menuObjects</td>
<td>array</td>
<td>null</td>
<td>An array of objects that define the menus structure</td>
</tr>
</tbody>
</table>
<h3>Destroying</h3>
<pre>context.destroy('#download');</pre>
<table border="1" cellpadding="6">
<thead>
<tr>
<th>Paramater</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>selector</td>
<td>string</td>
<td>null</td>
<td>The jQuery (or css) selector of the element you want to remove the context menu from</td>
</tr>
</tbody>
</table>
<h2>Menu Objects</h2>
<h3>Headers</h3>
<pre>{
header: 'My Header Title'
}</pre>
<h3>Anchor Links</h3>
<pre>{
text: 'My Link Title',
href: 'http://contextjs.com/',
target: '_blank'
}</pre>
<h3>Dividers</h3>
<pre>{
divider: true
}</pre>
<h3>Event Based Actions</h3>
<pre>{
text: 'Event Based Link',
action: function(e){
e.preventDefault();
alert('Do Something');
}
}</pre>
<h3>Sub-Menus</h3>
<pre>{
text: 'My Sub-menu',
subMenu: [menuObjects]
}</pre>
<h3>Tracking Links with Google Analytics</h3>
<pre>{
text: 'context.js',
href: 'http://contextjs.com/context.js',
target:'_blank',
action: function(e){
_gaq.push(['_trackEvent', 'ContextJS Download', this.pathname, this.innerHTML]);
}
}</pre>
<h2>Changelog</h2>
<h3>Version 1.0 (Initial Release)</h3>
<h3>Version 1.5</h3>
<ul>
<li>Added Initialize Options</li>
<li>Removal of Dropdown ID paramater</li>
<li>Added Event-based items</li>
<li>Added Headers</li>
<li>Added Recursive Menus</li>
<li>Vertical Space Detection</li>
</ul>
<h3>Version 2.0</h3>
<ul>
<li>Refined Vertical Space Detection</li>
<li>Added Horizontal Space Detection</li>
<li>Added an optional standalone CSS file for use without bootstrap</li>
<li>Added preventDoubleContext parameter in the init function</li>
<li>Added target parameter to links</li>
<li>Fixed event bubbling (multi-level dropdowns in the DOM)</li>
</ul>
<h3>Version 2.1</h3>
<ul>
<li>Added settings function</li>
<li>Added compressed code <span class="amp">&amp;</span> styles</li>
<li>Cleaned up context.js code</li>
</ul>
<h3>Version 2.1.1</h3>
<ul>
<li>Fixed multiple menus becoming visible</li>
<li>Refined Support for IE7 <span class="amp">&amp;</span> IE8</li>
</ul>
<h2>Notes</h2>
<ul>
<li>Stray trailing commas are disliked by IE. Make sure when creating your menu, you take that into account, elsewise, you will get the <code>SCRIPT5007: Unable to get value of the property</code> error.</li>
</ul>
<h2>Credits</h2>
<ul>
<li><a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a></li>
<li><script type="text/javascript" async="" src="./ContextJS_files/ga.js"></script><script type="text/javascript" src="./ContextJS_files/code.js" data-color="#ddd" id="codejs"></script><a href="javascript:;" id="scripts" data-hovercolor="#ddd" style="position: relative;">More Code by @jakiestfu<ul class="scripts-list" id="scripts-list"><li><a href="http://sparkyjs.com/" target="_blank">Sparky.js</a></li><li><a href="http://lab.jakiestfu.com/slowjs/" target="_blank">Slow.js</a></li><li><a href="http://jakiestfu.com/2012/10/01/blurjs-take-ii/" target="_blank">Blur.js V2</a></li><li><a href="http://contextjs.com/" target="_blank">Context.js</a></li><li><a href="http://blurjs.com/" target="_blank">Blur.js</a></li><li><a href="http://docsjs.com/" target="_blank">Docs.js</a></li><li><a href="./ContextJS_files/code.js" target="_blank">Code.js</a></li></ul></a></li>
</ul>
<h4><a href="http://twitter.com/jakiestfu" target="_blank">Tweet to me with Bugs</a></h4>
<div class="finale">
<h1>Enjoy</h1>
<h1 class="toggle">Me Codesta</h1>
</div>
<img src="./ContextJS_files/mecodesta.png" class="me-codesta">
</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="donate"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHmAYJKoZIhvcNAQcEoIIHiTCCB4UCAQExggEwMIIBLAIB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NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIwODMwMTcwMTA5WjAjBgkqhkiG9w0BCQQxFgQUHXXPYfL/KUPFemp8MXkNaZdOKDAwDQYJKoZIhvcNAQEBBQAEgYCVx1jzmYpVsncIt2u0KTuc6EIIVVNc47Z6FF0nsensuafHgQh8PklHOxeFWHh9Pyi2M4CbtvkaKYWF2kp2YvuHbu7uSeVvwXrs2yxYGF1MYGdwk+dtIkYmvB3CFXgo8IhuiRx7MrztGaYaF7TkPJiRXRrJZMVJ+Mi5B2yvey7giQ==-----END PKCS7-----"><input type="image" src="./ContextJS_files/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="./ContextJS_files/pixel.gif" width="1" height="1"></form>
<script src="./ContextJS_files/jquery.min.js"></script>
<script src="./ContextJS_files/context.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34440227-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script src="./ContextJS_files/demo.js"></script>
<ul class="dropdown-menu dropdown-context" id="dropdown-1389265153119" style=""><li class="nav-header">Options</li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Open</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Open in new Window</a></li><li class="divider"></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Copy</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Dafuq!?</a></li></ul><ul class="dropdown-menu dropdown-context" id="dropdown-1389265153125" style=""><li class="nav-header">Download</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">The Script</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">Requires jQuery</li><li><a tabindex="-1" href="http://contextjs.com/context.js" target="_blank" id="event-108294607951324830">context.js</a></li></ul></li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">The Styles</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li><a tabindex="-1" href="http://contextjs.com/context.bootstrap.css" target="_blank" id="event-71434624908637220">context.bootstrap.css</a></li><li><a tabindex="-1" href="http://contextjs.com/context.standalone.css" target="_blank" id="event-4943005414829424">context.standalone.css</a></li></ul></li><li class="divider"></li><li class="nav-header">Meta</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">The Author</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">@jakiestfu</li><li><a tabindex="-1" href="http://jakiestfu.com/" target="_blank">Website</a></li><li><a tabindex="-1" href="http://forrst.com/people/jakiestfu" target="_blank">Forrst</a></li><li><a tabindex="-1" href="http://twitter.com/jakiestfu" target="_blank">Twitter</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm" target="_blank" id="event-11366967482909660">Donate?</a></li></ul></li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Hmm?</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">Well, thats lovely.</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">2nd Level</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">You like?</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">3rd Level!?</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">Of course you do</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">MENUCEPTION</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">FUCK</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">MAKE IT STOP!</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">NEVAH!</li><li class="dropdown-submenu"><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Shieeet</a><ul class="dropdown-menu dropdown-context dropdown-context-sub" id="dropdown-1389265153125"><li class="nav-header">WIN</li><li><a tabindex="-1" href="http://omglilwayne.com/" target="_blank" id="event-12167184211130056">Dont Click Me</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul><ul class="dropdown-menu dropdown-context compressed-context" id="dropdown-1389265153134" style="top: 590px; left: 892px;"><li class="nav-header">Compressed Menu</li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Back</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Reload</a></li><li class="divider"></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Save As</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Print</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">View Page Source</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">View Page Info</a></li><li class="divider"></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm">Inspect Element</a></li><li class="divider"></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm" id="event-68885323353194590">Disable This Menu</a></li><li><a tabindex="-1" href="./ContextJS_files/ContextJS.htm" id="event-2232549101092766">Donate?</a></li></ul></body></html>