Permalink
Browse files

not changing camelcase right now

  • Loading branch information...
1 parent ff1ed7a commit d25db186488e046f7064bd4f9f3599b9e3d78942 @jonrohan jonrohan committed Dec 10, 2012
Showing with 45 additions and 45 deletions.
  1. +6 −6 Makefile
  2. +1 −1 ZeroClipboard.min.js
  3. +1 −1 index.js
  4. +2 −2 package.json
  5. +17 −17 src/javascript/ZeroClipboard.js
  6. +1 −1 test.js
  7. +17 −17 zeroclipboard.js
View
@@ -5,7 +5,7 @@ JS_TEST = $(NODE_PATH)/nodeunit/bin/nodeunit
all: \
node_modules \
- zeroclipboard.min.js \
+ ZeroClipboard.min.js \
LICENSE \
test \
@@ -17,17 +17,17 @@ LICENSE: Makefile
@node src/build.js ./src/license.js $@
@chmod a-w $@
-zeroclipboard.js: Makefile
+ZeroClipboard.js: Makefile
@rm -f $@
- @node src/build.js ./src/javascript/zeroclipboard.js $@
+ @node src/build.js ./src/javascript/ZeroClipboard.js $@
@chmod a-w $@
-zeroclipboard.min.js: zeroclipboard.js
+ZeroClipboard.min.js: ZeroClipboard.js
@rm -f $@
- $(JS_COMPILER) ./zeroclipboard.js > $@
+ $(JS_COMPILER) ./ZeroClipboard.js > $@
@chmod a-w $@
-test: zeroclipboard.min.js
+test: ZeroClipboard.min.js
$(JS_TEST) ./test.js
testpage:
View
Oops, something went wrong.
View
@@ -12,7 +12,7 @@ exports = module.exports = setup;
var http = require('http');
var send = require('send');
var root = __dirname;
-var swf = '/zeroclipboard.swf';
+var swf = '/ZeroClipboard.swf';
function setup () {
return http.createServer(onReq);
View
@@ -1,7 +1,7 @@
{
"name": "zeroclipboard",
"version": "1.0.8",
- "main": "./zeroclipboard.min.js",
+ "main": "./ZeroClipboard.js",
"description": "The Zero Clipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.",
"keywords": [
"flash",
@@ -36,7 +36,7 @@
},
"component": {
"scripts": {
- "zeroclipboard": "src/javascript/zeroclipboard.js"
+ "zeroclipboard": "src/javascript/ZeroClipboard.js"
}
},
"scripts": {
@@ -5,12 +5,12 @@
{{/each}}// License: {{license}}
(function(){
"use strict";
-var zeroclipboard;
-zeroclipboard = {
+var ZeroClipboard;
+ZeroClipboard = {
version: "{{version}}",
clients: {}, // registered upload clients on page, indexed by id
- moviePath: 'zeroclipboard.swf', // URL to movie
+ moviePath: 'ZeroClipboard.swf', // URL to movie
nextId: 1, // ID of next movie
$: function(thingy) {
@@ -41,13 +41,13 @@ zeroclipboard = {
},
setMoviePath: function(path) {
- // set path to zeroclipboard.swf
+ // set path to ZeroClipboard.swf
this.moviePath = path;
},
// use this method in JSNI calls to obtain a new Client instance
newClient: function() {
- return new zeroclipboard.Client();
+ return new ZeroClipboard.Client();
},
dispatch: function(id, eventName, args) {
@@ -88,18 +88,18 @@ zeroclipboard = {
this.handlers = {};
// unique ID
- this.id = zeroclipboard.nextId++;
+ this.id = ZeroClipboard.nextId++;
this.movieId = 'ZeroClipboardMovie_' + this.id;
// register client with singleton to receive flash events
- zeroclipboard.register(this.id, this);
+ ZeroClipboard.register(this.id, this);
// create movie
if (elem) this.glue(elem);
}
};
-zeroclipboard.Client.prototype = {
+ZeroClipboard.Client.prototype = {
id: 0, // unique ID for us
title: "", // tooltip for the flash element
@@ -114,7 +114,7 @@ zeroclipboard.Client.prototype = {
glue: function(elem, appendElem, stylesToAdd) {
// glue to DOM element
// elem can be ID or actual DOM element object
- this.domElement = zeroclipboard.$(elem);
+ this.domElement = ZeroClipboard.$(elem);
// float just above object, or default zIndex if dom element isn't set
if (this.domElement.style.zIndex) {
@@ -127,14 +127,14 @@ zeroclipboard.Client.prototype = {
}
if (typeof(appendElem) == 'string') {
- appendElem = zeroclipboard.$(appendElem);
+ appendElem = ZeroClipboard.$(appendElem);
}
else if (typeof(appendElem) == 'undefined') {
appendElem = document.getElementsByTagName('body')[0];
}
// find X/Y position of domElement
- var box = zeroclipboard.getDOMObjectPosition(this.domElement, appendElem);
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
// create floating DIV above element
this.div = document.createElement('div');
@@ -170,11 +170,11 @@ zeroclipboard.Client.prototype = {
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
- html += '<object' + title + ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+zeroclipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
+ html += '<object' + title + ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
}
else {
// all other browsers get an EMBED tag
- html += '<embed' + title + ' id="'+this.movieId+'" src="'+zeroclipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
+ html += '<embed' + title + ' id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
}
return html;
},
@@ -209,12 +209,12 @@ zeroclipboard.Client.prototype = {
// reposition our floating div, optionally to new container
// warning: container CANNOT change size, only position
if (elem) {
- this.domElement = zeroclipboard.$(elem);
+ this.domElement = ZeroClipboard.$(elem);
if (!this.domElement) this.hide();
}
if (this.domElement && this.div) {
- var box = zeroclipboard.getDOMObjectPosition(this.domElement);
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
var style = this.div.style;
style.left = '' + box.left + 'px';
style.top = '' + box.top + 'px';
@@ -342,9 +342,9 @@ zeroclipboard.Client.prototype = {
};
if (typeof module !== "undefined") {
- module.exports = zeroclipboard;
+ module.exports = ZeroClipboard;
} else {
- window.ZeroClipboard = zeroclipboard;
+ window.ZeroClipboard = ZeroClipboard;
}
})();
View
@@ -1,6 +1,6 @@
"use strict";
-var zeroClipboard = require("./zeroclipboard.min")
+var zeroClipboard = require("./ZeroClipboard")
exports.client = {
"simple": function (test) {
Oops, something went wrong.

0 comments on commit d25db18

Please sign in to comment.