Skip to content

Commit

Permalink
Merge pull request #287 from IbeVanmeenen/issue_280
Browse files Browse the repository at this point in the history
[AdminBundle] Make it possible to open a link in new tab in the sidebar
  • Loading branch information
krispypen committed Apr 8, 2015
2 parents a5b12a2 + 05aaa3b commit 620d8e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ kunstmaanbundles.sidebartree = (function($, window, undefined) {
// DOCS: http://www.jstree.com/api/#/?q=.jstree%20Event&f=changed.jstree
var href = data.event.currentTarget.href;

document.location.href = href;
if (data.event.ctrlKey || data.event.metaKey) {
window.open(href);
} else {
document.location.href = href;
}
});


Expand Down
8 changes: 4 additions & 4 deletions src/Kunstmaan/AdminBundle/Resources/ui/js/_page-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ kunstmaanbundles.pageEditor = (function(window, undefined) {

// Key Combinations
keyCombinations = function() {
$(document).on('keydown', function(e) {
if((e.ctrlKey || e.metaKey) && e.which === 83) {
e.preventDefault();
$(document).on('keydown', function(e) {
if((e.ctrlKey || e.metaKey) && e.which === 83) {
e.preventDefault();

$body.addClass('app--loading');
$body.addClass('app--loading');
$('#pageadminform').submit();
};
});
Expand Down

0 comments on commit 620d8e2

Please sign in to comment.