Skip to content

Commit

Permalink
verbatim tooltips using qtip.js fixes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejdlf committed Dec 20, 2012
1 parent 265ff10 commit 360c383
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3,786 deletions.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -55,8 +55,11 @@ To understand how the reanalyse project works, you'll need to read carefully:
* `./upload/`



$ vi settingsprivate.py

$ mkdir logs upload download solrdataindex

$ sudo chown -R www-data:www-data solr log upload download

### Postgresql
Expand Down Expand Up @@ -135,7 +138,7 @@ manually translate file `./locale/fr/LC_MESSAGES/django.po`

the normalisation process is described within the "Method" page in the website `./templates/content/method_content_fr.html`

but if need to add icons, please refer to the comments within the `./reanalyseapp/globalvars.py` file
to add more icons, please refer to the comments within the `./reanalyseapp/globalvars.py` file

## django models & views

Expand Down
64 changes: 49 additions & 15 deletions media/js/utilScripts.js
Expand Up @@ -169,11 +169,11 @@ function changeVerbatimWordsDisplay(wordsStr,css_prefix,showOnly) {
// viz involved tooltips
var closemodalvizdialog;
function overlaymodalclickclose() {
if (closemodalvizdialog) {
$('.vizmodal').dialog('close');
}
//set to one because click on dialog (focus) box sets to zero
closemodalvizdialog = 1;
if (closemodalvizdialog) {
$('.vizmodal').dialog('close');
}
//set to one because click on dialog (focus) box sets to zero
closemodalvizdialog = 1;
}
function initVizInvolvedModals(getvizhtmlurl) {
$(".vizinvolved").click( function(event) {
Expand All @@ -193,15 +193,15 @@ function initVizInvolvedModals(getvizhtmlurl) {
resizable: false,
position: ['center',100],
open: function() {
closemodalvizdialog = 1;
$(document).bind('click', overlaymodalclickclose);
},
focus: function() {
closemodalvizdialog = 0;
},
close: function() {
$(document).unbind('click');
},
closemodalvizdialog = 1;
$(document).bind('click', overlaymodalclickclose);
},
focus: function() {
closemodalvizdialog = 0;
},
close: function() {
$(document).unbind('click');
},
});
//closemodalvizdialog = 0;
},
Expand Down Expand Up @@ -564,6 +564,40 @@ function initSpeakerTableScrollBar() {
//////////////////////////////////////////////////////////////////
// INIT VERBATIM TOOLTIPS
function initVerbatimTooltips() {
$('a[rel=text_tooltip]').each(function() {
$(this).qtip({
content: $(this).attr("title"),
show: 'mouseover',
hide: 'mouseout',
position: {
corner: {
target: 'bottomMiddle',
tooltip: 'topMiddle'
}
},
/*
style: {
//width: 200,
padding: 5,
//background: '#A2D959',
//color: 'black',
textAlign: 'center',
border: {
width: 7,
radius: 5,
color: '#A2D959'
},
//name: 'dark' // Inherit the rest of the attributes from the preset dark style
}
*/
});
});
};


/* deprecated manual tooltip */
/*
function initVerbatimTooltipsOld() {
//console.log("init verbatim tooltips");
//Select all anchor tag with rel set to tooltip
$('a[rel=text_tooltip]').mouseover(function(e) {
Expand Down Expand Up @@ -631,7 +665,6 @@ function initVerbatimTooltips() {
}
).data('hover', false);
}

})
.mousemove(function(e) {
Expand All @@ -648,6 +681,7 @@ function initVerbatimTooltips() {
}
});
}
*/
//////////////////////////////////////////////////////////////////


Expand Down

0 comments on commit 360c383

Please sign in to comment.