Changeset 9795
- Timestamp:
- 04/23/2015 09:00:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/js/jquery.caret.js
-
Property
svn:executable
set to
*
r9604 r9795 1 (function (root, factory) { 2 if (typeof define === 'function' && define.amd) { 3 // AMD. Register as an anonymous module. 4 define(["jquery"], function ($) { 5 return (root.returnExportsGlobal = factory($)); 6 }); 7 } else if (typeof exports === 'object') { 8 // Node. Does not work with strict CommonJS, but 9 // only CommonJS-like enviroments that support module.exports, 10 // like Node. 11 module.exports = factory(require("jquery")); 12 } else { 13 factory(jQuery); 14 } 15 }(this, function ($) { 16 1 17 /* 2 18 Implement Github like autocomplete mentions … … 6 22 Licensed under the MIT license. 7 23 */ 8 9 24 10 25 /* … … 14 29 */ 15 30 16 17 (function() { 18 (function(factory) { 19 if (typeof define === 'function' && define.amd) { 20 return define(['jquery'], factory); 21 } else { 22 return factory(window.jQuery); 23 } 24 })(function($) { 25 "use strict"; 26 var EditableCaret, InputCaret, Mirror, Utils, discoveryIframeOf, methods, oDocument, oFrame, oWindow, pluginName, setContextBy; 27 pluginName = 'caret'; 28 EditableCaret = (function() { 29 function EditableCaret($inputor) { 30 this.$inputor = $inputor; 31 this.domInputor = this.$inputor[0]; 31 "use strict"; 32 var EditableCaret, InputCaret, Mirror, Utils, discoveryIframeOf, methods, oDocument, oFrame, oWindow, pluginName, setContextBy; 33 34 pluginName = 'caret'; 35 36 EditableCaret = (function() { 37 function EditableCaret($inputor) { 38 this.$inputor = $inputor; 39 this.domInputor = this.$inputor[0]; 40 } 41 42 EditableCaret.prototype.setPos = function(pos) { 43 return this.domInputor; 44 }; 45 46 EditableCaret.prototype.getIEPosition = function() { 47 return this.getPosition(); 48 }; 49 50 EditableCaret.prototype.getPosition = function() { 51 var inputor_offset, offset; 52 offset = this.getOffset(); 53 inputor_offset = this.$inputor.offset(); 54 offset.left -= inputor_offset.left; 55 offset.top -= inputor_offset.top; 56 return offset; 57 }; 58 59 EditableCaret.prototype.getOldIEPos = function() { 60 var preCaretTextRange, textRange; 61 textRange = oDocument.selection.createRange(); 62 preCaretTextRange = oDocument.body.createTextRange(); 63 preCaretTextRange.moveToElementText(this.domInputor); 64 preCaretTextRange.setEndPoint("EndToEnd", textRange); 65 return preCaretTextRange.text.length; 66 }; 67 68 EditableCaret.prototype.getPos = function() { 69 var clonedRange, pos, range; 70 if (range = this.range()) { 71 clonedRange = range.cloneRange(); 72 clonedRange.selectNodeContents(this.domInputor); 73 clonedRange.setEnd(range.endContainer, range.endOffset); 74 pos = clonedRange.toString().length; 75 clonedRange.detach(); 76 return pos; 77 } else if (oDocument.selection) { 78 return this.getOldIEPos(); 79 } 80 }; 81 82 EditableCaret.prototype.getOldIEOffset = function() { 83 var range, rect; 84 range = oDocument.selection.createRange().duplicate(); 85 range.moveStart("character", -1); 86 rect = range.getBoundingClientRect(); 87 return { 88 height: rect.bottom - rect.top, 89 left: rect.left, 90 top: rect.top 91 }; 92 }; 93 94 EditableCaret.prototype.getOffset = function(pos) { 95 var clonedRange, offset, range, rect, shadowCaret; 96 if (oWindow.getSelection && (range = this.range())) { 97 if (range.endOffset - 1 > 0 && range.endContainer === !this.domInputor) { 98 clonedRange = range.cloneRange(); 99 clonedRange.setStart(range.endContainer, range.endOffset - 1); 100 clonedRange.setEnd(range.endContainer, range.endOffset); 101 rect = clonedRange.getBoundingClientRect(); 102 offset = { 103 height: rect.height, 104 left: rect.left + rect.width, 105 top: rect.top 106 }; 107 clonedRange.detach(); 32 108 } 33 34 EditableCaret.prototype.setPos = function(pos) { 35 return this.domInputor; 36 }; 37 38 EditableCaret.prototype.getIEPosition = function() { 39 return this.getPosition(); 40 }; 41 42 EditableCaret.prototype.getPosition = function() { 43 var inputor_offset, offset; 44 offset = this.getOffset(); 45 inputor_offset = this.$inputor.offset(); 46 offset.left -= inputor_offset.left; 47 offset.top -= inputor_offset.top; 48 return offset; 49 }; 50 51 EditableCaret.prototype.getOldIEPos = function() { 52 var preCaretTextRange, textRange; 53 textRange = oDocument.selection.createRange(); 54 preCaretTextRange = oDocument.body.createTextRange(); 55 preCaretTextRange.moveToElementText(this.domInputor); 56 preCaretTextRange.setEndPoint("EndToEnd", textRange); 57 return preCaretTextRange.text.length; 58 }; 59 60 EditableCaret.prototype.getPos = function() { 61 var clonedRange, pos, range; 62 if (range = this.range()) { 63 clonedRange = range.cloneRange(); 64 clonedRange.selectNodeContents(this.domInputor); 65 clonedRange.setEnd(range.endContainer, range.endOffset); 66 pos = clonedRange.toString().length; 67 clonedRange.detach(); 68 return pos; 69 } else if (oDocument.selection) { 70 return this.getOldIEPos(); 71 } 72 }; 73 74 EditableCaret.prototype.getOldIEOffset = function() { 75 var range, rect; 76 range = oDocument.selection.createRange().duplicate(); 77 range.moveStart("character", -1); 78 rect = range.getBoundingClientRect(); 79 return { 80 height: rect.bottom - rect.top, 109 if (!offset || (offset != null ? offset.height : void 0) === 0) { 110 clonedRange = range.cloneRange(); 111 shadowCaret = $(oDocument.createTextNode("|")); 112 clonedRange.insertNode(shadowCaret[0]); 113 clonedRange.selectNode(shadowCaret[0]); 114 rect = clonedRange.getBoundingClientRect(); 115 offset = { 116 height: rect.height, 81 117 left: rect.left, 82 118 top: rect.top 83 119 }; 120 shadowCaret.remove(); 121 clonedRange.detach(); 122 } 123 } else if (oDocument.selection) { 124 offset = this.getOldIEOffset(); 125 } 126 if (offset) { 127 offset.top += $(oWindow).scrollTop(); 128 offset.left += $(oWindow).scrollLeft(); 129 } 130 return offset; 131 }; 132 133 EditableCaret.prototype.range = function() { 134 var sel; 135 if (!oWindow.getSelection) { 136 return; 137 } 138 sel = oWindow.getSelection(); 139 if (sel.rangeCount > 0) { 140 return sel.getRangeAt(0); 141 } else { 142 return null; 143 } 144 }; 145 146 return EditableCaret; 147 148 })(); 149 150 InputCaret = (function() { 151 function InputCaret($inputor) { 152 this.$inputor = $inputor; 153 this.domInputor = this.$inputor[0]; 154 } 155 156 InputCaret.prototype.getIEPos = function() { 157 var endRange, inputor, len, normalizedValue, pos, range, textInputRange; 158 inputor = this.domInputor; 159 range = oDocument.selection.createRange(); 160 pos = 0; 161 if (range && range.parentElement() === inputor) { 162 normalizedValue = inputor.value.replace(/\r\n/g, "\n"); 163 len = normalizedValue.length; 164 textInputRange = inputor.createTextRange(); 165 textInputRange.moveToBookmark(range.getBookmark()); 166 endRange = inputor.createTextRange(); 167 endRange.collapse(false); 168 if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) { 169 pos = len; 170 } else { 171 pos = -textInputRange.moveStart("character", -len); 172 } 173 } 174 return pos; 175 }; 176 177 InputCaret.prototype.getPos = function() { 178 if (oDocument.selection) { 179 return this.getIEPos(); 180 } else { 181 return this.domInputor.selectionStart; 182 } 183 }; 184 185 InputCaret.prototype.setPos = function(pos) { 186 var inputor, range; 187 inputor = this.domInputor; 188 if (oDocument.selection) { 189 range = inputor.createTextRange(); 190 range.move("character", pos); 191 range.select(); 192 } else if (inputor.setSelectionRange) { 193 inputor.setSelectionRange(pos, pos); 194 } 195 return inputor; 196 }; 197 198 InputCaret.prototype.getIEOffset = function(pos) { 199 var h, textRange, x, y; 200 textRange = this.domInputor.createTextRange(); 201 pos || (pos = this.getPos()); 202 textRange.move('character', pos); 203 x = textRange.boundingLeft; 204 y = textRange.boundingTop; 205 h = textRange.boundingHeight; 206 return { 207 left: x, 208 top: y, 209 height: h 210 }; 211 }; 212 213 InputCaret.prototype.getOffset = function(pos) { 214 var $inputor, offset, position; 215 $inputor = this.$inputor; 216 if (oDocument.selection) { 217 offset = this.getIEOffset(pos); 218 offset.top += $(oWindow).scrollTop() + $inputor.scrollTop(); 219 offset.left += $(oWindow).scrollLeft() + $inputor.scrollLeft(); 220 return offset; 221 } else { 222 offset = $inputor.offset(); 223 position = this.getPosition(pos); 224 return offset = { 225 left: offset.left + position.left - $inputor.scrollLeft(), 226 top: offset.top + position.top - $inputor.scrollTop(), 227 height: position.height 84 228 }; 85 86 EditableCaret.prototype.getOffset = function(pos) { 87 var clonedRange, offset, range, rect, shadowCaret; 88 if (oWindow.getSelection && (range = this.range())) { 89 if (range.endOffset - 1 > 0 && range.endContainer === !this.domInputor) { 90 clonedRange = range.cloneRange(); 91 clonedRange.setStart(range.endContainer, range.endOffset - 1); 92 clonedRange.setEnd(range.endContainer, range.endOffset); 93 rect = clonedRange.getBoundingClientRect(); 94 offset = { 95 height: rect.height, 96 left: rect.left + rect.width, 97 top: rect.top 98 }; 99 clonedRange.detach(); 100 } 101 if (!offset || (offset != null ? offset.height : void 0) === 0) { 102 clonedRange = range.cloneRange(); 103 shadowCaret = $(oDocument.createTextNode("|")); 104 clonedRange.insertNode(shadowCaret[0]); 105 clonedRange.selectNode(shadowCaret[0]); 106 rect = clonedRange.getBoundingClientRect(); 107 offset = { 108 height: rect.height, 109 left: rect.left, 110 top: rect.top 111 }; 112 shadowCaret.remove(); 113 clonedRange.detach(); 114 } 115 } else if (oDocument.selection) { 116 offset = this.getOldIEOffset(); 117 } 118 if (offset) { 119 offset.top += $(oWindow).scrollTop(); 120 offset.left += $(oWindow).scrollLeft(); 121 } 122 return offset; 123 }; 124 125 EditableCaret.prototype.range = function() { 126 var sel; 127 if (!oWindow.getSelection) { 128 return; 129 } 130 sel = oWindow.getSelection(); 131 if (sel.rangeCount > 0) { 132 return sel.getRangeAt(0); 133 } else { 134 return null; 135 } 136 }; 137 138 return EditableCaret; 139 140 })(); 141 InputCaret = (function() { 142 function InputCaret($inputor) { 143 this.$inputor = $inputor; 144 this.domInputor = this.$inputor[0]; 229 } 230 }; 231 232 InputCaret.prototype.getPosition = function(pos) { 233 var $inputor, at_rect, end_range, format, html, mirror, start_range; 234 $inputor = this.$inputor; 235 format = function(value) { 236 value = value.replace(/<|>|`|"|&/g, '?').replace(/\r\n|\r|\n/g, "<br/>"); 237 if (/firefox/i.test(navigator.userAgent)) { 238 value = value.replace(/\s/g, ' '); 145 239 } 146 147 InputCaret.prototype.getIEPos = function() { 148 var endRange, inputor, len, normalizedValue, pos, range, textInputRange; 149 inputor = this.domInputor; 150 range = oDocument.selection.createRange(); 151 pos = 0; 152 if (range && range.parentElement() === inputor) { 153 normalizedValue = inputor.value.replace(/\r\n/g, "\n"); 154 len = normalizedValue.length; 155 textInputRange = inputor.createTextRange(); 156 textInputRange.moveToBookmark(range.getBookmark()); 157 endRange = inputor.createTextRange(); 158 endRange.collapse(false); 159 if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) { 160 pos = len; 161 } else { 162 pos = -textInputRange.moveStart("character", -len); 163 } 164 } 165 return pos; 166 }; 167 168 InputCaret.prototype.getPos = function() { 169 if (oDocument.selection) { 170 return this.getIEPos(); 171 } else { 172 return this.domInputor.selectionStart; 173 } 174 }; 175 176 InputCaret.prototype.setPos = function(pos) { 177 var inputor, range; 178 inputor = this.domInputor; 179 if (oDocument.selection) { 180 range = inputor.createTextRange(); 181 range.move("character", pos); 182 range.select(); 183 } else if (inputor.setSelectionRange) { 184 inputor.setSelectionRange(pos, pos); 185 } 186 return inputor; 187 }; 188 189 InputCaret.prototype.getIEOffset = function(pos) { 190 var h, textRange, x, y; 191 textRange = this.domInputor.createTextRange(); 192 pos || (pos = this.getPos()); 193 textRange.move('character', pos); 194 x = textRange.boundingLeft; 195 y = textRange.boundingTop; 196 h = textRange.boundingHeight; 197 return { 198 left: x, 199 top: y, 200 height: h 201 }; 202 }; 203 204 InputCaret.prototype.getOffset = function(pos) { 205 var $inputor, offset, position; 206 $inputor = this.$inputor; 207 if (oDocument.selection) { 208 offset = this.getIEOffset(pos); 209 offset.top += $(oWindow).scrollTop() + $inputor.scrollTop(); 210 offset.left += $(oWindow).scrollLeft() + $inputor.scrollLeft(); 211 return offset; 212 } else { 213 offset = $inputor.offset(); 214 position = this.getPosition(pos); 215 return offset = { 216 left: offset.left + position.left - $inputor.scrollLeft(), 217 top: offset.top + position.top - $inputor.scrollTop(), 218 height: position.height 219 }; 220 } 221 }; 222 223 InputCaret.prototype.getPosition = function(pos) { 224 var $inputor, at_rect, end_range, format, html, mirror, start_range; 225 $inputor = this.$inputor; 226 format = function(value) { 227 return $('<div></div>').text(value).html().replace(/\r\n|\r|\n/g, "<br/>").replace(/\s/g, " "); 228 }; 229 if (pos === void 0) { 230 pos = this.getPos(); 231 } 232 start_range = $inputor.val().slice(0, pos); 233 end_range = $inputor.val().slice(pos); 234 html = "<span style='position: relative; display: inline;'>" + format(start_range) + "</span>"; 235 html += "<span id='caret' style='position: relative; display: inline;'>|</span>"; 236 html += "<span style='position: relative; display: inline;'>" + format(end_range) + "</span>"; 237 mirror = new Mirror($inputor); 238 return at_rect = mirror.create(html).rect(); 239 }; 240 241 InputCaret.prototype.getIEPosition = function(pos) { 242 var h, inputorOffset, offset, x, y; 243 offset = this.getIEOffset(pos); 244 inputorOffset = this.$inputor.offset(); 245 x = offset.left - inputorOffset.left; 246 y = offset.top - inputorOffset.top; 247 h = offset.height; 248 return { 249 left: x, 250 top: y, 251 height: h 252 }; 253 }; 254 255 return InputCaret; 256 257 })(); 258 Mirror = (function() { 259 Mirror.prototype.css_attr = ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle", "borderTopWidth", "boxSizing", "fontFamily", "fontSize", "fontWeight", "height", "letterSpacing", "lineHeight", "marginBottom", "marginLeft", "marginRight", "marginTop", "outlineWidth", "overflow", "overflowX", "overflowY", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "textAlign", "textOverflow", "textTransform", "whiteSpace", "wordBreak", "wordWrap"]; 260 261 function Mirror($inputor) { 262 this.$inputor = $inputor; 263 } 264 265 Mirror.prototype.mirrorCss = function() { 266 var css, 267 _this = this; 268 css = { 269 position: 'absolute', 270 left: -9999, 271 top: 0, 272 zIndex: -20000 273 }; 274 if (this.$inputor.prop('tagName') === 'TEXTAREA') { 275 this.css_attr.push('width'); 276 } 277 $.each(this.css_attr, function(i, p) { 278 return css[p] = _this.$inputor.css(p); 279 }); 280 return css; 281 }; 282 283 Mirror.prototype.create = function(html) { 284 this.$mirror = $('<div></div>'); 285 this.$mirror.css(this.mirrorCss()); 286 this.$mirror.html(html); 287 this.$inputor.after(this.$mirror); 288 return this; 289 }; 290 291 Mirror.prototype.rect = function() { 292 var $flag, pos, rect; 293 $flag = this.$mirror.find("#caret"); 294 pos = $flag.position(); 295 rect = { 296 left: pos.left, 297 top: pos.top, 298 height: $flag.height() 299 }; 300 this.$mirror.remove(); 301 return rect; 302 }; 303 304 return Mirror; 305 306 })(); 307 Utils = { 308 contentEditable: function($inputor) { 309 return !!($inputor[0].contentEditable && $inputor[0].contentEditable === 'true'); 310 } 311 }; 312 methods = { 313 pos: function(pos) { 314 if (pos || pos === 0) { 315 return this.setPos(pos); 316 } else { 317 return this.getPos(); 318 } 319 }, 320 position: function(pos) { 321 if (oDocument.selection) { 322 return this.getIEPosition(pos); 323 } else { 324 return this.getPosition(pos); 325 } 326 }, 327 offset: function(pos) { 328 var offset; 329 offset = this.getOffset(pos); 330 return offset; 331 } 332 }; 333 oDocument = null; 334 oWindow = null; 335 oFrame = null; 336 setContextBy = function(settings) { 337 var iframe; 338 if (iframe = settings != null ? settings.iframe : void 0) { 339 oFrame = iframe; 340 oWindow = iframe.contentWindow; 341 return oDocument = iframe.contentDocument || oWindow.document; 342 } else { 343 oFrame = void 0; 344 oWindow = window; 345 return oDocument = document; 346 } 347 }; 348 discoveryIframeOf = function($dom) { 349 var error; 350 oDocument = $dom[0].ownerDocument; 351 oWindow = oDocument.defaultView || oDocument.parentWindow; 352 try { 353 return oFrame = oWindow.frameElement; 354 } catch (_error) { 355 error = _error; 356 } 357 }; 358 $.fn.caret = function(method, value, settings) { 359 var caret; 360 if (methods[method]) { 361 if ($.isPlainObject(value)) { 362 setContextBy(value); 363 value = void 0; 364 } else { 365 setContextBy(settings); 366 } 367 caret = Utils.contentEditable(this) ? new EditableCaret(this) : new InputCaret(this); 368 return methods[method].apply(caret, [value]); 369 } else { 370 return $.error("Method " + method + " does not exist on jQuery.caret"); 371 } 372 }; 373 $.fn.caret.EditableCaret = EditableCaret; 374 $.fn.caret.InputCaret = InputCaret; 375 $.fn.caret.Utils = Utils; 376 return $.fn.caret.apis = methods; 377 }); 378 379 }).call(this); 240 return value; 241 }; 242 if (pos === void 0) { 243 pos = this.getPos(); 244 } 245 start_range = $inputor.val().slice(0, pos); 246 end_range = $inputor.val().slice(pos); 247 html = "<span style='position: relative; display: inline;'>" + format(start_range) + "</span>"; 248 html += "<span id='caret' style='position: relative; display: inline;'>|</span>"; 249 html += "<span style='position: relative; display: inline;'>" + format(end_range) + "</span>"; 250 mirror = new Mirror($inputor); 251 return at_rect = mirror.create(html).rect(); 252 }; 253 254 InputCaret.prototype.getIEPosition = function(pos) { 255 var h, inputorOffset, offset, x, y; 256 offset = this.getIEOffset(pos); 257 inputorOffset = this.$inputor.offset(); 258 x = offset.left - inputorOffset.left; 259 y = offset.top - inputorOffset.top; 260 h = offset.height; 261 return { 262 left: x, 263 top: y, 264 height: h 265 }; 266 }; 267 268 return InputCaret; 269 270 })(); 271 272 Mirror = (function() { 273 Mirror.prototype.css_attr = ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle", "borderTopWidth", "boxSizing", "fontFamily", "fontSize", "fontWeight", "height", "letterSpacing", "lineHeight", "marginBottom", "marginLeft", "marginRight", "marginTop", "outlineWidth", "overflow", "overflowX", "overflowY", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "textAlign", "textOverflow", "textTransform", "whiteSpace", "wordBreak", "wordWrap"]; 274 275 function Mirror($inputor) { 276 this.$inputor = $inputor; 277 } 278 279 Mirror.prototype.mirrorCss = function() { 280 var css, 281 _this = this; 282 css = { 283 position: 'absolute', 284 left: -9999, 285 top: 0, 286 zIndex: -20000 287 }; 288 if (this.$inputor.prop('tagName') === 'TEXTAREA') { 289 this.css_attr.push('width'); 290 } 291 $.each(this.css_attr, function(i, p) { 292 return css[p] = _this.$inputor.css(p); 293 }); 294 return css; 295 }; 296 297 Mirror.prototype.create = function(html) { 298 this.$mirror = $('<div></div>'); 299 this.$mirror.css(this.mirrorCss()); 300 this.$mirror.html(html); 301 this.$inputor.after(this.$mirror); 302 return this; 303 }; 304 305 Mirror.prototype.rect = function() { 306 var $flag, pos, rect; 307 $flag = this.$mirror.find("#caret"); 308 pos = $flag.position(); 309 rect = { 310 left: pos.left, 311 top: pos.top, 312 height: $flag.height() 313 }; 314 this.$mirror.remove(); 315 return rect; 316 }; 317 318 return Mirror; 319 320 })(); 321 322 Utils = { 323 contentEditable: function($inputor) { 324 return !!($inputor[0].contentEditable && $inputor[0].contentEditable === 'true'); 325 } 326 }; 327 328 methods = { 329 pos: function(pos) { 330 if (pos || pos === 0) { 331 return this.setPos(pos); 332 } else { 333 return this.getPos(); 334 } 335 }, 336 position: function(pos) { 337 if (oDocument.selection) { 338 return this.getIEPosition(pos); 339 } else { 340 return this.getPosition(pos); 341 } 342 }, 343 offset: function(pos) { 344 var offset; 345 offset = this.getOffset(pos); 346 return offset; 347 } 348 }; 349 350 oDocument = null; 351 352 oWindow = null; 353 354 oFrame = null; 355 356 setContextBy = function(settings) { 357 var iframe; 358 if (iframe = settings != null ? settings.iframe : void 0) { 359 oFrame = iframe; 360 oWindow = iframe.contentWindow; 361 return oDocument = iframe.contentDocument || oWindow.document; 362 } else { 363 oFrame = void 0; 364 oWindow = window; 365 return oDocument = document; 366 } 367 }; 368 369 discoveryIframeOf = function($dom) { 370 var error; 371 oDocument = $dom[0].ownerDocument; 372 oWindow = oDocument.defaultView || oDocument.parentWindow; 373 try { 374 return oFrame = oWindow.frameElement; 375 } catch (_error) { 376 error = _error; 377 } 378 }; 379 380 $.fn.caret = function(method, value, settings) { 381 var caret; 382 if (methods[method]) { 383 if ($.isPlainObject(value)) { 384 setContextBy(value); 385 value = void 0; 386 } else { 387 setContextBy(settings); 388 } 389 caret = Utils.contentEditable(this) ? new EditableCaret(this) : new InputCaret(this); 390 return methods[method].apply(caret, [value]); 391 } else { 392 return $.error("Method " + method + " does not exist on jQuery.caret"); 393 } 394 }; 395 396 $.fn.caret.EditableCaret = EditableCaret; 397 398 $.fn.caret.InputCaret = InputCaret; 399 400 $.fn.caret.Utils = Utils; 401 402 $.fn.caret.apis = methods; 403 404 405 })); -
Property
svn:executable
set to
Note: See TracChangeset
for help on using the changeset viewer.