-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit, its a test for mootools forge.
- Loading branch information
Fábio M. Costa
committed
Jul 19, 2009
0 parents
commit aec488a
Showing
15 changed files
with
829 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
Native: Class {#Class} | |||
====================== | |||
|
|||
The base Class of the [MooTools](http://mootools.net/) framework. | |||
|
|||
Class Method: constructor {#Class:constructor} | |||
---------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,74 @@ | |||
meioKeyboard - a mootools plugin for creating a virtual keyboard. | |||
=========== | |||
|
|||
What goes here is the description. Please don't make it too long. It can contain basic *styling*, **styling**, etc. | |||
|
|||
If an image is found within the description, that becomes the screenshot of the plugin. Screenshots are optional but encouraged, given the plugin has some visual interaction. The screenshot can be of any size, but try to keep it of about 200x100. | |||
|
|||
![Screenshot](http://url_to_project_screenshot) | |||
|
|||
How to use | |||
---------- | |||
|
|||
We expect this section for every plugin. It just explains how to use your plugin. | |||
Never should a plugin rely on a 3rd party link to explain its behavior or functionality. We need this to ensure that if a website is removed or becomes inaccessible, people can still enjoy your plugins' functionality. | |||
|
|||
It often include code snippets, which are just indented pieces of text: | |||
|
|||
#JS | |||
var script = new MyScript() | |||
script.doSomething(); | |||
|
|||
If the first line is #JS or #CSS or #HTML, then the code is highlighted accordingly. | |||
|
|||
Screenshots | |||
----------- | |||
|
|||
This section is optional, but encouraged if the plugin affords it. Just a list of images, one per line. We do the resizing, so use actual size screenshots. | |||
|
|||
![Screenshot 1](http://url_to_project_screenshot) | |||
![Screenshot 2](http://url_to_project_screenshot) | |||
![Screenshot 3](http://url_to_project_screenshot) | |||
![Screenshot 4](http://url_to_project_screenshot) | |||
|
|||
Arbitrary section | |||
----------------- | |||
|
|||
This is an arbitrary section which will become a Tab in your MooForge project page. | |||
Some arbitrary section examples: | |||
|
|||
* FAQ | |||
* Notes | |||
* Misc | |||
* Known issues | |||
|
|||
The name is up to you, but remember to keep it meaningful and simple. Arbitrary sections are always optional. | |||
|
|||
Created by Fabio M. Costa on 2009-07-15. | |||
Based on (C) 2008 Kishore Nallan's http://www.kishorelive.com http://designshack.co.uk/tutorials/creating-a-virtual-jquery-keyboard | |||
|
|||
Please report any bug at http://www.meiocodigo.com | |||
Copyright (c) 2008 Fabio M. Costa http://www.meiocodigo.com | |||
|
|||
The MIT License (http://www.opensource.org/licenses/mit-license.php) | |||
|
|||
Permission is hereby granted, free of charge, to any person | |||
obtaining a copy of this software and associated documentation | |||
files (the "Software"), to deal in the Software without | |||
restriction, including without limitation the rights to use, | |||
copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the | |||
Software is furnished to do so, subject to the following | |||
conditions: | |||
|
|||
The above copyright notice and this permission notice shall be | |||
included in all copies or substantial portions of the Software. | |||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |||
OTHER DEALINGS IN THE SOFTWARE. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,33 @@ | |||
// http://blog.kassens.net/outerclick-event | |||
// i changed the name for "clickout" cause i think its better :S | |||
(function(){ | |||
var $ = document.id || $; | |||
var events; | |||
var check = function(e){ | |||
var target = $(e.target), | |||
parents = target.getParents(); | |||
events.each(function(item){ | |||
var element = item.element; | |||
if (element != target && !parents.contains(element)) | |||
item.fn.call(element, e); | |||
}); | |||
}; | |||
Element.Events.clickout = { | |||
onAdd: function(fn){ | |||
if(!events) { | |||
document.addEvent('mousedown', check); | |||
events = []; | |||
} | |||
events.push({element: this, fn: fn}); | |||
}, | |||
onRemove: function(fn){ | |||
events = events.filter(function(item){ | |||
return item.element != this || item.fn != fn; | |||
}, this); | |||
if (!events.length) { | |||
document.removeEvent('mousedown', check); | |||
events = null; | |||
} | |||
} | |||
}; | |||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,59 @@ | |||
.mk-container{ | |||
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; | |||
position: absolute; | |||
width: 100%; | |||
overflow: hidden; | |||
position: fixed; | |||
_position: absolute; | |||
bottom: 0; | |||
left: 0; | |||
display: none; | |||
border-top: 1px solid #ccc; | |||
} | |||
.mk-container .mk-container1{ | |||
margin: 0 auto; | |||
width: 860px; | |||
overflow: hidden; | |||
padding: 10px 0; | |||
} | |||
.mk-container button{ | |||
font-size: 30px !important; | |||
width: 44px; | |||
margin-right: 10px; | |||
height: 40px; | |||
display: inline; | |||
float: left; | |||
} | |||
.mk-container .mk-spacebar button{ | |||
width: 400px; | |||
margin: 0 auto; | |||
margin-left: 150px; | |||
} | |||
.mk-container .mk-shift, .mk-container .mk-shifton{ | |||
width: 85px; | |||
text-align: left; | |||
} | |||
.mk-container .mk-shift-active{ | |||
display: none; | |||
} | |||
.mk-container .mk-row0, .mk-container .mk-row1, .mk-container .mk-row2, .mk-container .mk-row3{ | |||
padding-bottom: 10px; | |||
overflow: hidden; | |||
width: 100%; | |||
} | |||
.mk-container .mk-row0{ | |||
padding-left: 20px; | |||
} | |||
.mk-container .mk-row1{ | |||
padding-left: 60px; | |||
} | |||
.mk-container .mk-row2{ | |||
padding-left: 70px; | |||
} | |||
.mk-container .mk-backspace{ | |||
width: 125px; | |||
} | |||
.mk-container .mk-shifton{ | |||
border-left: 3px solid #000; | |||
border-top: 3px solid #000; | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,81 @@ | |||
if(typeof Meio == 'undefined') var Meio = {}; | |||
|
|||
|
|||
(function(){ | |||
var $ = document.id || $; | |||
|
|||
Meio.VirtualKeyboard = new Class({ | |||
|
|||
shiftOn: false, | |||
|
|||
initialize: function(element, inputs, parentContainer){ | |||
this.element = $(element); | |||
this.inputs = inputs; | |||
this.currentInput = null; | |||
this.divShiftActive = this.element.getElement('.mk-shift-active'); | |||
this.divShiftInactive = this.element.getElement('.mk-shift-inactive'); | |||
this.firstDocumentChild = parentContainer || $(document.body).getFirst(); | |||
this.setDetectInputFunction(); | |||
this.setButtonsClickEvent(); | |||
}, | |||
|
|||
setDetectInputFunction: function(){ | |||
this.inputs.each(function(input){ | |||
input.addEvents({ | |||
'focus': function(){ | |||
this.currentInput = input; | |||
this.element.setStyle('display', 'block'); | |||
}.bind(this), | |||
'mousedown': function(e){ | |||
e.stopPropagation(); | |||
}.bind(this) | |||
}); | |||
this.element.addEvent('clickout', function(){ | |||
this.element.setStyle('display', 'none'); | |||
}.bind(this)); | |||
}, this); | |||
}, | |||
|
|||
setButtonsClickEvent: function(){ | |||
this.element.getElements('button').each(function(btn){ | |||
btn.addEvent('click', function(e){ | |||
if(this.currentInput){ | |||
this.currentInput.focus(); | |||
if(btn.get('text') == 'Apagar'){ | |||
var range = this.currentInput.getSelectedRange(); | |||
if(range.start === range.end && range.end){ | |||
this.currentInput.selectRange(range.start-1, range.start); | |||
} | |||
this.currentInput.insertAtCursor('', false); | |||
} | |||
else if(btn.get('text') == 'Shift'){ | |||
this.shiftPressed(); | |||
} | |||
else{ | |||
this.currentInput.insertAtCursor(btn.get('text'), false); | |||
if(this.shiftOn) this.shiftPressed(false); | |||
} | |||
} | |||
}.bind(this)); | |||
}, this); | |||
}, | |||
|
|||
shiftPressed: function(shiftActive){ | |||
if(typeof shiftActive == 'undefined') shiftActive = !this.shiftOn; | |||
var activeStyle, inactiveStyle; | |||
if(shiftActive){ | |||
activeStyle = 'block'; | |||
inactiveStyle = 'none'; | |||
} | |||
else{ | |||
activeStyle = 'none'; | |||
inactiveStyle = 'block'; | |||
} | |||
this.divShiftActive.setStyle('display', activeStyle); | |||
this.divShiftInactive.setStyle('display', inactiveStyle); | |||
this.shiftOn = shiftActive; | |||
} | |||
|
|||
}); | |||
|
|||
})(); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |||
<title>Plugin's Test Options</title> | |||
</head> | |||
<body> | |||
<ul> | |||
<li><a title="user-tests" href="user/">user-tests</a></li> | |||
<li><a title="unit-tests" href="unit/">unit-tests</a></li> | |||
</ul> | |||
</body> | |||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head> | |||
<title>Plugin Specs</title> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
|
|||
<script src="../../../../assets/mootools/mootools-core-1.2.3.js" type="text/javascript" charset="utf-8"></script> | |||
<script src="../../../../assets/firebug/firebug-lite-compressed.js" type="text/javascript" charset="utf-8"></script> | |||
<script src="../../../../assets/js-spec/JSSpec.js" type="text/javascript" charset="utf-8"></script> | |||
<script src="../../../../assets/js-spec/DiffMatchPatch.js" type="text/javascript" charset="utf-8"></script> | |||
<script src="../../../../assets/js-spec/Builder.js" type="text/javascript" charset="utf-8"></script> | |||
|
|||
<link href="../../../../assets/js-spec/Specs.css" rel="stylesheet" type="text/css" /> | |||
|
|||
<script type="text/javascript" charset="utf-8"> | |||
Builder.build('../../', { | |||
source: [ | |||
'moo.meio.template', | |||
], | |||
tests: { | |||
unit: { | |||
'meio': ['moo.meio.template'] | |||
} | |||
} | |||
}); | |||
</script> | |||
</head> | |||
<body> | |||
</body> | |||
</html> |
Binary file not shown.
Oops, something went wrong.