Fixes everything after commit 9de870ce87
, where I accidentally committed some lines
This commit is contained in:
@@ -1829,54 +1829,4 @@ $(document).ready(function() {
|
||||
disable_popup();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Hides certain table structure actions, replacing them with the word "More". They are displayed
|
||||
* in a dropdown menu when the user hovers over the word "More."
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
// Remove the <noscript> icons/text since they aren't needed
|
||||
$("table[id='tablestructure'] td[class='browse'] noscript").remove();
|
||||
$("table[id='tablestructure'] td[class='primary'] noscript").remove();
|
||||
$("table[id='tablestructure'] td[class='unique'] noscript").remove();
|
||||
$("table[id='tablestructure'] td[class='index'] noscript").remove();
|
||||
$("table[id='tablestructure'] td[class='fulltext'] noscript").remove();
|
||||
|
||||
// If the action is enabled (there is a link), wrap the link around the icon and text
|
||||
// (Browse is always enabled)
|
||||
$(".structure_actions_dropdown .action_browse").wrap($("table[id='tablestructure'] td[class='browse'] a").html());
|
||||
|
||||
if($("table[id='tablestructure'] td[class='primary'] a").html()) {
|
||||
$(".structure_actions_dropdown .action_primary ").wrap($("table[id='tablestructure'] td[class='primary'] a").html());
|
||||
}
|
||||
if($("table[id='tablestructure'] td[class='unique'] a").html()) {
|
||||
$(".structure_actions_dropdown .action_unique").wrap($("table[id='tablestructure'] td[class='unique'] a").html());
|
||||
}
|
||||
if($("table[id='tablestructure'] td[class='index'] a").html()) {
|
||||
$(".structure_actions_dropdown .action_index").wrap($("table[id='tablestructure'] td[class='index'] a").html());
|
||||
}
|
||||
if($("table[id='tablestructure'] td[class='fulltext'] a").html()) {
|
||||
$(".structure_actions_dropdown .action_fulltext").wrap($("table[id='tablestructure'] td[class='fulltext'] a").html());
|
||||
}
|
||||
|
||||
// Remove the actions from the table cells
|
||||
$("table[id='tablestructure'] td[class='browse']").remove();
|
||||
$("table[id='tablestructure'] td[class='primary']").remove();
|
||||
$("table[id='tablestructure'] td[class='unique']").remove();
|
||||
$("table[id='tablestructure'] td[class='index']").remove();
|
||||
$("table[id='tablestructure'] td[class='fulltext']").remove();
|
||||
|
||||
// Display the "more" text
|
||||
$("table[id='tablestructure'] td[class='more_opts']").show()
|
||||
|
||||
// When "more" is hovered over, show the hidden actions
|
||||
$("table[id='tablestructure'] td[class='more_opts']").hover(
|
||||
function() {
|
||||
$(this).children(".structure_actions_dropdown").show();
|
||||
},
|
||||
function() {
|
||||
$(this).children(".structure_actions_dropdown").hide();
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user