Skip to content

Commit

Permalink
Merge pull request #128 from camicroscope/hf-lymph-bugs
Browse files Browse the repository at this point in the history
Hf lymph bugs
  • Loading branch information
tdiprima authored May 11, 2018
2 parents 0551f1a + 3463deb commit 7330833
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 38 deletions.
78 changes: 42 additions & 36 deletions js/annotationtoolslymph/geoJSONHandler_Lymph.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,13 +690,18 @@ annotools.prototype.generateSVG = function (annotations) {
content += line;
}

if (ctrl)
content += "<button class='btn-danger btn' id='deleteAnnot'><a href='#confirmDelete' rel='modal:open'>Delete</a></button>";
else if (alt)
// Section commented to disable Annotation deletion as per
// bug SBU-BMI/quip_distro#268 by Joe Balsamo
// if (ctrl)
// content += "<button class='btn-danger btn' id='deleteAnnot'><a href='#confirmDelete' rel='modal:open'>Delete</a></button>";
// else **When working join next line to this one again.
if (alt)
content += "<button class='btn-danger btn' id='featureScape'>FeatureScape</button>";


content += "<button class='btn-danger btn' id='deleteAnnot'><a href='#confirmDelete' rel='modal:open'>Delete</a></button>";
// Section commented to disable Annotation deletion as per
// bug SBU-BMI/quip_distro#268 by Joe Balsamo
// content += "<button class='btn-danger btn' id='deleteAnnot'><a href='#confirmDelete' rel='modal:open'>Delete</a></button>";
content += "<button class='btn' id='cancelPanel'>Cancel</button>";
content += "</div>";
var cancel = function () {
Expand All @@ -711,38 +716,39 @@ annotools.prototype.generateSVG = function (annotations) {
jQuery("#cancelPanel").click(function () {
cancel();
});

if (ctrl) { // Ctrl key for deletion of human generated annotation

jQuery("#deleteAnnot").click(function (e) {

//$("#confirmDelete").css(
//console.log(data.provenance.analysis.source);
if (data.provenance.analysis.source == "human") {
jQuery("#confirmDeleteButton").click(function () {
var secret = jQuery("#deleteSecret").val();
var payload = {
"id": id,
"secret": secret
};

jQuery.ajax({
//url: 'api/Data/getProperties.php?id=' + id,
url: 'api/Data/getPropertiesClone.php?id=' + id,
type: 'DELETE',
data: (payload),
success: function (data) {
console.log(data);
jQuery("#panel").hide("slide");
self.getMultiAnnot();
}
});
});
} else {
alert("Can't delete computer generated segments");
}
});
}
// Section commented to disable Annotation deletion as per
// bug SBU-BMI/quip_distro#268 by Joe Balsamo
// if (ctrl) { // Ctrl key for deletion of human generated annotation
//
// jQuery("#deleteAnnot").click(function (e) {
//
// //$("#confirmDelete").css(
// //console.log(data.provenance.analysis.source);
// if (data.provenance.analysis.source == "human") {
// jQuery("#confirmDeleteButton").click(function () {
// var secret = jQuery("#deleteSecret").val();
// var payload = {
// "id": id,
// "secret": secret
// };
//
// jQuery.ajax({
// //url: 'api/Data/getProperties.php?id=' + id,
// url: 'api/Data/getPropertiesClone.php?id=' + id,
// type: 'DELETE',
// data: (payload),
// success: function (data) {
// console.log(data);
// jQuery("#panel").hide("slide");
// self.getMultiAnnot();
// }
// });
// });
// } else {
// alert("Can't delete computer generated segments");
// }
// });
// }

});

Expand Down
4 changes: 3 additions & 1 deletion js/annotationtoolslymph/osdAnnotationTools_Lymph.js
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,9 @@ annotools.prototype.loadChangeUsername = function()
}
}
}
}
} else {
container.append('<blockquote><h5><span class="glyphicon glyphicon-alert red"> There are no users with finalized data to view! Instruct the users to set weight thresholds and click finalize to make them available.</h5></blockquote>');
}
} catch (e){
console.log('ERROR');
console.log(e);
Expand Down
2 changes: 1 addition & 1 deletion osdCamicroscope.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div id="container">

<div id="tool"></div>
<div id="panel"></div>
<div id="panel" hidden></div>
<!-- div id="bookmarkURLDiv"></div -->
<div id="algosel">
<div id="tree"></div>
Expand Down

0 comments on commit 7330833

Please sign in to comment.