r92781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92780‎ | r92781 | r92782 >
Date:19:22, 21 July 2011
Author:krinkle
Status:deferred
Tags:
Comment:
MoodBar front-end dev:
* ext.moodBar.core:
- form and what trigger implemented
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -30,9 +30,13 @@
3131 'tooltip-moodbar-what' => 'Learn more about this feature',
3232 'moodbar-what-target' => 'http://www.mediawiki.org/wiki/MoodBar',
3333 '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. ▶
3636 '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 ▶',
3741 // Special:MoodBar
3842 'right-moodbar-view' => 'View and export MoodBar feedback',
3943 'moodbar-admin-title' => 'MoodBar feedback',
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css
@@ -42,10 +42,30 @@
4343 font-size: 12px;
4444 }
4545
 46+.mw-moodBar-form,
4647 .mw-moodBar-overlayWhatContent {
4748 display: none;
 49+ overflow: hidden;
4850 }
4951
 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+
5070 /**
5171 * Types
5272 */
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js
@@ -14,6 +14,14 @@
1515 <span class="mw-moodBar-overlayClose"><a href="#"><html:msg key="moodbar-close" /></a></span>\
1616 <div class="mw-moodBar-overlayTitle"><html:msg key="moodbar-intro-using" /></div>\
1717 <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>\
1826 <span class="mw-moodBar-overlayWhat">\
1927 <a title-msg="tooltip-moodbar-what">\
2028 <span class="mw-moodBar-overlayWhatTrigger"></span>\
@@ -75,6 +83,7 @@
7684 .localize()
7785 .click( function( e ) {
7886 var $el = $( this );
 87+ mb.ui.overlay.find( '.mw-moodBar-form' ).slideDown( 'fast' );
7988 $mwMoodBarTypes.addClass( 'mw-moodBar-types-select' );
8089 mb.feedbackItem.type = $el.attr( 'rel' );
8190 $el.addClass( 'mw-moodBar-selected' );
@@ -96,7 +105,7 @@
97106 .end()
98107 // Link what-button
99108 .find( '.mw-moodBar-overlayWhatTrigger' )
100 - .html( mw.msg( 'moodbar-what-collapsed' ) )
 109+ .text( mw.msg( 'moodbar-what-collapsed' ) )
101110 .end()
102111 .find( '.mw-moodBar-overlayWhat > a' )
103112 .click( function() {
@@ -106,15 +115,22 @@
107116 var $el = $( this ),
108117 $trigger = mb.ui.overlay.find( '.mw-moodBar-overlayWhatTrigger' );
109118 if ( $el.is( ':visible' ) ) {
110 - $el.slideUp();
 119+ $el.slideUp( 'fast' );
111120 $trigger.html( mw.msg( 'moodbar-what-collapsed' ) );
112121 } else {
113 - $el.slideDown();
 122+ $el.slideDown( 'fast' );
114123 $trigger.html( mw.msg( 'moodbar-what-expanded' ) );
115124 }
116125 } )
117126 } )
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();
119135
120136 // Inject overlay
121137 mb.ui.overlay.appendTo( 'body' );
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -77,6 +77,10 @@
7878 'moodbar-what-expanded',
7979 'moodbar-what-collapsed',
8080 'moodbar-what-content',
 81+ 'moodbar-form-title',
 82+ 'moodbar-form-note',
 83+ 'moodbar-form-note-dynamic',
 84+ 'moodbar-form-submit',
8185 ),
8286 'dependencies' => array(
8387 'mediawiki.util',

Status & tagging log