spacing
This commit is contained in:
parent
ecfd283b44
commit
c319e56609
1 changed files with 56 additions and 58 deletions
|
@ -549,17 +549,17 @@ function changeThemeTo( theme )
|
||||||
|
|
||||||
function setCookie(c_name,value,exdays)
|
function setCookie(c_name,value,exdays)
|
||||||
{
|
{
|
||||||
var exdate=new Date();
|
var exdate=new Date();
|
||||||
exdate.setDate(exdate.getDate() + exdays);
|
exdate.setDate(exdate.getDate() + exdays);
|
||||||
var c_value=escape(value) + ((exdays===null) ? "" : "; expires="+exdate.toUTCString());
|
var c_value=escape(value) + ((exdays===null) ? "" : "; expires="+exdate.toUTCString());
|
||||||
document.cookie=c_name + "=" + c_value;
|
document.cookie=c_name + "=" + c_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCookie(c_name)
|
function getCookie(c_name)
|
||||||
{
|
{
|
||||||
var i,x,y,ARRcookies=document.cookie.split(";");
|
var i,x,y,ARRcookies=document.cookie.split(";");
|
||||||
for (i=0;i<ARRcookies.length;i++)
|
for (i=0;i<ARRcookies.length;i++)
|
||||||
{
|
{
|
||||||
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
|
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
|
||||||
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
|
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
|
||||||
x=x.replace(/^\s+|\s+$/g,"");
|
x=x.replace(/^\s+|\s+$/g,"");
|
||||||
|
@ -667,26 +667,24 @@ function adjustCard(offsets, doSync) {
|
||||||
$(".card").each(function() {
|
$(".card").each(function() {
|
||||||
var card = $(this);
|
var card = $(this);
|
||||||
var offset = offsets[this.id];
|
var offset = offsets[this.id];
|
||||||
if(offset) {
|
if (offset) {
|
||||||
var data = {
|
var data = {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
position: {
|
position: {
|
||||||
left: offset.col.position().left + (offset.x * offset.col.outerWidth()),
|
left: offset.col.position().left + (offset.x * offset.col
|
||||||
top: parseInt(card.css('top').slice(0,-2))
|
.outerWidth()),
|
||||||
|
top: parseInt(card.css('top').slice(0, -2))
|
||||||
},
|
},
|
||||||
oldposition: {
|
oldposition: {
|
||||||
left: parseInt(card.css('left').slice(0,-2)),
|
left: parseInt(card.css('left').slice(0, -2)),
|
||||||
top: parseInt(card.css('top').slice(0,-2))
|
top: parseInt(card.css('top').slice(0, -2))
|
||||||
}
|
}
|
||||||
}; //use .css() instead of .position() because css' rotate
|
}; //use .css() instead of .position() because css' rotate
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
if (!doSync)
|
if (!doSync) {
|
||||||
{
|
card.css('left', data.position.left);
|
||||||
card.css('left',data.position.left);
|
card.css('top', data.position.top);
|
||||||
card.css('top',data.position.top);
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//note that in this case, data.oldposition isn't accurate since
|
//note that in this case, data.oldposition isn't accurate since
|
||||||
//many moves have happened since the last sync
|
//many moves have happened since the last sync
|
||||||
//but that's okay becuase oldPosition isn't used right now
|
//but that's okay becuase oldPosition isn't used right now
|
||||||
|
|
Loading…
Add table
Reference in a new issue