mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
remove href from a tag to prevent backbone page reload and change some vars to const
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<span id="item-url-text" style="display: none">
|
||||
{{ item_url_parts[0] }}<span id="item-identifier">{{ item_url_parts[1] }}</span>
|
||||
</span>
|
||||
<a href="#" id="edit-identifier"><img :src="pencil_url"/></a>
|
||||
<a href="javascript:void(0)" id="edit-identifier"><img :src="pencil_url" alt="Edit Share Url"/></a>
|
||||
</blockquote>
|
||||
<div v-if="item.published">
|
||||
<p>
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
.catch(error => (this.err_msg = error.response.data.err_msg));
|
||||
},
|
||||
createSlugHandler: function() {
|
||||
var on_start = function(text_elt) {
|
||||
const on_start = function(text_elt) {
|
||||
// Replace URL with URL text.
|
||||
$("#item-url").hide();
|
||||
$("#item-url-text").show();
|
||||
@@ -279,14 +279,14 @@ export default {
|
||||
);
|
||||
});
|
||||
};
|
||||
var on_finish = function(text_elt) {
|
||||
const on_finish = function(text_elt) {
|
||||
// Replace URL text with URL.
|
||||
$("#item-url-text").hide();
|
||||
$("#item-url").show();
|
||||
|
||||
// Set URL to new value.
|
||||
var new_url = $("#item-url-text").text();
|
||||
var item_url_obj = $("#item-url");
|
||||
const new_url = $("#item-url-text").text();
|
||||
const item_url_obj = $("#item-url");
|
||||
item_url_obj.attr("href", new_url);
|
||||
item_url_obj.text(new_url);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user