Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Views/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<select id="graph-select"></select>
<h5><?php echo _('Graph Name') ?>:</h5>
<input id="graph-name" type="text">
<small id="selected-graph-id"><?php echo _('Selected graph id') ?>: <span id="graph-id"><?php echo _('None selected') ?></span></small>
<small id="selected-graph-id" class="help-block text-light"><?php echo _('Selected graph id') ?>: <span id="graph-id"><?php echo _('None selected') ?></span></small>
<button id="graph-delete" class="btn" style="display:none"><?php echo _('Delete') ?></button>
<button id="graph-save" class="btn"><?php echo _('Save') ?></button>
</div>
Expand Down
11 changes: 7 additions & 4 deletions graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function graph_init_editor()

$("body").on("click keyup",".tagheading",function(event){
let enterKey = 13;
console.log(event.type,event.which);
// console.log(event.type,event.which);

if((event.type === 'keyup' && event.which === enterKey) || event.type === 'click') {
var tag = $(this).data("tag");
Expand Down Expand Up @@ -1269,6 +1269,8 @@ function histogram(feedid,type,resolution)
//----------------------------------------------------------------------------------------
$("#graph-select").change(function() {
var name = $(this).val();
var id = $(this).find(':selected').data('id');
$('#graph-id').text(id);
load_saved_graph(name);
});

Expand Down Expand Up @@ -1421,10 +1423,11 @@ function graph_load_savedgraphs(fn=false)
success: function(result) {
savedgraphs = result.user;

var out = "<option>" + _lang['Select graph'] + ":</option>";
var out = "<option value=''>" + _lang['Select graph'] + ":</option>";
for (var z in savedgraphs) {
var name = savedgraphs[z].name;
out += "<option>"+name+"</option>";
var id = savedgraphs[z].id;
var name = savedgraphs[z].name;
out += '<option data-id="' + id +'" value="' + name +'">'+ '[#'+id+'] ' + name+'</option>';
}
$("#graph-select").html(out);
if (fn) fn();
Expand Down