X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fmediawiki%2Fmediawiki.feedback.js;h=1afe51eff6fd1659bb5d9aad374f279ccf018f31;hb=4d8cff99e75c690a418dd887152d90b9d08844ad;hp=8a9435ec7da9754cf82d3af3039cd36d1f754ff8;hpb=7047be59eb3afcff1d8f5a91f5906d6d9b1c2167;p=lhc%2Fweb%2Fwiklou.git
diff --git a/resources/mediawiki/mediawiki.feedback.js b/resources/mediawiki/mediawiki.feedback.js
index 8a9435ec7d..1afe51eff6 100644
--- a/resources/mediawiki/mediawiki.feedback.js
+++ b/resources/mediawiki/mediawiki.feedback.js
@@ -1,45 +1,43 @@
-/**
- * mediawiki.Feedback
+/**
+ * mediawiki.feedback
*
* @author Ryan Kaldari, 2010
* @author Neil Kandalgaonkar, 2010-11
* @since 1.19
*
* This is a way of getting simple feedback from users. It's useful
- * for testing new features -- users can give you feedback without
+ * for testing new features -- users can give you feedback without
* the difficulty of opening a whole new talk page. For this reason,
* it also tends to collect a wider range of both positive and negative
- * comments. However you do need to tend to the feedback page. It will
- * get long relatively quickly, and you often get multiple messages
+ * comments. However you do need to tend to the feedback page. It will
+ * get long relatively quickly, and you often get multiple messages
* reporting the same issue.
*
* It takes the form of thing on your page which, when clicked, opens a small
- * dialog box. Submitting that dialog box appends its contents to a
+ * dialog box. Submitting that dialog box appends its contents to a
* wiki page that you specify, as a new section.
*
* Not compatible with LiquidThreads.
- *
+ *
* Minimal example in how to use it:
- *
+ *
* var feedback = new mw.Feedback();
- * $( '#myButton' ).click( function() { feedback.launch(); } );
- *
- * You can also launch the feedback form with a prefilled subject and body.
- * See the docs for the launch() method.
+ * $( '#myButton' ).click( function () { feedback.launch(); } );
+ *
+ * You can also launch the feedback form with a prefilled subject and body.
+ * See the docs for the launch() method.
*/
-( function( mw, $, undefined ) {
-
+( function ( mw, $ ) {
/**
* Thingy for collecting user feedback on a wiki page
* @param {Array} options -- optional, all properties optional.
- * api: {mw.Api} if omitted, will just create a standard API
- * title: {mw.Title} the title of the page where you collect feedback. Defaults to "Feedback".
- * dialogTitleMessageKey: {String} message key for the title of the dialog box
- * bugsLink: {mw.Uri|String} url where bugs can be posted
- * bugsListLink: {mw.Uri|String} url where bugs can be listed
+ * api: {mw.Api} if omitted, will just create a standard API
+ * title: {mw.Title} the title of the page where you collect feedback. Defaults to "Feedback".
+ * dialogTitleMessageKey: {String} message key for the title of the dialog box
+ * bugsLink: {mw.Uri|String} url where bugs can be posted
+ * bugsListLink: {mw.Uri|String} url where bugs can be listed
*/
- mw.Feedback = function( options ) {
-
+ mw.Feedback = function ( options ) {
if ( options === undefined ) {
options = {};
}
@@ -69,162 +67,200 @@
};
mw.Feedback.prototype = {
- setup: function() {
- var _this = this;
-
-
- var $feedbackPageLink = $( '' )
- .attr( { 'href': _this.title.getUrl(), 'target': '_blank' } )
- .css( { 'white-space': 'nowrap' } );
-
- var $bugNoteLink = $( '' ).attr( { 'href': '#' } ).click( function() { _this.displayBugs(); } );
-
- var $bugsListLink = $( '' ).attr( { 'href': _this.bugsListLink, 'target': '_blank' } );
-
- this.$dialog =
- $( '