r108271 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108270‎ | r108271 | r108272 >
Date:19:34, 6 January 2012
Author:rmoen
Status:ok (Comments)
Tags:todo 
Comment:
added needed assets and function to load tooltip for response concurrency notification
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/mb-icon-16x16-alert.png (added) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/tooltip-pokey.png (added) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -87,6 +87,48 @@
8888 margin: 1em 0 0 0;
8989 }
9090
 91+/* Tool Tip */
 92+
 93+.fbd-tooltip-overlay-wrap {
 94+ width: 285px;
 95+ position: absolute;
 96+ left: 7em;
 97+ top: 5.25em;
 98+ background: #ff9933;
 99+ padding: 2px;
 100+}
 101+
 102+.fbd-tooltip-pointy {
 103+ position: absolute;
 104+ top: -15px;
 105+ left: 15px;
 106+ /* @embed */
 107+ background: url(images/tooltip-pokey.png);
 108+ background-repeat: no-repeat;
 109+ background-position: left;
 110+ height: 17px;
 111+ width: 15px;
 112+}
 113+
 114+.fbd-tooltip-overlay {
 115+ background: #fefac6;
 116+ padding: 10px;
 117+}
 118+
 119+.fbd-tooltip-title {
 120+ font-weight: bold;
 121+ font-size: 0.75em;
 122+ /* embed */
 123+ background: url(images/mb-icon-16x16-alert.png) left top no-repeat;
 124+ line-height: 18px;
 125+ padding-left: 20px;
 126+}
 127+
 128+.fbd-tooltip-close {
 129+ color: #FF9933;
 130+ float: right;
 131+}
 132+
91133 /* List */
92134
93135 #fbd-list {
@@ -230,6 +272,7 @@
231273
232274 .fbd-item-response {
233275 line-height: 2.1em;
 276+ position: relative;
234277 }
235278
236279 .fbd-item-response-icon {
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -455,7 +455,7 @@
456456
457457 //get the feedbackItem
458458 var $item = $(this).closest('.fbd-item');
459 -
 459+ //close any open responders prior to opening this one.
460460 closeAllResponders();
461461
462462 $(this).find('.fbd-item-response-collapsed')
@@ -509,6 +509,7 @@
510510 wikitext = wikitext.replace(/~{3,5}/g, '') + "\n\n~~~~"; //remove and add signature for
511511 parseWikiText($item, wikitext);
512512 });
 513+
513514 }
514515 e.preventDefault();
515516 }
@@ -593,7 +594,38 @@
594595 setTimeout(function(){
595596 reloadItem($el, true);
596597 }, 2000);
597 - }
 598+ }
 599+ /* Display tooltip for response concurrency notification
 600+ * @param $item Feedback item
 601+ * @param msg Message to display in tooltip
 602+ */
 603+ function loadToolTip($item, msg) {
 604+ var tooltip = $('<div>').attr('class', 'fbd-tooltip-overlay-wrap')
 605+ .append(
 606+ $('<div>').attr('class', 'fbd-tooltip-overlay')
 607+ .append(
 608+ $('<div>').attr('class', 'fbd-tooltip-pointy')
 609+ ).append(
 610+ $('<div>').attr('class', 'fbd-tooltip-title')
 611+ .text( msg )
 612+ .prepend(
 613+ $('<span>').attr('class', 'fbd-tooltip-close').text('X')
 614+ )
 615+ )
 616+ );
 617+ $item
 618+ .append( tooltip );
 619+ $( '.fbd-tooltip-close' )
 620+ .live( 'click' , function() {
 621+ tooltip.remove();
 622+ });
 623+ setTimeout( function() {
 624+ tooltip.fadeOut(function(tooltip){
 625+ tooltip.remove();
 626+ });
 627+ }, 1500 );
 628+
 629+ }
598630 // On-load stuff
599631
600632 $('.fbd-item-show a').live( 'click', showHiddenItem );
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/mb-icon-16x16-alert.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/mb-icon-16x16-alert.png
___________________________________________________________________
Added: svn:mime-type
601633 + image/png
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/tooltip-pokey.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/images/tooltip-pokey.png
___________________________________________________________________
Added: svn:mime-type
602634 + image/png

Follow-up revisions

RevisionCommit summaryAuthorDate
r108573add concurrency call to feedback dashboard, revise loadConcurrencyToolTip met...rmoen00:22, 11 January 2012

Comments

#Comment by Krinkle (talk | contribs)   20:42, 10 January 2012

loadToolTip() doesn't appear to be used anywhere (not here and not in the current HEAD). was this intended to be committed ?

#Comment by Robmoen (talk | contribs)   20:54, 10 January 2012

Currently, this is not used. Waiting on concurrency API to be commmited to trunk. Will follow up today.

Status & tagging log