left_width value is now get on run time via jquery. see BT#6799

1.9.x
Julio Montoya 12 years ago
parent 079e15df52
commit c1d3e1008f
  1. 36
      main/inc/lib/javascript/jquery.lp_minipanel.js

@ -37,14 +37,14 @@ function toogle_minipanel() {
$('#learning_path_left_zone').hide(50);
$('#learning_path_right_zone').css('margin-left','10px');
$('#hide_bar table').css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE');
}
var left_width = 292; // (relative) hide_bar position
var left_width_mini = 20; // (relative) hide_bar position
$(document).ready(function() {
left_width = $('learning_path_left_zone').width();
//Adding div to hide panel
$('#learning_path_right_zone').before('<div id="hide_bar" style="float: left; width: 10px; height: 1000px;">' +
'<table style="border: 0 none; width: 100%; height: 100%; cursor: pointer; background-color: #EEEEEE">' +
@ -67,23 +67,21 @@ $(document).ready(function() {
var original = $('#content_id').height();
// Adding funcionality
$('#hide_bar table').toggle(function(){
if ($('#hide_bar').position().left >= left_width) {
toogle_minipanel();
}
},
function(){
// Show navigation left zone
$('#learning_path_left_zone').show(50);
$('#learning_path_right_zone').css('marginLeft', left_width + 10 + 'px');
$('#hide_bar table').css('backgroundImage','url(../img/hide0.png)').css('backgroundColor','#EEEEEE');
$('#learning_path_main #control').remove();
$('#content_id').css({ height: original});
}
);
// Adding functionality
$('#hide_bar table').toggle(function(){
if ($('#hide_bar').position().left >= left_width) {
toogle_minipanel();
}
},
function() {
// Show navigation left zone
$('#learning_path_left_zone').show(50);
$('#learning_path_right_zone').css('marginLeft', left_width + 10 + 'px');
$('#hide_bar table').css('backgroundImage','url(../img/hide0.png)').css('backgroundColor','#EEEEEE');
$('#learning_path_main #control').remove();
$('#content_id').css({ height: original});
});
});

Loading…
Cancel
Save