Permalink
Browse files

Merge branch 'release/0.0.19'

  • Loading branch information...
2 parents 77bdd0a + 6b14f43 commit 4ec880ca7bcff9f0eb4da39bdf4ce729d3cfa3fd @jagthedrummer committed Jul 5, 2012
Showing with 16 additions and 16 deletions.
  1. +5 −5 README.md
  2. +1 −1 VERSION
  3. +10 −10 js/codemirror-ui.js
View
@@ -38,11 +38,11 @@ Installation
--------------------
// First the CodeMirror stuff
- <script src="lib/CodeMirror-2.0/lib/codemirror.js" type="text/javascript"></script>
- <script src="lib/CodeMirror-2.0/lib/util/searchcursor.js" type="text/javascript"></script>
- <link rel="stylesheet" href="lib/CodeMirror-2.0/lib/codemirror.css">
- <script src="lib/CodeMirror-2.0/mode/javascript/javascript.js"></script>
- <link rel="stylesheet" href="lib/CodeMirror-2.0/mode/javascript/javascript.css">
+ <script src="lib/CodeMirror-2.3/lib/codemirror.js" type="text/javascript"></script>
+ <script src="lib/CodeMirror-2.3/lib/util/searchcursor.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="lib/CodeMirror-2.3/lib/codemirror.css">
+ <script src="lib/CodeMirror-2.3/mode/javascript/javascript.js"></script>
+ <link rel="stylesheet" href="lib/CodeMirror-2.3/mode/javascript/javascript.css">
//Then the CodeMirrorUI stuff
<script src="js/codemirror-ui.js" type="text/javascript"></script>
View
@@ -1,3 +1,3 @@
-0.0.18
+0.0.19
View
@@ -46,7 +46,7 @@ CodeMirrorUI.prototype = {
*/
this.self = this;
- var onChange = this.editorChanged.bind(this);
+ var onChange = this.editorChanged.cmuiBind(this);
// preserve custom onChance handler
if (mirrorOptions.onChange) {
mirrorOptions.onChange = function() {
@@ -127,7 +127,7 @@ CodeMirrorUI.prototype = {
this.findButton = document.createElement("input");
this.findButton.type = "button";
this.findButton.value = "Find";
- this.findButton.onclick = function(){this.find()}.bind(this);
+ this.findButton.onclick = function(){this.find()}.cmuiBind(this);
this.connect(this.findString, "keyup", function(e){
var code = e.keyCode;
@@ -140,7 +140,7 @@ CodeMirrorUI.prototype = {
}
this.findString.focus();
- }.bind(this) );
+ }.cmuiBind(this) );
var regLabel = document.createElement("label");
regLabel.title = "Regular Expressions"
@@ -167,12 +167,12 @@ CodeMirrorUI.prototype = {
if (code == 13){
this.replace()
}
- }.bind(this) );
+ }.cmuiBind(this) );
this.replaceButton = document.createElement("input");
this.replaceButton.type = "button";
this.replaceButton.value = "Replace";
- this.replaceButton.onclick = this.replace.bind(this);
+ this.replaceButton.onclick = this.replace.cmuiBind(this);
var replaceAllLabel = document.createElement("label");
replaceAllLabel.title = "Replace All"
@@ -275,7 +275,7 @@ CodeMirrorUI.prototype = {
this.wordWrap.checked = true;
label.appendChild(this.wordWrap);
label.appendChild(document.createTextNode("Word Wrap"));
- this.wordWrap.onchange = this.toggleWordWrap.bind(this);
+ this.wordWrap.onchange = this.toggleWordWrap.cmuiBind(this);
wrapDiv.appendChild(label);
this.buttonFrame.appendChild(wrapDiv);
},
@@ -291,19 +291,19 @@ CodeMirrorUI.prototype = {
//button.href = "#";
button.className = "codemirror-ui-button " + action;
button.title = name;
- button.func = func.bind(this);
+ button.func = func.cmuiBind(this);
button.onclick = function(event) {
//alert(event.target);
event.target.func();
return false;
//this.self[action].call(this);
//eval("this."+action)();
}
- .bind(this, func);
+ .cmuiBind(this, func);
var img = document.createElement("img");
img.src = image;
img.border = 0;
- img.func = func.bind(this);
+ img.func = func.cmuiBind(this);
button.appendChild(img);
frame.appendChild(button);
if (action == 'save') {
@@ -494,7 +494,7 @@ CodeMirrorUI.prototype = {
/*
* This makes coding callbacks much more sane
*/
-Function.prototype.bind = function(scope) {
+Function.prototype.cmuiBind = function(scope) {
var _function = this;
return function() {

0 comments on commit 4ec880c

Please sign in to comment.