-
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.
- Loading branch information
Daniel Kocsan
committed
May 22, 2012
1 parent
5f328b1
commit bc90fef
Showing
6 changed files
with
99 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
var uppit = function () { | ||
var uppit = function (document) { | ||
"use strict"; | ||
var element = null, | ||
plugins = {}; | ||
|
||
function setElement (elmnt) { | ||
plugins = {}, | ||
filesNode, | ||
createNodes; | ||
|
||
function setElement(elmnt) { | ||
var event = document.createEvent('Event'); | ||
|
||
element = elmnt; | ||
createNodes(); | ||
|
||
event.initEvent('elementSet', true, true); | ||
event.element = elmnt; | ||
event.elements = { | ||
element: elmnt, | ||
files: filesNode | ||
}; | ||
document.dispatchEvent(event); | ||
element = elmnt; | ||
} | ||
|
||
}; | ||
|
||
createNodes = function () { | ||
var clearNode = document.createElement('div'); | ||
clearNode.setAttribute('class', 'clear'); | ||
|
||
filesNode = document.createElement('div'); | ||
filesNode.setAttribute('id', 'files'); | ||
|
||
element.appendChild(filesNode); | ||
element.appendChild(clearNode); | ||
}; | ||
|
||
return { | ||
setElement: setElement, | ||
getElement: function () { | ||
return element; | ||
}, | ||
plugins: plugins | ||
} | ||
}(); | ||
}; | ||
}(window.document); |