Index: trunk/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -30,9 +30,13 @@ |
31 | 31 | 'tooltip-moodbar-what' => 'Learn more about this feature', |
32 | 32 | 'moodbar-what-target' => 'http://www.mediawiki.org/wiki/MoodBar', |
33 | 33 | 'moodbar-what-label' => 'What is this?', |
34 | | - 'moodbar-what-expanded' => '▼', // Ignore, do not translate |
35 | | - 'moodbar-what-collapsed' => '▶', // Ignore, do not translate |
| 34 | + 'moodbar-what-expanded' => '▶', // Ignore, do not translate. ▼ |
| 35 | + 'moodbar-what-collapsed' => '▼', // Ignore, do not translate. ▶ |
36 | 36 | 'moodbar-what-content' => '--- @todo ---', |
| 37 | + 'moodbar-form-title' => 'Because...', |
| 38 | + 'moodbar-form-note' => '140 character maximum', |
| 39 | + 'moodbar-form-note-dynamic' => '$1 characters remaining', |
| 40 | + 'moodbar-form-submit' => 'Send Feedback ▶', |
37 | 41 | // Special:MoodBar |
38 | 42 | 'right-moodbar-view' => 'View and export MoodBar feedback', |
39 | 43 | 'moodbar-admin-title' => 'MoodBar feedback', |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css |
— | — | @@ -42,10 +42,30 @@ |
43 | 43 | font-size: 12px; |
44 | 44 | } |
45 | 45 | |
| 46 | +.mw-moodBar-form, |
46 | 47 | .mw-moodBar-overlayWhatContent { |
47 | 48 | display: none; |
| 49 | + overflow: hidden; |
48 | 50 | } |
49 | 51 | |
| 52 | +.mw-moodBar-formNote { |
| 53 | + float: right; |
| 54 | + font-size: 10px; |
| 55 | + color: #7e7e7e; |
| 56 | +} |
| 57 | + |
| 58 | +.mw-moodBar-formTitle { |
| 59 | + font-size: 18px; |
| 60 | +} |
| 61 | + |
| 62 | +.mw-moodBar-formInput { |
| 63 | + width: 100%; |
| 64 | +} |
| 65 | + |
| 66 | +.mw-moodBar-formSubmit { |
| 67 | + float: right; |
| 68 | +} |
| 69 | + |
50 | 70 | /** |
51 | 71 | * Types |
52 | 72 | */ |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -14,6 +14,14 @@ |
15 | 15 | <span class="mw-moodBar-overlayClose"><a href="#"><html:msg key="moodbar-close" /></a></span>\ |
16 | 16 | <div class="mw-moodBar-overlayTitle"><html:msg key="moodbar-intro-using" /></div>\ |
17 | 17 | <div class="mw-moodBar-types"></div>\ |
| 18 | + <div class="mw-moodBar-form">\ |
| 19 | + <div class="mw-moodBar-formTitle">\ |
| 20 | + <span class="mw-moodBar-formNote"><html:msg key="moodbar-form-note" /></span>\ |
| 21 | + <html:msg key="moodbar-form-title" />\ |
| 22 | + </div>\ |
| 23 | + <input type="text" maxlength="140" class="mw-moodBar-formInput" />\ |
| 24 | + <input type="button" class="mw-moodBar-formSubmit" />\ |
| 25 | + </div>\ |
18 | 26 | <span class="mw-moodBar-overlayWhat">\ |
19 | 27 | <a title-msg="tooltip-moodbar-what">\ |
20 | 28 | <span class="mw-moodBar-overlayWhatTrigger"></span>\ |
— | — | @@ -75,6 +83,7 @@ |
76 | 84 | .localize() |
77 | 85 | .click( function( e ) { |
78 | 86 | var $el = $( this ); |
| 87 | + mb.ui.overlay.find( '.mw-moodBar-form' ).slideDown( 'fast' ); |
79 | 88 | $mwMoodBarTypes.addClass( 'mw-moodBar-types-select' ); |
80 | 89 | mb.feedbackItem.type = $el.attr( 'rel' ); |
81 | 90 | $el.addClass( 'mw-moodBar-selected' ); |
— | — | @@ -96,7 +105,7 @@ |
97 | 106 | .end() |
98 | 107 | // Link what-button |
99 | 108 | .find( '.mw-moodBar-overlayWhatTrigger' ) |
100 | | - .html( mw.msg( 'moodbar-what-collapsed' ) ) |
| 109 | + .text( mw.msg( 'moodbar-what-collapsed' ) ) |
101 | 110 | .end() |
102 | 111 | .find( '.mw-moodBar-overlayWhat > a' ) |
103 | 112 | .click( function() { |
— | — | @@ -106,15 +115,22 @@ |
107 | 116 | var $el = $( this ), |
108 | 117 | $trigger = mb.ui.overlay.find( '.mw-moodBar-overlayWhatTrigger' ); |
109 | 118 | if ( $el.is( ':visible' ) ) { |
110 | | - $el.slideUp(); |
| 119 | + $el.slideUp( 'fast' ); |
111 | 120 | $trigger.html( mw.msg( 'moodbar-what-collapsed' ) ); |
112 | 121 | } else { |
113 | | - $el.slideDown(); |
| 122 | + $el.slideDown( 'fast' ); |
114 | 123 | $trigger.html( mw.msg( 'moodbar-what-expanded' ) ); |
115 | 124 | } |
116 | 125 | } ) |
117 | 126 | } ) |
118 | | - .end(); |
| 127 | + .end() |
| 128 | + // Submit |
| 129 | + .find( '.mw-moodBar-formSubmit' ) |
| 130 | + .val( mw.msg( 'moodbar-form-submit' ) ) |
| 131 | + .click( function() { |
| 132 | + |
| 133 | + } ) |
| 134 | + .end(); |
119 | 135 | |
120 | 136 | // Inject overlay |
121 | 137 | mb.ui.overlay.appendTo( 'body' ); |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -77,6 +77,10 @@ |
78 | 78 | 'moodbar-what-expanded', |
79 | 79 | 'moodbar-what-collapsed', |
80 | 80 | 'moodbar-what-content', |
| 81 | + 'moodbar-form-title', |
| 82 | + 'moodbar-form-note', |
| 83 | + 'moodbar-form-note-dynamic', |
| 84 | + 'moodbar-form-submit', |
81 | 85 | ), |
82 | 86 | 'dependencies' => array( |
83 | 87 | 'mediawiki.util', |