Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
commit f30f5b33a7
  1. 4
      resources/library/interactive/GeoInfo.wgt/GeoInfo.html
  2. 149
      resources/library/interactive/GeoInfo.wgt/css/GeoInfo.css
  3. BIN
      resources/library/interactive/GeoInfo.wgt/images/cursor.png
  4. 223
      resources/library/interactive/GeoInfo.wgt/js/GeoInfo.js
  5. 5
      resources/library/interactive/Graphme.wgt/Grapheur.xhtml
  6. 2
      resources/library/interactive/Graphme.wgt/JavaScript/.directory
  7. 472
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/DD_roundies_0.0.2a.js
  8. 74
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/calculate.js
  9. 19
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery-1.3.2.min.js
  10. 298
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery-ui-1.7.2.custom.min.js
  11. 56
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery.center.js
  12. 62
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery.disable.text.select.js
  13. 140
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery.easing.1.2.js
  14. 259
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/jquery.ubwidget.js
  15. 526
      resources/library/interactive/Graphme.wgt/JavaScript/jQuery/ubw-main.js
  16. 9
      src/board/UBBoardController.cpp

@ -31,8 +31,8 @@
<!-- Div contenant le point d'interrogation pour les satistiques--> <!-- Div contenant le point d'interrogation pour les satistiques-->
<div class="question"> <div class="question">
<img src="images/question.jpg" onclick='recevoirStats()'/> <img src="images/question.jpg" onclick='recevoirStats()'/>
</div> </div>
<!-- Div principale pour les pays du monde--> <!-- Div principale pour les pays du monde-->
<div id="carteMonde1" class="carteMonde1"> <div id="carteMonde1" class="carteMonde1">
<img src="images/Cartes/Carte_Monde_1.png" id="monde" class="monde" usemap="#monde1"/> <img src="images/Cartes/Carte_Monde_1.png" id="monde" class="monde" usemap="#monde1"/>

@ -1,147 +1,158 @@
body { body {
background-color: white; background-color: white;
} }
.styleDiv .styleDiv
{ {
height:250px; height:250px;
overflow:auto; overflow:auto;
display:none; display:none;
font-size:11px; font-size:11px;
font-family:Arial, "Times New Roman", Sans-serif; font-family:Arial, "Times New Roman", Sans-serif;
border-left:solid 2px grey; border-left:solid 2px grey;
-moz-border-radius-topright: 1em; -moz-border-radius-topright: 1em;
-moz-border-radius-bottomright:1em; -moz-border-radius-bottomright:1em;
} }
.question .question
{ {
position:absolute; position:absolute;
top:320px; top:320px;
left:13px; left:13px;
z-index:4; z-index:4;
} }
.comparer .comparer
{ {
margin:auto; margin:auto;
font-family:Arial, "Times New Roman", Sans-serif; font-family:Arial, "Times New Roman", Sans-serif;
} }
#souris #souris
{ {
display:none; display:none;
} }
#coords #coords
{ {
display:none; display:none;
} }
.curseur .curseur
{ {
cursor:pointer; cursor:pointer;
} }
.carteMonde1 .carteMonde1
{ {
border-style:solid; border-style:solid;
border-width:3px; border-width:3px;
height:332px; height:332px;
width:654px; width:654px;
border-color: black; border-color: black;
} }
.carte .carte
{ {
position:absolute; position:absolute;
top:11px; top:11px;
left:11px; left:11px;
height:332px; height:332px;
width:654px; width:654px;
display: none; display: none;
opacity:0; opacity:0;
z-index:1; z-index:1;
} }
.retour .retour
{ {
position:absolute; position:absolute;
top:13px; top:13px;
left:13px; left:13px;
width:100px; width:100px;
height:50.5px; height:50.5px;
opacity:0; opacity:0;
z-index:2; z-index:2;
border: 1px black solid; border: 1px black solid;
display: none; display: none;
cursor:pointer; cursor:pointer;
} }
#carteRetour #carteRetour
{ {
width:100%; width:100%;
height: 100%; height: 100%;
} }
.texte .texte
{ {
position:absolute; position:absolute;
top:300px; top:300px;
left:0px; left:0px;
width:654px; width:654px;
} }
#description #description
{ {
font-size:18px; font-size:18px;
text-align:center; text-align:center;
} }
.infoPays .infoPays
{ {
position:absolute; position:absolute;
border:1px black solid; border:1px black solid;
background-color:rgba(150,150,150,0.5); background-color:rgba(150,150,150,0.5);
display:none; display:none;
z-index:2; z-index:2;
padding:4px; padding:4px;
} }
.infoSupp .infoSupp
{ {
position:absolute; position:absolute;
top:344px; top:344px;
border:1px black solid; border:1px black solid;
width:300px; width:300px;
height:0px; height:0px;
overflow:scroll; overflow:scroll;
} }
#infoSupp2 #infoSupp2
{ {
position:absolute; position:absolute;
top:344px; top:344px;
left:320px; left:320px;
} }
.nomPays .nomPays
{ {
font-weight:bold; font-weight:bold;
color:black; color:black;
} }
.capitalePays .capitalePays
{ {
color:white; color:white;
} }
.cacher .cacher
{ {
display:none; display:none;
} }
.drapeaux .drapeaux
{ {
height:40px; height:40px;
}
.customCursor{
position: absolute;
top: -3px;
left: -38px;
border: none;
width: 20px;
height: 20px;
background-image: url(../images/cursor.png);
background-repeat: no-repeat;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,4 +1,4 @@
/* /*
Script utilisé par GeoInfo. Script utilisé par GeoInfo.
Copyright (C) 2010 Baptiste Sottas Tous droits réservés. Copyright (C) 2010 Baptiste Sottas Tous droits réservés.
@ -43,198 +43,199 @@ var compareActive = false;
// permet d'effacer le contenu des divs 2 à 5 si on ne désire pas comparer // permet d'effacer le contenu des divs 2 à 5 si on ne désire pas comparer
function vide() function vide()
{ {
// regarder si la case est cochée // regarder si la case est cochée
compareActive = document.getElementById('compare').checked; compareActive = document.getElementById('compare').checked;
// si elle ne l'est pas vider les divs 2 à 5 // si elle ne l'est pas vider les divs 2 à 5
if (!compareActive) if (!compareActive)
{ {
for (i = 2; i < 6; i++) for (i = 2; i < 6; i++)
{ {
var element = document.getElementById("info" + i); var element = document.getElementById("info" + i);
element.innerHTML = ""; element.innerHTML = "";
element.style.display = "none"; element.style.display = "none";
} }
// remettre la grandeur initiale à la première div // remettre la grandeur initiale à la première div
document.getElementById("info1").style.width = 654 + 'px'; document.getElementById("info1").style.width = 654 + 'px';
// initialiser le compteur // initialiser le compteur
currentInfo = 1; currentInfo = 1;
} }
} }
// permet de créer et remplir les divs d'informations // permet de créer et remplir les divs d'informations
function popupInfo(text) function popupInfo(text)
{ {
// regarder si on désire comparer les pays entre eux // regarder si on désire comparer les pays entre eux
compareActive = document.getElementById('compare').checked; compareActive = document.getElementById('compare').checked;
// si oui mettre l'info dans une nouvelle div, autrement mettre dans la div 1 // si oui mettre l'info dans une nouvelle div, autrement mettre dans la div 1
if (compareActive) if (compareActive)
currentInfo += 1; currentInfo += 1;
else else
currentInfo = 1; currentInfo = 1;
// max 5 comparaisons possibles, si plus on réécrit dans la dernière // max 5 comparaisons possibles, si plus on réécrit dans la dernière
if (currentInfo > 5) if (currentInfo > 5)
currentInfo = 5; currentInfo = 5;
// obtenir la div à modifier // obtenir la div à modifier
var info = document.getElementById("info" + currentInfo); var info = document.getElementById("info" + currentInfo);
// la rendre visible et mettre le texte // la rendre visible et mettre le texte
info.style.display = "block"; info.style.display = "block";
info.innerHTML = text; info.innerHTML = text;
// met la bonne grandeur à chaque div // met la bonne grandeur à chaque div
for (i = 1; i <= currentInfo; i++) for (i = 1; i <= currentInfo; i++)
document.getElementById("info" + i).style.width = (654/currentInfo) + 'px'; document.getElementById("info" + i).style.width = (654/currentInfo) + 'px';
} }
// affiche le text de l'erreur en cas de problème // affiche le text de l'erreur en cas de problème
function erreur(texteErreur) function erreur(texteErreur)
{ {
alert(texteErreur); alert(texteErreur);
} }
// permet d'appeller la fonction pour recevoir les statistiques du serveur // permet d'appeller la fonction pour recevoir les statistiques du serveur
function recevoirStats() function recevoirStats()
{ {
var pl = new SOAPClientParameters(); var pl = new SOAPClientParameters();
// appel de la fonction getInfos du serveur // appel de la fonction getInfos du serveur
SOAPClient.invoke(url, "getInfos", pl, true, recevoirStatsReponse); SOAPClient.invoke(url, "getInfos", pl, true, recevoirStatsReponse);
} }
// permet de recevoir les statistiques du serveur et les afficher // permet de recevoir les statistiques du serveur et les afficher
function recevoirStatsReponse(resultat, soapResponse) function recevoirStatsReponse(resultat, soapResponse)
{ {
var objDom = new XMLDoc(((new XMLSerializer()).serializeToString(soapResponse)), erreur); var objDom = new XMLDoc(((new XMLSerializer()).serializeToString(soapResponse)), erreur);
var objDomTree = objDom.docNode; var objDomTree = objDom.docNode;
// prepare le texte à afficher à partir de la réponse // prepare le texte à afficher à partir de la réponse
var stats = ("Nombre d'accès total: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("accesTotal")[0].getText() var stats = ("Nombre d'accès total: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("accesTotal")[0].getText()
+ "\n" + "\n"
+ "Dernier accès le: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("dernierAcces")[0].getText() + "Dernier accès le: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("dernierAcces")[0].getText()
+ "\n" + "\n"
+ "Adresse pour des questions/remarques: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("email")[0].getText() + "Adresse pour des questions/remarques: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("email")[0].getText()
+ "\n" + "\n"
+ "Microinformations sous: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("twitter")[0].getText() + "Microinformations sous: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("twitter")[0].getText()
+ "\n" + "\n"
+ "Version de l'application: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("version")[0].getText()); + "Version de l'application: " + objDomTree.getElements("env:Body")[0].getElements("ser:getInfosResponse")[0].getElements("GeoStats")[0].getElements("version")[0].getText());
alert(stats); alert(stats);
} }
// permet d'appeller la fonction pour recevoir les informations du pays // permet d'appeller la fonction pour recevoir les informations du pays
function recevoirPays(id) function recevoirPays(id)
{ {
// prépare le paramètre avec l'id du pays // prépare le paramètre avec l'id du pays
var pl = new SOAPClientParameters(); var pl = new SOAPClientParameters();
pl.add("id",id); pl.add("id",id);
// appel de la fonction find du serveur // appel de la fonction find du serveur
SOAPClient.invoke(url, "find", pl, true, recevoirPaysReponse); SOAPClient.invoke(url, "find", pl, true, recevoirPaysReponse);
} }
// permet de recevoir les informations du pays du serveur et les afficher // permet de recevoir les informations du pays du serveur et les afficher
function recevoirPaysReponse(resultat, soapResponse) function recevoirPaysReponse(resultat, soapResponse)
{ {
var objDom = new XMLDoc(((new XMLSerializer()).serializeToString(soapResponse)), erreur); var objDom = new XMLDoc(((new XMLSerializer()).serializeToString(soapResponse)), erreur);
var objDomTree = objDom.docNode; var objDomTree = objDom.docNode;
// prepare le texte à afficher à partir de la réponse // prepare le texte à afficher à partir de la réponse
var informations = ("<b>Pays:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("pays")[0].getText() var informations = ("<b>Pays:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("pays")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Nom:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("nomPays")[0].getText() + "<b>Nom:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("nomPays")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Capitale:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("capitale")[0].getText() + "<b>Capitale:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("capitale")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Forme:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("forme")[0].getText() + "<b>Forme:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("forme")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Adjectif:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("adjectif")[0].getText() + "<b>Adjectif:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("adjectif")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Monnaie ISO:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaieIso")[0].getText() + "<b>Monnaie ISO:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaieIso")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Monnaie:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaie")[0].getText() + "<b>Monnaie:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaie")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Monnaie centime:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaieSubDiv")[0].getText() + "<b>Monnaie centime:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("monnaieSubDiv")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Plus grande ville:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("plusGrandeVille")[0].getText() + "<b>Plus grande ville:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("plusGrandeVille")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Nbr habitants:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("nbrHabitant")[0].getText() + "<b>Nbr habitants:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("nbrHabitant")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Langues officielles:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("langueOfficielle")[0].getText() + "<b>Langues officielles:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("langueOfficielle")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Système gouvernemental:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("politique")[0].getText() + "<b>Système gouvernemental:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("politique")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Remarques:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("remarques")[0].getText() + "<b>Remarques:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("remarques")[0].getText()
+ "<br/>" + "<br/>"
+ "<b>Devise:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("devise")[0].getText()); + "<b>Devise:</b> " + objDomTree.getElements("env:Body")[0].getElements("ser:findResponse")[0].getElements("GeoData")[0].getElements("devise")[0].getText());
// appelle la fonction popupInfo qui affiche les informations dans les divs // appelle la fonction popupInfo qui affiche les informations dans les divs
popupInfo(informations); popupInfo(informations);
} }
// permet l'affichage de la description lors du passage de la souris // permet l'affichage de la description lors du passage de la souris
function writeText(txt) function writeText(txt)
{ {
document.getElementById("description").innerHTML = txt; document.getElementById("description").innerHTML = txt;
} }
// permet l'effaçage de la description lors du passage de la souris // permet l'effaçage de la description lors du passage de la souris
function effaceTexte() function effaceTexte()
{ {
document.getElementById("description").innerHTML = ""; document.getElementById("description").innerHTML = "";
} }
// apparition de la div contenant une carte d'un continent + carte de retour // apparition de la div contenant une carte d'un continent + carte de retour
function apparition(carte) function apparition(carte)
{ {
document.getElementById(carte).style.display = 'block' document.getElementById(carte).style.display = 'block'
i = setInterval('fondu("'+carte+'")', 25) i = setInterval('fondu("'+carte+'")', 25)
document.getElementById("retour").style.display = 'block' document.getElementById("retour").style.display = 'block'
document.getElementById("retour").style.opacity = 1 document.getElementById("retour").style.opacity = 1
} }
// permet de recharger la page // permet de recharger la page
function disparition() function disparition()
{ {
window.location.reload() window.location.reload()
} }
// permet de faire apparaître la carte d'un continent en fondu // permet de faire apparaître la carte d'un continent en fondu
function fondu(carte) function fondu(carte)
{ {
opacity = opacity + 0.05 opacity = opacity + 0.05
document.getElementById(carte).style.opacity = opacity; document.getElementById(carte).style.opacity = opacity;
if (opacity > 1) if (opacity > 1)
{ {
clearInterval(i) clearInterval(i)
} }
} }
// permet de faire apparaître les infos du pays dans la petite fenêtre // permet de faire apparaître les infos du pays dans la petite fenêtre
function afficheInfoPays(pays) function afficheInfoPays(pays)
{ {
document.getElementById("infoPays").innerHTML = document.getElementById(pays).innerHTML; //$("area[alt=" + pays + "]").css("z-index","9999");
document.getElementById("infoPays").innerHTML = "<div id='customCursor' class='customCursor'></div>" + document.getElementById(pays).innerHTML;
} }
// permet de cacher la petite fenêtre // permet de cacher la petite fenêtre
function cacherInfoPays() function cacherInfoPays()
{ {
document.getElementById("infoPays").style.display = 'none'; document.getElementById("infoPays").style.display = 'none';
} }
// permet à la petite fenêtre de suivre la souris // permet à la petite fenêtre de suivre la souris
function deplacerInfo(event) function deplacerInfo(event)
{ {
document.getElementById("infoPays").style.display = 'block'; document.getElementById("infoPays").style.display = 'block';
document.getElementById("infoPays").style.top = event.clientY; document.getElementById("infoPays").style.top = event.clientY;
document.getElementById ("infoPays").style.left = event.clientX+20; document.getElementById("infoPays").style.left = event.clientX+40;
} }

@ -18,11 +18,12 @@
<script type="text/javascript" src="JavaScript/AffichageUniboard.js"></script> <script type="text/javascript" src="JavaScript/AffichageUniboard.js"></script>
<script type="text/javascript" src="JavaScript/AffichageXPM.js"></script> <script type="text/javascript" src="JavaScript/AffichageXPM.js"></script>
<script src="JavaScript/jQuery/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="JavaScript/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="JavaScript/jQuery/jquery.disable.text.select.js" type="text/javascript"></script> <script src="JavaScript/jquery.disable.text.select.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
// --- Variables nécessaires au fonctionnement du widget --- // --- Variables nécessaires au fonctionnement du widget ---
var loadingFlag = false var loadingFlag = false
var largeur = 500 var largeur = 500
var hauteur = 400 var hauteur = 400

@ -1,2 +0,0 @@
[Dolphin]
Timestamp=2010,7,5,14,3,51

@ -1,472 +0,0 @@
/**
* DD_roundies, this adds rounded-corner CSS in standard browsers and VML sublayers in IE that accomplish a similar appearance when comparing said browsers.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_roundies/
* Version: 0.0.2a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_roundies/#license
*
* Usage:
* DD_roundies.addRule('#doc .container', '10px 5px'); // selector and multiple radii
* DD_roundies.addRule('.box', 5, true); // selector, radius, and optional addition of border-radius code for standard browsers.
*
* Just want the PNG fixing effect for IE6, and don't want to also use the DD_belatedPNG library? Don't give any additional arguments after the CSS selector.
* DD_roundies.addRule('.your .example img');
**/
var DD_roundies = {
ns: 'DD_roundies',
IE6: false,
IE7: false,
IE8: false,
IEversion: function() {
if (document.documentMode != 8 && document.namespaces && !document.namespaces[this.ns]) {
this.IE6 = true;
this.IE7 = true;
}
else if (document.documentMode == 8) {
this.IE8 = true;
}
},
querySelector: document.querySelectorAll,
selectorsToProcess: [],
imgSize: {},
createVmlNameSpace: function() { /* enable VML */
if (this.IE6 || this.IE7) {
document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
}
if (this.IE8) {
document.writeln('<?import namespace="' + this.ns + '" implementation="#default#VML" ?>');
}
},
createVmlStyleSheet: function() { /* style VML, enable behaviors */
/*
Just in case lots of other developers have added
lots of other stylesheets using document.createStyleSheet
and hit the 31-limit mark, let's not use that method!
further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
*/
var style = document.createElement('style');
document.documentElement.firstChild.insertBefore(style, document.documentElement.firstChild.firstChild);
if (style.styleSheet) { /* IE */
try {
var styleSheet = style.styleSheet;
styleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
this.styleSheet = styleSheet;
} catch(err) {}
}
else {
this.styleSheet = style;
}
},
/**
* Method to use from afar - refer to it whenever.
* Example for IE only: DD_roundies.addRule('div.boxy_box', '10px 5px');
* Example for IE, Firefox, and WebKit: DD_roundies.addRule('div.boxy_box', '10px 5px', true);
* @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
* @param {Integer} radius - REQUIRED - the desired radius for the box corners
* @param {Boolean} standards - OPTIONAL - true if you also wish to output -moz-border-radius/-webkit-border-radius/border-radius declarations
**/
addRule: function(selector, rad, standards) {
if (typeof rad == 'undefined' || rad === null) {
rad = 0;
}
if (rad.constructor.toString().search('Array') == -1) {
rad = rad.toString().replace(/[^0-9 ]/g, '').split(' ');
}
for (var i=0; i<4; i++) {
rad[i] = (!rad[i] && rad[i] !== 0) ? rad[Math.max((i-2), 0)] : rad[i];
}
if (this.styleSheet) {
if (this.styleSheet.addRule) { /* IE */
var selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
for (var i=0; i<selectors.length; i++) {
this.styleSheet.addRule(selectors[i], 'behavior:expression(DD_roundies.roundify.call(this, [' + rad.join(',') + ']))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
}
}
else if (standards) {
var moz_implementation = rad.join('px ') + 'px';
this.styleSheet.appendChild(document.createTextNode(selector + ' {border-radius:' + moz_implementation + '; -moz-border-radius:' + moz_implementation + ';}'));
this.styleSheet.appendChild(document.createTextNode(selector + ' {-webkit-border-top-left-radius:' + rad[0] + 'px ' + rad[0] + 'px; -webkit-border-top-right-radius:' + rad[1] + 'px ' + rad[1] + 'px; -webkit-border-bottom-right-radius:' + rad[2] + 'px ' + rad[2] + 'px; -webkit-border-bottom-left-radius:' + rad[3] + 'px ' + rad[3] + 'px;}'));
}
}
else if (this.IE8) {
this.selectorsToProcess.push({'selector':selector, 'radii':rad});
}
},
readPropertyChanges: function(el) {
switch (event.propertyName) {
case 'style.border':
case 'style.borderWidth':
case 'style.padding':
this.applyVML(el);
break;
case 'style.borderColor':
this.vmlStrokeColor(el);
break;
case 'style.backgroundColor':
case 'style.backgroundPosition':
case 'style.backgroundRepeat':
this.applyVML(el);
break;
case 'style.display':
el.vmlBox.style.display = (el.style.display == 'none') ? 'none' : 'block';
break;
case 'style.filter':
this.vmlOpacity(el);
break;
case 'style.zIndex':
el.vmlBox.style.zIndex = el.style.zIndex;
break;
}
},
applyVML: function(el) {
el.runtimeStyle.cssText = '';
this.vmlFill(el);
this.vmlStrokeColor(el);
this.vmlStrokeWeight(el);
this.vmlOffsets(el);
this.vmlPath(el);
this.nixBorder(el);
this.vmlOpacity(el);
},
vmlOpacity: function(el) {
if (el.currentStyle.filter.search('lpha') != -1) {
var trans = el.currentStyle.filter;
trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
for (var v in el.vml) {
el.vml[v].filler.opacity = trans;
}
}
},
vmlFill: function(el) {
if (!el.currentStyle) {
return;
} else {
var elStyle = el.currentStyle;
}
el.runtimeStyle.backgroundColor = '';
el.runtimeStyle.backgroundImage = '';
var noColor = (elStyle.backgroundColor == 'transparent');
var noImg = true;
if (elStyle.backgroundImage != 'none' || el.isImg) {
if (!el.isImg) {
el.vmlBg = elStyle.backgroundImage;
el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
}
else {
el.vmlBg = el.src;
}
var lib = this;
if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
var img = document.createElement('img');
img.attachEvent('onload', function() {
this.width = this.offsetWidth; /* weird cache-busting requirement! */
this.height = this.offsetHeight;
lib.vmlOffsets(el);
});
img.className = lib.ns + '_sizeFinder';
img.runtimeStyle.cssText = 'behavior:none; position:absolute; top:-10000px; left:-10000px; border:none;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
img.src = el.vmlBg;
img.removeAttribute('width');
img.removeAttribute('height');
document.body.insertBefore(img, document.body.firstChild);
lib.imgSize[el.vmlBg] = img;
}
el.vml.image.filler.src = el.vmlBg;
noImg = false;
}
el.vml.image.filled = !noImg;
el.vml.image.fillcolor = 'none';
el.vml.color.filled = !noColor;
el.vml.color.fillcolor = elStyle.backgroundColor;
el.runtimeStyle.backgroundImage = 'none';
el.runtimeStyle.backgroundColor = 'transparent';
},
vmlStrokeColor: function(el) {
el.vml.stroke.fillcolor = el.currentStyle.borderColor;
},
vmlStrokeWeight: function(el) {
var borders = ['Top', 'Right', 'Bottom', 'Left'];
el.bW = {};
for (var b=0; b<4; b++) {
el.bW[borders[b]] = parseInt(el.currentStyle['border' + borders[b] + 'Width'], 10) || 0;
}
},
vmlOffsets: function(el) {
var dims = ['Left', 'Top', 'Width', 'Height'];
for (var d=0; d<4; d++) {
el.dim[dims[d]] = el['offset'+dims[d]];
}
var assign = function(obj, topLeft) {
obj.style.left = (topLeft ? 0 : el.dim.Left) + 'px';
obj.style.top = (topLeft ? 0 : el.dim.Top) + 'px';
obj.style.width = el.dim.Width + 'px';
obj.style.height = el.dim.Height + 'px';
};
for (var v in el.vml) {
var mult = (v == 'image') ? 1 : 2;
el.vml[v].coordsize = (el.dim.Width*mult) + ', ' + (el.dim.Height*mult);
assign(el.vml[v], true);
}
assign(el.vmlBox, false);
if (DD_roundies.IE8) {
el.vml.stroke.style.margin = '-1px';
if (typeof el.bW == 'undefined') {
this.vmlStrokeWeight(el);
}
el.vml.color.style.margin = (el.bW.Top-1) + 'px ' + (el.bW.Left-1) + 'px';
}
},
vmlPath: function(el) {
var coords = function(direction, w, h, r, aL, aT, mult) {
var cmd = direction ? ['m', 'qy', 'l', 'qx', 'l', 'qy', 'l', 'qx', 'l'] : ['qx', 'l', 'qy', 'l', 'qx', 'l', 'qy', 'l', 'm']; /* whoa */
aL *= mult;
aT *= mult;
w *= mult;
h *= mult;
var R = r.slice(); /* do not affect original array */
for (var i=0; i<4; i++) {
R[i] *= mult;
R[i] = Math.min(w/2, h/2, R[i]); /* make sure you do not get funky shapes - pick the smallest: half of the width, half of the height, or current value */
}
var coords = [
cmd[0] + Math.floor(0+aL) +','+ Math.floor(R[0]+aT),
cmd[1] + Math.floor(R[0]+aL) +','+ Math.floor(0+aT),
cmd[2] + Math.ceil(w-R[1]+aL) +','+ Math.floor(0+aT),
cmd[3] + Math.ceil(w+aL) +','+ Math.floor(R[1]+aT),
cmd[4] + Math.ceil(w+aL) +','+ Math.ceil(h-R[2]+aT),
cmd[5] + Math.ceil(w-R[2]+aL) +','+ Math.ceil(h+aT),
cmd[6] + Math.floor(R[3]+aL) +','+ Math.ceil(h+aT),
cmd[7] + Math.floor(0+aL) +','+ Math.ceil(h-R[3]+aT),
cmd[8] + Math.floor(0+aL) +','+ Math.floor(R[0]+aT)
];
if (!direction) {
coords.reverse();
}
var path = coords.join('');
return path;
};
if (typeof el.bW == 'undefined') {
this.vmlStrokeWeight(el);
}
var bW = el.bW;
var rad = el.DD_radii.slice();
/* determine outer curves */
var outer = coords(true, el.dim.Width, el.dim.Height, rad, 0, 0, 2);
/* determine inner curves */
rad[0] -= Math.max(bW.Left, bW.Top);
rad[1] -= Math.max(bW.Top, bW.Right);
rad[2] -= Math.max(bW.Right, bW.Bottom);
rad[3] -= Math.max(bW.Bottom, bW.Left);
for (var i=0; i<4; i++) {
rad[i] = Math.max(rad[i], 0);
}
var inner = coords(false, el.dim.Width-bW.Left-bW.Right, el.dim.Height-bW.Top-bW.Bottom, rad, bW.Left, bW.Top, 2);
var image = coords(true, el.dim.Width-bW.Left-bW.Right+1, el.dim.Height-bW.Top-bW.Bottom+1, rad, bW.Left, bW.Top, 1);
/* apply huge path string */
el.vml.color.path = inner;
el.vml.image.path = image;
el.vml.stroke.path = outer + inner;
this.clipImage(el);
},
nixBorder: function(el) {
var s = el.currentStyle;
var sides = ['Top', 'Left', 'Right', 'Bottom'];
for (var i=0; i<4; i++) {
el.runtimeStyle['padding' + sides[i]] = (parseInt(s['padding' + sides[i]], 10) || 0) + (parseInt(s['border' + sides[i] + 'Width'], 10) || 0) + 'px';
}
el.runtimeStyle.border = 'none';
},
clipImage: function(el) {
var lib = DD_roundies;
if (!el.vmlBg || !lib.imgSize[el.vmlBg]) {
return;
}
var thisStyle = el.currentStyle;
var bg = {'X':0, 'Y':0};
var figurePercentage = function(axis, position) {
var fraction = true;
switch(position) {
case 'left':
case 'top':
bg[axis] = 0;
break;
case 'center':
bg[axis] = 0.5;
break;
case 'right':
case 'bottom':
bg[axis] = 1;
break;
default:
if (position.search('%') != -1) {
bg[axis] = parseInt(position, 10) * 0.01;
}
else {
fraction = false;
}
}
var horz = (axis == 'X');
bg[axis] = Math.ceil(fraction ? (( el.dim[horz ? 'Width' : 'Height'] - (el.bW[horz ? 'Left' : 'Top'] + el.bW[horz ? 'Right' : 'Bottom']) ) * bg[axis]) - (lib.imgSize[el.vmlBg][horz ? 'width' : 'height'] * bg[axis]) : parseInt(position, 10));
bg[axis] += 1;
};
for (var b in bg) {
figurePercentage(b, thisStyle['backgroundPosition'+b]);
}
el.vml.image.filler.position = (bg.X/(el.dim.Width-el.bW.Left-el.bW.Right+1)) + ',' + (bg.Y/(el.dim.Height-el.bW.Top-el.bW.Bottom+1));
var bgR = thisStyle.backgroundRepeat;
var c = {'T':1, 'R':el.dim.Width+1, 'B':el.dim.Height+1, 'L':1}; /* these are defaults for repeat of any kind */
var altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'Width'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'Height'} };
if (bgR != 'repeat') {
c = {'T':(bg.Y), 'R':(bg.X+lib.imgSize[el.vmlBg].width), 'B':(bg.Y+lib.imgSize[el.vmlBg].height), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
var v = bgR.split('repeat-')[1].toUpperCase();
c[altC[v].b1] = 1;
c[altC[v].b2] = el.dim[altC[v].d]+1;
}
if (c.B > el.dim.Height) {
c.B = el.dim.Height+1;
}
}
el.vml.image.style.clip = 'rect('+c.T+'px '+c.R+'px '+c.B+'px '+c.L+'px)';
},
pseudoClass: function(el) {
var self = this;
setTimeout(function() { /* would not work as intended without setTimeout */
self.applyVML(el);
}, 1);
},
reposition: function(el) {
this.vmlOffsets(el);
this.vmlPath(el);
},
roundify: function(rad) {
this.style.behavior = 'none';
if (!this.currentStyle) {
return;
}
else {
var thisStyle = this.currentStyle;
}
var allowed = {BODY: false, TABLE: false, TR: false, TD: false, SELECT: false, OPTION: false, TEXTAREA: false};
if (allowed[this.nodeName] === false) { /* elements not supported yet */
return;
}
var self = this; /* who knows when you might need a setTimeout */
var lib = DD_roundies;
this.DD_radii = rad;
this.dim = {};
/* attach handlers */
var handlers = {resize: 'reposition', move: 'reposition'};
if (this.nodeName == 'A') {
var moreForAs = {mouseleave: 'pseudoClass', mouseenter: 'pseudoClass', focus: 'pseudoClass', blur: 'pseudoClass'};
for (var a in moreForAs) {
handlers[a] = moreForAs[a];
}
}
for (var h in handlers) {
this.attachEvent('on' + h, function() {
lib[handlers[h]](self);
});
}
this.attachEvent('onpropertychange', function() {
lib.readPropertyChanges(self);
});
/* ensure that this elent and its parent is given hasLayout (needed for accurate positioning) */
var giveLayout = function(el) {
el.style.zoom = 1;
if (el.currentStyle.position == 'static') {
el.style.position = 'relative';
}
};
giveLayout(this.offsetParent);
giveLayout(this);
/* create vml elements */
this.vmlBox = document.createElement('ignore'); /* IE8 really wants to be encased in a wrapper element for the VML to work, and I don't want to disturb getElementsByTagName('div') - open to suggestion on how to do this differently */
this.vmlBox.runtimeStyle.cssText = 'behavior:none; position:absolute; margin:0; padding:0; border:0; background:none;'; /* super important - if something accidentally matches this (you yourseld did this once, Drew), you'll get infinitely-created elements and a frozen browser! */
this.vmlBox.style.zIndex = thisStyle.zIndex;
this.vml = {'color':true, 'image':true, 'stroke':true};
for (var v in this.vml) {
this.vml[v] = document.createElement(lib.ns + ':shape');
this.vml[v].filler = document.createElement(lib.ns + ':fill');
this.vml[v].appendChild(this.vml[v].filler);
this.vml[v].stroked = false;
this.vml[v].style.position = 'absolute';
this.vml[v].style.zIndex = thisStyle.zIndex;
this.vml[v].coordorigin = '1,1';
this.vmlBox.appendChild(this.vml[v]);
}
this.vml.image.fillcolor = 'none';
this.vml.image.filler.type = 'tile';
this.parentNode.insertBefore(this.vmlBox, this);
this.isImg = false;
if (this.nodeName == 'IMG') {
this.isImg = true;
this.style.visibility = 'hidden';
}
setTimeout(function() {
lib.applyVML(self);
}, 1);
}
};
try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
DD_roundies.IEversion();
DD_roundies.createVmlNameSpace();
DD_roundies.createVmlStyleSheet();
if (DD_roundies.IE8 && document.attachEvent && DD_roundies.querySelector) {
document.attachEvent('onreadystatechange', function() {
if (document.readyState == 'complete') {
var selectors = DD_roundies.selectorsToProcess;
var length = selectors.length;
var delayedCall = function(node, radii, index) {
setTimeout(function() {
DD_roundies.roundify.call(node, radii);
}, index*100);
};
for (var i=0; i<length; i++) {
var results = document.querySelectorAll(selectors[i].selector);
var rLength = results.length;
for (var r=0; r<rLength; r++) {
if (results[r].nodeName != 'INPUT') { /* IE8 doesn't like to do this to inputs yet */
delayedCall(results[r], selectors[i].radii, r);
}
}
}
}
});
}

@ -1,74 +0,0 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
function addChar(input, character) {
if(input.value == null || input.value == "0")
input.value = character
else
input.value += character
}
function cos(form) {
form.display.value = Math.cos(form.display.value);
}
function sin(form) {
form.display.value = Math.sin(form.display.value);
}
function tan(form) {
form.display.value = Math.tan(form.display.value);
}
function sqrt(form) {
form.display.value = Math.sqrt(form.display.value);
}
function ln(form) {
form.display.value = Math.log(form.display.value);
}
function exp(form) {
form.display.value = Math.exp(form.display.value);
}
function deleteChar(input) {
input.value = input.value.substring(0, input.value.length - 1)
}
function changeSign(input) {
if(input.value.substring(0, 1) == "-")
input.value = input.value.substring(1, input.value.length)
else
input.value = "-" + input.value
}
function square(form) {
form.display.value = eval(form.display.value) * eval(form.display.value)
}
function checkNum(str) {
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i+1)
if (ch < "0" || ch > "9") {
if (ch != "/" && ch != "*" && ch != "+" && ch != "-" && ch != "."
&& ch != "(" && ch!= ")") {
$("#display").text("ERROR");
return false
}
}
}
return true
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,56 +0,0 @@
jQuery.fn.center = function(params) {
var options = {
vertical: true,
horizontal: true
}
op = jQuery.extend(options, params);
this.each(function(){
//initializing variables
var $self = jQuery(this);
//get the dimensions using dimensions plugin
var width = $self.width();
var height = $self.height();
//get the paddings
var paddingTop = parseInt($self.css("padding-top"));
var paddingBottom = parseInt($self.css("padding-bottom"));
//get the borders
var borderTop = parseInt($self.css("border-top-width"));
var borderBottom = parseInt($self.css("border-bottom-width"));
//get the media of padding and borders
var mediaBorder = (borderTop+borderBottom)/2;
var mediaPadding = (paddingTop+paddingBottom)/2;
//get the type of positioning
var positionType = $self.parent().css("position");
// get the half minus of width and height
var halfWidth = (width/2)*(-1);
var halfHeight = ((height/2)*(-1))-mediaPadding-mediaBorder;
// initializing the css properties
var cssProp = {
position: 'absolute'
};
if(op.vertical) {
cssProp.height = height;
cssProp.top = '50%';
cssProp.marginTop = halfHeight;
}
if(op.horizontal) {
cssProp.width = width;
cssProp.left = '50%';
cssProp.marginLeft = halfWidth;
}
//check the current position
if(positionType == 'static') {
$self.parent().css("position","relative");
}
//aplying the css
$self.css(cssProp);
});
};

@ -1,62 +0,0 @@
/**
* .disableTextSelect - Disable Text Select Plugin
*
* Version: 1.1
* Updated: 2007-11-28
*
* Used to stop users from selecting text
*
* Copyright (c) 2007 James Dempster (letssurf@gmail.com, http://www.jdempster.com/category/jquery/disabletextselect/)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
**/
/**
* Requirements:
* - jQuery (John Resig, http://www.jquery.com/)
**/
(function($) {
if ($.browser.mozilla) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : 'none'
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).css({
'MozUserSelect' : ''
});
});
};
} else if ($.browser.msie) {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('selectstart.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('selectstart.disableTextSelect');
});
};
} else {
$.fn.disableTextSelect = function() {
return this.each(function() {
$(this).bind('mousedown.disableTextSelect', function() {
return false;
});
});
};
$.fn.enableTextSelect = function() {
return this.each(function() {
$(this).unbind('mousedown.disableTextSelect');
});
};
}
})(jQuery);

@ -1,140 +0,0 @@
/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.extend( jQuery.easing,
{
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});

@ -1,259 +0,0 @@
(function($) {
jQuery.fn.ubwidget = function(options) {
var settings = jQuery.extend({}, jQuery.fn.ubwidget.defaults, options);
DD_roundies.addRule('.ubw-standard-corners', '5px', true);
DD_roundies.addRule('.ubw-button-corners', '4px', true);
DD_roundies.addRule('.ubw-i-corners', '4px', true);
$(window)
.bind("blur", function(event){
})
.trigger("focus");
return this.each(function() {
var ubwbody = $(this)
.addClass("ubw-body");
var ubwcontainer = $("<div></div>")
.append(ubwbody)
.addClass("ubw-container")
.css({
width:settings.width,
height:settings.height
})
.disableTextSelect();
$('body').append(ubwcontainer);
});
};
// Default options
jQuery.fn.ubwidget.defaults = {
width:200,
height:250
};
// Shadows
jQuery.fn.ubwshadows = function(settings){
var shadow = $("<div class='ubw-shadow'></div>")
.addClass("ubw-standard-corners")
.css({
backgroundColor:"#333377",
opacity:".1",
filter: "alpha(opacity = 10)",
position:"absolute",
top:settings.t,
left:settings.l,
width:settings.w,
height:settings.h
});
$(this).before(shadow);
};
jQuery.fn.ubwbutton = function(size, arrows) {
var arrows = typeof(arrows) != "undefined" ? arrows = arrows : arrows = {top:0, right:0, bottom:0, left:0};
var button = null;
var scale = 0.20;
var url = "";
var buttonbody;
return this.each(function() {
button = $(this)
.addClass("ubw-button-wrapper")
.css({zIndex:0});
url = $(this).find("img").attr("src");
url = url.split(".");
var buttonContent = $("<table cellpadding='0' cellspacing='0' border='0' width='auto' height='100%'><tr><td height='auto' width='auto' valign='middle' align='center'></td></tr></table>")
.addClass("ubw-button-content");
buttonContent.find("td").html($(this).html());
$(this).empty();
var buttonCanvas = $("<div></div>")
.addClass("ubw-button-canvas")
.appendTo(button)
.html('<table width="auto" height="auto" cellpadding="0" cellspacing="0"><tr><td class="ubw-button-arrowTop" align="center"><img style="visibility:hidden; margin-bottom:-1px" src="images/arrows_out/top.png"></td></tr><tr><td><table width="auto" height="auto" border="0" cellpadding="0" cellspacing="0"><tr><td class="ubw-button-arrowLeft"><img style="visibility:hidden; margin-right:-1px" src="images/arrows_out/left.png"></td><td class="ubw-button-body"></td><td class="ubw-button-arrowRight"><img style="visibility:hidden; margin-left:-1px" src="images/arrows_out/right.png"></td></tr></table></td></tr><tr><td class="ubw-button-arrowBottom" align="center"><img style="visibility:hidden; margin-top:-1px" src="images/arrows_out/bottom.png"></td></tr></table>');
if(arrows.top)buttonCanvas.find(".ubw-button-arrowTop").children("img").css({visibility:"visible"});
if(arrows.right)buttonCanvas.find(".ubw-button-arrowRight").children("img").css({visibility:"visible"});
if(arrows.bottom)buttonCanvas.find(".ubw-button-arrowBottom").children("img").css({visibility:"visible"});
if(arrows.left)buttonCanvas.find(".ubw-button-arrowLeft").children("img").css({visibility:"visible"});
var buttonBody = buttonCanvas.find(".ubw-button-body")
.addClass("ubw-button-out")
.append(buttonContent)
.bind("mouseenter", buttonOverHandler)
.bind("mouseleave", buttonOutHandler)
.bind("mousedown", buttonDownHandler)
.bind("mouseup", buttonUpHandler)
.css({
width:size.w,
height:size.h
});
button.width(size.w+9).height(size.h+2);
buttonbody = buttonBody.find(".ubw-button-content");
});
function buttonOverHandler(e) {
buttonbody.find("img").attr("src", url[0]+"_over.png");
button.css({
zIndex:1
});
};
function buttonOutHandler(e){
buttonbody.find("img").attr("src", url[0]+".png");
button.css({
zIndex:0
});
};
function buttonDownHandler(e){
buttonbody.find("img").attr("src", url[0]+"_over_down.png");
};
function buttonUpHandler(e){
url[0] = url[0].replace("_down", "");
buttonbody.find("img").attr("src", url[0]+"_over.png");
};
};
jQuery.fn.ubwtoggle = function(activated, _firstFunc, _secondFunc) {
var activated = typeof(activated) != "undefined" ? activated = 1 : activated = 0;
return this.each(function(){
var button = $(this);
var buttonBody = button.find(".ubw-button-body");
var img = buttonBody.find("img");
var imgsrc = img.attr("src");
var firstFunc = _firstFunc;
var secondFunc = _secondFunc;
buttonBody
.toggle(
function(){
img.css({visibility:"hidden"});
firstFunc();
},
function(){
img.css({visibility:"visible"});
secondFunc();
}
);
if(activated){
buttonBody.trigger("click");
};
});
};
jQuery.fn.ubwidget.sliderbutton = function() {
};
jQuery.fn.ubwidget.inspector = function(_position, content, button){
var position = {x:_position.x, y:_position.y};
var catcher = $("<div id='ubw-catcher'></div>")
.css({
position:"absolute",
width:"100%",
height:"100%"
})
.mousedown(function(){
inspector.hide();
removeDropShadow();
catcher.hide();
//resizeubcanvas()
});
$("body").append(catcher);
catcher.hide();
var inspector = $("<div class='ubw-inspector'></div>")
.css({
left:position.x,
top:position.y
})
.append(content)
.appendTo($("body"))
.hide()
.disableTextSelect();
var inspectorWidth = inspector.width();
var inspectorHeight = inspector.height();
var windowWidth = $(window).width();
var windowHeight = $(window).height();
$("body").prepend(button);
button.addClass("ubw-rounded")
.click(function(){
catcher.show();
inspector.show();
dropShadow();
resizeubcanvas()
});
function dropShadow (){
inspector.ubwshadows({w:inspectorWidth+23,h:inspectorHeight+22,l:55,t:55})}
function removeDropShadow (){
$(".ubw-shadow").remove()}
// !!
$(".ubw-shadow")
.mousedown(function(){
inspector.hide();
removeDropShadow();
catcher.hide();
resizeubcanvas()
});
function resizeWidget(w, h){
window.resizeTo(w+2, h+2);
$("#indicator").remove();
var indicator = $("<div id='indicator'></div>")
.css({
width:w,
height:h,
position:"absolute",
left:0,
top:0,
border:"1px solid #ff0000"
});
//$("body").prepend(indicator);
}
function resizeubcanvas(){
if(inspector.css("display")=="none"){
resizeWidget(windowWidth, windowHeight);
return 0;
};
var inspectorbottom = inspector.position().top+inspector.height()+40;
var inspectorright = inspector.position().left+inspector.width()+40;
if($(window).height()<inspectorbottom){
resizeWidget($(window).width(), inspectorbottom)};
if($(window).width()<inspectorright){
resizeWidget(inspectorright, $(window).height())};
}
};
})(jQuery);

@ -1,526 +0,0 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
function init(){
var h = 292;
var w = 160;
var wh = h+6;
var ww = w+6;
var clickFlag = false;
var ubwidget = $("#ubwidget").ubwidget({
width:w,
height:h
});
var historyTab = $("<div></div>")
.css({
height:h,
marginRight:0,
width:20,
float:"left",
backgroundImage:"url(images/historytab.png)",
backgroundRepeat:"no-repeat"
})
.toggle(
function(){
resizeWidget(370, 294);
historyPanel.show();
$(".ubw-container").css({
backgroundImage:"url(images/back.png)",
width:328
});
if(window.sankore){
window.sankore.setPreference('historyTab', "visible");
};
},
function(){
resizeWidget(200, 294);
historyPanel.hide();
$(".ubw-container").css({
backgroundImage:"url(images/back_small.png)",
width:160
});
if(window.sankore){
window.sankore.setPreference('historyTab', "hidden");
};
}
)
.hover(
function(){
$(this).css({
backgroundImage:"url(images/historytabOver.png)"
});
},
function(){
$(this).css({
backgroundImage:"url(images/historytab.png)"
});
}
)
.appendTo($("body"));
var space = $("<div></div>");
space.css({
width:5,
height:1,
float:"left"
});
var keysPanel = $("<div id='keysPanel'></div>").css({
float:"left"
});
var mode = "standard";
var calc = "";
var displayTrunk = "";
var historyTrunk = "";
var lastHistory = "";
var subtrunk = 0;
var itrunk = 0;
var trunkpos = 0;
var lastchar = {
type:"NaN",
value:"null"
};
var inparenthesis = false;
var erase = false;
var abtn;
var readyToCompute = false;
var lastResult = "0";
var gDecimalSeparator = "";
var gThousandsSeparator = "";
var gDecimalCode = 0;
var gDecimalString = "";
var gError = false;
var historyTxt = "0";
var display = $("<div id='display'>0</div>")
.addClass("ubw-inputbox")
.css({
padding:"12px",
marginLeft:"2px",
marginBottom:"9px",
marginTop:7,
backgroundImage:"url(images/display.png)",
fontSize:"22px",
fontFamily:"Arial, Helvetica, Sans-serif",
color:"#777788",
width:118,
height:28,
overflow:"hidden",
textAlign:"right",
});
var standardPanel = $("<div></div>").css({
float:"left"
});
var cKeySize = {
w:33,
h:36
};
var btn7 = $("<div><img src='images/touche7.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("7", 1)
});
var btn8 = $("<div><img src='images/touche8.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("8", 1)
});
var btn9 = $("<div><img src='images/touche9.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("9", 1)
});
var btnDiv = $("<div><img src='images/touchediv.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("/", 0)
});
var btn4 = $("<div><img src='images/touche4.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("4", 1)
});
var btn5 = $("<div><img src='images/touche5.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("5", 1)
});
var btn6 = $("<div><img src='images/touche6.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("6", 1)
});
var btnMul = $("<div><img src='images/touchef.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("*", 0)
});
var btn1 = $("<div><img src='images/touche1.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("1", 1)
});
var btn2 = $("<div><img src='images/touche2.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("2", 1)
});
var btn3 = $("<div><img src='images/touche3.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("3", 1)
});
var btnSou = $("<div><img src='images/touchem.png'/></div>").ubwbutton({
w:68,
h:34
})
.mousedown(function(){
appendToDisplay("-", 0)
});
var btn0 = $("<div><img src='images/touche0.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("0", 1)
});
var btnDot = $("<div><img src='images/touchedot.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay(".", 1)
});
var btnC = $("<div><img src='images/touchec.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
reset()
});
var btnAdd = $("<div><img src='images/touchep.png'/></div>").ubwbutton({
w:68,
h:34
})
.mousedown(function(){
appendToDisplay("+", 0)
});
var btnPaL = $("<div><img src='images/touchepg.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay("(", 1)
});
var btnPaR = $("<div><img src='images/touchepd.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
appendToDisplay(")", 1)
});
var btnEqu = $("<div><img src='images/toucheeq.png'/></div>").ubwbutton({
w:cKeySize.w,
h:cKeySize.h
})
.mousedown(function(){
compute()
});
var historyPanel = $("<div id='historyPanel'></div>")
.css({
backgroundImage:"url(images/historyback.png)",
width:"auto",
height:"auto",
float:"left",
marginLeft:3,
marginRight:2,
marginTop:6
})
.hide();
var historyBox = $("<textarea id='historyBox'></textarea>")
.css({
padding:10,
fontSize:"20px",
fontFamily:"Arial, Helvetica, Sans-serif",
width:143,
height:236,
backgroundColor:"transparent",
resize:"none",
border:"none",
overlay:"none",
color:"#eeeeee"
})
.val("0");
historyPanel.append(historyBox);
var stop = $("<div></div>");
var sleft = $("<div></div>");
var sright = $("<div></div>");
stop.css({
width:140
})
.append(btnAdd).append(btnSou)
.append(btn7).append(btn8).append(btn9).append(btnMul)
.append(btn4).append(btn5).append(btn6).append(btnDiv);
sleft.css({
width:105,
float:"left"
})
.append(btn1).append(btn2).append(btn3)
.append(btn0).append(btnDot).append(btnC);
sright.css({
width:45,
float:"left"
})
.append(btnEqu);
standardPanel.css({
width:150
})
.append(stop)
.append(sleft).append(sright);
keysPanel
.append(display)
.append(standardPanel);
ubwidget
.append(historyPanel)
.append(keysPanel);
if(window.sankore){
historyTxt = window.sankore.preference('historyTxt', historyTxt);
var ht = window.sankore.preference('historyTab', "hidden");
$("#historyBox").val(historyTxt);
if(ht === "visible"){
historyTab.trigger("click");
};
}
function resizeWidget(w, h){
window.sankore.resize(w+2, h+2);
}
function compute(){
var result = eval(calc)
$("#display").text(updateDisplay(result));
lastResult = result;
lastchar.type = "Nan";
lastchar.value = "";
calc = "";
$("#historyBox").val($("#historyBox").val()+historyTrunk+"\n= "+updateDisplay(result)+"\n\n");
$("#historyBox").scrollTop(99999);
displayTrunk = "";
historyTrunk = "";
if(window.sankore){
window.sankore.setPreference('historyTxt', $("#historyBox").val());
};
lastHistory = $("#historyBox").val();
}
function reset(){
$("#display").text("0");
calc="";
displayTrunk="";
historyTrunk="";
$("#historyBox").val(lastHistory);
$("#historyBox").scrollTop(99999);
}
function formatNumberWithDelimiters(number) {
var delimiter = gThousandsSeparator;
var numString = number.toString();
if (!numString)
return "0";
var dot = numString.indexOf(gDecimalSeparator);
if (dot == -1)
dot = numString.length;
var stop = numString.length-dot;
var characteristic = numString.substr(0, dot);
if (!parseInt(characteristic))
return numString;
// see if it's a negative number
var numIsNegative = (parseInt(characteristic) < 0)
var newNumber = "";
var delimiterCount = Math.floor((characteristic.length-1) / 3);
var extras = characteristic.length % 3;
if (!extras && characteristic.length > 2)
extras = 3;
if (extras)
newNumber = newNumber + characteristic.substr(0, extras);
for (var i=0;i< delimiterCount; i++) {
if ( (0 == i) && numIsNegative && (extras == 1))
newNumber = newNumber + characteristic.substr(extras + (i * 3), 3);
else
newNumber = newNumber + delimiter + characteristic.substr(extras + (i * 3), 3);
}
return (dot ? (newNumber + numString.substr(dot, stop)) : newNumber);
}
function formatNumberWithScientificNotation(number) {
if (number == 0)
return number;
var numString = number.toString();
if (!numString)
return "0";
var num = new Number(numString);
var sci = num.toExponential(5);
if (sci == "NaN")
sci = formatNumberWithDelimiters(numString);
if (!sci)
return "0";
return sci;
}
function updateDisplay(number){
if(String(number).length > 8){
number = formatNumberWithScientificNotation(number);
}
else{
number = number;
}
return number;
}
function appendToDisplay(_char, v){
var char = _char;
// Display
if($("#historyBox").val() === "0"){
$("#historyBox").val("");
};
if(char == "-" && lastchar.type == "NaN"){
char = "m";
};
// char is a number
if(char <= 0 || char > 0 || char == "." || char == "m" || char == "(" || char == ")"){
if(char == "m"){
char = "-";
};
if(lastchar.type == "NaN"){
displayTrunk = "";
};
if(lastchar.value == "." && char == "."){
calc = calc.substr(0, calc.length-1);
displayTrunk = displayTrunk.substr(0, displayTrunk.length-1);
};
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
}
// char is an operator
else {
if(calc.length === 0){
var endCalc = calc;
calc = lastResult + endCalc;
historyTrunk = updateDisplay(lastResult);
}
if(lastchar.type == "NaN"){
calc = calc.substr(0, calc.length-1);
calc += char;
$("#historyBox").val($("#historyBox").val().substr(0, $("#historyBox").val().length-1));
}
else{
try{
calc = eval(calc) + String(char);
}catch(e){}
}
lastchar.type = "NaN";
try{
displayTrunk = eval(calc.substr(0, calc.length-1));
}catch(e){}
$("#historyBox").val($("#historyBox").val()+historyTrunk+char);
$("#historyBox").scrollTop(99999);
historyTrunk = "";
}
lastchar.value = char;
$("#display").text(updateDisplay(displayTrunk));
}
$("#historyBox").click(function(){
if(!clickFlag){
$(this).select();
clickFlag = true;
}
else{
clickFlag = false;
$(this).blur();
}
});
$(document).disableTextSelect();
};

@ -687,9 +687,10 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint)
void UBBoardController::handScroll(qreal dx, qreal dy) void UBBoardController::handScroll(qreal dx, qreal dy)
{ {
mControlView->horizontalScrollBar()->setValue(mControlView->horizontalScrollBar()->value() - dx); // mControlView->horizontalScrollBar()->setValue(mControlView->horizontalScrollBar()->value() - dx);
mControlView->verticalScrollBar()->setValue(mControlView->verticalScrollBar()->value() - dy); // mControlView->verticalScrollBar()->setValue(mControlView->verticalScrollBar()->value() - dy);
mControlView->translate(dx, dy);
UBApplication::applicationController->adjustDisplayView(); UBApplication::applicationController->adjustDisplayView();
emit controlViewportChanged(); emit controlViewportChanged();
@ -1598,7 +1599,7 @@ void UBBoardController::stylusToolChanged(int tool)
if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text) if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text)
{ {
if(mPaletteManager->mKeyboardPalette->m_isVisible) if(mPaletteManager->mKeyboardPalette->m_isVisible)
UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger); UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger);
} }
} }

Loading…
Cancel
Save