예제 #1
0
 * ------------------------------------------------------------------------
 * JUDownload for Joomla 2.5, 3.x
 * ------------------------------------------------------------------------
 *
 * @copyright      Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 * @author         JoomUltra Co., Ltd
 * @website        http://www.joomultra.com
 * @----------------------------------------------------------------------@
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
	var default_icon = "<?php echo JUDownloadHelper::getDefaultDocumentIcon(); ?>";
	var document_icon_url = "<?php echo JUri::root(true) . "/". JUDownloadFrontHelper::getDirectory("document_icon_directory", "media/com_judownload/images/document/", true); ?>";
	function jSelectDocument_related() {
		var $ul = jQuery(".related-document-list").find(".related-documents");
		var $document = $ul.find("li#document-" + arguments[0]);
		if (!$document.length && arguments[0] != <?php echo (int)$this->item->id; ?>) {
			var $li = '<li id="document-' + arguments[0] + '">';
			$li += '<div class="document-inner">';
			var icon_src = arguments[2] ? document_icon_url + arguments[2] : default_icon;
			if (icon_src) {
				$li += '<img class="image" src="' + icon_src + '" title="' + arguments[1] + '" width="<?php echo $this->params->get('document_icon_width', 150)?>px" height="<?php echo $this->params->get('document_icon_height', 150); ?>px" />';
			}
			var href = 'index.php?option=com_judownload&task=document.edit&id=' + arguments[0];
			$li += '<a class="rel-document-title" target="_blank" href="' + href + '">' + arguments[1] + '</a>';
			$li += '<a class="remove-rel-document" href="#" title="<?php echo JText::_('COM_JUDOWNLOAD_REMOVE_DOCUMENT'); ?>" ><?php echo JText::_('COM_JUDOWNLOAD_REMOVE_DOCUMENT'); ?></a>';
			$li += '<input type="hidden" name="related_documents[]" value="' + arguments[0] + '" />';
예제 #2
0
 public static function getDocumentIcon($icon, $getDefault = true)
 {
     if ($icon) {
         $documentIconUrl = JUDownloadFrontHelper::getDirectory("document_image_directory", "media/com_judownload/images/document/", true);
         return JUri::root(true) . "/" . $documentIconUrl . $icon;
     } elseif ($getDefault) {
         return JUDownloadHelper::getDefaultDocumentIcon();
     }
     return '';
 }
예제 #3
0
	public function canView($options = array())
	{
		$params       = JUDownloadHelper::getParams(null, $this->doc_id);
		$default_icon = JUDownloadHelper::getDefaultDocumentIcon();
		if ($this->value == "" && $default_icon)
		{
			$this->value = "default/" . $params->get('listing_default_icon', 'default-document.png');
		}

		return parent::canView($options);
	}
예제 #4
0
 * ------------------------------------------------------------------------
 * JUDownload for Joomla 2.5, 3.x
 * ------------------------------------------------------------------------
 *
 * @copyright      Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
 * @license        GNU General Public License version 2 or later; see LICENSE.txt
 * @author         JoomUltra Co., Ltd
 * @website        http://www.joomultra.com
 * @----------------------------------------------------------------------@
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
	var default_icon = "<?php 
echo JUDownloadHelper::getDefaultDocumentIcon();
?>
";
	var document_icon_url = "<?php 
echo JUri::root(true) . "/" . JUDownloadFrontHelper::getDirectory("document_icon_directory", "media/com_judownload/images/document/", true);
?>
";
	function jSelectDocument_related() {
		var $ul = jQuery(".related-document-list").find(".related-documents");
		var $document = $ul.find("li#document-" + arguments[0]);
		if (!$document.length && arguments[0] != <?php 
echo (int) $this->item->id;
?>
) {
			var $li = '<li id="document-' + arguments[0] + '">';
			$li += '<div class="document-inner">';