silverstripe-dms/javascript/DMSGridField.js

25 lines
629 B
JavaScript
Raw Permalink Normal View History

(function ($) {
"use strict";
$.entwine('ss', function ($) {
$('.ss-gridfield-item a.file-url').entwine({
onclick: function (e) {
2017-05-30 06:46:45 +02:00
// Make sure the download link doesn't trigger a gridfield edit dialog
window.open(this.attr('href'), '_blank');
e.preventDefault();
return false;
}
});
2017-06-06 23:31:08 +02:00
$('.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));