aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js
diff options
context:
space:
mode:
authorAlvin Li <liweitianux@gmail.com>2013-08-13 14:13:24 +0800
committerAlvin Li <liweitianux@gmail.com>2013-08-13 14:13:24 +0800
commit9636d4a6767f49384d5c386bc3f1142c88b90613 (patch)
tree3a70f6d9e4be1791d36c87cc7cbfd1d5aa2b39dd /97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js
parent9383d9a8a5988d071766c3d08a5c946e9c5b02ae (diff)
download97dev-9636d4a6767f49384d5c386bc3f1142c88b90613.tar.bz2
cloned from 'bitbucket', 2013/08/13
Diffstat (limited to '97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js')
-rw-r--r--97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js b/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js
new file mode 100644
index 0000000..fee260c
--- /dev/null
+++ b/97suifangqa/staticfiles/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("tabfocus",function(e){function t(e){9===e.keyCode&&e.preventDefault()}function n(t){function n(t){function n(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&n(e.parentNode)}function o(e){return e.attributes.tabIndex.specified||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function l(e){return!o(e)&&"-1"!=e.getAttribute("tabindex")&&n(e)}if(s=r.select(":input:enabled,*[tabindex]:not(iframe)"),i(s,function(t,n){return t.id==e.id?(a=n,!1):void 0}),t>0){for(c=a+1;s.length>c;c++)if(l(s[c]))return s[c]}else for(c=a-1;c>=0;c--)if(l(s[c]))return s[c];return null}var a,s,l,c;9===t.keyCode&&(l=o(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==l.length&&(l[1]=l[0],l[0]=":prev"),s=t.shiftKey?":prev"==l[0]?n(-1):r.get(l[0]):":next"==l[1]?n(1):r.get(l[1]),s&&(s.id&&(e=tinymce.get(s.id||s.name))?e.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),s.focus()},10),t.preventDefault()))}var r=tinymce.DOM,i=tinymce.each,o=tinymce.explode;e.on("keyup",t),tinymce.Env.gecko?e.on("keypress keydown",n):e.on("keydown",n)}); \ No newline at end of file