Skip to content

Commit 1210855

Browse files
lohani2280lohani2280
authored andcommitted
Added a Save Layout button on the Layouts pane
Fixes #392
1 parent f91a4c0 commit 1210855

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

static/js/graphs_page.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ var graphPage = {
452452
});
453453

454454
$('#saveLayoutBtn').click(function () {
455-
456-
cytoscapeGraph.showGraphInformation(graphPage.cyGraph);
457-
458455
graphPage.saveLayout($('#saveLayoutNameInput').val(), '#saveLayoutModal');
459456
});
460457

templates/graph/default_sidebar.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434
Change Layout
3535
</a>
3636
</li>
37+
3738
{% if uid %}
39+
<li>
40+
<a id="saveLayoutEditorBtn" class="btn sidebar-nav-pills" href="#" data-target="#defaultSideBar">
41+
Save Layout
42+
</a>
43+
</li>
3844
<li>
3945
<a id="layoutEditorBtn" class="btn sidebar-nav-pills" href="#editor" data-target="#layoutEditorSideBar">
4046
<i class="fa fa-pencil-square-o fa-lg"></i> Use Layout <br> Editor

templates/graph/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ <h4 class="modal-title" id="myModalLabel">Save Layout</h4>
116116
<div class="modal-dialog">
117117
<div class="modal-content">
118118
<div class="modal-header">
119-
<h4 class="modal-title" id="myModalLabel">Save Layout</h4>
119+
<h4 class="modal-title" id="myModalLabel">Save Positions and Style</h4>
120+
<h6 class="modal-title" id="myModalLabel">Save the current x- and y-coordinates of every node and the style attributes of every node and edge</h6>
120121
</div>
121122
<div class="modal-body">
122123

@@ -129,7 +130,7 @@ <h4 class="modal-title" id="myModalLabel">Save Layout</h4>
129130
<br>
130131
<div class="form-group">
131132
<button name="saveLayoutBtn" id="saveLayoutBtn"
132-
class="btn btn-success sidebar-nav-pills" data-target="#layoutEditorSideBar">Save
133+
class="btn btn-success sidebar-nav-pills" data-target="#defaultSideBar">Save
133134
</button>
134135
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
135136
</div>

0 commit comments

Comments
 (0)