Revize 66b30558
Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)
sources/src/main/webapp/css/main.css | ||
---|---|---|
697 | 697 |
top: 2em; |
698 | 698 |
} |
699 | 699 |
|
700 |
.node-container:not(.excluded-nodes) .change-button { |
|
701 |
display: none; |
|
702 |
} |
|
703 |
|
|
704 |
.change-nodes .button-group .change-button, |
|
705 |
.change-nodes .button-group .change-button { |
|
706 |
display: none; |
|
707 |
} |
|
708 |
|
|
709 |
.sidebar .change-list { |
|
710 |
list-style: none; |
|
711 |
margin: 0; |
|
712 |
padding-left: 0; |
|
713 |
} |
|
714 |
|
|
715 |
.sidebar .change:not(.change--triggered) .change-controls { |
|
716 |
display: none; |
|
717 |
} |
|
718 |
|
|
719 |
.sidebar .change:not(.change--triggered) .change-controls + .node-list { |
|
720 |
display: none; |
|
721 |
} |
|
722 |
|
|
723 |
.sidebar .change--triggered .include-not-found-checkbox, |
|
724 |
.sidebar .change--triggered .trigger-change-button { |
|
725 |
display: none; |
|
726 |
} |
|
727 |
|
|
728 |
.sidebar .change--triggered .change-controls + .node-list .include-button { |
|
729 |
display: none; |
|
730 |
} |
|
731 |
|
|
732 |
.sidebar .change-controls { |
|
733 |
position: relative; |
|
734 |
text-align: center; |
|
735 |
} |
|
736 |
|
|
737 |
.sidebar .change-controls .transition-arrow { |
|
738 |
font-size: 3em; |
|
739 |
} |
|
740 |
|
|
741 |
.sidebar .change-controls .load-details-button { |
|
742 |
font-weight: bold; |
|
743 |
} |
|
744 |
|
|
745 |
.sidebar .change--details-loaded .change-controls .load-details-button { |
|
746 |
display: none; |
|
747 |
} |
|
748 |
|
|
749 | 700 |
.unconnected-nodes .node > svg { |
750 | 701 |
display: none; |
751 | 702 |
} |
... | ... | |
754 | 705 |
display: none; |
755 | 706 |
} |
756 | 707 |
|
757 |
.missing-components .node-list > li { |
|
758 |
white-space: nowrap; |
|
759 |
overflow: hidden; |
|
760 |
text-overflow: ellipsis; |
|
761 |
} |
|
762 |
|
|
763 | 708 |
.sort-list { |
764 | 709 |
font-size: 0.8em; |
765 | 710 |
list-style: none; |
sources/src/main/webapp/js/components/vertexLight.js | ||
---|---|---|
1 |
/** |
|
2 |
* Light version of the vertex to be used inside of a change as a placeholder until full change details are loaded. |
|
3 |
* @see Vertex |
|
4 |
* @see Change |
|
5 |
* @constructor |
|
6 |
* @param {object} props Properties of the vertex. |
|
7 |
*/ |
|
8 |
function VertexLight(props) { |
|
9 |
/** @prop {string} id Identifier of the component in CRCE. */ |
|
10 |
this.id = props.uuid; |
|
11 |
/** @prop {string} name Name of the component. */ |
|
12 |
this.name = props['external-id'] + ' v' + props.version; |
|
13 |
|
|
14 |
/** |
|
15 |
* Removes the DOM element representing the vertex from document. |
|
16 |
*/ |
|
17 |
this.exclude = function() { |
|
18 |
this.remove(); |
|
19 |
}; |
|
20 |
|
|
21 |
/** |
|
22 |
* Creates a new DOM element representing the vertex in memory. |
|
23 |
* @returns {Element} HTML DOM element. |
|
24 |
*/ |
|
25 |
this.render = function() { |
|
26 |
rootElement = app.utils.createHtmlElement('li', { |
|
27 |
'class': 'node vertex', |
|
28 |
'data-id': this.id, |
|
29 |
}); |
|
30 |
|
|
31 |
// name |
|
32 |
var nameText = app.utils.createHtmlElement('div', { |
|
33 |
'class': 'vertex-name', |
|
34 |
'title': this.name, |
|
35 |
}); |
|
36 |
nameText.appendChild(document.createTextNode(this.name)); |
|
37 |
rootElement.appendChild(nameText); |
|
38 |
|
|
39 |
return rootElement; |
|
40 |
}; |
|
41 |
|
|
42 |
/** |
|
43 |
* Removes the DOM element representing the vertex from document. |
|
44 |
*/ |
|
45 |
this.remove = function() { |
|
46 |
rootElement.remove(); |
|
47 |
}; |
|
48 |
} |
sources/src/main/webapp/js/legacy/diagram.js | ||
---|---|---|
1 |
/** |
|
2 |
* Funkce zavola servlet, ktery odstrani diagram z databáze a ze serveru. |
|
3 |
* |
|
4 |
* @param id_diagram - id diagramu |
|
5 |
*/ |
|
6 |
function deleteDiagram(id_diagram) { |
|
7 |
var really = confirm('Do you really want to remove diagram?'); |
|
8 |
if (really === false) { |
|
9 |
return false; |
|
10 |
} |
|
11 |
|
|
12 |
$.ajax({ |
|
13 |
url: 'api/diagram?id_diagram=' + id_diagram, |
|
14 |
type: 'DELETE', |
|
15 |
success: function(result) { |
|
16 |
$('#diagram_id_' + id_diagram).remove(); |
|
17 |
$('#public_diagram_id_' + id_diagram).remove(); |
|
18 |
}, |
|
19 |
}); |
|
20 |
} |
|
21 |
|
|
22 |
/** |
|
23 |
* Funkce nalezne vsechny komponenty zobrazene ve viewportu, ulozi je jako json a odesle servletu. |
|
24 |
* |
|
25 |
* @param id_diagram ID diagramu |
|
26 |
*/ |
|
27 |
function saveDiagram(id_diagram) { |
|
28 |
var vertex_position = new Array(), |
|
29 |
vertex_position_counter = 0; |
|
30 |
|
|
31 |
$('g.vertex').each(function () { |
|
32 |
vertex_position[vertex_position_counter] = ' {"id":"' + $(this).attr('id') + '" , ' + |
|
33 |
' "transform":"' + $(this).attr('transform') + '" }'; |
|
34 |
vertex_position_counter++; |
|
35 |
}); |
|
36 |
|
|
37 |
vertex_position.join(','); |
|
38 |
vertex_position = '{"vertices_position": [ ' + vertex_position + ' ]}'; |
|
39 |
|
|
40 |
$.post('api/diagram', { |
|
41 |
id_diagram: id_diagram, |
|
42 |
vertices_position: vertex_position, |
|
43 |
}).done(function () { |
|
44 |
alert("Diagram saved."); |
|
45 |
}).fail(function () { |
|
46 |
alert("Error - Diagram not saved!"); |
|
47 |
}); |
|
48 |
} |
|
49 |
|
|
50 |
/** |
|
51 |
* Funkce zobrazi vyskakovaci okno s potvrzenim |
|
52 |
* |
|
53 |
* @param diagramId ID diagramu |
|
54 |
* @returns {Boolean} true if reset confirmed |
|
55 |
*/ |
|
56 |
function reset_diagram(diagramId) { |
|
57 |
var really = confirm('Do you want to reset components position and refresh page?'); |
|
58 |
if (really === false) { |
|
59 |
return false; |
|
60 |
} |
|
61 |
|
|
62 |
$.post('api/diagram', { |
|
63 |
id_diagram: diagramId, |
|
64 |
vertices_position: "", |
|
65 |
}); |
|
66 |
|
|
67 |
return true; |
|
68 |
} |
sources/src/main/webapp/js/legacy/user.js | ||
---|---|---|
1 |
|
|
2 |
/** |
|
3 |
* Funkce odesle registracni formular |
|
4 |
*/ |
|
5 |
function send_register() { |
|
6 |
|
|
7 |
// var viewport_html = $('#viewport').html(); |
|
8 |
// var rightpanel_html = $('#rightPanel').html(); |
|
9 |
|
|
10 |
$.post('api/register', { user_name: $('#user_name').val(), |
|
11 |
user_email: $('#user_email').val(), |
|
12 |
user_nick: $('#user_nick').val(), |
|
13 |
user_password: $('#user_password').val(), |
|
14 |
user_password_2: $('#user_password_2').val()}, |
|
15 |
function(data){ |
|
16 |
if (data.ok != null && data.ok == "ok"){ |
|
17 |
$('.register_popup .err_msg').html(""); |
|
18 |
$('.register_popup .err_msg').hide(); |
|
19 |
|
|
20 |
$('.register_popup').hide(); |
|
21 |
$('.login_popup').show(); |
|
22 |
var user_login_name = $('#user_nick').val(); |
|
23 |
clear_register_form(); |
|
24 |
$('.login_popup .not_msg').html("User registered.<br />Please login."); |
|
25 |
$('#login_name').val(user_login_name); |
|
26 |
|
|
27 |
}else if (data.err != null){ |
|
28 |
$('.register_popup .err_msg').html(data.err.replace(/\./g,".<br />")); |
|
29 |
} |
|
30 |
}); |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* Vycisti registracni formular |
|
35 |
*/ |
|
36 |
function clear_register_form(){ |
|
37 |
$('#user_name').val(''); |
|
38 |
$('#user_email').val(''); |
|
39 |
$('#user_nick').val(''); |
|
40 |
$('#user_password').val(''); |
|
41 |
$('#user_password_2').val(''); |
|
42 |
} |
sources/src/main/webapp/uploadFiles.jsp | ||
---|---|---|
9 | 9 |
<link rel="stylesheet" href="css/main.css"> |
10 | 10 |
|
11 | 11 |
<script src="js/libs/jquery-1.8.3.js"></script> |
12 |
<script src="js/legacy/diagram.js"></script> |
|
13 |
<script src="js/legacy/user.js"></script> |
|
14 | 12 |
<script src="js/userMenu.js"></script> |
15 | 13 |
|
16 | 14 |
<title>IMiGEr</title> |
Také k dispozici: Unified diff
frontend cleanup