/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
function init(){
//variables
var toggleFlag = false; // detects toggling in toggle button
var endFlag = false; // ending of toggling in toggle button
var addToggleStart = false; // detects toggling in add button
var addToggleEnd = false; // ending of toggling in add button
var shadowOver = false;
var mode = false;
var popupFlag = false
var flagForSelect = false;
var dragElement = null; //the element that must be dragging
var coords = {
left:0,
top:0
}
var resizeObj = {
y:false,
x:false,
width:0,
height:0
}
var opacityChanged = false;
if(window.sankore){
if(sankore.preference("blackYellowData","")){
var importArray = jQuery.parseJSON(sankore.preference("blackYellowData",""));
for(var i in importArray){
var tmpReadyTask = $("
");
var exprContainer = $("
" + importArray[i].data1 + "
").appendTo(tmpReadyTask);
var resContainer = $("
"+ importArray[i].data2 + "
").appendTo(tmpReadyTask);
tmpReadyTask.width(importArray[i].width)
.height(importArray[i].height)
.css("position","absolute")
.css("top",importArray[i].top)
.css("left",importArray[i].left);
tmpReadyTask.appendTo("body");
}
}
$(document).disableTextSelect();
}
/* ------------- BUTTONS -------------*/
// toggle button
var buttonDiv = $("