Jordan de la Houssaye

FIXED: get rid of unused files in andy

<div class="about">
<p><span class="title">ABCD simulator is part of the SNAKES
toolkit</span><br/> (C) 2014 Franck Pommereau</p>
<p><a href="http://www.ibisc.univ-evry.fr/~fpommereau/SNAKES"
target="_blank">SNAKES homepage</a></p>
</div>
Well, you can tell by the way I use my walk,
I'm a woman's man: no time to talk.
Music loud and women warm, I've been kicked around
Since I was born.
And now it's all right. it's ok.
And you may look the other way.
We can try to understand
The new york times effect on man.
Whether you're a brother or whether you're a mother,
You're stayin alive, stayin alive.
Feel the city breakin and everybody shakin,
And were stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive.
Well now, I get low and I get high,
And if I can't get either, I really try.
Got the wings of heaven on my shoes.
I'm a dancin man and I just can't lose.
You know it's all right.its ok.
I'll live to see another day.
We can try to understand
The new york times effect on man.
Whether you're a brother or whether you're a mother,
You're stayin alive, stayin alive.
Feel the city breakin and everybody shakin,
And were stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive.
Life goin nowhere.somebody help me.
Somebody help me, yeah.
Life goin nowhere.somebody help me.
Somebody help me, yeah. stayin alive.
Well, you can tell by the way I use my walk,
I'm a woman's man: no time to talk.
Music loud and women warm,
I've been kicked around since I was born.
And now it's all right. it's ok.
And you may look the other way.
We can try to understand
The new york times effect on man.
Whether you're a brother or whether you're a mother,
You're stayin alive, stayin alive.
Feel the city breakin and everybody shakin,
And were stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive, stayin alive.
Ah, ha, ha, ha, stayin alive.
Life goin nowhere.somebody help me.
Somebody help me, yeah.
Life goin nowhere.somebody help me, yeah.
I'm stayin alive.
This diff is collapsed. Click to expand it.
......@@ -3,16 +3,11 @@
<head>
<link type="text/css" href="r/css/bootstrap-theme.css" rel="stylesheet"/>
<link type="text/css" href="r/css/bootstrap.css" rel="stylesheet"/>
<link type="text/css" href="r/css/docs.css" rel="stylesheet"/>
<link type="text/css" href="r/simulator.css" rel="stylesheet"/>
<link type="text/css" href="r/model.css" rel="stylesheet"/>
<script src="r/jquery.min.js"></script>
<script src="r/js/jquery.min.js"></script>
<script src="r/js/jquery.periodic.js"></script>
<script src="r/js/bootstrap.min.js"></script>
<script src="r/jquery.periodic.js"></script>
<script src="r/js/bootstrap.file-input.js"></script>
<script src="r/d3.min.js"></script>
<script src="r/js/petri.js"></script>
<script src="r/simulator.js"></script>
<script src="r/js/d3.min.js"></script>
<script src="r/js/simulator.js"></script>
<style>
path { stroke: steelblue;
stroke-width: 2;
......
/*
Bootstrap - File Input
======================
This is meant to convert all file input tags into a set of elements that displays consistently in all browsers.
Converts all
<input type="file">
into Bootstrap buttons
<a class="btn">Browse</a>
*/
$(function() {
$.fn.bootstrapFileInput = function() {
this.each(function(i,elem){
var $elem = $(elem);
// Maybe some fields don't need to be standardized.
if (typeof $elem.attr('data-bfi-disabled') != 'undefined') {
return;
}
// Set the word to be displayed on the button
var buttonWord = 'Browse';
if (typeof $elem.attr('title') != 'undefined') {
buttonWord = $elem.attr('title');
}
// Start by getting the HTML of the input element.
// Thanks for the tip http://stackoverflow.com/a/1299069
var input = $('<div>').append( $elem.eq(0).clone() ).html();
var className = '';
if (!!$elem.attr('class')) {
className = ' ' + $elem.attr('class');
}
// Now we're going to replace that input field with a Bootstrap button.
// The input will actually still be there, it will just be float above and transparent (done with the CSS).
$elem.replaceWith('<a class="file-input-wrapper btn btn-default' + className + '">'+buttonWord+input+'</a>');
})
// After we have found all of the file inputs let's apply a listener for tracking the mouse movement.
// This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh.
.promise().done( function(){
// As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor.
// This gives us the pointer cursor that FF denies us
$('.file-input-wrapper').mousemove(function(cursor) {
var input, wrapper,
wrapperX, wrapperY,
inputWidth, inputHeight,
cursorX, cursorY;
// This wrapper element (the button surround this file input)
wrapper = $(this);
// The invisible file input element
input = wrapper.find("input");
// The left-most position of the wrapper
wrapperX = wrapper.offset().left;
// The top-most position of the wrapper
wrapperY = wrapper.offset().top;
// The with of the browsers input field
inputWidth= input.width();
// The height of the browsers input field
inputHeight= input.height();
//The position of the cursor in the wrapper
cursorX = cursor.pageX;
cursorY = cursor.pageY;
//The positions we are to move the invisible file input
// The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle
moveInputX = cursorX - wrapperX - inputWidth + 20;
// Slides the invisible input Browse button to be positioned middle under the cursor
moveInputY = cursorY- wrapperY - (inputHeight/2);
// Apply the positioning styles to actually move the invisible file input
input.css({
left:moveInputX,
top:moveInputY
});
});
$('.file-input-wrapper input[type=file]').change(function(){
var fileName;
fileName = $(this).val();
// Remove any previous file names
$(this).parent().next('.file-input-name').remove();
if (!!$(this).prop('files') && $(this).prop('files').length > 1) {
fileName = $(this)[0].files.length+' files';
//$(this).parent().after('<span class="file-input-name">'+$(this)[0].files.length+' files</span>');
}
else {
// var fakepath = 'C:\\fakepath\\';
// fileName = $(this).val().replace('C:\\fakepath\\','');
fileName = fileName.substring(fileName.lastIndexOf('\\')+1,fileName.length);
}
$(this).parent().after('<span class="file-input-name">'+fileName+'</span>');
});
});
};
// Add the styles before the first stylesheet
// This ensures they can be easily overridden with developer styles
var cssHtml = '<style>'+
'.file-input-wrapper { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }'+
'.file-input-wrapper input[type=file], .file-input-wrapper input[type=file]:focus, .file-input-wrapper input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; filter: alpha(opacity=0); z-index: 99; outline: 0; }'+
'.file-input-name { margin-left: 8px; }'+
'</style>';
$('link[rel=stylesheet]').eq(0).before(cssHtml);
});
\ No newline at end of file
$(document).ready(function(){
$(".abcd .action, .abcd .instance").each(function(){
var objet = this;
$(".action, .instance").each(function(){
if ($(this).attr("data-abcd") == "#" + $(objet).attr("id")){
$(this).html($(objet).html());
}
});
});
$(".action, .instance, .buffer, .proto").mouseover(function(){
$(this).addClass("highlight_simul");
$($(this).attr("data-abcd")).addClass("highlight_simul");
$($(this).attr("data-tree")).addClass("highlight_simul");
$($(this).attr("data-net")).addClass("highlight_simul");
}).mouseout(function(){
$(this).removeClass("highlight_simul");
$($(this).attr("data-abcd")).removeClass("highlight_simul");
$($(this).attr("data-tree")).removeClass("highlight_simul");
$($(this).attr("data-net")).removeClass("highlight_simul");
});
});
\ No newline at end of file
/* ABCD source code */
#model .abcd .comment {
color: #888;
}
#model .abcd .ident {
color: #808;
}
#model .abcd .string {
color: #088;
}
#model .abcd .kw {
color: #800;
font-weight: bold;
}
#model .abcd .flow {
color: #800;
font-weight: bold;
}
#model .abcd .buffer .decl {
color: #080;
font-weight: bold;
}
#model .abcd .net .decl {
color: #008;
font-weight: bold;
}
#model .abcd .instance .name {
color: #008;
}
#model .abcd .action .delim {
font-weight: bold;
}
#model .abcd .action .name {
color: #080;
}
#model .abcd .active {
background-color: #B6F8AE;
}
#model .abcd .highlight_simul {
background-color: yellow;
}
#model .tree .buffer .kw {
color: #800;
font-weight: bold;
}
#model .tree .buffer .name {
color: #080;
font-weight: bold;
}
#model .tree .ident {
color: #808;
}
#model .tree .instance .name {
color: #008;
}
#model .tree .action .delim {
font-weight: bold;
}
#model .tree .action .name {
color: #080;
}
#model .tree .string {
color: #088;
}
#model .tree .modes li {
margin: 12px 0px;
}
#model .tree .modes a {
background-color: #B6F8AE;
border: solid 1px #AAA;
border-radius: 5px;
padding: 5px 10px;
text-decoration: none;
color: #333;
}
#model .tree .modes a:hover {
color: #A33;
background-color: #F8B6AE;
}
#model .tree .active {
background-color: #B6F8AE;
}
#model .tree .highlight_simul {
background-color: yellow;
}
var nodeColor;
function abcdon () {
obj = $(this);
if (obj.attr("class") == "node") {
node = obj.children().children().first();
nodeColor = node.attr("fill");
node.attr("fill", "yellow");
} else {
obj.addClass("highlight");
}
$(obj.attr("data-abcd")).addClass("highlight");
};
function abcdoff () {
obj = $(this);
if (obj.attr("class") == "node") {
node = obj.children().children().first();
node.attr("fill", nodeColor);
} else {
obj.removeClass("highlight");
}
$(obj.attr("data-abcd")).removeClass("highlight");
};
function treeon () {
obj = $(this);
if (obj.attr("class") != "node") {
obj.addClass("highlight");
}
$(obj.attr("data-tree")).addClass("highlight");
};
function treeoff () {
obj = $(this);
if (obj.attr("class") != "node") {
obj.removeClass("highlight");
}
$(obj.attr("data-tree")).removeClass("highlight");
};
function neton () {
obj = $(this);
$(obj.attr("data-net")).each(function () {
node = $(this).children().children().first();
nodeColor = node.attr("fill");
node.attr("fill", "yellow");
});
obj.addClass("highlight");
};
function netoff () {
obj = $(this);
$(obj.attr("data-net")).each(function () {
node = $(this).children().children().first();
node.attr("fill", nodeColor);
});
obj.removeClass("highlight");
};
$(document).ready(function() {
$("#model [data-abcd]").hover(abcdon, abcdoff);
$("#model [data-tree]").hover(treeon, treeoff);
$("#model [data-net]").hover(neton, netoff);
$(".tree .instance, .tree .action").each(function () {
obj = $(this);
obj.html($(obj.attr("data-abcd")).html());
});
});
body {
font-family: sans-serif;
}
#alive {
border: solid 1px #AAA;
border-radius: 5px;
padding: 5px 10px;
margin: 5px;
background-color: #DDD;
overflow:auto;
}
#alive .ui {
display: inline;
list-style: none;
margin: 0px;
padding: 0px;
}
#alive .ui li {
display: inline;
border: solid 1px #AAA;
padding: 5px 10px;
margin: 0px 3px;
background-color: #EEE;
}
#alive .ui a {
text-decoration: none;
color: #333;
}
#alive .ui li:hover {
background-color: #FFF;
}
#alive .ui a:hover {
color: #A33;
}
#alive .ping {
color: #DDD;
float: right;
}
#model {
border: solid 1px #AAA;
border-radius: 5px;
padding: 5px 10px;
margin: 5px;
background-color: #EEE;
overflow:auto;
}
#trace {
border: solid 1px #AAA;
border-radius: 5px;
padding: 5px 10px;
margin: 5px;
background-color: #EEE;
overflow:auto;
}
#about {
display: none;
}
#dialog {
display: none;
position: fixed;
z-index: 2;
top: 10%;
left: 20%;
width: 60%;
border: solid 2px #AAA;
border-radius: 5px;
padding: 20px;
background-color: #FFF;
overflow:auto;
}
#dialog-bg {
display: none;
position: fixed;
z-index: 1;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: #000;
margin: 0px;
}
#dialog-close {
/* TODO: fix position when dialog has a horizontal scrollbar */
display: block;
float: right;
border: solid 1px #AAA;
padding: 5px 10px;
margin: 0px 3px;
background-color: #EEE;
text-decoration: none;
color: #333;
}
#dialog-close:hover {
background-color: #FFF;
color: #A33;
}
.dialog p {
margin: 10px 20px 0px 20px;
}
.dialog .title {
margin: 0px 20px 5px 20px;
font-weight: bold;
text-align: center;
}
.dialog .subtitle {
margin: 0px 20px 5px 20px;
text-align: center;
}
\ No newline at end of file