Skip to content
Snippets Groups Projects
Commit 9fd5ca2e authored by Stefan Grönke's avatar Stefan Grönke
Browse files

jQuery latest

* jQuery 1.9.0
* jQuery-UI v1.9.2
* jQuery.fn.live > jQuery.fn.on
* jQuery.fn.browser replacement (jquery.mb.browser.js)
parent e6c4a822
No related branches found
No related tags found
No related merge requests found
Showing
with 12802 additions and 10167 deletions
......@@ -43,6 +43,7 @@ function js_out(){
DOKU_INC."lib/scripts/jquery/jquery$min.js",
DOKU_INC.'lib/scripts/jquery/jquery.cookie.js',
DOKU_INC."lib/scripts/jquery/jquery-ui$min.js",
DOKU_INC."lib/scripts/jquery/jquery.mb.browser.js",
DOKU_INC."lib/scripts/fileuploader.js",
DOKU_INC."lib/scripts/fileuploaderextended.js",
DOKU_INC.'lib/scripts/helpers.js',
......
/**
* Hides elements with a slide animation
*
* @param fn optional callback to run after hiding
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_hide = function(fn) {
return this.slideUp('fast', fn);
};
/**
* Unhides elements with a slide animation
*
* @param fn optional callback to run after hiding
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_show = function(fn) {
return this.slideDown('fast', fn);
};
/**
* Toggles visibility of an element using a slide element
*
* @param bool the current state of the element (optional)
*/
jQuery.fn.dw_toggle = function(bool, fn) {
return this.each(function() {
var $this = jQuery(this);
if (typeof bool === 'undefined') {
bool = $this.is(':hidden');
}
$this[bool ? "dw_show" : "dw_hide" ](fn);
});
};
/**
* Automatic behaviours
*
......@@ -16,7 +51,7 @@ var dw_behaviour = {
dw_behaviour.subscription();
dw_behaviour.revisionBoxHandler();
jQuery('#page__revisions input[type=checkbox]').live('click',
jQuery('#page__revisions input[type=checkbox]').on('click',
dw_behaviour.revisionBoxHandler
);
},
......@@ -77,7 +112,7 @@ var dw_behaviour = {
return;
}
jQuery('a.windows').live('click', function(){
jQuery('a.windows').on('click', function(){
alert(LANG.nosmblinks.replace(/\\n/,"\n"));
});
},
......@@ -142,39 +177,4 @@ var dw_behaviour = {
};
/**
* Hides elements with a slide animation
*
* @param fn optional callback to run after hiding
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_hide = function(fn) {
return this.slideUp('fast', fn);
};
/**
* Unhides elements with a slide animation
*
* @param fn optional callback to run after hiding
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_show = function(fn) {
return this.slideDown('fast', fn);
};
/**
* Toggles visibility of an element using a slide element
*
* @param bool the current state of the element (optional)
*/
jQuery.fn.dw_toggle = function(bool, fn) {
return this.each(function() {
var $this = jQuery(this);
if (typeof bool === 'undefined') {
bool = $this.is(':hidden');
}
$this[bool ? "dw_show" : "dw_hide" ](fn);
});
};
jQuery(dw_behaviour.init);
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
/**
* jQuery Cookie plugin
/*!
* jQuery Cookie Plugin v1.3
* https://github.com/carhartl/jquery-cookie
*
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* http://www.opensource.org/licenses/GPL-2.0
*/
jQuery.cookie = function (key, value, options) {
// key and at least value given, set cookie...
if (arguments.length > 1 && String(value) !== "[object Object]") {
options = jQuery.extend({}, options);
if (value === null || value === undefined) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=',
options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// key and possibly options given, get cookie...
options = value || {};
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
(function ($, document, undefined) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return decodeURIComponent(s.replace(pluses, ' '));
}
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = config.json ? JSON.stringify(value) : String(value);
return (document.cookie = [
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// read
var decode = config.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
if (decode(parts.shift()) === key) {
var cookie = decode(parts.join('='));
return config.json ? JSON.parse(cookie) : cookie;
}
}
return null;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) !== null) {
$.cookie(key, null, options);
return true;
}
return false;
};
})(jQuery, document);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment