Permalink
Browse files

Update jQuery & move deps in their own folders

  • Loading branch information...
Seldaek committed Dec 16, 2011
1 parent 2bb3c5d commit 4913b59fe082f5bd2525c3259588f324dcfc42f6
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2008 Tom Preston-Werner
+
+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.
File renamed without changes.
View
@@ -73,10 +73,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Debug Console</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
- <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="jquery.selections.js"></script>
- <script type="text/javascript" src="ace.js"></script>
- <script type="text/javascript" src="mode-php.js"></script>
+ <script type="text/javascript" src="jquery-1.7.1.min.js"></script>
+ <script type="text/javascript" src="ace/ace.js"></script>
+ <script type="text/javascript" src="ace/mode-php.js"></script>
<script type="text/javascript" src="php-console.js"></script>
<script type="text/javascript">
$.console({
@@ -94,13 +93,13 @@
<span class="position">Line: 1, Column: 1</span>
<span class="copy">
Copy selection: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="110" height="14" id="clippy">
- <param name="movie" value="clippy.swf"/>
+ <param name="movie" value="clippy/clippy.swf"/>
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param NAME="FlashVars" value="text=">
<param name="bgcolor" value="#E8E8E8">
- <embed src="clippy.swf"
+ <embed src="clippy/clippy.swf"
width="110"
height="14"
name="clippy"
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,192 +0,0 @@
-/**
- * jQuery Selections plugin
- *
- * Provides text input utilities
- *
- * Note that most functions act only on the first of
- * the given elements, since browsers can only have
- * one in focus at a time
- *
- * Copyright (C) 2010, Jordi Boggiano
- * http://seld.be/ - j.boggiano@seld.be
- *
- * Licensed under the new BSD License
- * See the LICENSE file for details
- *
- * Source on Github http://github.com/Seldaek/jquery-selections
- */
-(function($) {
- /**
- * sets the caret position
- *
- * @param int index
- * @see $.fn.setSelection
- */
- $.fn.setCaret = function(index) {
- this.setSelection(index, index);
- };
-
- /**
- * returns the caret position, or 0 if the element has no caret
- *
- * @return int
- */
- $.fn.getCaret = function() {
- var elem, range, elemRange, elemRangeCopy, value, caret, pos, match;
- elem = this.get(0);
-
- value = $(elem).val();
-
- // standard browsers
- if (elem.selectionStart) {
- caret = elem.selectionStart;
- } else if (document.selection) {
- // old IE handling
- elem.focus();
- range = document.selection.createRange();
-
- // handle input texts
- if (elem.nodeName === 'INPUT') {
- elemRange = elem.createTextRange();
- elemRangeCopy = elemRange.duplicate();
- elemRange.moveToBookmark(range.getBookmark());
- elemRangeCopy.setEndPoint('EndToStart', elemRange);
- caret = elemRangeCopy.text.length;
- } else {
- // handle textareas
- elemRangeCopy = range.duplicate();
- elemRangeCopy.moveToElementText(elem);
-
- pos = 0;
- if (range.text.length > 1) {
- pos = Math.max(0, pos - range.text.length);
- }
-
- caret = -1 + pos;
- elemRangeCopy .moveStart('character', pos);
-
- while (elemRangeCopy.inRange(range)) {
- elemRangeCopy.moveStart('character');
- caret++;
- }
- }
- } else {
- caret = 0;
- }
-
- if ($.browser.opera) {
- match = value.replace(/\r?\n/g, "\r\n").substr(0, caret).match(/\r\n/g);
- if (match) {
- caret -= match.length;
- }
- }
-
- return caret;
- };
-
- /**
- * selects a range of text
- *
- * @param int start index of the beginning of the selection
- * @param int end index of the end of the selection
- * @return object chainable
- */
- $.fn.setSelection = function(start, end) {
- var elem, range, match;
- elem = this.get(0);
- end = end || start;
-
- // standard browsers
- if (elem.setSelectionRange) {
- elem.focus();
-
- if ($.browser.opera) {
- match = this.val().replace(/\r?\n/g, "\n").substr(0, start).match(/\n/g);
- if (match) {
- start += match.length;
- }
- match = this.val().replace(/\r?\n/g, "\n").substr(0, end).match(/\n/g);
- if (match) {
- end += match.length;
- }
- }
- elem.setSelectionRange(start, end);
- } else if (elem.createTextRange) {
- // old IE handling
- range = elem.createTextRange();
- range.collapse(true);
- range.moveEnd('character', end);
- range.moveStart('character', start);
- range.select();
- }
-
- return this;
- };
-
- /**
- * reads the text the user selected
- *
- * @param int start index of the beginning of the selection
- * @param int end index of the end of the selection
- * @return string
- */
- $.fn.getSelectedText = function() {
- var elem = this.get(0);
-
- // standard browsers
- if (elem.selectionStart) {
- return elem.value.substring(elem.selectionStart, elem.selectionEnd);
- }
-
- // old IE
- if (document.selection) {
- elem.focus();
- return document.selection.createRange().text;
- }
-
- return '';
- };
-
- /**
- * injects the given text in place of the current selection
- *
- * @param string text
- * @return object chainable
- */
- $.fn.replaceSelection = function(text) {
- var elem = this.get(0);
-
- // standard browsers
- if (elem.selectionStart) {
- elem.value = elem.value.substr(0, elem.selectionStart) + text + elem.value.substr(elem.selectionEnd);
- return this;
- }
-
- // old IE
- if (document.selection) {
- elem.focus();
- document.selection.createRange().text = text;
- return this;
- }
-
- return this;
- };
-
- /**
- * injects the given text at the current caret position
- *
- * @param string text
- * @return object chainable
- */
- $.fn.injectText = function(text) {
- var $elem, caret;
- $elem = this.first();
- caret = $elem.getCaret();
- $elem.val(function(idx, val) {
- return val.substring(0, caret) + text + val.substring(caret);
- });
- $elem.setCaret(caret + text.length);
-
- return this;
- };
-}(jQuery));

0 comments on commit 4913b59

Please sign in to comment.