miLock small clock fix




Ok I had a chance to look at the clock. I have received multiple emails saying that is doesnt disappear, It does dissapear, but after lock/unlock it will come back:( Here is a fix. I will update but it will be a day or so.

This isnt hard but you have to pay attention.

Go to the lockscreen.css look for
#clock{
  position: absolute;
  top:15px;
  left:500px;
  z-index: 5;
}

Add the left:500px

next go into the junecookie.js look for $("#timeoff").click(function() . in this function we will need to, move the left css back to 0px since we set it to move 500px off screen.

To do this add $('#clock').css("left", '0px'); when clicked it will move the clock to be shown at 0px

since we moved it we need to make a cookie to save wether it was moved or not. to do this add
$.cookie('timestate', $("#clock").css('left')); this will take my existing cookie (timestate) and save the clock css.

You will need to do the exact thing for  $("#timeon").click(function()

Also we will need to add it to our if and else statement. This tells it to set that cookie after the lock loads.
if statement $('#clock').css('left', $.cookie('timestate')); else statement     $('#clock').css('left', '0px');

full time js edited


$("#timeoff").click(function() {
$('#timeoff').css("left", '115px');
$('#timeon').css("left", '160px');
$('#Time').css("left", '150px');
$('#clock').css("left", '0px');
$.cookie('timestate', $("#Time").css('left'));
$.cookie('timestate', $("#clock").css('left'));
$.cookie('buttoncook', $("#timeoff").css('left'));
});

$("#timeon").click(function() {
$('#timeoff').css("left", '120px');
$('#timeon').css("left", '160px');
$('#Time').css("left", '500px');
$.cookie('timestate', $("#Time").css('left'));
$.cookie('#clock', $("#Time").css('left'));
$.cookie('buttoncook', $("#timeoff").css('left'));
});

if($.cookie('timestate') != null){
    $('#Time').css('left', $.cookie('timestate'));
    $('#clock').css('left', $.cookie('timestate'));

}else{
    $('#timetate').css('left', '0px');
     $('#clock').css('left', '0px');
}


if($.cookie('buttoncook') != null){
    $('#timeoff').css('left', $.cookie('buttoncook'));


}else{
    $('#timeoff').css('left', 'buttoncook');
}

No comments:

Post a Comment