Site for researching all meanings of Hebrew Bible.

Difference between revisions of "MediaWiki:Common.js"

From Without Vowels project
Jump to: navigation, search
(Reverted back)
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
  
/* The 'callback' parameter doesn't work :-(
+
$(document).ready(function() {
mwCustomEditButtons[mwCustomEditButtons.length] = {
+
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
        "imageId": "button-hebrew-word",
+
                        'section': 'emoticons',
        "imageFile": "http://www.withoutvowels.org/w/images/9/95/Button_hebrew_word.png",
+
                        'group': 'faces',
        "speedTip": "Insert a Hebrew word with a reference to the dictionary",
+
                        'tools': {
        "tagOpen": "",
+
                                'hebrew_link': {
        "tagClose": "",
+
                                        label: 'Hebrew word with dictionary link',
        "sampleText": "",
+
                                        type: 'button',
        callback: function() {
+
                                        icon: 'http://www.withoutvowels.org/w/images/9/95/Button_hebrew_word.png',
                alert("Test");
+
                                        action: {
        }
+
                                                type: 'callback',
};
+
                                                execute: function() {
*/
+
                                                        alert("Test!");
 +
                                                }
 +
                                        }
 +
                                }
 +
                        }
 +
                } );
 +
});

Revision as of 17:51, 28 October 2011

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'emoticons',
                        'group': 'faces',
                        'tools': {
                                'hebrew_link': {
                                        label: 'Hebrew word with dictionary link',
                                        type: 'button',
                                        icon: 'http://www.withoutvowels.org/w/images/9/95/Button_hebrew_word.png',
                                        action: {
                                                type: 'callback',
                                                execute: function() {
                                                        alert("Test!");
                                                }
                                        }
                                }
                        }
                } );
});