From a527e33829fa1f80f6f4b99e2755df00c435fc90 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 5 Aug 2011 11:22:33 +0300 Subject: [PATCH] nice --- .../interactive/Anyembed.wgt/index.html | 6 -- .../interactive/Anyembed.wgt/js/ubw-main.js | 33 ++++++--- .../Calculator.wgt/js/calculate.js | 15 ++++ .../interactive/Calculator.wgt/js/ubw-main.js | 15 ++++ .../interactive/GoogleMap.wgt/index.html | 35 +++++++--- .../library/interactive/Html.wgt/index.html | 16 ++++- .../interactive/Notes.wgt/js/ubw-main.js | 19 ++++- .../interactive/Stopwatch.wgt/index.html | 1 - .../interactive/Stopwatch.wgt/js/ubw-main.js | 65 ++++++++++++++--- .../interactive/WebBrowser.wgt/index.html | 8 +-- .../interactive/barre_prof.wgt/config.xml | 10 +-- .../interactive/barre_prof.wgt/index.html | 70 ++++++++++++------- 12 files changed, 220 insertions(+), 73 deletions(-) diff --git a/resources/library/interactive/Anyembed.wgt/index.html b/resources/library/interactive/Anyembed.wgt/index.html index d488498e..e4e1b194 100644 --- a/resources/library/interactive/Anyembed.wgt/index.html +++ b/resources/library/interactive/Anyembed.wgt/index.html @@ -6,13 +6,8 @@ ubwidget - - - - - @@ -27,7 +22,6 @@
- \ No newline at end of file diff --git a/resources/library/interactive/Anyembed.wgt/js/ubw-main.js b/resources/library/interactive/Anyembed.wgt/js/ubw-main.js index 91a1632f..d5800fa5 100644 --- a/resources/library/interactive/Anyembed.wgt/js/ubw-main.js +++ b/resources/library/interactive/Anyembed.wgt/js/ubw-main.js @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ function init(){ var embed; @@ -50,15 +64,18 @@ function init(){ submit.click(function(){ $("#ubwidget").append(loadWindow) embed = inputBox.val(); - ////////////!!!1///////// попробовать с реади searchWrap.hide(); - loadWindow.append(embed); - //alert($("#ubwidget").html()); - $("#ubwidget embed").attr("wmode", "transparent"); - var ubwidget_html = $("#ubwidget").html(); - alert(ubwidget_html); - setTimeOut(alert); - $("#ubwidget").empty().html(ubwidget_html); + + if(/. +*/ + function addChar(input, character) { if(input.value == null || input.value == "0") input.value = character diff --git a/resources/library/interactive/Calculator.wgt/js/ubw-main.js b/resources/library/interactive/Calculator.wgt/js/ubw-main.js index 23dc7f29..7e08d0dc 100644 --- a/resources/library/interactive/Calculator.wgt/js/ubw-main.js +++ b/resources/library/interactive/Calculator.wgt/js/ubw-main.js @@ -1,3 +1,18 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + function init(){ var h = 292; var w = 160; diff --git a/resources/library/interactive/GoogleMap.wgt/index.html b/resources/library/interactive/GoogleMap.wgt/index.html index b2a598d0..6f17c525 100644 --- a/resources/library/interactive/GoogleMap.wgt/index.html +++ b/resources/library/interactive/GoogleMap.wgt/index.html @@ -15,6 +15,21 @@ - diff --git a/resources/library/interactive/Stopwatch.wgt/js/ubw-main.js b/resources/library/interactive/Stopwatch.wgt/js/ubw-main.js index b6e2107e..fa08dbf0 100644 --- a/resources/library/interactive/Stopwatch.wgt/js/ubw-main.js +++ b/resources/library/interactive/Stopwatch.wgt/js/ubw-main.js @@ -1,6 +1,34 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ function init(){ + var tempHours; + var tempMinutes; + var tempSeconds; + + if(window.sankore){ + tempHours = window.sankore.preference("hours","00"); + tempMinutes = window.sankore.preference("minutes","00"); + tempSeconds = window.sankore.preference("seconds","00"); + } else { + tempHours = "00"; + tempMinutes = "00"; + tempSeconds = "00"; + } + var ubwidget = $("#ubwidget").ubwidget({ width:252, height:89 @@ -32,8 +60,8 @@ function init(){ borderRight:"none" }); spacec.find(".ubw-button-canvas").unbind("mouseenter"); - - var hours = $("
00
").ubwbutton({ + + var hours = $("
" + tempHours + "
").ubwbutton({ w:52, h:68 }, { @@ -45,7 +73,7 @@ function init(){ hours.find(".ubw-button-body").css({ borderRight:"none" }); - var minutes = $("
00
").ubwbutton({ + var minutes = $("
" + tempMinutes + "
").ubwbutton({ w:52, h:68 }, { @@ -58,7 +86,7 @@ function init(){ borderLeft:"none", borderRight:"none" }); - var seconds = $("
00
").ubwbutton({ + var seconds = $("
" + tempSeconds + "
").ubwbutton({ w:52, h:68 }, { @@ -67,6 +95,7 @@ function init(){ right:0, left:0 }); + seconds.find(".ubw-button-body").css({ borderLeft:"none", borderRight:"none" @@ -239,12 +268,26 @@ function init(){ } function timeButtonDownHandler(m){ - var button = m.data.button; - var mouseStart = { + var button = m.data.button; + var content = button.find(".ubw-button-content"); + if(window.sankore){ + var temp = button.attr("id"); + switch(temp){ + case "seconds": + window.sankore.setPreference("seconds", content.text()); + break; + case "minutes": + window.sankore.setPreference("minutes", content.text()); + break; + case "hours": + window.sankore.setPreference("hours", content.text()); + break; + } + } + /*var mouseStart = { pageX:m.pageX, pageY:m.pageY - }; - var content = button.find(".ubw-button-content"); + };*/ var val = content.text(); isScrolling = true; reverse = true; @@ -332,6 +375,12 @@ function init(){ minutesValue.text(formatTime(currentMinute)); secondsValue.text(formatTime(currentSecond)); + if(window.sankore){ + window.sankore.setPreference("hours", hoursValue.text()); + window.sankore.setPreference("minutes", minutesValue.text()); + window.sankore.setPreference("seconds", secondsValue.text()); + } + } function formatTime(time){ diff --git a/resources/library/interactive/WebBrowser.wgt/index.html b/resources/library/interactive/WebBrowser.wgt/index.html index 8f431720..49d1b680 100644 --- a/resources/library/interactive/WebBrowser.wgt/index.html +++ b/resources/library/interactive/WebBrowser.wgt/index.html @@ -33,11 +33,11 @@ //resizerIndex = 0; - /*if(window.sankore){ + if(window.sankore){ url = window.sankore.preference("url", ""); }else{ url = ""; - }; */ + }; language = navigator.userAgent.split(";"); language = language[3].replace(/\s/g, "").substr(0, 2); @@ -157,9 +157,9 @@ //clearTimeout(resizer); //resizerIndex = 0; - /*if(window.sankore){ + if(window.sankore){ window.sankore.setPreference("url", $("#textbox").val()); - };*/ + }; $("#embeded-content").hide(); $("#container").removeClass("load").addClass("show"); diff --git a/resources/library/interactive/barre_prof.wgt/config.xml b/resources/library/interactive/barre_prof.wgt/config.xml index 0009af14..2f634ce4 100644 --- a/resources/library/interactive/barre_prof.wgt/config.xml +++ b/resources/library/interactive/barre_prof.wgt/config.xml @@ -4,13 +4,13 @@ xmlns:ub="http://uniboard.mnemis.com/widgets" id="http://www.example.net/widgets/helloworld" version="1.0" - width="200" - height="700" + width="660" + height="410" ub:resizable="true"> - Rich Note - Allows the teacher to attach a rich note to the page. + Rich Text Editor + Allows the teacher to attach a text editor to the page. + value="sankore"/> diff --git a/resources/library/interactive/barre_prof.wgt/index.html b/resources/library/interactive/barre_prof.wgt/index.html index 783668fe..844c1772 100644 --- a/resources/library/interactive/barre_prof.wgt/index.html +++ b/resources/library/interactive/barre_prof.wgt/index.html @@ -1,31 +1,47 @@ - - - - + + + - - Template - - - - - - - - - - - - - - - - - + Very nice text editor!!11 + + + + - -
+ - \ No newline at end of file +