code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * WordPress plugin. */ (function() { var DOM = tinymce.DOM; tinymce.create('tinymce.plugins.WordPress', { mceTout : 0, init : function(ed, url) { var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML; moreHTML = '<img src="' + url + '/img/trans.gif"...
JavaScript
var wpLink; (function($){ var inputs = {}, rivers = {}, ed, River, Query; wpLink = { timeToTriggerRiver: 150, minRiverAJAXDuration: 200, riverBottomThreshold: 5, keySensitivity: 100, lastSearch: '', textarea: function() { return edCanvas; }, init : function() { inputs.dialog = $('#wp-link'); in...
JavaScript
(function() { tinymce.create('tinymce.plugins.wpLink', { /** * Initializes the plugin, this will be executed after the plugin has been created. * This call is done before the editor instance has finished it's initialization so use the onInit event * of the editor instance to intercept that event. * * ...
JavaScript
tinyMCEPopup.requireLangPack(); var PasteTextDialog = { init : function() { this.resize(); }, insert : function() { var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; // Convert linebreaks into paragraphs if (document.getElementById('linebreaks').checked) { lines = h.spli...
JavaScript
tinyMCEPopup.requireLangPack(); var PasteWordDialog = { init : function() { var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; // Create iframe el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></if...
JavaScript
tinyMCE.addI18n({en:{ common:{ edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", apply:"Apply", insert:"Insert", update:"Update", cancel:"Cancel", close:"Close", browse:"Browse", class_name:"Class", not_set:"-- Not set --", clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", cl...
JavaScript
(function(w) { var init = function() { var pr = document.getElementById('post-revisions'), inputs = pr ? pr.getElementsByTagName('input') : []; pr.onclick = function() { var i, checkCount = 0, side; for ( i = 0; i < inputs.length; i++ ) { checkCount += inputs[i].checked ? 1 : 0; side = inputs[i].ge...
JavaScript
var topWin = window.dialogArguments || opener || parent || top; function fileDialogStart() { jQuery("#media-upload-error").empty(); } // progress and success handlers for media multi uploads function fileQueued(fileObj) { // Get rid of unused form jQuery('.media-blank').remove(); // Collapse a single item if ( j...
JavaScript
/* Speed Plug-in Features: *Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc. - currentSpeed -- String indicating the upload speed, bytes per second - averageSpeed -- Overall average upload speed, bytes per second - movingAverageSpeed -- Speed over averaged...
JavaScript
/* Cookie Plug-in This plug in automatically gets all the cookies for this site and adds them to the post_params. Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params. The cookies will override any other post params with the same name. */ var SWFUpload; ...
JavaScript
/* Queue Plug-in Features: *Adds a cancelQueue() method for cancelling the entire queue. *All queued files are uploaded when startUpload() is called. *If false is returned from uploadComplete then the queue upload is stopped. If false is not returned (strict comparison) then the queue upload is continued. ...
JavaScript
/* SWFUpload.SWFObject Plugin Summary: This plugin uses SWFObject to embed SWFUpload dynamically in the page. SWFObject provides accurate Flash Player detection and DOM Ready loading. This plugin replaces the Graceful Degradation plugin. Features: * swfupload_load_failed_hander event * swfupload_pre_load_...
JavaScript
/* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ if ( typeof tb_pathToImage != 'string' ) { var tb_pathToImage = thickboxL10n.loadingAnimation; } if...
JavaScript
/** * hoverIntent is similar to jQuery's built-in "hover" function except that * instead of firing the onMouseOver event immediately, hoverIntent checks * to see if the user's mouse has slowed down (beneath the sensitivity * threshold) before firing the onMouseOver event. * * hoverIntent r5 // 2007.03.27 // jQuery 1.1...
JavaScript
/** * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright not...
JavaScript
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} }; /** * Set the variable that indicates if JavaScript behaviors should be applied */ Drupal.jsEnabled = document.getElementsByTagName && document.createElement && document.createTextNode && document.documentElement && document.get...
JavaScript
/** * Drag and drop table rows with field manipulation. * * Using the drupal_add_tabledrag() function, any table with weights or parent * relationships may be made into draggable tables. Columns containing a field * may optionally be hidden, providing a better user experience. * * Created tableDrag instances ma...
JavaScript
/** * A progressbar object. Initialized with the given id. Must be inserted into * the DOM afterwards through progressBar.element. * * method is the function which will perform the HTTP request to get the * progress bar state. Either "GET" or "POST". * * e.g. pb = new progressBar('myProgressBar'); * some_...
JavaScript
/** * Auto-attach for teaser behavior. * * Note: depends on resizable textareas. */ Drupal.behaviors.teaser = function(context) { // This breaks in Konqueror. Prevent it from running. if (/KDE/.test(navigator.vendor)) { return; } $('textarea.teaser:not(.teaser-processed)', context).each(function() { ...
JavaScript
Drupal.behaviors.tableSelect = function (context) { $('form table:has(th.select-all):not(.tableSelect-processed)', context).each(Drupal.tableSelect); }; Drupal.tableSelect = function() { // Do not add a "Select all" checkbox if there are no rows with checkboxes in the table if ($('td input:checkbox', this).size...
JavaScript
Drupal.behaviors.multiselectSelector = function() { // Automatically selects the right radio button in a multiselect control. $('.multiselect select:not(.multiselectSelector-processed)') .addClass('multiselectSelector-processed').change(function() { $('.multiselect input:radio[value="'+ this.id.substr(5)...
JavaScript
// Farbtastic 1.2 jQuery.fn.farbtastic = function (callback) { $.farbtastic(this, callback); return this; }; jQuery.farbtastic = function (container, callback) { var container = $(container).get(0); return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); }; jQuery...
JavaScript
/** * Attaches the batch behavior to progress bars. */ Drupal.behaviors.batch = function (context) { // This behavior attaches by ID, so is only valid once on a page. if ($('#progress.batch-processed').size()) { return; } $('#progress', context).addClass('batch-processed').each(function () { var hold...
JavaScript
/** * Provides AJAX-like page updating via AHAH (Asynchronous HTML and HTTP). * * AHAH is a method of making a request via Javascript while viewing an HTML * page. The request returns a small chunk of HTML, which is then directly * injected into the page. * * Drupal uses this file to enhance form elements with ...
JavaScript
Drupal.behaviors.textarea = function(context) { $('textarea.resizable:not(.textarea-processed)', context).each(function() { // Avoid non-processed teasers. if ($(this).is(('textarea.teaser:not(.teaser-processed)'))) { return false; } var textarea = $(this).addClass('textarea-processed'), stat...
JavaScript
/** * Attaches the autocomplete behavior to all required fields */ Drupal.behaviors.autocomplete = function (context) { var acdb = []; $('input.autocomplete:not(.autocomplete-processed)', context).each(function () { var uri = this.value; if (!acdb[uri]) { acdb[uri] = new Drupal.ACDB(uri); } ...
JavaScript
/** * Toggle the visibility of a fieldset using smooth animations */ Drupal.toggleFieldset = function(fieldset) { if ($(fieldset).is('.collapsed')) { // Action div containers are processed separately because of a IE bug // that alters the default submit button behavior. var content = $('> div:not(.acti...
JavaScript
Drupal.tableHeaderDoScroll = function() { if (typeof(Drupal.tableHeaderOnScroll)=='function') { Drupal.tableHeaderOnScroll(); } }; Drupal.behaviors.tableHeader = function (context) { // This breaks in anything less than IE 7. Prevent it from running. if (jQuery.browser.msie && parseInt(jQuery.browser.vers...
JavaScript
/** * Attach handlers to evaluate the strength of any password fields and to check * that its confirmation is correct. */ Drupal.behaviors.password = function(context) { var translate = Drupal.settings.password; $("input.password-field:not(.password-processed)", context).each(function() { var passwordInput ...
JavaScript
/** * Move a block in the blocks table from one region to another via select list. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.blockDrag = function(context) { var table = $('table#blocks'); var tableD...
JavaScript
Drupal.behaviors.color = function (context) { // This behavior attaches by ID, so is only valid once on a page. if ($('#color_scheme_form .color-form.color-processed').size()) { return; } var form = $('#color_scheme_form .color-form', context); var inputs = []; var hooks = []; var locks = []; var f...
JavaScript
/** * Internal function to check using Ajax if clean URLs can be enabled on the * settings page. * * This function is not used to verify whether or not clean URLs * are currently enabled. */ Drupal.behaviors.cleanURLsSettingsCheck = function(context) { // This behavior attaches by ID, so is only valid once on ...
JavaScript
/** * Add functionality to the profile drag and drop table. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. It shows and hides * a warning message when removing the last field from a profile category. */ Drupal.behaviors.profil...
JavaScript
/** * Move a block in the blocks table from one region to another via select list. * * This behavior is dependent on the tableDrag behavior, since it uses the * objects initialized in that behavior to update the row. */ Drupal.behaviors.termDrag = function(context) { var table = $('#taxonomy', context); var t...
JavaScript
Drupal.behaviors.comment = function (context) { var parts = new Array("name", "homepage", "mail"); var cookie = ''; for (i=0;i<3;i++) { cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); if (cookie != '') { $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context)...
JavaScript
Drupal.behaviors.openid = function (context) { var $loginElements = $("#edit-name-wrapper, #edit-pass-wrapper, li.openid-link"); var $openidElements = $("#edit-openid-identifier-wrapper, li.user-link"); // This behavior attaches by ID, so is only valid once on a page. if (!$("#edit-openid-identifier.openid-pr...
JavaScript
// $Id: tabs.js,v 1.4.2.1 2010/03/10 20:08:58 merlinofchaos Exp $ /** * @file tabs.js * jQuery UI Tabs (Tabs 3) * * This is nothing more than the pure jquery UI tabs implementation. * It has been implemented under the Drupal.Views.Tabs namespace to * avoid conflicts with alternatve versions of jquery, jquery UI....
JavaScript
// $Id: base.js,v 1.11.2.1 2010/03/10 20:08:58 merlinofchaos Exp $ /** * @file base.js * * Some basic behaviors and utility functions for Views. */ Drupal.Views = {}; /** * jQuery UI tabs, Views integration component */ Drupal.behaviors.viewsTabs = function (context) { $('#views-tabset:not(.views-processed)')...
JavaScript
// $Id: dependent.js,v 1.9.2.1 2009/11/18 02:43:47 merlinofchaos Exp $ /** * @file dependent.js * * Written by dmitrig01 (Dmitri Gaskin) for Views; this provides dependent * visibility for form items in Views' ajax forms. * * To your $form item definition add: * - '#process' => array('views_process_dependency'),...
JavaScript
// $Id: ajax_view.js,v 1.19.2.5 2010/03/25 18:25:28 merlinofchaos Exp $ /** * @file ajaxView.js * * Handles AJAX fetching of views, including filter submission and response. */ Drupal.Views.Ajax = Drupal.Views.Ajax || {}; /** * An ajax responder that accepts a packet of JSON data and acts appropriately. * * T...
JavaScript
// $Id: ajax.js,v 1.26.2.8 2010/04/08 21:29:59 merlinofchaos Exp $ /** * @file ajax_admin.js * * Handles AJAX submission and response in Views UI. */ Drupal.Views.Ajax = Drupal.Views.Ajax || {}; /** * Handles the simple process of setting the ajax form area with new data. */ Drupal.Views.Ajax.setForm = function...
JavaScript
// $Id: ajax-responder.js,v 1.18.2.24 2010/08/27 22:09:48 merlinofchaos Exp $ /** * @file * * CTools flexible AJAX responder object. */ (function ($) { Drupal.CTools = Drupal.CTools || {}; Drupal.CTools.AJAX = Drupal.CTools.AJAX || {}; Drupal.CTools.AJAX.commands = Drupal.CTools.AJAX.commands || {}; Drupal...
JavaScript
// $Id: stylizer.js,v 1.1.2.1 2010/02/17 01:04:50 merlinofchaos Exp $ (function ($) { Drupal.CTools = Drupal.CTools || {}; Drupal.CTools.Stylizer = {}; Drupal.CTools.Stylizer.addFarbtastic = function(context) { // This behavior attaches by ID, so is only valid once on a page. if ($('ctools_stylizer_colo...
JavaScript
// $Id: jump-menu.js,v 1.1.2.2 2009/10/28 01:53:15 merlinofchaos Exp $ (function($) { Drupal.behaviors.CToolsJumpMenu = function(context) { $('.ctools-jump-menu-hide:not(.ctools-jump-menu-processed)') .addClass('ctools-jump-menu-processed') .hide(); $('.ctools-jump-menu-change:not(.ctools-jump-m...
JavaScript
// $Id: auto-submit.js,v 1.1.2.2 2010/06/16 16:15:00 merlinofchaos Exp $ /** * To make a form auto submit, all you have to do is 3 things: * * ctools_add_js('auto-submit'); * * On gadgets you want to auto-submit when changed, add the ctools-auto-submit * class. With FAPI, add: * @code * '#attributes' => array...
JavaScript
// $Id: collapsible-div.js,v 1.6.2.2 2009/10/09 17:10:00 merlinofchaos Exp $ /** * @file * Javascript required for a simple collapsible div. * * Creating a collapsible div with this doesn't take too much. There are * three classes necessary: * * - ctools-collapsible-container: This is the overall container that ...
JavaScript
// $Id: modal.js,v 1.17.2.20 2010/10/20 19:22:08 merlinofchaos Exp $ /** * @file * * Implement a modal form. * * @see modal.inc for documentation. * * This javascript relies on the CTools ajax responder. */ (function ($) { // Make sure our objects are defined. Drupal.CTools = Drupal.CTools || {}; Drupal....
JavaScript
// $Id: dependent.js,v 1.4.2.2 2009/10/05 23:38:33 merlinofchaos Exp $ /** * @file * * Written by dmitrig01 (Dmitri Gaskin) for CTools; this provides dependent * visibility for form items in CTools' ajax forms. * * To your $form item definition add: * - '#process' => array('CTools_process_dependency'), * - Add ...
JavaScript
// $Id: dropdown.js,v 1.3.2.1 2009/10/05 23:38:33 merlinofchaos Exp $ /** * @file * Implement a simple, clickable dropdown menu. * * See dropdown.theme.inc for primary documentation. * * The javascript relies on four classes: * - The dropdown must be fully contained in a div with the class * ctools-dropdown. ...
JavaScript
/** * Provide the HTML to create the modal dialog. */ Drupal.theme.prototype.CToolsSampleModal = function () { var html = '' html += '<div id="ctools-modal" class="popups-box">'; html += ' <div class="ctools-modal-content ctools-sample-modal-content">'; html += ' <table cellpadding="0" cellspacing="0" id="...
JavaScript
// $Id: page-list.js,v 1.3 2009/07/12 18:32:04 merlinofchaos Exp $ /** * Provide some extra responses for the page list so we can have automatic * on change. */ Drupal.behaviors.PageManagerList = function() { var timeoutID = 0; $('form#page-manager-list-pages-form select:not(.pm-processed)') .addClass('pm-...
JavaScript
if (!Drupal.advpoll) { Drupal.advpoll = {}; } // Update maxchoices, called when adding and removing choices Drupal.advpoll.maxChoices = function(numChoices) { var selected = $("#edit-settings-max-choices").val(); var label = $("#edit-settings-max-choices").prev(); // Hard-code the HTML (not clone) as .html() ...
JavaScript
/** * Submit advpoll forms with ajax */ Drupal.behaviors.attachVoteAjax = function(context) { $("form.advpoll-vote", context).each(function() { var thisForm = this; var options = { dataType: "json", success: function(data) { // Remove previous messages $("div.messages").remove()...
JavaScript
// $Id: flag.js,v 1.1.2.8 2009/09/14 21:39:01 quicksketch Exp $ /** * Terminology: * * "Link" means "Everything which is in flag.tpl.php" --and this may contain * much more than the <A> element. On the other hand, when we speak * specifically of the <A> element, we say "element" or "the <A> element". */ D...
JavaScript
// $Id: fivestar-admin.js,v 1.1.4.4 2009/05/10 20:56:24 quicksketch Exp $ /** * Fivestar admin interface enhancments. */ if (Drupal.jsEnabled) { $(document).ready(function() { var nodePreview = new fivestarPreview($('#fivestar-direct-preview .fivestar-preview')[0]); // Hide extra mouseover textfields ...
JavaScript
// $Id: fivestar-color.js,v 1.1.4.4 2008/04/15 04:47:59 quicksketch Exp $ if (Drupal.jsEnabled) { $(document).ready(function () { var form = $('#fivestar_color_scheme_form .color-form'); var inputs = []; var focused = null; var radios = document.forms['fivestar-settings']['fivestar_widget']; var ...
JavaScript
/** * Modified Star Rating - jQuery plugin * * Copyright (c) 2006 Wil Stuckey * * Original source available: http://sandbox.wilstuckey.com/jquery-ratings/ * Extensively modified by Lullabot: http://www.lullabot.com * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-lic...
JavaScript
// Fivestar highlight interaction Drupal.behaviors.highlightedStarRate = function(context) { $('.rate-widget-fivestar ul:not(.highlightedStarRate-processed)',context).addClass('.highlightedStarRate-processed').each(function() { var $this = $(this); // Save the current vote status var status ...
JavaScript
Drupal.behaviors.RateSlider = function(context) { $('.rate-widget-slider:not(.rate-slider-processed)',context).addClass('rate-slider-processed').each(function() { var widget = $(this); var ids = widget.attr('id').match(/^rate\-([a-z]+)\-([0-9]+)\-([0-9]+)\-([0-9])$/); var token = widget.attr('class').matc...
JavaScript
Drupal.behaviors.rate = function(context) { $('.rate-widget:not(.rate-processed)', context).addClass('rate-processed').each(function () { var widget = $(this); var ids = widget.attr('id').match(/^rate\-([a-z]+)\-([0-9]+)\-([0-9]+)\-([0-9])$/); var data = { content_type: ids[1], content_id: ids...
JavaScript
Drupal.behaviors.contentTypes = { attach: function() { if ($('#edit-type').val() == $('#edit-name').val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_') || $('#edit-type').val() == '') { $('#edit-type-wrapper').hide(); $('#edit-name').keyup(function() { var machine = $(this).val...
JavaScript
// $Id: pathauto.js,v 1.4.2.2 2010/02/10 21:50:30 greggles Exp $ if (Drupal.jsEnabled) { $(document).ready(function() { if ($("#edit-pathauto-perform-alias").size() && $("#edit-pathauto-perform-alias").attr("checked")) { // Disable input and hide its description. $("#edit-path").attr("disabled","disab...
JavaScript
/* * Flexigrid for jQuery - New Wave Grid * * Copyright (c) 2008 Paulo P. Marinas (webplicity.net/flexigrid) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2009/02/03 13:55:03 $ */ (function($){ $.addFlex = function(t,p) { if (t.grid) return false; /...
JavaScript
$MODE = 'list'; $(document).ready(function() { initFlexigrid(); $('#edit-field-list-0-nid-nid').keydown(function (event) { //alert("Change Listener: "+$(this).val()); if(event.keyCode==13) { startProgress(); $('.flex1').search($(this).val(), 'title'); setTimeout("stopProgress()", 500); $('#taxonomy...
JavaScript
/* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ var tb_pathToImage = "images/loadingAnimation.gif"; /*!!!!!!!!!!!!!!!!! edit below this line at...
JavaScript
// $Id: none.js,v 1.6.2.1 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. * * @param context * A DOM element, supplied by Drupal.attachBehaviors(). * @param params * An object containing input format parameters. Default parameters are: * - editor: The internal ed...
JavaScript
// $Id: whizzywig.js,v 1.4.2.1 2010/02/13 23:58:41 sun Exp $ var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; /** * Override Whizzywig's document.write() function. * * Whizzywig uses document.write() by default, which leads to a blank page when * invoked in jQuery.ready(). Luckil...
JavaScript
// $Id: whizzywig-56.js,v 1.1.4.2 2010/02/06 17:33:58 sun Exp $ var wysiwygWhizzywig = { currentField: null, fields: {} }; var buttonPath = null; /** * Override Whizzywig's document.write() function. * * Whizzywig uses document.write() by default, which leads to a blank page when * invoked in jQuery.ready(). Luc...
JavaScript
// $Id: openwysiwyg.js,v 1.1.4.1 2010/02/13 23:58:41 sun Exp $ // Reset $() to jQuery. Yuck! $ = jQuery; (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.openwysiwyg = function(context, params, settings) { jQuery.noConflict(); $ = Drupal.wysiwyg._openwysiwyg; // ...
JavaScript
// $Id: wymeditor.js,v 1.2.2.2 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.wymeditor = function (context, params, settings) { // Prepend basePath to wymPath. settings.wymPath = settings.basePath + settings.wymPath; // Update activeI...
JavaScript
// $Id: markitup.js,v 1.2.2.1 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.markitup = function(context, params, settings) { $('#' + params.field, context).markItUp(settings); // Adjust CSS for editor buttons. $.each(settings.markupS...
JavaScript
// $Id: nicedit.js,v 1.3.4.2 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.nicedit = function(context, params, settings) { // Attach editor. var editor = new nicEditor(settings); editor.panelInstance(params.field); editor.addEvent('...
JavaScript
// $Id: fckeditor.config.js,v 1.6 2009/06/08 22:20:38 sun Exp $ Drupal = window.parent.Drupal; /** * Fetch and provide original editor settings as local variable. * * FCKeditor does not support to pass complex variable types to the editor. * Instance settings passed to FCKinstance.Config are temporarily stored in...
JavaScript
// $Id: tinymce-2.js,v 1.10.2.2 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Initialize editor instances. * * This function needs to be called before the page is fully loaded, as * calling tinyMCE.init() after the page is loaded breaks IE6. * * @param editorSettings * An object containing editor setting...
JavaScript
// $Id: tinymce-3.js,v 1.17.2.2 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Initialize editor instances. * * @todo Is the following note still valid for 3.x? * This function needs to be called before the page is fully loaded, as * calling tinyMCE.init() after the page is loaded breaks IE6. * * @param edi...
JavaScript
// $Id: ckeditor-3.0.js,v 1.2.4.5 2009/11/17 15:31:33 twod Exp $ (function($) { Drupal.wysiwyg.editor.init.ckeditor = function(settings) { // Plugins must only be loaded once. Only the settings from the first format // will be used but they're identical anyway. var registeredPlugins = {}; for (var format in se...
JavaScript
// $Id: fckeditor-2.6.js,v 1.16.2.3 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.fckeditor = function(context, params, settings) { var FCKinstance = new FCKeditor(params.field, settings.Width, settings.Height, settings.ToolbarSet); // ...
JavaScript
// $Id: jwysiwyg.js,v 1.3.4.1 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.jwysiwyg = function(context, params, settings) { // Attach editor. $('#' + params.field).wysiwyg(); }; /** * Detach a single or all editors. */ Drupal.wysiwy...
JavaScript
// $Id: wysiwyg.init.js,v 1.3 2009/02/01 09:20:48 sun Exp $ Drupal.wysiwyg = Drupal.wysiwyg || { 'instances': {} }; Drupal.wysiwyg.editor = Drupal.wysiwyg.editor || { 'init': {}, 'attach': {}, 'detach': {}, 'instance': {} }; Drupal.wysiwyg.plugins = Drupal.wysiwyg.plugins || {};
JavaScript
// $Id: wysiwyg.js,v 1.15.2.2 2010/02/13 23:58:41 sun Exp $ (function($) { /** * Initialize editor libraries. * * Some editors need to be initialized before the DOM is fully loaded. The * init hook gives them a chance to do so. */ Drupal.wysiwygInit = function() { // This breaks in Konqueror. Prevent it from ru...
JavaScript
// $Id: break.js,v 1.6.2.1 2010/02/13 23:58:41 sun Exp $ (function ($) { // @todo Array syntax required; 'break' is a predefined token in JavaScript. Drupal.wysiwyg.plugins['break'] = { /** * Return whether the passed node belongs to this plugin. */ isNode: function(node) { return ($(node).is('img.wysiw...
JavaScript
// $Id: de.js,v 1.1 2008/06/15 17:28:15 sun Exp $ tinyMCE.addToLang('break', { title: 'Anrisstext trennen', desc: 'Separiert den Anrisstext und Textkörper des Inhalts an dieser Stelle' });
JavaScript
// $Id: en.js,v 1.1 2008/06/10 18:20:14 sun Exp $ tinyMCE.addToLang('break', { title: 'Insert teaser break', desc: 'Separate teaser and body of this content' });
JavaScript
// $Id: ca.js,v 1.1 2008/10/25 13:35:51 sun Exp $ tinyMCE.addToLang('break', { title: 'Inserir marcador de document retallat', desc: 'Generar el punt de separació entre la versió retallada del document i la resta del contingut' });
JavaScript
// $Id: es.js,v 1.1 2008/10/25 13:35:51 sun Exp $ tinyMCE.addToLang('break', { title: 'Insertar marcador de documento recortado', desc: 'Generar el punto de separación entre la versión recortada del documento y el resto del contenido' });
JavaScript
// $Id: wysiwyg.api.js,v 1.1.2.2 2009/08/09 02:47:17 sun Exp $ /** * Wysiwyg plugin button implementation for Awesome plugin. */ Drupal.wysiwyg.plugins.awesome = { /** * Return whether the passed node belongs to this plugin. * * @param node * The currently focused DOM element in the editor content. ...
JavaScript
// $Id: profile.action.js,v 1.1.2.1 2009/10/08 21:37:55 kratib Exp $ (function ($) { // START jQuery Drupal.vbo = Drupal.vbo || {}; Drupal.vbo.profileAction = Drupal.vbo.profileAction || {}; Drupal.vbo.profileAction.updateField = function(checkbox, direct) { var id = checkbox.id.replace('-check', ''); if ((checkb...
JavaScript
// $Id: fields.action.js,v 1.1.2.5 2009/12/08 00:50:39 kratib Exp $ (function ($) { // START jQuery Drupal.vbo = Drupal.vbo || {}; Drupal.vbo.fieldsAction = Drupal.vbo.fieldsAction || {}; Drupal.vbo.fieldsAction.updateToggler = function(toggler, direct) { var parent = $(toggler).parents('tr')[0]; if ((toggler.che...
JavaScript
// $Id: views_bulk_operations.action.js,v 1.1.2.5 2010/06/07 14:50:10 kratib Exp $ (function ($) { // START jQuery Drupal.vbo = Drupal.vbo || {}; Drupal.vbo.action = Drupal.vbo.action || {}; Drupal.vbo.action.updateOperations = function(vid, trigger) { var options = ""; if (Drupal.settings.vbo.action.views_operat...
JavaScript
// $Id: views_bulk_operations.js,v 1.1.4.19 2010/09/15 17:23:35 kratib Exp $ (function ($) { // START jQuery Drupal.vbo = Drupal.vbo || {}; Drupal.vbo.selectAll = function() { var table = this; var form = $(table).parents('form'); var select = $('th.select-all', table).click(function() { setSelectAll(false...
JavaScript
/** * Show/hide custom format sections on the date-time settings page. */ Drupal.behaviors.dateDateTime = function(context) { // Show/hide custom format depending on the select's value. $('select.date-format:not(.date-time-processed)', context).change(function() { $(this).addClass('date-time-processed').paren...
JavaScript
/** * Attaches the calendar behavior to all required fields */ Drupal.behaviors.date_popup = function (context) { for (var id in Drupal.settings.datePopup) { $('#'+ id).bind('focus', Drupal.settings.datePopup[id], function(e) { if (!$(this).hasClass('date-popup-init')) { var datePopup = e.data; ...
JavaScript
/** * Set the client's system time zone as default values of form fields. */ Drupal.setDefaultTimezone = function() { var dateString = Date(); // In some client environments, date strings include a time zone // abbreviation which can be interpreted by PHP. var matches = Date().match(/\(([A-Z]{3,5})\)/); va...
JavaScript
$(document).ready(function() { if (!$('#admin-menu').length) { return; } // Apply margin-top if enabled; directly applying marginTop doesn't work in IE. if (Drupal && Drupal.settings && Drupal.settings.admin_menu) { if (Drupal.settings.admin_menu.margin_top) { $('body').addClass('admin-menu'); ...
JavaScript
// $Id: filefield.js,v 1.25 2010/04/24 02:47:49 quicksketch Exp $ /** * Auto-attach standard client side file input validation. */ Drupal.behaviors.filefieldValidateAutoAttach = function(context) { $("input[type='file'][accept]", context).change( function() { // Remove any previous errors. $('.file-upload-...
JavaScript
// $Id: content.js,v 1.1.2.3 2008/10/06 14:30:01 karens Exp $ Drupal.behaviors.cckManageFields = function(context) { attachUpdateSelects(context); }; function attachUpdateSelects(context) { var widgetTypes = Drupal.settings.contentWidgetTypes; var fields = Drupal.settings.contentFields; // Store the default ...
JavaScript
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system. // There images will be displayed as a dropdown in all image dialogs if the "external_link_image_url" // option is defined in TinyMCE init. var tinyMCEImageList = new Array( // Name, URL ["Logo 1", "media/logo.jpg"], ...
JavaScript
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system. // There templates will be displayed as a dropdown in all media dialog if the "template_external_list_url" // option is defined in TinyMCE init. var tinyMCETemplateList = [ // Name, URL, Description ["Simple snippet", "...
JavaScript
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system. // There links will be displayed as a dropdown in all link dialogs if the "external_link_list_url" // option is defined in TinyMCE init. var tinyMCELinkList = new Array( // Name, URL ["Moxiecode", "http://www.moxiecode....
JavaScript
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system. // There flash movies will be displayed as a dropdown in all media dialog if the "media_external_list_url" // option is defined in TinyMCE init. var tinyMCEMediaList = [ // Name, URL ["Some Flash", "media/sample.swf"], ...
JavaScript