Lines 21-32
$( document ).ready( function() {
Link Here
|
21 |
$( ".checkboxed" ).unCheckCheckboxes(); |
21 |
$( ".checkboxed" ).unCheckCheckboxes(); |
22 |
return false; |
22 |
return false; |
23 |
}); |
23 |
}); |
24 |
$( "#close_menu" ).on( "click", function(e) { |
24 |
|
25 |
e.preventDefault(); |
|
|
26 |
$( ".linktools" ).hide(); |
27 |
$( "tr" ).removeClass( "selected" ); |
28 |
return false; |
29 |
}); |
30 |
$( ".submit" ).on( "click", function() { |
25 |
$( ".submit" ).on( "click", function() { |
31 |
$( "body" ).css( "cursor", "wait" ); |
26 |
$( "body" ).css( "cursor", "wait" ); |
32 |
}); |
27 |
}); |
Lines 56-62
$( document ).ready( function() {
Link Here
|
56 |
return true; |
51 |
return true; |
57 |
} |
52 |
} |
58 |
}); |
53 |
}); |
59 |
$( ".previewMARC" ).on( "click", function(e) { |
54 |
|
|
|
55 |
/* Display actions menu anywhere the table is clicked */ |
56 |
/* Note: The templates where this is included must have a search results |
57 |
table with the id "resultst" and "action" table cells with the class "actions" */ |
58 |
$("#resultst").on("click", "td", function(event){ |
59 |
var tgt = $(event.target); |
60 |
var row = $(this).parent(); |
61 |
/* Remove highlight from all rows and add to the clicked row */ |
62 |
$("tr").removeClass("highlighted-row"); |
63 |
row.addClass("highlighted-row"); |
64 |
/* Remove any menus created on the fly for other rows */ |
65 |
$(".btn-wrapper").remove(); |
66 |
|
67 |
if( tgt.is("a") || tgt.hasClass("actions") ){ |
68 |
/* Don't show inline links for cells containing links of their own. */ |
69 |
} else { |
70 |
event.stopPropagation(); |
71 |
/* Remove the "open" class from all dropup menus in case one is open */ |
72 |
$(".dropup").removeClass("open"); |
73 |
/* Create a clone of the Bootstrap dropup menu in the "Actions" column */ |
74 |
var menu_clone = $(".dropdown-menu", row) |
75 |
.clone() |
76 |
.addClass("menu-clone") |
77 |
.css({ |
78 |
"display" : "block", |
79 |
"position" : "absolute", |
80 |
"top" : "auto", |
81 |
"bottom" : "100%", |
82 |
"right" : "auto", |
83 |
"left" : "0", |
84 |
}); |
85 |
/* Append the menu clone to the table cell which was clicked. |
86 |
The menu must first be wrapped in a block-level div to clear |
87 |
the table cell's text contents and then a relative-positioned |
88 |
div to allow the menu to be positioned correctly */ |
89 |
tgt.append( |
90 |
$('<div/>', {'class': 'btn-wrapper'}).append( |
91 |
$('<div/>', {'class': 'btn-group'}).append( |
92 |
menu_clone |
93 |
) |
94 |
) |
95 |
); |
96 |
} |
97 |
}); |
98 |
|
99 |
$( "#resultst" ).on("click", ".previewMARC", function(e) { |
60 |
e.preventDefault(); |
100 |
e.preventDefault(); |
61 |
var ltitle = $( this ).text(); |
101 |
var ltitle = $( this ).text(); |
62 |
var page = $( this ).attr( "href" ); |
102 |
var page = $( this ).attr( "href" ); |
Lines 68-74
$( document ).ready( function() {
Link Here
|
68 |
$( "#marcPreviewLabel" ).html( "" ); |
108 |
$( "#marcPreviewLabel" ).html( "" ); |
69 |
$( "#marcPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" ); |
109 |
$( "#marcPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" ); |
70 |
}); |
110 |
}); |
71 |
$( ".previewData" ).on( "click", function(e) { |
111 |
$( "#resultst" ).on("click", ".previewData", function(e) { |
72 |
e.preventDefault(); |
112 |
e.preventDefault(); |
73 |
var ltitle = $( this ).text(); |
113 |
var ltitle = $( this ).text(); |
74 |
var page = $( this ).attr( "href" ); |
114 |
var page = $( this ).attr( "href" ); |
Lines 80-86
$( document ).ready( function() {
Link Here
|
80 |
$( "#dataPreviewLabel" ).html( "" ); |
120 |
$( "#dataPreviewLabel" ).html( "" ); |
81 |
$( "#dataPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" ); |
121 |
$( "#dataPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" ); |
82 |
}); |
122 |
}); |
83 |
$( ".import_record" ).on( "click", function(e) { |
123 |
$( "#resultst" ).on("click", ".import_record", function(e) { |
84 |
e.preventDefault(); |
124 |
e.preventDefault(); |
85 |
var data_breedingid = $( this ).data( "breedingid" ); |
125 |
var data_breedingid = $( this ).data( "breedingid" ); |
86 |
var data_headingcode = $( this ).data( "heading_code" ); |
126 |
var data_headingcode = $( this ).data( "heading_code" ); |
87 |
- |
|
|