File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ PreviewURL プラグイン
2121動作要件
2222-----------
2323
24- * MT(MTOS) 5.0 / 5.1 / 5.2 / 6.0 / 6.1
24+ * MT(MTOS) 5.0 / 5.1 / 5.2 / 6.0 / 6.1 / 7
2525* CGI / PSGI対応
2626
2727インストール
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ l10n_class: PreviewURL::L10N
22id : PreviewURL
33key : previewurl
44name : <__trans phrase="PreviewURL">
5- version : 1.6
5+ version : 1.7
66author_name : <__trans phrase="_PLUGIN_AUTHOR">
77author_link : http://takeyu-web.com/
88description : <__trans phrase="_PLUGIN_DESCRIPTION">
Original file line number Diff line number Diff line change @@ -35,9 +35,13 @@ sub _cb_template_param_edit_entry {
3535 required => 0,
3636 class => ' field-no-header' });
3737 my $innerHTML = <<"HTML" ;
38- <strong >@{[ $plugin ->translate( 'Preview URL' ) ]}:</strong >
39- <input type =" text" readonly =" readonly" onclick =" this.select();" style =" width : 530px ;" value =" $preview_url" />
40- <a class =" button" href =" $preview_url" target =" <__trans phrase=" _external_link_target " >" ><__trans phrase="View"></a >
38+ <label >@{[ $plugin ->translate( 'Preview URL' ) ]}</label >
39+ <div class =" input-group" >
40+ <input type =" text" readonly =" readonly" onclick =" this.select();" class =" form-control text med" value =" $preview_url" />
41+ <div class =" input-group-append" >
42+ <a class =" button btn btn-default" href =" $preview_url" target =" _blank" ><__trans phrase="View"></a >
43+ </div >
44+ </div >
4145HTML
4246 $nodeset -> innerHTML($innerHTML );
4347 $tmpl -> insertAfter($nodeset , $pointer_field );
@@ -101,6 +105,9 @@ sub preview_url {
101105 );
102106 my $cfg = $app -> config;
103107 my $url_base = $cfg -> AdminCGIPath || $cfg -> CGIPath;
108+ if ($url_base !~ m ! ^https://! ) {
109+ $url_base = $app -> {query }-> url;
110+ }
104111 $url_base = $url_base =~ m ! ^(https?://[^/]+/?).*$ ! i ? $1 : ' /' ;
105112 return caturl( $url_base , $uri );
106113}
You can’t perform that action at this time.
0 commit comments