Usunięcie nieużywanej już biblioteki jquery.fieldselection.js.
authorzuber <marek@stepniowski.com>
Thu, 20 Aug 2009 19:52:05 +0000 (21:52 +0200)
committerzuber <marek@stepniowski.com>
Thu, 20 Aug 2009 19:52:05 +0000 (21:52 +0200)
project/static/js/jquery.fieldselection.js [deleted file]
project/templates/explorer/file_xml.html

diff --git a/project/static/js/jquery.fieldselection.js b/project/static/js/jquery.fieldselection.js
deleted file mode 100644 (file)
index 448f9dc..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-(function() { 
-    jQuery.fn.getSelection = function() {
-        var e = (this.jquery) ? this[0] : this;
-
-        return (
-            // Mozilla / dom 3.0
-            ('selectionStart' in e && function() {
-                var l = e.selectionEnd - e.selectionStart;
-                return { start: e.selectionStart, end: e.selectionEnd, length: l, text: e.value.substr(e.selectionStart, l) };
-            }) ||
-            
-            // Internet Explorer
-            (document.selection && function() {
-                e.focus();
-                
-                var r = document.selection.createRange();
-                if (r === null) {
-                    return { start: 0, end: e.value.length, length: 0 }
-                }
-                
-                var re = e.createTextRange();
-                var rc = re.duplicate();
-                re.moveToBookmark(r.getBookmark());
-                rc.setEndPoint('EndToStart', re);
-                
-                return { start: rc.text.length, end: rc.text.length + r.text.length, length: r.text.length, text: r.text };
-            }) ||
-            
-            // browser not supported
-            function() { return null; }
-        )();
-    },
-        
-    jQuery.fn.replaceSelection = function() {
-        var e = this.jquery ? this[0] : this;
-        var text = arguments[0] || '';
-        var scrollTop = $(this).scrollTop();
-                
-        return (
-            // Mozilla / dom 3.0
-            ('selectionStart' in e && function() {
-                var selectionStart = e.selectionStart;
-                console.log(e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length));
-                e.value = e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length);
-                $(e).scrollTop(scrollTop).focus();
-                e.selectionStart = selectionStart + text.length;
-                e.selectionEnd = selectionStart + text.length;
-                return this;
-            }) ||
-
-            // Internet Explorer
-            (document.selection && function() {
-                e.focus();
-                document.selection.createRange().text = text;
-                return this;
-            }) ||
-
-            // browser not supported
-            function() {
-                e.value += text;
-                return jQuery(e);
-            }
-        )();
-    }
-})();
\ No newline at end of file
index c73f9d7..54583e5 100644 (file)
@@ -2,7 +2,6 @@
 {% load toolbar_tags %}
 
 {% block extrahead %}
 {% load toolbar_tags %}
 
 {% block extrahead %}
-    <script src="/static/js/jquery.fieldselection.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>