Skip to content
Browse files

add tests files.

Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
  • Loading branch information...
1 parent c110d87 commit 658b818f5084fa376c2e48f6521516885d0f4149 @holyshared committed May 28, 2011
Showing with 55 additions and 10 deletions.
  1. +25 −0 README.md
  2. +11 −8 Source/Class.Attachment.js
  3. +17 −0 Tests/Class.Attachment.html
  4. +2 −2 package.yml
View
25 README.md
@@ -0,0 +1,25 @@
+Mixin
+===========================================
+
+
+
+
+
+![Mixin](http://holyshared.github.com/class-attachment/logo.png "Mixin")
+
+How to use
+-----------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+Screenshots
+------------------------------------------------------------------------
View
19 Source/Class.Attachment.js
@@ -1,6 +1,6 @@
/*
---
-name: Class.Attachment
+name: Attachment
description:
@@ -24,19 +24,22 @@ provides: [Attachment]
var Attachment = this.Attachment = new Class({
- handlers: {},
+ _attachHandlers: {},
-// attachEvent: 'click',
-// attachHandler: null,
+ attach: function(selecter){
+ if (!Type.isFunction(this.attachHandler)){
- attach: funmction(selecter){
+ }
var elements = $$(selecter);
- this.handlers[selecter] = elements;
+ this._attachHandlers[selecter] = elements;
elements.addEvent(this.attachEvent, this.attachHandler);
},
- dettach: funmction(selecter){
- var handler = this.handlers[selecter];
+ dettach: function(selecter){
+ if (!this._attachHandlers[selecter]){
+
+ }
+ var handler = this._attachHandlers[selecter];
elements.removeEvent(this.attachEvent, this.attachHandler);
}
View
17 Tests/Class.Attachment.html
@@ -0,0 +1,17 @@
+<script type="text/javascript" src="/depender/build?require=Mixin/Attachment"></script>
+<script type="text/javascript">
+(function(){
+
+ window.addEventListener('load', function(){
+
+
+
+
+
+
+
+
+ }, false);
+
+}());
+</script>
View
4 package.yml
@@ -1,4 +1,4 @@
-name: Class.Attachment
+name: Class
web: "[http://sharedhat.com](http://sharedhat.com)"
@@ -15,7 +15,7 @@ sources:
author: Noritaka Horio
-category: Realtime
+category: Utilities
tags: [utils, mixin, class]

0 comments on commit 658b818

Please sign in to comment.
Something went wrong with that request. Please try again.