@@ -29,35 +29,37 @@ public function boot(Panel $panel): void
29
29
ImageColumn::macro ('simpleLightbox ' , macro: function ($ url = null ) {
30
30
$ extraAttributes = $ this ->extraAttributes [0 ] ?? [];
31
31
$ extraImgAttributes = $ this ->extraImgAttributes [0 ] ?? [];
32
-
33
32
/** @phpstan-ignore-next-line */
34
33
return $ this
35
- ->extraAttributes (array_merge ($ extraAttributes , ['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]))
34
+ ->openUrlInNewTab ()
35
+ ->extraAttributes (array_merge ($ extraAttributes , ['x-on:click ' => 'SimpleLightBox.open(event, \'' .$ url .'\') ' ]))
36
36
->extraImgAttributes (array_merge ($ extraImgAttributes , ['class ' => 'simple-light-box-img-indicator ' ]));
37
37
});
38
38
39
39
ImageEntry::macro ('simpleLightbox ' , function ($ url = null ) {
40
40
$ extraAttributes = $ this ->extraAttributes [0 ] ?? [];
41
41
$ extraImgAttributes = $ this ->extraImgAttributes [0 ] ?? [];
42
-
43
42
/** @phpstan-ignore-next-line */
44
43
return $ this
44
+ ->openUrlInNewTab ()
45
45
->extraAttributes (array_merge ($ extraAttributes , ['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]))
46
46
->extraImgAttributes (array_merge ($ extraImgAttributes , ['class ' => 'simple-light-box-img-indicator ' ]));
47
47
});
48
48
49
49
TextColumn::macro ('simpleLightbox ' , function ($ url ) {
50
50
$ extraAttributes = $ this ->extraAttributes [0 ] ?? [];
51
-
52
51
/** @phpstan-ignore-next-line */
53
- return $ this ->extraAttributes (array_merge ($ extraAttributes , ['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]));
52
+ return $ this
53
+ ->openUrlInNewTab ()
54
+ ->extraAttributes (array_merge ($ extraAttributes ,['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]));
54
55
});
55
56
56
57
TextEntry::macro ('simpleLightbox ' , function ($ url ) {
57
58
$ extraAttributes = $ this ->extraAttributes [0 ] ?? [];
58
-
59
59
/** @phpstan-ignore-next-line */
60
- return $ this ->extraAttributes (array_merge ($ extraAttributes , ['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]));
60
+ return $ this
61
+ ->openUrlInNewTab ()
62
+ ->extraAttributes (array_merge ($ extraAttributes ,['x-on:click ' => 'SimpleLightBox.open(event, \'' . $ url . '\') ' ]));
61
63
});
62
64
63
65
}
0 commit comments