changed Wikipedia, Wiktionary and WebBrowser widgets

preferencesAboutTextFull
unknown 13 years ago
parent b5ebaf1940
commit 48a3ef4e61
  1. 16
      resources/library/interactive/WebBrowser.wgt/css/main.css
  2. 52
      resources/library/interactive/WebBrowser.wgt/index.html
  3. 4
      resources/library/interactive/Wikipedia.wgt/config.xml
  4. 140
      resources/library/interactive/Wikipedia.wgt/css/master.css
  5. 129
      resources/library/interactive/Wikipedia.wgt/index.html
  6. 5
      resources/library/interactive/Wikipedia.wgt/nbproject/private/private.properties
  7. 4
      resources/library/interactive/Wikipedia.wgt/nbproject/private/private.xml
  8. 7
      resources/library/interactive/Wikipedia.wgt/nbproject/project.properties
  9. 9
      resources/library/interactive/Wikipedia.wgt/nbproject/project.xml
  10. 44
      resources/library/interactive/Wiktionary.wgt/css/master.css
  11. 128
      resources/library/interactive/Wiktionary.wgt/index.html
  12. 5
      resources/library/interactive/Wiktionary.wgt/nbproject/private/private.properties
  13. 7
      resources/library/interactive/Wiktionary.wgt/nbproject/project.properties
  14. 9
      resources/library/interactive/Wiktionary.wgt/nbproject/project.xml

@ -179,4 +179,20 @@ body{
width:193px; width:193px;
background-image:url(../imgs/right.png); background-image:url(../imgs/right.png);
background-repeat:no-repeat; background-repeat:no-repeat;
}
.popupWordInfo{
position: absolute;
display: none;
width: 100px;
height: 17px;
top: 0;
left: 0;
text-align: center;
border: 1px solid #B9B9B9;
background-color: #eaebeb;
color: black;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
z-index: 100;
} }

@ -22,6 +22,7 @@
$(document).ready(function(){ $(document).ready(function(){
//var resizer; // Timer //var resizer; // Timer
//var resizerIndex; //var resizerIndex;
var popupFlag = false;
var currentHistory = 0; var currentHistory = 0;
var references = new Array(); var references = new Array();
var globalWidth = 850; var globalWidth = 850;
@ -37,7 +38,8 @@
var resizer; // Timer var resizer; // Timer
var resizerIndex; var resizerIndex;
var popupText = $("<div id='popupWordInfo' class='popupWordInfo'></div>").appendTo("body");
resizerIndex = 0; resizerIndex = 0;
if(window.sankore){ if(window.sankore){
@ -66,7 +68,53 @@
$("#search-button").trigger("click"); $("#search-button").trigger("click");
} }
}); });
$("#search-button").mouseover(function(evt){
popupFlag = true;
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"100px"})
.text("Go to the site")
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#back-button").mouseover(function(evt){
popupFlag = true;
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"90px"})
.text("Previous site")
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#forward-button").mouseover(function(evt){
popupFlag = true;
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"70px"})
.text("Next site")
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#search-button, #back-button, #forward-button").mousemove(function(evt){
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13);
});
$("#search-button, #back-button, #forward-button").mouseout(function(evt){
popupText.hide();
popupFlag = false;
});
$("#textbox").keypress(function(e) { $("#textbox").keypress(function(e) {
if(e.keyCode == 13) { if(e.keyCode == 13) {
$("#search-button").trigger("click"); $("#search-button").trigger("click");

@ -3,8 +3,8 @@
xmlns:ub="http://uniboard.mnemis.com/widgets" xmlns:ub="http://uniboard.mnemis.com/widgets"
identifier="http://uniboard.mnemis.com/widgets/wikipedia" identifier="http://uniboard.mnemis.com/widgets/wikipedia"
version="1.2" version="1.2"
width="350" width="370"
height="450" height="400"
ub:resizable = "true"> ub:resizable = "true">
<name>Wikipedia</name> <name>Wikipedia</name>

@ -1,70 +1,70 @@
body{ body{
font-family:helvetica, arial, sans-serif; font-family:helvetica, arial, sans-serif;
font-size:12px; font-size:12px;
} }
.on-the-right{ .on-the-right{
width:0px; width:0px;
position:absolute; position:absolute;
top:0; top:0;
overflow:visible; overflow:visible;
margin-left:100%; margin-left:100%;
} }
.toolbar{ .toolbar{
background-image:url(../images/toolbarBody.png); background-image:url(../images/toolbarBody.png);
padding-left:4px; padding-left:4px;
border:1px solid #cccccc; border:1px solid #cccccc;
border-bottom:1px solid #ffffff; border-bottom:1px solid #ffffff;
position:relative; position:relative;
} }
.toolbar>div>.button{ .toolbar>div>.button{
width:29px; width:29px;
height:24px; height:24px;
float:left; float:left;
margin-right:4px; margin-right:4px;
margin-top:0px; margin-top:0px;
cursor:pointer; cursor:pointer;
} }
#toolbar-down{ #toolbar-down{
font-size:18px; font-size:18px;
font-weight:bold; font-weight:bold;
color:#333333; color:#333333;
text-align:center; text-align:center;
font-family:helvetica, arial, sans-serif; font-family:helvetica, arial, sans-serif;
text-shadow: #ffffff 0px 1px 1px; text-shadow: #ffffff 0px 1px 1px;
} }
#url{ #url{
height:20px; height:20px;
float:left; float:left;
border:1px solid #b9b9b9; border:1px solid #b9b9b9;
padding-right:4%; padding-right:4%;
width:80%; width:80%;
} }
#left-field{ #left-field{
float:left; float:left;
} }
#right-field{ #right-field{
float:right; float:right;
} }
#center-field{ #center-field{
display:block-inline; display:block-inline;
position:relative; position:relative;
} }
#center-field.min{ #center-field.min{
margin-right:6px; margin-right:6px;
} }
#center-field.full{ #center-field.full{
margin-right:78px; margin-right:78px;
margin-left:65px; margin-left:65px;
} }
#web-canevas { #web-canevas {
@ -79,20 +79,20 @@ body{
} }
.toolbar-body { .toolbar-body {
display: table; display: table;
width: 100%; width: 100%;
height: 37px; height: 37px;
/* IE hacks */ /* IE hacks */
position: relative !ie7; position: relative !ie7;
} }
.toolbar-body>div { .toolbar-body>div {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
/* IE hacks */ /* IE hacks */
position: absolute !ie7; position: absolute !ie7;
top: 50% !ie7; top: 50% !ie7;
} }
#toolbar-button-back{ background-image:url(../images/toolbarButtonBack.png) } #toolbar-button-back{ background-image:url(../images/toolbarButtonBack.png) }
@ -101,19 +101,49 @@ body{
#toolbar-button-languages{ background-image:url(../images/toolbarButtonLanguages.png) } #toolbar-button-languages{ background-image:url(../images/toolbarButtonLanguages.png) }
#toolbar-button-search{ #toolbar-button-search{
width:22px; float: left;
height:22px; width:22px;
position:relative; height:22px;
margin-left:-22px; position:relative;
background-image:url(../images/toolbarButtonSearch.png); margin-left:-32px;
background-repeat:no-repeat; background-image:url(../images/toolbarButtonSearch.png);
background-position:center center; background-repeat:no-repeat;
background-position:center center;
border: 1px solid #B9B9B9;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
#toolbar-button-search:hover{
border: 1px solid #666666;
} }
#toolbar-button-languages{ #toolbar-button-languages{
width:66px; width:66px;
} }
#toolbar-button-back{ #toolbar-button-back{
margin-right:0px; margin-right:0px;
}
.popupWordInfo{
position: absolute;
display: none;
width: 100px;
height: 17px;
top: 0;
left: 0;
text-align: center;
border: 1px solid #B9B9B9;
background-color: #eaebeb;
color: black;
font-family: Verdana,Arial,Helvetica,sans-serif;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
z-index: 100;
font-family: Arial,Helvetica,sans-serif;
} }

@ -13,7 +13,8 @@
<script type="text/javascript" src="script/superfish.js"></script> <script type="text/javascript" src="script/superfish.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var popupFlag = false
var browsing = false; var browsing = false;
var lang = 'en'; var lang = 'en';
var internalChange = false; var internalChange = false;
@ -37,24 +38,26 @@
}, },
index:-1 index:-1
} }
$(document).ready(function() { $(document).ready(function() {
var ubHistoryList = ""; var ubHistoryList = "";
var ubHistoryIndex = ""; var ubHistoryIndex = "";
var popupText = $("<div id='popupWordInfo' class='popupWordInfo'></div>").appendTo("body");
lang = navigator.userAgent.split(";"); lang = navigator.userAgent.split(";");
lang = (navigator.language || navigator.systemLanguage || lang = (navigator.language || navigator.systemLanguage ||
navigator.userLanguage || 'en').substr(0, 2).toLowerCase(); navigator.userLanguage || 'en').substr(0, 2).toLowerCase();
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); $("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1));
if(window.sankore){ if(window.sankore){
toolbar.state = loadPref("historyState", "begin"); toolbar.state = loadPref("historyState", "begin");
ubHistoryList = loadPref("historyList", ""); ubHistoryList = loadPref("historyList", "");
ubHistoryIndex = loadPref("historyIndex", "-1"); ubHistoryIndex = loadPref("historyIndex", "-1");
} }
if(ubHistoryList !== "") { if(ubHistoryList !== "") {
appHistory.list = ubHistoryList.split(","); appHistory.list = ubHistoryList.split(",");
appHistory.index = parseInt(ubHistoryIndex); appHistory.index = parseInt(ubHistoryIndex);
@ -62,22 +65,22 @@
} else { } else {
wikiReq(""); wikiReq("");
} }
$(window).resize(); $(window).resize();
$("#languages-dropdown>li>ul>li").each(function(){ $("#languages-dropdown>li>ul>li").each(function(){
$(this).click(function(){ $(this).click(function(){
languagesHandler($(this).text()); languagesHandler($(this).text());
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); $("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1));
}); });
}); });
$("#languages-dropdown").superfish({ $("#languages-dropdown").superfish({
dropShadows:false, dropShadows:false,
speed:1, speed:1,
delay:100 delay:100
}); });
$("#url") $("#url")
.change(function(){ .change(function(){
if(!toolbar.loading){ if(!toolbar.loading){
@ -90,42 +93,92 @@
$("#url").change(); $("#url").change();
}; };
}); });
$("#url").val(appHistory.list[appHistory.index]);
$("#toolbar-button-search").click(function(){
$("#url").trigger("change");
});
$("#toolbar-button-search").mouseover(function(evt){
popupFlag = true;
popupText.text("Search")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"70px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mousemove(function(evt){
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13);
});
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mouseout(function(evt){
popupFlag = false;
popupText.hide();
});
$("#url").val(appHistory.list[appHistory.index]);
if($("#url").val().length > 0) if($("#url").val().length > 0)
$("#url").change(); $("#url").change();
$("#toolbar-button-back").click(function(){ $("#toolbar-button-back").click(function(){
browsing = true; browsing = true;
appHistory.back(); appHistory.back();
}); });
$("#toolbar-button-back").mouseover(function(evt){
popupFlag = true;
popupText.text("Previous word")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"100px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-forward").click(function(){ $("#toolbar-button-forward").click(function(){
browsing = true; browsing = true;
appHistory.forward(); appHistory.forward();
}); });
$("#toolbar-button-forward").mouseover(function(evt){
popupFlag = true;
popupText.text("Next word")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"70px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-home").click(function(){ $("#toolbar-button-home").click(function(){
}); });
}); });
$(window).resize(function(){ $(window).resize(function(){
$("#web-browser").height($(window).height() - $("#toolbar").height() - 2); $("#web-browser").height($(window).height() - $("#toolbar").height() - 2);
$("#web-browser").width($(window).width() - 2); $("#web-browser").width($(window).width() - 2);
if($(window).width() < 280){ if($(window).width() < 280){
window.resizeTo(280, $(window).height()); window.resizeTo(280, $(window).height());
} }
}); });
function wikiReq(kword){ function wikiReq(kword){
var textBoxInput = ""; var textBoxInput = "";
textBoxInput = remacc(kword.replace(/ /g,'+')); textBoxInput = remacc(kword.replace(/ /g,'+'));
textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toUpperCase()); textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toUpperCase());
if(toolbar.state == "begin"){ if(toolbar.state == "begin"){
$('#web-browser').attr('src',""); $('#web-browser').attr('src',"");
@ -137,25 +190,25 @@
$('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)"); $('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)");
toolbar.loading = true; toolbar.loading = true;
} }
function hideLoading(){ function hideLoading(){
$('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)"); $('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)");
toolbar.loading = false; toolbar.loading = false;
// History // History
if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){ if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){
appHistory.list = appHistory.list.slice(0, appHistory.index+1); appHistory.list = appHistory.list.slice(0, appHistory.index+1);
appHistory.list[appHistory.index+1] = $("#url").val(); appHistory.list[appHistory.index+1] = $("#url").val();
appHistory.index = appHistory.list.length-1; appHistory.index = appHistory.list.length-1;
} }
if(window.sankore && $("#web-browser").attr("src") !== ""){ if(window.sankore && $("#web-browser").attr("src") !== ""){
savePref("historyState", "started"); savePref("historyState", "started");
savePref("historyList", appHistory.list.toString()); savePref("historyList", appHistory.list.toString());
savePref("historyIndex", appHistory.index) savePref("historyIndex", appHistory.index)
} }
} }
String.prototype.accnt = function(){ String.prototype.accnt = function(){
var cnt = 0; var cnt = 0;
var acnt = this; var acnt = this;
@ -167,7 +220,7 @@
cnt++; cnt++;
return cnt; return cnt;
} }
String.prototype.renlacc = function(){ String.prototype.renlacc = function(){
var torem = this; var torem = this;
torem = torem.split(''); torem = torem.split('');
@ -184,9 +237,9 @@
document.title = toascout; document.title = toascout;
return toascout; return toascout;
} }
function remacc(kword){ function remacc(kword){
var countarr = new Array(); var countarr = new Array();
var c = ''; var c = '';
var text=kword; var text=kword;
@ -201,21 +254,21 @@
textout = textout.join('\n'); textout = textout.join('\n');
return textout; return textout;
} }
function loadPref(name, defaultValue){ function loadPref(name, defaultValue){
var pref = defaultValue; var pref = defaultValue;
if (sankore.preference(name) !== "") { if (sankore.preference(name) !== "") {
pref = sankore.preference(name); pref = sankore.preference(name);
}; };
return pref; return pref;
}; };
function savePref(name, value){ function savePref(name, value){
sankore.setPreference(name, String(value)); sankore.setPreference(name, String(value));
}; };
function languagesHandler(language){ function languagesHandler(language){
switch(language){ switch(language){
case "Deutsch": case "Deutsch":
@ -250,7 +303,7 @@
break; break;
} }
}; };
</script> </script>
</head> </head>
<body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff"> <body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff">
@ -274,9 +327,9 @@
</div> </div>
<div id="center-field" class="full"> <div id="center-field" class="full">
<input type="text" id="url" alt="url"/> <input type="text" id="url" alt="url"/>
<div class="on-the-right"> <div class="on-the-right">
<div id="toolbar-button-search"></div> <div id="toolbar-button-search"></div>
</div> </div>
</div> <!--center-field--> </div> <!--center-field-->
<div id="right-field"> <div id="right-field">
<div id="toolbar-button-languages" class="button" alt="languages button"> <div id="toolbar-button-languages" class="button" alt="languages button">

@ -1,5 +0,0 @@
copy.src.files=false
copy.src.target=
index.file=index.html
run.as=LOCAL
url=http://localhost/Wikipedia.wgt/

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
</project-private>

@ -1,7 +0,0 @@
include.path=${php.global.include.path}
php.version=PHP_5
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=true
web.root=.

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>Wikipedia.wgt</name>
</data>
</configuration>
</project>

@ -101,13 +101,23 @@ body{
#toolbar-button-languages{ background-image:url(../images/toolbarButtonLanguages.png) } #toolbar-button-languages{ background-image:url(../images/toolbarButtonLanguages.png) }
#toolbar-button-search{ #toolbar-button-search{
width:22px; float: left;
height:22px; width:22px;
position:relative; height:22px;
margin-left:-22px; position:relative;
background-image:url(../images/toolbarButtonSearch.png); margin-left:-32px;
background-repeat:no-repeat; background-image:url(../images/toolbarButtonSearch.png);
background-position:center center; background-repeat:no-repeat;
background-position:center center;
border: 1px solid #B9B9B9;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
}
#toolbar-button-search:hover{
border: 1px solid #666666;
} }
#toolbar-button-languages{ #toolbar-button-languages{
@ -116,4 +126,24 @@ body{
#toolbar-button-back{ #toolbar-button-back{
margin-right:0px; margin-right:0px;
}
.popupWordInfo{
position: absolute;
display: none;
width: 100px;
height: 17px;
top: 0;
left: 0;
text-align: center;
border: 1px solid #B9B9B9;
background-color: #eaebeb;
color: black;
font-family: Verdana,Arial,Helvetica,sans-serif;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
z-index: 100;
font-family: Arial,Helvetica,sans-serif;
} }

@ -1,4 +1,3 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head> <head>
@ -13,7 +12,8 @@
<script type="text/javascript" src="script/superfish.js"></script> <script type="text/javascript" src="script/superfish.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var popupFlag = false;
var browsing = false; var browsing = false;
var mode = 'wiki'; var mode = 'wiki';
var lang = 'en'; var lang = 'en';
@ -38,25 +38,27 @@
}, },
index:-1 index:-1
} }
$(document).ready(function() { $(document).ready(function() {
var ubHistoryList = ""; var ubHistoryList = "";
var ubHistoryIndex = ""; var ubHistoryIndex = "";
var popupText = $("<div id='popupWordInfo' class='popupWordInfo'></div>").appendTo("body");
lang = navigator.userAgent.split(";"); lang = navigator.userAgent.split(";");
lang = (navigator.language || navigator.systemLanguage || lang = (navigator.language || navigator.systemLanguage ||
navigator.userLanguage || 'en').substr(0, 2).toLowerCase(); navigator.userLanguage || 'en').substr(0, 2).toLowerCase();
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); $("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1));
if(window.sankore){ if(window.sankore){
toolbar.state = loadPref("historyState", "begin"); toolbar.state = loadPref("historyState", "begin");
ubHistoryList = loadPref("historyList", ""); ubHistoryList = loadPref("historyList", "");
ubHistoryIndex = loadPref("historyIndex", "-1"); ubHistoryIndex = loadPref("historyIndex", "-1");
//window.resizeTo(350, 450); //window.resizeTo(350, 450);
} }
if(ubHistoryList !== "") { if(ubHistoryList !== "") {
appHistory.list = ubHistoryList.split(","); appHistory.list = ubHistoryList.split(",");
appHistory.index = parseInt(ubHistoryIndex); appHistory.index = parseInt(ubHistoryIndex);
@ -64,22 +66,22 @@
} else { } else {
wikiReq(""); wikiReq("");
} }
$(window).resize(); $(window).resize();
$("#languages-dropdown>li>ul>li").each(function(){ $("#languages-dropdown>li>ul>li").each(function(){
$(this).click(function(){ $(this).click(function(){
languagesHandler($(this).text()); languagesHandler($(this).text());
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); $("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1));
}); });
}); });
$("#languages-dropdown").superfish({ $("#languages-dropdown").superfish({
dropShadows:false, dropShadows:false,
speed:1, speed:1,
delay:100 delay:100
}); });
$("#url") $("#url")
.change(function(){ .change(function(){
if(!toolbar.loading){ if(!toolbar.loading){
@ -92,26 +94,76 @@
$("#url").change(); $("#url").change();
}; };
}); });
$("#url").val(appHistory.list[appHistory.index]); $("#url").val(appHistory.list[appHistory.index]);
if($("#url").val().length > 0) if($("#url").val().length > 0)
$("#url").change(); $("#url").change();
$("#toolbar-button-search").click(function(){
$("#url").trigger("change");
});
$("#toolbar-button-search").mouseover(function(evt){
popupFlag = true;
popupText.text("Search")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"70px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mousemove(function(evt){
popupText.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13);
});
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mouseout(function(evt){
popupFlag = false;
popupText.hide();
});
$("#toolbar-button-back").click(function(){ $("#toolbar-button-back").click(function(){
browsing = true; browsing = true;
appHistory.back(); appHistory.back();
}); });
$("#toolbar-button-back").mouseover(function(evt){
popupFlag = true;
popupText.text("Previous word")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"100px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-forward").click(function(){ $("#toolbar-button-forward").click(function(){
browsing = true; browsing = true;
appHistory.forward(); appHistory.forward();
}); });
$("#toolbar-button-forward").mouseover(function(evt){
popupFlag = true;
popupText.text("Next word")
.css("top", evt.pageY + 5)
.css("left", evt.pageX + 13)
.css({width:"70px"})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$("#toolbar-button-home").click(function(){ $("#toolbar-button-home").click(function(){
}); });
}); });
$(window).resize(function(){ $(window).resize(function(){
if($(window).width() < 300){ if($(window).width() < 300){
@ -121,15 +173,15 @@
$("#web-browser").width($(window).width() - 2); $("#web-browser").width($(window).width() - 2);
} else } else
$("#web-browser").height($(window).height() - $("#toolbar").height() - 2); $("#web-browser").height($(window).height() - $("#toolbar").height() - 2);
}); });
function wikiReq(kword){ function wikiReq(kword){
var textBoxInput = ""; var textBoxInput = "";
textBoxInput = remacc(kword.replace(/ /g,'_')); textBoxInput = remacc(kword.replace(/ /g,'_'));
textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toLowerCase()); textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toLowerCase());
if(toolbar.state == "begin"){ if(toolbar.state == "begin"){
$('#web-browser').attr('src',""); $('#web-browser').attr('src',"");
@ -141,25 +193,25 @@
$('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)"); $('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)");
toolbar.loading = true; toolbar.loading = true;
} }
function hideLoading(){ function hideLoading(){
$('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)"); $('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)");
toolbar.loading = false; toolbar.loading = false;
// History // History
if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){ if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){
appHistory.list = appHistory.list.slice(0, appHistory.index+1); appHistory.list = appHistory.list.slice(0, appHistory.index+1);
appHistory.list[appHistory.index+1] = $("#url").val(); appHistory.list[appHistory.index+1] = $("#url").val();
appHistory.index = appHistory.list.length-1; appHistory.index = appHistory.list.length-1;
} }
if(window.sankore && $("#web-browser").attr("src") !== ""){ if(window.sankore && $("#web-browser").attr("src") !== ""){
savePref("historyState", "started"); savePref("historyState", "started");
savePref("historyList", appHistory.list.toString()); savePref("historyList", appHistory.list.toString());
savePref("historyIndex", appHistory.index) savePref("historyIndex", appHistory.index)
} }
} }
String.prototype.accnt = function(){ String.prototype.accnt = function(){
var cnt = 0; var cnt = 0;
var acnt = this; var acnt = this;
@ -171,7 +223,7 @@
cnt++; cnt++;
return cnt; return cnt;
} }
String.prototype.renlacc = function(){ String.prototype.renlacc = function(){
var torem = this; var torem = this;
torem = torem.split(''); torem = torem.split('');
@ -188,9 +240,9 @@
document.title = toascout; document.title = toascout;
return toascout; return toascout;
} }
function remacc(kword){ function remacc(kword){
var countarr = new Array(); var countarr = new Array();
var c = ''; var c = '';
var text=kword; var text=kword;
@ -205,21 +257,21 @@
textout = textout.join('\n'); textout = textout.join('\n');
return textout; return textout;
} }
function loadPref(name, defaultValue){ function loadPref(name, defaultValue){
var pref = defaultValue; var pref = defaultValue;
if (sankore.preference(name) !== "") { if (sankore.preference(name) !== "") {
pref = sankore.preference(name); pref = sankore.preference(name);
}; };
return pref; return pref;
}; };
function savePref(name, value){ function savePref(name, value){
sankore.setPreference(name, String(value)); sankore.setPreference(name, String(value));
}; };
function languagesHandler(language){ function languagesHandler(language){
switch(language){ switch(language){
case "Deutsch": case "Deutsch":
@ -254,7 +306,7 @@
break; break;
} }
}; };
</script> </script>
</head> </head>
<body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff"> <body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff">
@ -278,9 +330,9 @@
</div> </div>
<div id="center-field" class="full"> <div id="center-field" class="full">
<input type="text" id="url" alt="url"/> <input type="text" id="url" alt="url"/>
<div class="on-the-right"> <div class="on-the-right">
<div id="toolbar-button-search"></div> <div id="toolbar-button-search"></div>
</div> </div>
</div> <!--center-field--> </div> <!--center-field-->
<div id="right-field"> <div id="right-field">
<div id="toolbar-button-languages" class="button" alt="languages button"> <div id="toolbar-button-languages" class="button" alt="languages button">

@ -1,5 +0,0 @@
copy.src.files=false
copy.src.target=
index.file=index.html
run.as=LOCAL
url=http://localhost/Wiktionary.wgt/

@ -1,7 +0,0 @@
include.path=${php.global.include.path}
php.version=PHP_53
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=true
web.root=.

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>Wiktionary.wgt</name>
</data>
</configuration>
</project>
Loading…
Cancel
Save