summaryrefslogtreecommitdiff
path: root/lib/scripts/behaviour.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-02-03 22:57:45 +0100
committerAndreas Gohr <andi@splitbrain.org>2013-02-03 22:57:45 +0100
commit3da7921f08ecdda929466921ecc50698f1adf99e (patch)
tree0e179e504399e874bfd785d0a95eec44b76d5952 /lib/scripts/behaviour.js
parent6cf2bbfa12b776cf47cb69ae40fb8862f715ad01 (diff)
parentcc4bb766fdac23358d7b586aa3830b9650eed7a8 (diff)
downloadrpg-3da7921f08ecdda929466921ecc50698f1adf99e.tar.gz
rpg-3da7921f08ecdda929466921ecc50698f1adf99e.tar.bz2
Merge branch 'master' into future
* master: (162 commits) fixed revision JS for images upgraded SimplePie to 1.3.1 FS#2708 removed obsolete browser plugin (migrate does it) adjust spacing to match standard 1.4em grid added comment on use of whitelist vs blacklist Updated idfilter() function for IIS use var and remove suggestions when needed Use variable for maximum number of suggestions for quicksearch. And hide suggestions when search field is emptied, or when no suggestion are found. added 'home' class to first link in hierarchical breadcrumbs reduced required max width to go into tablet mode re-added linear gradients for firefox added missing styling for disabled form elements (FS#2705) fixed acronyms in italics (FS#2684) improved print styles (includes fixes for FS#2645 and FS#2707) basic styles improvements Greek language update Use list in acl help text, for more structure Galician language update touch the config on save, even if no changes were made unwind the width narrowing commit put some whitespace between form submit button and fieldset bottom border ... Conflicts: lib/plugins/config/admin.php lib/plugins/config/settings/config.class.php
Diffstat (limited to 'lib/scripts/behaviour.js')
-rw-r--r--lib/scripts/behaviour.js74
1 files changed, 37 insertions, 37 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index cffdde042..f1c46bf4c 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -1,4 +1,39 @@
/**
+ * 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
*
* This class wraps various JavaScript functionalities that are triggered
@@ -16,7 +51,7 @@ var dw_behaviour = {
dw_behaviour.subscription();
dw_behaviour.revisionBoxHandler();
- jQuery('#page__revisions input[type=checkbox]').live('click',
+ jQuery(document).on('click','#page__revisions input[type=checkbox]',
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);