59 $this->FieldRenderer(
$form);
76 if ($this->parent->readOnlyForm || $this->parent->isReadOnly($this->field) || array_key_exists(
$field, $this->parent->hidden))
return "";
84 $redirect = $this->uploadRedirect ?
"'{$this->uploadRedirect}'" :
"false";
86 <script type=
"text/javascript" src=
"/components/phonegap/js/photo_uploader.js"></script>
87 <script type=
"text/javascript">
88 window.addEvent(
'load',
function()
90 new PhotoUploader().setup(
'<?echo $this->parent->id?>_<?echo $field?>',
'<?echo $this->parent->id?>_<?echo $field?>_thumbnail',
'<?echo $this->parent->id?>_<?echo $field?>_status',
'<?echo $this->gallery_id?>', <?echo
$redirect?>);
105 $this->_startField(
$field);
111 $img =
"<img src='/action/image/thumbnail?image_id={$id}&size={$this->imageSize}' alt=''/>";
114 <input type=
"hidden" value=
"<?echo $id?>" name=
"<?echo $field?>" id=
"<?echo $this->parent->id?>_<?echo $field?>"/>
115 <div
id=
"<?echo $this->parent->id?>_<?echo $field?>_thumbnail"><?echo $img?></div>
116 <div
id=
"<?echo $this->parent->id?>_<?echo $field?>_status"></div>
122 <a href=
"#" onclick=
"new PhotoUploader().capturePhoto(); return false" class=
"button"><i
class=
'icon-camera'></i> <?echo $this->takePhotoLabel?></a>&
nbsp;&
nbsp;
123 <a href=
"#" onclick=
"new PhotoUploader().choosePhoto(); return false" class=
"button"><i
class=
'icon-picture'></i> <?echo $this->uploadPhotoLabel?></a>
134 $this->_startField(
$field);
138 echo
"<img src='/action/image/thumbnail?image_id=".$this->parent->data->get(
$field).
"&size=300' alt=''/>";
142 echo
"No image uploaded";
static using()
Import the datamodels, views and manifest for the specified component(s).
PhotoUploadFieldRenderer($form, $field, $label, $gallery_id)
renderReadOnly($field="")
static create($form, $field, $xrefClass)
global $phonegap
Provides a central management class for event handlers and common functionality for the phonegap comp...