addScript($plg_path . '/assets/js/jquery.ui.core.min.js');
// $doc->addScript($plg_path . '/assets/js/jquery.ui.sortable.min.js');
$plg_path = JURI::root(true) . '/plugins/system/helix3';
$doc->addScript($plg_path . '/assets/js/jquery-ui.min.js');
$doc->addScript($plg_path . '/assets/js/spgallery.js');
$doc->addStyleSheet($plg_path . '/assets/css/spgallery.css');
$values = json_decode($this->value);
if($values) {
$images = $this->element['name'] . '_images';
$values = $values->$images;
} else {
$values = array();
}
$output = '
';
$output .= '
';
if(is_array($values) && $values) {
foreach ($values as $key => $value) {
$data_src = $value;
$src = JURI::root(true) . '/' . $value;
$basename = basename($src);
$thumbnail = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
if(file_exists($thumbnail)) {
$src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
}
$small_size = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename);
if(file_exists($small_size)) {
$src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename);
}
$output .= '- Delete

';
}
}
$output .= '
';
$output .= '
';
$output .= '
Upload Images';
$output .= '
';
$output .= '
';
return $output;
}
}