42 $title = (
$mode ==
"insert") ?
"Insert Images" :
"Select an Image";
52 <script type=
"text/javascript">
53 window.addEvent(
'domready',
function()
55 new ImagePicker().setMode(
'$mode',
'$field',
'$preview');
74 <div
class=
'image_picker_header'>
75 <div
style=
"float: left; width: auto"><strong>Gallery </strong>
76 <select name=
"gallery_id" id=
"gallery_id" onchange=
"new ImagePicker().showImages(this.value)">
85 <div
style=
"float: right;width: auto"><button
class=
"button" onclick=
"new ImagePicker().uploadImage()"<?
if (!
$gallery_id) echo
" disabled='disabled'"?>>Upload Image...</button></div>
86 <div
style=
"clear:both"></div>
88 <div
id=
"image_list" style=
"overflow:auto; width:95%; height: 300px;border: solid 1px #666; margin-left: 10px; padding: 2px; background-color: #fff">
93 <table border=
"0" style=
"width: 100%" class=
"layout">
95 <td
style=
"width: 50%"><div
style=
"display: block; float: right; margin: 10px"><div
id=
"image_picker_preview"></div></div></td>
96 <td
style=
"width: 50%">
97 <table
class=
"layout">
100 if (
$mode !=
"select")
104 <td><label
for=
"alignment">Alignment:</label></td>
106 <select
id=
"alignment" name=
"alignment" style=
"width: 120px">
107 <option value=
"">Inline with Text</option>
108 <option value=
"left">Left</option>
109 <option value=
"center">Center</option>
110 <option value=
"right">Right</option>
115 <td><label
for=
"width">Width:</label></td>
116 <td><input type=
"text" style=
"width: 60px" id=
"width" name=
"width" value=
"" onkeypress=
"return new ImagePicker().maskInput(event)" onkeyup=
"new ImagePicker().changeWidth()"/> pixels</td>
119 <td><label
for=
"height">Height:</label></td>
120 <td><input type=
"text" style=
"width: 60px" id=
"height" name=
"height" value=
"" onkeypress=
"return new ImagePicker().maskInput(event)" onkeyup=
"new ImagePicker().changeHeight()"/> pixels</td>
123 <td
colspan=
"2"><input type=
"checkbox" id=
"aspect" name=
"aspect" value=
"1" checked />&
nbsp;<label
for=
"aspect">Maintain aspect ratio</label></td>
128 <input type=
"button" class=
"button" name=
"insert" value=
"Insert Image" onclick=
"new ImagePicker().insertImage()"/>
137 <td
style=
"text-align: center"><br/>
138 <input type=
"button" class=
"button" name=
"insert" value=
"Select Image" onclick=
"new ImagePicker().setSelectedImage('<?php echo $field ?>')"/>
140 <td
style=
"text-align: center"><br/>
141 <input type=
"button" class=
"button" name=
"insert" value=
"Clear Image" onclick=
"new ImagePicker().clearImage('<?php echo $field ?>')"/>
static using()
Import the datamodels, views and manifest for the specified component(s).
if(! $gallery_id &&count($galleries) > 0) $script