some changes in Choisir and WebBrowser apps

preferencesAboutTextFull
unknown 13 years ago
parent 22c6931b1d
commit 9c1928d77d
  1. 2
      resources/library/interactive/Choisir.wgt/config.xml
  2. 36
      resources/library/interactive/Choisir.wgt/css/basic.css
  3. 5
      resources/library/interactive/Choisir.wgt/nbproject/private/private.properties
  4. 4
      resources/library/interactive/Choisir.wgt/nbproject/private/private.xml
  5. 7
      resources/library/interactive/Choisir.wgt/nbproject/project.properties
  6. 9
      resources/library/interactive/Choisir.wgt/nbproject/project.xml
  7. 56
      resources/library/interactive/Choisir.wgt/scripts/selQuestionApp.js
  8. 4
      resources/library/interactive/WebBrowser.wgt/config.xml
  9. 203
      resources/library/interactive/WebBrowser.wgt/css/main.css
  10. 15
      resources/library/interactive/WebBrowser.wgt/index.html

@ -3,7 +3,7 @@
xmlns:ub="http://uniboard.mnemis.com/widgets" xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser" id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1" version="1.1"
width="650" width="700"
height="400" height="400"
ub:resizable="true"> ub:resizable="true">

@ -15,7 +15,7 @@ body{
padding: 3px; padding: 3px;
margin: 0 auto; margin: 0 auto;
height: auto; height: auto;
background-color: white;
} }
.toggleButton{ .toggleButton{
@ -30,7 +30,7 @@ body{
} }
.buttonDiv{ .buttonDiv{
position: absolute; position: fixed;
float: right; float: right;
z-index: 1; z-index: 1;
} }
@ -47,7 +47,7 @@ body{
margin: 0; margin: 0;
border: none; border: none;
background: none; background: none;
color: #E6E3DC; color: #99ccff;
cursor: pointer; cursor: pointer;
} }
@ -103,7 +103,7 @@ body{
background-position: 0 50%; background-position: 0 50%;
width: auto; width: auto;
padding-left: 18px; padding-left: 18px;
color: #E6E3DC; color: #00C6FF;
cursor: pointer; cursor: pointer;
} }
@ -115,7 +115,7 @@ body{
background-position: 0 50%; background-position: 0 50%;
width: auto; width: auto;
padding-left: 18px; padding-left: 18px;
color: #E6E3DC; color: #00C6FF;
cursor: pointer; cursor: pointer;
} }
@ -169,7 +169,7 @@ body{
width: auto; width: auto;
padding-left: 20px; padding-left: 20px;
line-height: 24px; line-height: 24px;
color: #E6E3DC; color: #99ccff;
cursor: pointer; cursor: pointer;
} }
@ -217,7 +217,7 @@ body{
margin-left: 5px; margin-left: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small; font-size: small;
width: 80%; width: 90%;
float: left; float: left;
} }
@ -269,7 +269,7 @@ body{
.optDescText{ .optDescText{
text-align: center; text-align: center;
width: 70%; width: 70%;
color: #CCC; color: #666666;
float: left; float: left;
font-size: small; font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: Verdana,Arial,Helvetica,sans-serif;
@ -321,7 +321,7 @@ body{
width: 160px; width: 160px;
font-size: small; font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: Verdana,Arial,Helvetica,sans-serif;
color: #AAA; color: #666;
padding: 3px; padding: 3px;
margin-left: 20px; margin-left: 20px;
} }
@ -341,4 +341,22 @@ body{
float: right; float: right;
margin: 2px; margin: 2px;
padding: 3px; padding: 3px;
}
.popupWordInfo{
position: absolute;
display: none;
width: 100px;
height: 20px;
top: 0;
left: 0;
text-align: center;
border: 1px solid #B9B9B9;
background-color: #eaebeb;
color: #666;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
z-index: 100;
} }

@ -1,5 +0,0 @@
copy.src.files=false
copy.src.target=
index.file=index.html
run.as=LOCAL
url=http://localhost/Choisir.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>Choisir.wgt</name>
</data>
</configuration>
</project>

@ -17,12 +17,13 @@ var questionArray;
var currentQstId = ""; var currentQstId = "";
function init(){ function init(){
//variables //variables
var toggleFlag = false; var toggleFlag = false;
var endFlag = false; var endFlag = false;
var mode = false; var mode = false;
questionArray = new Array(); questionArray = new Array();
var popupFlag = false
// toggle button // toggle button
var buttonDiv = $("<div id='buttonDiv' class='buttonDiv'>").appendTo("body"); var buttonDiv = $("<div id='buttonDiv' class='buttonDiv'>").appendTo("body");
@ -32,6 +33,9 @@ function init(){
right:0 right:0
}); });
//popup message
var popupText = $("<div id='popupWordInfo' class='popupWordInfo'></div>").appendTo("body");
// adding question block // adding question block
var addQstDiv = $("<div id='addQstDiv' class='addQstDiv'>").appendTo("body"); var addQstDiv = $("<div id='addQstDiv' class='addQstDiv'>").appendTo("body");
var addQstButton = $("<button id='addQstButton' class='addQstButton'>").appendTo("#addQstDiv"); var addQstButton = $("<button id='addQstButton' class='addQstButton'>").appendTo("#addQstDiv");
@ -170,6 +174,7 @@ function init(){
//delete answer //delete answer
$(".ansDelete").live('click', function(){ $(".ansDelete").live('click', function(){
popupText.hide();
var id = this.id.replace("ansDelete",""); var id = this.id.replace("ansDelete","");
$("#" + id).remove(); $("#" + id).remove();
for(var i in questionArray) for(var i in questionArray)
@ -185,6 +190,7 @@ function init(){
//delete question //delete question
$(".qstDelete").live('click', function(){ $(".qstDelete").live('click', function(){
popupText.hide();
$("#" + currentQstId).remove(); $("#" + currentQstId).remove();
for(var i in questionArray) for(var i in questionArray)
if(questionArray[i].id == currentQstId){ if(questionArray[i].id == currentQstId){
@ -210,11 +216,51 @@ function init(){
//select option //select option
$("input:radio").live('click', function(event){ $("input:radio").live('click', function(event){
$("#" + currentQstId + " input:radio").removeAttr("checked"); if(!mode){
$(event.target).attr("checked", "checked"); $("#" + currentQstId + " input:radio").removeAttr("checked");
getNeededElement(questionArray, currentQstId).type = $(event.target).attr("value"); $(event.target).attr("checked", "checked");
getNeededElement(questionArray, currentQstId).type = $(event.target).attr("value");
}
});
//popup messages
$(".qstDelete").live('mouseover', function(evt){
popupFlag = true;
popupText.text("Delete question")
.css("top", evt.pageY + 15)
.css("left", evt.pageX - 40)
.css({
width:"120px"
})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
}); });
$(".ansDelete").live('mouseover', function(evt){
popupFlag = true;
popupText.text("Delete answer")
.css("top", evt.pageY + 15)
.css("left", evt.pageX - 40)
.css({
width:"110px"
})
.show("fast", function(){
if(!popupFlag)
popupText.hide();
});
});
$(".qstDelete, .ansDelete").live('mousemove', function(evt){
popupText.css("top", evt.pageY + 15)
.css("left", evt.pageX - 40)
});
$(".qstDelete, .ansDelete").live('mouseout', function(evt){
popupFlag = false;
popupText.hide();
});
//toggle button click trigger //toggle button click trigger

@ -3,8 +3,8 @@
xmlns:ub="http://uniboard.mnemis.com/widgets" xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser" id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1" version="1.1"
width="550" width="600"
height="280" height="300"
ub:resizable="true"> ub:resizable="true">
<name>Web Browser</name> <name>Web Browser</name>

@ -1,184 +1,191 @@
body{ body{
margin-top:10px; padding: 5px;
margin-left:10px; width: 95%;
font-family:Arial, Sans-serif; margin-top:10px;
font-size:15px; margin-left:10px;
color:#444; font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: #dadada -1px 0 4px;
box-shadow: #dadada -1px 0 4px;
} }
.icon-container{ .icon-container{
width:40px; width:40px;
height:40px; height:40px;
overflow:hidden; overflow:hidden;
} }
#shadow{ #shadow{
position:absolute; position:absolute;
z-index:0; z-index:0;
width:512px; width:512px;
height:58px; height:58px;
padding-left:8px; padding-left:8px;
margin-top:3px; margin-top:3px;
margin-left:3px; margin-left:3px;
background-color:rgb(210,210,210); background-color:rgb(210,210,210);
} }
#inputfield{ #inputfield{
position:absolute; position:absolute;
z-index:1; z-index:1;
width:520px; width:520px;
height:58px; height:58px;
background-color:rgb(230,230,233); background-color:rgb(230,230,233);
border:1px solid rgb(220, 220, 220); border:1px solid rgb(220, 220, 220);
} }
.button{ .button{
float:left; float:left;
padding:4px 5px; padding:4px 5px;
cursor:pointer; cursor:pointer;
background-color:rgb(45,65,250); background-color:rgb(45,65,250);
border:1px solid; border:1px solid;
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250); border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250);
text-transform:capitalize; text-transform:capitalize;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
color:white; color:white;
} }
#search-button{ #search-button{
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
} }
#back-button{ #back-button{
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
} }
#forward-button{ #forward-button{
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
} }
#search-button.over{ #search-button.over{
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230); border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230);
} }
#show-inputfield-button{ #show-inputfield-button{
margin-left:12px; margin-left:12px;
} }
#web-content{ #web-content{
display:none; display:none;
margin-top:65px; margin-top:65px;
} }
#container{ #container{
float:left; float:left;
position:relative; position:relative;
overflow:visible; overflow:visible;
height:auto; height:auto;
} }
#container.welcome{ #container.welcome{
width:405px; width:405px;
margin-top:87px; margin-top:87px;
background-color:#FFF; background-color:#FFF;
} }
#container.load{ #container.load{
margin-top:0px; margin-top:0px;
} }
#container.show{ #container.show{
margin-top:0px; margin-top:0px;
height:auto; height:auto;
} }
#container.change{ #container.change{
margin-top:80px; margin-top:80px;
height:auto; height:auto;
} }
#container.error{ #container.error{
width:400px; width:400px;
height:auto; height:auto;
margin-top:87px; margin-top:87px;
background-color:#FFF; background-color:#FFF;
position:relative; position:relative;
} }
#arrow{ #arrow{
text-align:center; text-align:center;
width:100%; width:100%;
margin-top:-36px; margin-top:-36px;
margin-bottom:-1px; margin-bottom:-1px;
position:relative; position:relative;
z-index:4; z-index:4;
} }
#embeded-content{ #embeded-content{
border:1px solid rgb(230,230,230); border:1px solid rgb(230,230,230);
position:relative; position:relative;
z-index:3; z-index:3;
float:left; float:left;
height:auto; height:auto;
} }
#show-container{ #show-container{
overflow:auto; overflow:auto;
height:auto; height:auto;
} }
#show-area{ #show-area{
width:80px; width:80px;
height:100%; height:100%;
display:none; display:none;
} }
#show-area .icon-container{ #show-area .icon-container{
margin:0 auto; margin:0 auto;
} }
#textbox{ #textbox{
width:245px; width:245px;
float:left; float:left;
padding:2px; padding:2px;
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
outline:none; outline:none;
border:1px solid #666; border:1px solid #666;
font-family:Arial, Sans-serif; font-family:Arial, Sans-serif;
font-size:15px; font-size:15px;
color:#444; color:#444;
} }
#container-shadow{ #container-shadow{
width:100%; width:100%;
height:30px; height:30px;
} }
#container-shadow td{ #container-shadow td{
height:100%; height:100%;
} }
#shadow-left{ #shadow-left{
width:193px; width:193px;
background-image:url(../imgs/left.png); background-image:url(../imgs/left.png);
background-repeat:no-repeat; background-repeat:no-repeat;
} }
#shadow-center{ #shadow-center{
width:auto; width:auto;
background-image:url(../imgs/center.png); background-image:url(../imgs/center.png);
background-repeat:repeat; background-repeat:repeat;
} }
#shadow-right{ #shadow-right{
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{ .popupWordInfo{

@ -8,9 +8,6 @@
<title>Web Browser</title> <title>Web Browser</title>
<link rel="stylesheet" type="text/css" href="css/main.css"> <link rel="stylesheet" type="text/css" href="css/main.css">
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript"> <script type="text/javascript">
var loadingState = false; var loadingState = false;
@ -22,6 +19,8 @@
$(document).ready(function(){ $(document).ready(function(){
//var resizer; // Timer //var resizer; // Timer
//var resizerIndex; //var resizerIndex;
$("body").css({height: $(window).height() - 40});
var popupFlag = false; var popupFlag = false;
var currentHistory = 0; var currentHistory = 0;
var references = new Array(); var references = new Array();
@ -180,11 +179,12 @@
}; };
$(window).resize(function(){ $(window).resize(function(){
$("body").css({height: $(window).height() - 40});
globalWidth = $(window).width(); globalWidth = $(window).width();
globalHeight = $(window).height(); globalHeight = $(window).height();
$("#web-content") $("#web-content")
.attr("width", globalWidth - 25) .attr("width", globalWidth - 60)
.attr("height", globalHeight - 90); .attr("height", globalHeight - 120);
}); });
function checkcontent(){ function checkcontent(){
@ -208,9 +208,10 @@
.attr("width", globalWidth - 25) .attr("width", globalWidth - 25)
.attr("height", globalHeight - 90); .attr("height", globalHeight - 90);
$("#web-content").show(); $("#web-content").show();
$(window).trigger("resize");
return false; return false;
}; };
if(resizerIndex > 50){ if(resizerIndex > 100){
resizerIndex = 0; resizerIndex = 0;
$("#textbox").val("http://www.google.com/search?q=" + $("#textbox").val().replace("http://", "")); $("#textbox").val("http://www.google.com/search?q=" + $("#textbox").val().replace("http://", ""));
$("#search-button").trigger("click"); $("#search-button").trigger("click");
@ -244,7 +245,9 @@
}); });
</script> </script>
</head>
<body>
<div id="ubwidget"> <div id="ubwidget">
<div id="shadow"></div> <div id="shadow"></div>

Loading…
Cancel
Save