code
stringlengths
1
2.08M
language
stringclasses
1 value
var buttonPath = null; (function($) { /** * Attach this editor to a target element. */ Drupal.wysiwyg.editor.attach.whizzywig = function(context, params, settings) { // Previous versions used per-button images found in this location, // now it is only used for custom buttons. if (settings.buttonPa...
JavaScript
(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 editorSettings * An object containing editor setting...
JavaScript
(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 settings) { if (Drupal.settings.wysiwyg.plugins[format])...
JavaScript
(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); // Apply editor instance settings. FCKinstance.BasePath = s...
JavaScript
(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.wysiwyg.editor.detach.jwysiwyg = function (context, p...
JavaScript
Drupal.wysiwyg = Drupal.wysiwyg || { 'instances': {} }; Drupal.wysiwyg.editor = Drupal.wysiwyg.editor || { 'init': {}, 'attach': {}, 'detach': {}, 'instance': {} }; Drupal.wysiwyg.plugins = Drupal.wysiwyg.plugins || {}; (function ($) { // Determine support for queryCommandEnabled(). // An exception sho...
JavaScript
(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 running. if (/KDE/.test(navigator.vendor)) { ...
JavaScript
(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.wysiwyg-break')); }, /** * Execute the bu...
JavaScript
tinyMCE.addToLang('break', { title: 'Anrisstext trennen', desc: 'Separiert den Anrisstext und Textkörper des Inhalts an dieser Stelle' });
JavaScript
tinyMCE.addToLang('break', { title: 'Insert teaser break', desc: 'Separate teaser and body of this content' });
JavaScript
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
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
/** * 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. */ isNode: function(node) { return ($(node)...
JavaScript
(function ($) { Drupal.behaviors.PrivatemsgAlternatives = { attach: function (context) { // Replace span with a link. $("span.privatemsg-recipient-alternative").each(function() { $(this).after( // Replace the span with a link, add href and class. $('<a>') .attr...
JavaScript
/* * jQuery treeTable Plugin 2.3.0 * http://ludo.cubicphuse.nl/jquery-plugins/treeTable/ * * Copyright 2010, Ludo van den Boom * Dual licensed under the MIT or GPL Version 2 licenses. */ (function($) { // Helps to make options available to all functions // TODO: This gives problems when there are b...
JavaScript
(function ($) { Drupal.behaviors.tokenTree = { attach: function (context, settings) { $('table.token-tree', context).once('token-tree', function () { $(this).treeTable(); }); } }; Drupal.behaviors.tokenDialog = { attach: function (context, settings) { $('a.token-dialog', context)...
JavaScript
(function ($) { Drupal.behaviors.vbo = { attach: function(context) { $('.vbo-views-form', context).each(function() { Drupal.vbo.initTableBehaviors(this); Drupal.vbo.initGenericBehaviors(this); }); } } Drupal.vbo = Drupal.vbo || {}; Drupal.vbo.initTableBehaviors = function(fo...
JavaScript
/** * @file * Javascript for Field Example. */ /** * Provides a farbtastic colorpicker for the fancier widget. */ (function ($) { Drupal.behaviors.field_example_colorpicker = { attach: function(context) { $(".edit-field-example-colorpicker").live("focus", function(event) { var edit_field = thi...
JavaScript
/* * @file * JavaScript for ajax_example. * * See @link ajax_example_dependent_dropdown_degrades @endlink for * details on what this file does. It is not used in any other example. */ (function($) { // Re-enable form elements that are disabled for non-ajax situations. Drupal.behaviors.enableFormItemsForAjax...
JavaScript
(function($){ $(document).ready(function(){ $('div#test').html('hello katherine'); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.brown; var newDiv = $('<div></div>').css('color', 'brown').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.black; var newDiv = $('<div></div>').css('color', 'black').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.red; var newDiv = $('<div></div>').css('color', 'red').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.blue; var newDiv = $('<div></div>').css('color', 'blue').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.purple; var newDiv = $('<div></div>').css('color', 'purple').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($){ $(document).ready(function(){ var weight = Drupal.settings.js_weights.green; var newDiv = $('<div></div>').css('color', 'green').html('I have a weight of ' + weight); $('#js-weights').append(newDiv); }); })(jQuery);
JavaScript
(function($) { Drupal.behaviors.captchaAdmin = { attach : function(context) { // Helper function to show/hide noise level widget. var noise_level_shower = function(speed) { speed = (typeof speed == 'undefined') ? 'slow' : speed; if ($("#edit-image-captcha-dot-noise").is(":checked") ...
JavaScript
(function ($) { Drupal.behaviors.captcha = { attach: function (context) { // Turn off autocompletion for the CAPTCHA response field. // We do it here with Javascript (instead of directly in the markup) // because this autocomplete attribute is not standard and // it would break (X)HTML c...
JavaScript
/** * Wysiwyg API integration helper function. */ function imceImageBrowser(field_name, url, type, win) { // TinyMCE. if (win !== 'undefined') { win.open(Drupal.settings.imce.url + encodeURIComponent(field_name), '', 'width=760,height=560,resizable=1'); } } /** * CKeditor integration. */ v...
JavaScript
(function ($) { /** * This serves several purposes to do with page output. * Within the PHP of the module it is easy to alternate between * leaf and expanded classes for each node type. * But the taxonomy term tree is made into a html block * through the use of custom functions because of the complexit...
JavaScript
/** * Attaches the calendar behavior to all required fields */ (function ($) { Drupal.behaviors.date_popup = { attach: function (context) { for (var id in Drupal.settings.datePopup) { $('#'+ id).bind('focus', Drupal.settings.datePopup[id], function(e) { if (!$(this).hasClass('date-popup-init')) ...
JavaScript
(function ($) { Drupal.behaviors.dateAdmin = {}; Drupal.behaviors.dateAdmin.attach = function (context, settings) { // Remove timezone handling options for fields without hours granularity. var $hour = $('#edit-field-settings-granularity-hour').once('date-admin'); if ($hour.length) { new Drupal.date...
JavaScript
(function ($) { Drupal.behaviors.dateYearRange = {}; Drupal.behaviors.dateYearRange.attach = function (context, settings) { var $textfield, $textfields, i; // Turn the years back and forward fieldsets into dropdowns. $textfields = $('input.select-list-with-custom-option', context).once('date-year-range...
JavaScript
(function ($) { Drupal.behaviors.dateSelect = {}; Drupal.behaviors.dateSelect.attach = function (context, settings) { var $widget = $('.form-type-date-select').parents('fieldset').once('date'); var i; for (i = 0; i < $widget.length; i++) { new Drupal.date.EndDateHandler($widget[i]); } }; Dr...
JavaScript
(function($) { /** * jQuery debugging helper. * * Invented for Dreditor. * * @usage * $.debug(var [, name]); * $variable.debug( [name] ); */ jQuery.extend({ debug: function () { // Setup debug storage in global window. We want to look into it. window.debug = window.debug || []; ...
JavaScript
(function($) { Drupal.admin = Drupal.admin || {}; Drupal.admin.behaviors = Drupal.admin.behaviors || {}; Drupal.admin.hashes = Drupal.admin.hashes || {}; /** * Core behavior for Administration menu. * * Test whether there is an administration menu is in the output and execute all * registered behaviors....
JavaScript
(function($) { /** * Automatically enables required permissions on demand. * * Many users do not understand that two permissions are required for the * administration menu to appear. Since Drupal core provides no facility for * this, we implement a simple manual confirmation for automatically enabling * ...
JavaScript
(function($) { Drupal.admin = Drupal.admin || {}; Drupal.admin.behaviors = Drupal.admin.behaviors || {}; /** * @ingroup admin_behaviors * @{ */ /** * Apply active trail highlighting based on current path. * * @todo Not limited to toolbar; move into core? */ Drupal.admin.behaviors.toolbarActiveT...
JavaScript
(function ($) { /** * Provide the summary information for the block settings vertical tab. */ Drupal.behaviors.i18nSettingsSummary = { attach: function (context) { $('fieldset#edit-languages', context).drupalSetSummary(function (context) { var summary = ''; if ($('.form-item-i18n-mode ...
JavaScript
(function ($) { /** * Rewrite autocomplete inputs to pass the language of the node currently being * edited in the path. * * This functionality ensures node autocompletes get suggestions for the node's * language rather than the current interface language. */ Drupal.behaviors.i18n = { attach : functi...
JavaScript
(function ($) { /** * Rewrite autocomplete inputs to pass the language of the node currently being * edited in the path. * * This functionality ensures node autocompletes get suggestions for the node's * language rather than the current interface language. */ Drupal.behaviors.i18n = { attach: funct...
JavaScript
(function($) { var ii = window.imceInline = {}; // Drupal behavior Drupal.behaviors.imceInline = {attach: function(context, settings) { $('div.imce-inline-wrapper', context).not('.processed').addClass('processed').show().find('a').click(function() { var i = this.name.indexOf('-IMCE-'); ii.activeText...
JavaScript
/* * IMCE Integration by URL * Ex-1: http://example.com/imce?app=XEditor|url@urlFieldId|width@widthFieldId|height@heightFieldId * Creates "Insert file" operation tab, which fills the specified fields with url, width, height properties * of the selected file in the parent window * Ex-2: http://example.com/imce...
JavaScript
(function($) { //Global container. window.imce = {tree: {}, findex: [], fids: {}, selected: {}, selcount: 0, ops: {}, cache: {}, urlId: {}, vars: {previewImages: 1, cache: 1}, hooks: {load: [], list: [], navigate: [], cache: []}, //initiate imce. initiate: function() { imce.conf = Drupal.settings.imce || {...
JavaScript
//This pack implemets: keyboard shortcuts, file sorting, resize bars, and inline thumbnail preview. (function($) { // add scale calculator for resizing. imce.hooks.load.push(function () { $('#edit-width, #edit-height').focus(function () { var fid, r, w, isW, val; if (fid = imce.vars.prvfid) { ...
JavaScript
(function ($) { Drupal.behaviors.datepicker = { attach: function() { for (var id in Drupal.settings.datePopup) { $('#'+ id).each(function() { datePopup = Drupal.settings.datePopup[id]; switch (datePopup.func) { case 'datepicker-inline': $(this).wrap('<div id="' + id + '-wrapp...
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
/*! * jQuery Cycle Plugin (with Transition Definitions) * Examples and documentation at: http://jquery.malsup.com/cycle/ * Copyright (c) 2007-2010 M. Alsup * Version: 2.9999 (13-NOV-2011) * Dual licensed under the MIT and GPL licenses. * http://jquery.malsup.com/license.html * Requires: jQuery v1.3.2 or later *...
JavaScript
(function ($) { Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) { // Change the logo to be the real one. if (!this.logoChanged) { $('#preview #preview-logo img').attr('src', Drupal.settings.color.logo); this.logoChanged = true;...
JavaScript
var langList = [ {name:'en', charset:'UTF-8'}, {name:'zh-cn', charset:'gb2312'}, {name:'zh-tw', charset:'GBK'} ]; var skinList = [ {name:'default', charset:'gb2312'}, {name:'whyGreen', charset:'gb2312'} ];
JavaScript
var $lang={ errAlertMsg: "Invalid date or the date out of range,redo or not?", aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Se...
JavaScript
 //全局共用方法对象 add by 不必 20080911 StringBuffer.prototype.append = function(strValue){this.__strings__.push(strValue);}; StringBuffer.prototype.toString = function(){return this.__strings__.join('');}; function StringBuffer(){this.__strings__ = [];}; String.prototype.Trim = function() { var str = this, ...
JavaScript
// JavaScript Document document.writeln(" <style type=\"text\/css\">"); document.writeln(" div.dialogMark { position: absolute; -moz-opacity: 0.6; opacity:0.6; filter: alpha(opacity=60); background-color: #a9a9a9;visibility:visible; z-index: 998; left: 0px;height:100%;}"); document.writeln(" div....
JavaScript
var intervalID; var update_entries_run = 0; var check_interval = 60000; var close_interval = 10000; var profile_page; var notification_page; var timeouts= {}; $(function() { $.fn.messageClose = function() { $(this).fadeTo('fast', 0, function() { $(this).hide('fast', function() { ...
JavaScript
django.jQuery(function() { django.jQuery("#id_type").change(function(event) { var type = django.jQuery(this).val(); if (type) { get_subtypes(type); } else { var select = '<option value="">---------</option>'; django.jQuery("#id_subtype").html(select); ...
JavaScript
/** * http://github.com/valums/file-uploader * * Multiple file upload component with progress-bar, drag-and-drop. * © 2010 Andrew Valums ( andrew(at)valums.com ) * * Licensed under GNU GPL 2 or later, see license.txt. */ // // Helper functions // var qq = qq || {}; /** * Adds all missing properties f...
JavaScript
/*! * jQuery Form Plugin * version: 2.67 (12-MAR-2011) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(functi...
JavaScript
 function submitRegister() { }
JavaScript
var ancp = { /*-- Gackiem Player --*/ gackiem:{width:"100%",height:"425",player:"http://phimphim.com/play/player.swf",proxy:"http://phimphim.com/play/plugins/proxy.swf",skin:"http://vuighe.net/public/player/stormtrooper/stormtrooper.xml",postion:"top-left",margin:"30",logo:"http://dl.dropbox.com/u/52283085/anc/lho.png"...
JavaScript
var ancp = { /*-- Gackiem Player --*/ gackiem:{width:"100%",height:"425",player:"http://phimvang.org/player/player.swf",proxy:"http://phimvang.org/player/plugins/proxy.swf",skin:"http://vuighe.net/public/player/stormtrooper/stormtrooper.xml",postion:"top-left",margin:"30",logo:"http://dl.dropbox.com/u/52283085/custom...
JavaScript
/* ------------------------------------------------------------------------ Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1.4 ------------------------------------------------------------------------- */ (function($) { $.prettyPhoto ...
JavaScript
// send html to the post editor var wpActiveEditor; function send_to_editor(h) { var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined'; if ( !wpActiveEditor ) { if ( mce && tinymce.activeEditor ) { ed = tinymce.activeEditor; wpActiveEditor = ed.id; } else if ( !qt ) {...
JavaScript
(function($) { wpWordCount = { settings : { strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc. count : /\S\s+/g // counting regexp }, block : 0, wc : function(tx) { var t = this, w = $('.word-count'), tc =...
JavaScript
(function($) { inlineEditPost = { init : function(){ var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit'); t.type = $('table.widefat').hasClass('pages') ? 'page' : 'post'; t.what = '#post-'; // prepare the edit rows qeRow.keyup(function(e){ if (e.which == 27) return inline...
JavaScript
(function($) { inlineEditTax = { init : function() { var t = this, row = $('#inline-edit'); t.type = $('#the-list').attr('class').substr(5); t.what = '#'+t.type+'-'; $('.editinline').live('click', function(){ inlineEditTax.edit(this); return false; }); // prepare the edit row r...
JavaScript
jQuery(document).ready( function($) { var newCat, noSyncChecks = false, syncChecks, catAddAfter; $('#link_name').focus(); // postboxes postboxes.add_postbox_toggles('link'); // category tabs $('#category-tabs a').click(function(){ var t = $(this).attr('href'); $(this).parent().addClass('tabs').s...
JavaScript
jQuery(document).ready( function($) { var stamp = $('#timestamp').html(); $('.edit-timestamp').click(function () { if ($('#timestampdiv').is(":hidden")) { $('#timestampdiv').slideDown("normal"); $('.edit-timestamp').hide(); } return false; }); $('.cancel-timestamp').click(function() { $(...
JavaScript
jQuery(document).ready( function($) { $('#link_rel').prop('readonly', true); $('#linkxfndiv input').bind('click keyup', function() { var isMe = $('#me').is(':checked'), inputs = ''; $('input.valinp').each( function() { if (isMe) { $(this).prop('disabled', true).parent().addClass('disabled'); } el...
JavaScript
var farbtastic; function pickColor(color) { farbtastic.setColor(color); jQuery('#background-color').val(color); jQuery('#custom-background-image').css('background-color', color); if ( color && color !== '#' ) jQuery('#clearcolor').show(); else jQuery('#clearcolor').hide(); } jQuery(document).read...
JavaScript
var showNotice, adminMenu, columns, validateForm, screenMeta, autofold_menu; (function($){ // Removed in 3.3. // (perhaps) needed for back-compat adminMenu = { init : function() {}, fold : function() {}, restoreMenuState : function() {}, toggle : function() {}, favorites : function() {} }; // show/hid...
JavaScript
var ThemeViewer; (function($){ ThemeViewer = function( args ) { function init() { $( '#filter-click, #mini-filter-click' ).unbind( 'click' ).click( function() { $( '#filter-click' ).toggleClass( 'current' ); $( '#filter-box' ).slideToggle(); $( '#current-theme' ).slideToggle( 300 ); re...
JavaScript
jQuery(document).ready(function($) { $('.delete-tag').live('click', function(e){ var t = $(this), tr = t.parents('tr'), r = true, data; if ( 'undefined' != showNotice ) r = showNotice.warn(); if ( r ) { data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag'); ...
JavaScript
var switchEditors = { switchto: function(el) { var aid = el.id, l = aid.length, id = aid.substr(0, l - 5), mode = aid.substr(l - 4); this.go(id, mode); }, go: function(id, mode) { // mode can be 'html', 'tmce', or 'toggle' id = id || 'content'; mode = mode || 'toggle'; var t = this, ed = ...
JavaScript
jQuery(document).ready(function($) { var gallerySortable, gallerySortableInit, w, desc = false; gallerySortableInit = function() { gallerySortable = $('#media-items').sortable( { items: 'div.media-item', placeholder: 'sorthelper', axis: 'y', distance: 2, handle: 'div.filename', stop: fu...
JavaScript
jQuery(document).ready(function($) { var options = false, addAfter, delBefore, delAfter; if ( document.forms['addcat'].category_parent ) options = document.forms['addcat'].category_parent.options; addAfter = function( r, settings ) { var name, id; name = $("<span>" + $('name', r).text() + "</span>")....
JavaScript
/*! * Farbtastic: jQuery color picker plug-in v1.3u * * Licensed under the GPL license: * http://www.gnu.org/licenses/gpl.html */ (function($) { $.fn.farbtastic = function (options) { $.farbtastic(this, options); return this; }; $.farbtastic = function (container, callback) { var container ...
JavaScript
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint; // return an array with any duplicate, whitespace or values removed function array_unique_noempty(a) { var out = []; jQuery.each( a, function(key, val) { val = jQuery.trim(val)...
JavaScript
// utility functions var wpCookies = { // The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL. each : function(o, cb, s) { var n, l; if (!o) return 0; s = s || o; if (typeof(o.length) != 'undefined') { for (n=0, l = o.length; n<l; n++) { if (cb....
JavaScript
(function($){ function check_pass_strength() { var pass1 = $('#pass1').val(), user = $('#user_login').val(), pass2 = $('#pass2').val(), strength; $('#pass-strength-result').removeClass('short bad good strong'); if ( ! pass1 ) { $('#pass-strength-result').html( pwsL10n.empty ); return; } s...
JavaScript
var wpWidgets; (function($) { wpWidgets = { init : function() { var rem, sidebars = $('div.widgets-sortables'), isRTL = !! ( 'undefined' != typeof isRtl && isRtl ), margin = ( isRtl ? 'marginRight' : 'marginLeft' ), the_id; $('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name...
JavaScript
/* Plugin Browser Thickbox related JS*/ var tb_position; jQuery(document).ready(function($) { tb_position = function() { var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; if ( $('body.admin-bar').length ) adminbar_h...
JavaScript
// Password strength meter function passwordStrength(password1, username, password2) { var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, mismatch = 5, symbolSize = 0, natLog, score; // password 1 != password 2 if ( (password1 != password2) && password2.length > 0) return mismatch //password ...
JavaScript
var imageEdit; (function($) { imageEdit = { iasapi : {}, hold : {}, postid : '', intval : function(f) { return f | 0; }, setDisabled : function(el, s) { if ( s ) { el.removeClass('disabled'); $('input', el).removeAttr('disabled'); } else { el.addClass('disabled'); $('input',...
JavaScript
var findPosts; (function($){ findPosts = { open : function(af_name, af_val) { var st = document.documentElement.scrollTop || $(document).scrollTop(); if ( af_name && af_val ) { $('#affected').attr('name', af_name).val(af_val); } $('#find-posts').show().draggable({ handle: '#find-post...
JavaScript
/** * WordPress Administration Navigation Menu * Interface JS functions * * @version 2.0.0 * * @package WordPress * @subpackage Administration */ var wpNavMenu; (function($) { var api = wpNavMenu = { options : { menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxT...
JavaScript
/** * PubSub * * A lightweight publish/subscribe implementation. * Private use only! */ var PubSub, fullscreen, wptitlehint; PubSub = function() { this.topics = {}; }; PubSub.prototype.subscribe = function( topic, callback ) { if ( ! this.topics[ topic ] ) this.topics[ topic ] = []; this.to...
JavaScript
var theList, theExtraList, toggleWithKeyboard = false, getCount, updateCount, updatePending, dashboardTotals; (function($) { setCommentsList = function() { var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList; totalInput = $('input...
JavaScript
var thickDims, tbWidth, tbHeight; jQuery(document).ready(function($) { thickDims = function() { var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h; w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90; h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60; if ( ...
JavaScript
var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad; jQuery(document).ready( function($) { /* Dashboard Welcome Panel */ var welcomePanel = $('#welcome-panel'), welcomePanelHide = $('#wp_welcome_panel-hide'), updateWelcomePanel = function( visible ) { $.post( ajaxurl, { action: 'update-welcome-p...
JavaScript
jQuery(document).ready( function($) { var before, addBefore, addAfter, delBefore; before = function() { var nonce = $('#newmeta [name="_ajax_nonce"]').val(), postId = $('#post_ID').val(); if ( !nonce || !postId ) { return false; } return [nonce,postId]; } addBefore = function( s ) { var b = befo...
JavaScript
var postboxes, is_iPad = navigator.userAgent.match(/iPad/); (function($) { postboxes = { add_postbox_toggles : function(page, args) { this.init(page, args); $('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() { var p = $(this).parent('.postbox'), id = p.attr('id'); if ...
JavaScript
function WPSetAsThumbnail(id, nonce){ var $link = jQuery('a#wp-post-thumbnail-' + id); $link.text( setPostThumbnailL10n.saving ); jQuery.post(ajaxurl, { action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie) }, function(str){ var ...
JavaScript
/* * jQuery ticker * * jQuery required. * jQuery Easing Plugin extends this Plugin. * * Copyright 2011 (c) kamem * http://develo.org/ * Licensed Under the MIT. * * Date: 2011.06.25 */ (function($){ // リストにつくid名 var tagId ="tickerId_" var count = []; var start = []; var end = []; var w...
JavaScript
var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init; 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(); ...
JavaScript
/* http://www.JSON.org/json2.js 2011-02-23 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html This code should be minified before deployment. See http://javascript.crockford.com/jsmin.html USE YOUR OWN COPY. IT IS EX...
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 copyrig...
JavaScript
// =================================================================== // Author: Matt Kruse <matt@mattkruse.com> // WWW: http://www.mattkruse.com/ // // NOTICE: You may use this code for any purpose, commercial or // private, without any further permission from the author. You may // remove this notice from your...
JavaScript