NP_Mediatocu_118 + jQuery.imgPreview
- 投稿日 : 2009-07-06, 08:51
- 最終更新日時 : 2010-12-21 17:27:39(履歴)
- タグ(NucleusPlugin / CSS / jQuery)
- カテゴリ(Weblog)
- 記し人(luvsic)[PDF]
- 閲覧数(10160)
画像へのリンクに、マウスオーバーでプレビューできる jQuery imgPreview を自分専用にNP_Mediatocu_118につっこんでみた。
mediatocu/media.php
466行目、「表示」のリンクタグに「 class="imageLink"」を追加
(<a href="{$hscMEDA}{$hscencCCol}/{$hscencFN}" target="preview" title="{$hscMVTT}{$hscTGTF}" class="imageLink">{$hscMVEW}</a>)
mediatocu/media.php
1034行目あたりにjQuery用のHTMLコード追加
mediatocu/imgpreview.js
jQuery.imgPreviewにて最後に次のjQueryコードを追加
jQuery(function(){
$('.imageLink').imgPreview({
containerID: 'imgPreviewWithStyles',
imgCSS: { width: 300 }
});
});
mediatocu/popups.css
前回のものをちょっと修正
@charset 'UTF-8';
/*
media library popup
$Id: popups.css 921 2009-02-08 16:49:08Z shizuki $
$NucleusJP: popups.css,v 1.4 2007/03/22 09:18:16 kimitake Exp $
*/
/*
Basic Elements
---------------------------------------------*/
body {
/* font-family: verdana, arial;*/
font-family: "メイリオ", "Meiryo", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Osaka", "MS Pゴシック", "MS PGothic", "IPA UIGothic", "IPA mona UIGothic", "VL PGothic", "Sazanami Gothic", "DynaLab-dfghsgothic w5-jisx0208.1990-0", "DynaLab-dfggothic w5-iso8859-1", "Trebuchet MS", "Bitstream Vera Sans", verdana, lucida, arial, helvetica, sans-serif;
font-size: small;
background-color: #fbfbfb;
color: #000;
text-align: center;
overflow-y: scroll;
}
h1 {
border-bottom: 1px dotted gray;
font-size: x-large;
color: #596d9d;
}
h2 {
color: gray;
font-size: large;
margin-left: 20px;
text-indent: 10px;
border-bottom: 1px solid #ddd;
}
img {
border: none;
}
.clear {
clear: both;
}
/*** Link elements ***/
a {
margin: 0;
padding: 2px;
}
a:link, a:visited {
color: #1D3565;
font-weight: bold;
text-decoration: none;
}
a:hover, a:active {
color: #FF843A;
text-decoration: underline;
}
/*** table elements ***/
table {
border: solid 1px #fff;
border-collapse: collapse;
}
th, td {
padding: 5px;
border: solid 1px #fff;
}
th {
background-color: linen;
font-size: 93%;
letter-spacing:2px;
text-align: right;
}
td {
background-color: #f3f3f3;
font-size: small;
vertical-align: top;
text-align: left;
}
/*** form elements ***/
form {
margin: 0;
padding: 0;
}
td input {
margin: 0;
padding: 0;
}
label {
cursor: pointer;
}
td label:hover {
color: #FF843A;
}
#media_filter {
width: 97%;
}
input.newname {
width: 140px;
}
input.newname:forcus {
background-color: yellow;
}
.radio {
width: auto;
border: none;
}
/*** FAQ ***/
pre, .note, .faq .answer {
background-color: #ddd;
padding: 10px;
font-size: small;
}
.faq .question {
font-weight: bold;
margin-bottom: 0px;
}
.faq .answer {
}
.faq {
margin-bottom: 20px;
}
/*
header
---------------------------------------------*/
div.wrap {
text-align: left;
margin: 5px auto;
padding: 10px;
border: 1px solid #ddd;
background-color: #fff;
width: 600px;
}
.heading {
text-align: center;
font-size: xx-large;
font-weight: bold;
color: gray;
}
.heading i {
position: absolute;
top: 5px;
right: 5px;
font-size: small;
font-style: normal;
font-weight: normal;
}
p.navi {
margin: 5px 0 10px;
padding: 0 15px;
}
.left {
float: left;
display: inline;
}
.left a{
text-decoration: underline;
}
.right {
float: right;
display: inline;
}
/*
Image Box
---------------------------------------------*/
.box {
float: left;
display: inline;
line-height: 1.2em;
margin: 1px 2px 1px 0;
padding: 5px;
color: #444;
background-color: #f3f3f3;
}
.box p {
line-height: 2em;
}
.tmb a {
padding: 0 !important;
}
.navi, p.clear {
clear: both;
text-align: center;
max-width: 532px;
background-color: linen;
}
.navi a, .clear a {
margin: 0 0 0 1em;
padding: 3px;
}
.box a {
line-height: 2em;/*
text-decoration: underline;*/
}
.hyde {
display: none;
}
/*
imgPreview
---------------------------------------------*/
#imgPreviewWithStyles {
max-width: 300px;
background: #667;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 15px;
z-index: 999;
border: none;
}
No comments yet