Add ability to create new trials

This commit is contained in:
Eike Foken
2011-08-18 20:48:44 +02:00
parent 04c8301d6f
commit 20d0d2b9f5
4 changed files with 118 additions and 74 deletions

View File

@@ -14,10 +14,10 @@ $(document).ready(JT_init);
* Initializes JTip.
*/
function JT_init() {
$('a.jTip').hover(function() {
$('a.jtip').hover(function() {
JT_show(this.href, this.id, this.name);
}, function() {
$('#JT').remove();
$('#jt').remove();
}).click(function() {
return false;
});
@@ -54,17 +54,17 @@ function JT_show(url, linkId, title) {
}
if (hasArea > (params['width'] * 1) + 75) {
$('body').append('<div id="JT" style="width: ' + params['width'] * 1 + 'px;"><div id="JT_arrow_left"></div><div id="JT_close_left">' + title + '</div><div id="JT_copy"><div class="JT_loader"><div></div></div>'); // right side
$('body').append('<div id="jt" style="width: ' + params['width'] * 1 + 'px;"><div id="jt_arrow_left"></div><div id="jt_close_left">' + title + '</div><div id="jt_copy"><div class="jt_loader"><div></div></div>'); // right side
var arrowOffset = getElementWidth(linkId) + 11;
clickElementX = getAbsoluteLeft(linkId) + arrowOffset; // set x position
} else {
$('body').append('<div id="JT" style="width: ' + params['width'] * 1 + 'px;"><div id="JT_arrow_right" style="left: ' + ((params['width'] * 1) + 1) + 'px;"></div><div id="JT_close_right">' + title + '</div><div id="JT_copy"><div class="JT_loader"><div></div></div>'); // left side
$('body').append('<div id="jt" style="width: ' + params['width'] * 1 + 'px;"><div id="jt_arrow_right" style="left: ' + ((params['width'] * 1) + 1) + 'px;"></div><div id="jt_close_right">' + title + '</div><div id="jt_copy"><div class="jt_loader"><div></div></div>'); // left side
clickElementX = getAbsoluteLeft(linkId) - ((params['width']*1) + 15); //set x position
}
$('#JT').css({ left: clickElementX + 'px', top: clickElementY + 'px' });
$('#JT').show();
$('#JT_copy').load(url);
$('#jt').css({ left: clickElementX + 'px', top: clickElementY + 'px' });
$('#jt').show();
$('#jt_copy').load(url);
}
/**