Commit 6167ac7f authored by unknown's avatar unknown

new widget called etudier.wgt

parent 57f90755
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/notes"
version="1.2"
width="900"
height="450"
ub:resizable="true">
<name>Notes</name>
<author href="http://www.getuniboard.com"
email="info@mnemis.com">Mnemis SA</author>
<description>Associer images</description>
<content src="index.html"/>
</widget>
html, body{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: white;
}
.toggle_mode{
width: 100%;
height: 25px;
border-bottom: 1px solid #999;
background-color: #ccc;
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
#display_img, #edit_img{
width: 15px;
height: 15px;
margin: 5px 10px;
}
.green_point{
background-image: url(../img/green_point.png);
}
.red_point{
background-image: url(../img/red_point.png);
}
#display_text, #edit_text{
height: 19px;
padding: 3px 0 0 0;
}
.selected{
background-color: #666;
}
#display:hover, #edit:hover{
background-color: #999;
}
.img_block{
width: 120px;
height: 120px;
padding: 5px;
display: inline-block;
position: absolute;
top: 100px;
left: 350px;
}
.img_gray{
border: 1px solid #ccc;
-moz-box-shadow: #ccc -1px 0 4px;
-webkit-box-shadow: #ccc -1px 0 4px;
box-shadow: #ccc -1px 0 4px;
}
.close_img {
width: 30px;
height: 30px;
background-repeat: no-repeat;
position: absolute;
background-image: url(../img/close_img.png);
top: -15px;
right: -15px;
cursor: pointer;
}
.dropHere{
background-color: #ccc;
}
.dropBack{
background-color: #F4F2F2;
}
.audio_block{
width: 120px;
height: 30px;
padding: 10px 5px;
position: absolute;
top: 200px;
left: 50px;
}
.audio_desc{
min-height: 30px;
margin: 5px 0;
float: left;
margin-left: 20px;
}
.play, .stop{
height: 30px;
width: 70px;
float: left;
cursor: pointer;
}
.play{
background-image: url(../img/play.png);
}
.stop{
background-image: url(../img/stop.png);
}
.replay{
height: 30px;
width: 32px;
margin-left: 10px;
float: left;
background-image: url(../img/replay.png);
background-repeat: no-repeat;
cursor: pointer;
}
.gray{
background-color: #ccc;
}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider{
height: 100%;
margin-top: -25px;
overflow:hidden;
}
span#prevBtn a{
height: 100%;
width: 20px;
background-color: #999;
position: absolute;
left: 0;
top: 0;
opacity: 0.5;
background-image: url(../img/left.png);
background-repeat: no-repeat;
background-position: 0 54%;
}
span#nextBtn a{
height: 100%;
width: 20px;
background-color: #999;
position: absolute;
right: 0;
top: 0;
opacity: 0.5;
background-image: url(../img/right.png);
background-repeat: no-repeat;
background-position: 0 52%;
}
span#nextBtn a:hover, span#prevBtn a:hover{
opacity: 0.7;
}
li>div{
width: 100%;
height: 100%;
padding: 30px 0 0 25px;
position: relative;
}
.text_block{
margin: 0;
padding: 5px;
width: 200px;
position: absolute;
top: 50px;
left: 100px;
}
.block_border{
border: 1px solid #999;
border-radius: 5px;
}
.move_block{
width: 30px;
height: 30px;
background-image: url(../img/moving.png);
position: absolute;
top: -15px;
left: -15px;
cursor: pointer;
}
.resize_block{
width: 30px;
height: 30px;
background-image: url(../img/resize.png);
position: absolute;
bottom: -13px;
right: -13px;
cursor: pointer;
}
.add_left{
width: 41px;
height: 30px;
opacity: 0.5;
background-image: url(../img/add_left.png);
position: absolute;
bottom: 40px;
left: 40px;
cursor: pointer;
}
.add_right{
width: 41px;
height: 30px;
opacity: 0.5;
background-image: url(../img/add_right.png);
position: absolute;
bottom: 40px;
right: 80px;
cursor: pointer;
}
.close_slide{
width: 30px;
height: 30px;
opacity: 0.5;
background-image: url(../img/close_slide.png);
position: absolute;
top: 40px;
right: 80px;
cursor: pointer;
}
.add_text{
width: 30px;
height: 30px;
opacity: 0.5;
background-image: url(../img/add_text.png);
position: absolute;
top: 40px;
left: 40px;
cursor: pointer;
}
.add_left:hover, .add_right:hover, .close_slide:hover, .add_text:hover{
opacity: 0.8;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>D'n'd</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="css/basic.css"/>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="js/easySlider1.5.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var lang = ""; //locale language
if(window.sankore){
lang = sankore.locale().substr(0,2);
} else
lang = "en";
if(lang == "en"){
if(window.sankore)
sankore.enableDropOnWidget(false);
start();
}
else{
returnStatus(lang);
}
function returnStatus(lang){
$.ajax({
type: 'POST',
url:'locales/' + lang + '/index.html',
statusCode: {
404: function() {
start();
},
200: function(){
window.location.href = 'locales/' + lang + '/index.html';
}
}
});
}
});
</script>
</head>
<body>
<div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 120px; cursor: pointer;" class="selected">
<div id="display_img" style="float: right;" class="green_point"></div>
<div id="display_text" style="float: right;"></div>
</div>
</div>
<div style="width: 50%; height: 100%; float: right;">
<div id="edit" style="float: left; width: 120px; cursor: pointer;">
<div id="edit_img" style="float: left;" class="red_point"></div>
<div id="edit_text" style="float: left;"></div>
</div>
</div>
</div>
<div style="width: 100%; height: 25px;"></div>
<div id="slider">
<ul>
</ul>
</div>
<span id="prevBtn"><a href="javascript:void(0);"></a></span>
<span id="nextBtn"><a href="javascript:void(0);"></a></span>
</body>
</html>
(function($) {
var s = 0;
var w = 0;
var h = 0;
var t = 0;
var ts = 0;
$.fn.setSize = function(width, height){
w = width;
h = height;
$(this).find("ul").css('width',s*w);
$("ul", $(this)).animate(
{
marginLeft: (t*w*-1)
},
0
);
}
$.fn.removeSlide = function(){
s = $("li", $(this)).length;
$(this).find("ul").css('width',s*w);
ts = s-1;
}
$.fn.addSlide = function(place){
s = $("li", $(this)).length;
ts = s-1;
$(this).find("ul").css('width',s*w);
if(place == "after")
$("a","#nextBtn").trigger("click");
}
$.fn.easySlider = function(options){
// default configuration properties
var defaults = {
prevId: 'prevBtn',
prevText: 'Previous',
nextId: 'nextBtn',
nextText: 'Next',
controlsShow: true,
controlsBefore: '',
controlsAfter: '',
controlsFade: true,
firstId: 'firstBtn',
firstText: 'First',
firstShow: false,
lastId: 'lastBtn',
lastText: 'Last',
lastShow: false,
vertical: false,
speed: 800,
auto: false,
pause: 2000,
continuous: false
};
options = $.extend(defaults, options);
this.each(function() {
var obj = $(this);
s = $("li", obj).length;
w = $("li", obj).width();
h = $("li", obj).height();
obj.width(w);
obj.height(h);
obj.css("overflow","hidden");
ts = s-1;
t = 0;
$("ul", obj).css('width',s*w);
if(!options.vertical) $("li", obj).css('float','left');
if(options.controlsShow){
var html = options.controlsBefore;
if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
html += options.controlsAfter;
$(obj).after(html);
};
$("a","#"+options.nextId).click(function(){
animate("next",true);
});
$("a","#"+options.prevId).click(function(){
animate("prev",true);
});
$("a","#"+options.firstId).click(function(){
animate("first",true);
});
$("a","#"+options.lastId).click(function(){
animate("last",true);
});
function animate(dir,clicked){
var ot = t;
switch(dir){
case "next":
t = (ot>=ts) ? (options.continuous ? 0 : ts) : t+1;
break;
case "prev":
t = (t<=0) ? (options.continuous ? ts : 0) : t-1;
break;
case "first":
t = 0;
break;
case "last":
t = ts;
break;
default:
break;
};
var diff = Math.abs(ot-t);
var speed = diff*options.speed;
if(!options.vertical) {
p = (t*w*-1);
console.log(w + " | " + h + " | " + p);
$("ul",obj).animate(
{
marginLeft: p
},
speed
);
} else {
p = (t*h*-1);
$("ul",obj).animate(
{
marginTop: p
},
speed
);
};
if(!options.continuous && options.controlsFade){
if(t==ts){
$("a","#"+options.nextId).hide();
$("a","#"+options.lastId).hide();
} else {
$("a","#"+options.nextId).show();
$("a","#"+options.lastId).show();
};
if(t==0){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
} else {
$("a","#"+options.prevId).show();
$("a","#"+options.firstId).show();
};
};
if(clicked) clearTimeout(timeout);
if(options.auto && dir=="next" && !clicked){
timeout = setTimeout(function(){
animate("next",false);
},diff*options.speed+options.pause);
};
};
// init
var timeout;
if(options.auto){
timeout = setTimeout(function(){
animate("next",false);
},options.pause);
};
if(!options.continuous && options.controlsFade){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
};
});
};
})(jQuery);
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>D'n'd</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../../css/basic.css"/>
<script type="text/javascript" src="../../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="../../js/easySlider1.5.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
$(document).ready(function(){
sankore.enableDropOnWidget(false);
start();
});
</script>
</head>
<body>
<div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 120px; cursor: pointer;" class="selected">
<div id="display_img" style="float: right;" class="green_point"></div>
<div id="display_text" style="float: right;"></div>
</div>
</div>
<div style="width: 50%; height: 100%; float: right;">
<div id="edit" style="float: left; width: 120px; cursor: pointer;">
<div id="edit_img" style="float: left;" class="red_point"></div>
<div id="edit_text" style="float: left;"></div>
</div>
</div>
</div>
<div style="width: 100%; height: 25px;"></div>
<div id="slider">
<ul>
</ul>
</div>
<span id="prevBtn"><a href="javascript:void(0);"></a></span>
<span id="nextBtn"><a href="javascript:void(0);"></a></span>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>D'n'd</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../../css/basic.css"/>
<script type="text/javascript" src="../../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="../../js/easySlider1.5.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
$(document).ready(function(){
sankore.enableDropOnWidget(false);
start();
});
</script>
</head>
<body>
<div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 120px; cursor: pointer;" class="selected">
<div id="display_img" style="float: right;" class="green_point"></div>
<div id="display_text" style="float: right;"></div>
</div>
</div>
<div style="width: 50%; height: 100%; float: right;">
<div id="edit" style="float: left; width: 120px; cursor: pointer;">
<div id="edit_img" style="float: left;" class="red_point"></div>
<div id="edit_text" style="float: left;"></div>
</div>
</div>
</div>
<div style="width: 100%; height: 25px;"></div>
<div id="slider">
<ul>
</ul>
</div>
<span id="prevBtn"><a href="javascript:void(0);"></a></span>
<span id="nextBtn"><a href="javascript:void(0);"></a></span>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment