mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
25 lines
629 B
JavaScript
25 lines
629 B
JavaScript
(function ($) {
|
|
"use strict";
|
|
|
|
$.entwine('ss', function ($) {
|
|
$('.ss-gridfield-item a.file-url').entwine({
|
|
onclick: function (e) {
|
|
// Make sure the download link doesn't trigger a gridfield edit dialog
|
|
window.open(this.attr('href'), '_blank');
|
|
|
|
e.preventDefault();
|
|
return false;
|
|
}
|
|
});
|
|
|
|
$('.ss-gridfield-item a.dms-doc-sets-link').entwine({
|
|
onclick: function (e){
|
|
// Prevent the initial flash of the gridfield's edit form
|
|
e.preventDefault();
|
|
document.location.href=this.attr('href');
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
}(jQuery));
|