]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
WordPress 3.8
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wpeditimage / editor_plugin_src.js
index b26ed4a1a762c604f15fc2c0b6bde17d3d106384..e99c30749285b96133c1089f1f32ad5816a08a6b 100644 (file)
@@ -1,11 +1,13 @@
-
+/* global tinymce */
 (function() {
+       var mouse = {};
+
        tinymce.create('tinymce.plugins.wpEditImage', {
                url: '',
                editor: {},
 
                init: function(ed, url) {
-                       var t = this, mouse = {};
+                       var t = this;
 
                        t.url = url;
                        t.editor = ed;
@@ -27,7 +29,7 @@
 
                                // when pressing Return inside a caption move the caret to a new parapraph under it
                                ed.dom.events.add(ed.getBody(), 'keydown', function(e) {
-                                       var n, DL, DIV, P, content;
+                                       var n, DL, DIV, P;
 
                                        if ( e.keyCode == 13 ) {
                                                n = ed.selection.getNode();
 
                        // When inserting content, if the caret is inside a caption create new paragraph under
                        // and move the caret there
-                       ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
+                       ed.onBeforeExecCommand.add( function( ed, cmd ) {
                                var node, p;
 
                                if ( cmd == 'mceInsertContent' ) {
                                title : ed.getLang('wpeditimage.edit_img')
                        });
 
-                       tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
+                       tinymce.dom.Event.add(editButton, 'mousedown', function() {
                                t._editImage();
                                ed.plugins.wordpress._hideButtons();
                        });
                                title : ed.getLang('wpeditimage.del_img')
                        });
 
-                       tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
+                       tinymce.dom.Event.add(dellButton, 'mousedown', function() {
                                var ed = tinymce.activeEditor, el = ed.selection.getNode(), parent;
 
                                if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) {
                                author : 'WordPress',
                                authorurl : 'http://wordpress.org',
                                infourl : '',
-                               version : "1.0"
+                               version : '1.0'
                        };
                }
        });