Skip to content

Commit

Permalink
Fixed update server url
Browse files Browse the repository at this point in the history
Restored frontend credits without backlink
Rearranged items in category view (responsive table)
Added possibility to hide the link on document title in category view
Added frontend stylesheet
Removed description in category view
Fixed MD5 show/hide selector
  • Loading branch information
gmansillo committed Sep 26, 2018
1 parent 0bcfe8a commit 8a6697a
Show file tree
Hide file tree
Showing 19 changed files with 341 additions and 248 deletions.
46 changes: 16 additions & 30 deletions admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,6 @@
</option>
</field>

<field
name="document_show_md5"
type="radio"
class="radio btn-group btn-group-yesno"
default="1"
label="COM_FIREDRIVE_FIELD_DOCUMENT_SHOW_MD5_LABEL"
description="COM_FIREDRIVE_FIELD_DOCUMENT_SHOW_MD5_DESC">
<option
value="1">JSHOW
</option>
<option
value="0">JHIDE
</option>
</field>

<field
name="document_show_description"
type="radio"
Expand Down Expand Up @@ -311,6 +296,22 @@
</option>
</field>

<field
name="show_link_on_title_in_category_view"
type="radio"
class="radio btn-group btn-group-yesno"
label="COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_LABEL"
description="COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_DESC"
default="1"
>
<option
value="1">JYES
</option>
<option
value="0">JNO
</option>
</field>

<field
name="category_show_document_created_by"
type="radio"
Expand Down Expand Up @@ -386,21 +387,6 @@
</option>
</field>

<field
name="category_show_document_description"
type="radio"
class="radio btn-group btn-group-yesno"
default="1"
label="COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_LABEL"
description="COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_DESC">
<option
value="1">JYES
</option>
<option
value="0">JNO
</option>
</field>

<field
name="filter_field"
type="radio"
Expand Down
2 changes: 1 addition & 1 deletion admin/helpers/firedrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function convertToReadableSize($size)
return "0 KB";

$base = log($size) / log(1024);
$suffix = array("", "KB", "MB", "GB", "TB");
$suffix = array("Byte", "KB", "MB", "GB", "TB");
$f_base = floor($base);

return round(pow(1024, $base - floor($base)), 1) . $suffix[$f_base];
Expand Down
4 changes: 2 additions & 2 deletions admin/language/en-GB/en-GB.com_firedrive.ini
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ COM_FIREDRIVE_FIELD_CATEGORY_SHOW_FILTER_FIELD_LABEL = "Show filters"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_FILTER_FIELD_DESC = "Show filters in category view"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_NEW_LABEL = "Label on new documents"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_NEW_DESC = "Show a label on new documents in category view."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_LABEL = "Show description"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_DESC = "Show document description in category view."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_BY_LABEL = "Show author"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_BY_DESC = "Show author's name in category view."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_LABEL="Link on title"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_DESC="Show a link on document title linking to the details page"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_LABEL = "Show creation date"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_DESC = "Show creation date in category view."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_SIZE_LABEL = "Show size"
Expand Down
4 changes: 2 additions & 2 deletions admin/language/it-IT/it-IT.com_firedrive.ini
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ COM_FIREDRIVE_FIELD_CATEGORY_SHOW_FILTER_FIELD_LABEL = "Mostra filtri"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_FILTER_FIELD_DESC = "Mostra filtri nella vista categoria"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_NEW_LABEL = "Etichetta sui nuovi documenti"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_NEW_DESC = "Mostra una etichetta sui nuovi documenti nella vista categoria."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_LABEL = "Mostra descrizione"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_DESC_DESC = "Mostra descrizione nella vista categoria."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_BY_LABEL = "Mostra autore"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_BY_DESC = "Mostra il nome dell'autore nella vista categoria."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_LABEL="Link sul titolo"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_LINK_ON_TITLE_IN_CATEGORY_DESC="Mostra un link sul titolo del documento che collega alla pagina dei dettagli"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_LABEL = "Mostra data creazione"
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_CREATED_DESC = "Mostra la data di creazione nella vista categoria."
COM_FIREDRIVE_FIELD_CATEGORY_SHOW_DOCUMENT_SIZE_LABEL = "Mostra dimensione"
Expand Down
145 changes: 72 additions & 73 deletions firedrive.xml
Original file line number Diff line number Diff line change
@@ -1,73 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.8.5" method="upgrade">
<name>COM_FIREDRIVE</name>
<author>Giovanni Mansillo</author>
<creationDate>Feb 2018</creationDate>
<copyright>(C) 2014 Giovanni Mansillo. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later</license>
<authorUrl>http://www.firedrive.eu</authorUrl>
<version>5.2.1</version>
<description><![CDATA[]]></description>
<scriptfile>script.php</scriptfile>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<files folder="site">
<filename>index.html</filename>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
<folder>models</folder>
<folder>views</folder>
<filename>controller.php</filename>
<filename>firedrive.php</filename>
</files>
<media destination="com_firedrive" folder="media">
<filename>index.html</filename>
<folder>images</folder>
<folder>smartIcons</folder>
</media>
<administration>
<menu>COM_FIREDRIVE_MENU</menu>
<submenu>
<menu link="option=com_firedrive" view="firedrives">
COM_FIREDRIVE_MENU_DOCUMENTS
</menu>
<menu link="option=com_categories&amp;extension=com_firedrive" view="categories">
COM_FIREDRIVE_MENU_CATEGORIES
</menu>
</submenu>
<files folder="admin">
<filename>index.html</filename>
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>firedrive.php</filename>
<filename>controller.php</filename>
<folder>sql</folder>
<folder>uploads</folder>
<folder>language</folder>
<folder>views</folder>
<folder>tables</folder>
<folder>models</folder>
<folder>helpers</folder>
<folder>controllers</folder>
</files>
</administration>
<updateservers>
<server type="extension" priority="1" name="Simple Update Server">
http://get.firedrive.eu/update.php
</server>
</updateservers>
</extension>
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.8.5" method="upgrade">
<name>COM_FIREDRIVE</name>
<author>Giovanni Mansillo</author>
<creationDate>Feb 2018</creationDate>
<copyright>(C) 2014 Giovanni Mansillo. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later</license>
<authorUrl>http://www.firedrive.eu</authorUrl>
<version>5.2.2</version>
<description><![CDATA[]]></description>
<scriptfile>script.php</scriptfile>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<files folder="site">
<filename>index.html</filename>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
<folder>models</folder>
<folder>views</folder>
<filename>controller.php</filename>
<filename>firedrive.php</filename>
</files>
<media destination="com_firedrive" folder="media">
<filename>index.html</filename>
<folder>css</folder>
<folder>images</folder>
<folder>smartIcons</folder>
</media>
<administration>
<menu>COM_FIREDRIVE_MENU</menu>
<submenu>
<menu link="option=com_firedrive" view="firedrives">
COM_FIREDRIVE_MENU_DOCUMENTS
</menu>
<menu link="option=com_categories&amp;extension=com_firedrive" view="categories">
COM_FIREDRIVE_MENU_CATEGORIES
</menu>
</submenu>
<files folder="admin">
<filename>index.html</filename>
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>firedrive.php</filename>
<filename>controller.php</filename>
<folder>sql</folder>
<folder>uploads</folder>
<folder>language</folder>
<folder>views</folder>
<folder>tables</folder>
<folder>models</folder>
<folder>helpers</folder>
<folder>controllers</folder>
</files>
</administration>
<updateservers>
<server type="extension" priority="1" name="Simple Update Server">http://get.firedrive.eu/update/</server>
</updateservers>
</extension>
117 changes: 117 additions & 0 deletions media/css/firedrive.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#firedrive-category-table {
display: table;
width: 100%;
margin-bottom: 18px;
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0;
}

#firedrive-category-table tbody, #firedrive-category-table thead {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}

#firedrive-category-table tr {
display: table-row;
vertical-align: middle;
border-color: inherit;
}

#firedrive-category-table th, #firedrive-category-table td {
text-align: left;
display: table-cell;
vertical-align: middle;
padding: 8px;
line-height: 18px;
border-top: 1px solid #ddd;
}

#firedrive-category-table th {
font-weight: normal;
padding: 14px 8px;
}

#firedrive-category-table .col-icon {
width: 1%;
}

#firedrive-category-table .col-icon img {
max-width: inherit;
min-width: 30px;
}

#firedrive-category-table .col-title h3 {
font-weight: bold;
font-size: 1.1em;
}

#firedrive-category-table .col-actions {
text-align: right;
}

/*
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {

/* Force table to not be like tables anymore */
#firedrive-category-table,
#firedrive-category-table thead,
#firedrive-category-table tbody,
#firedrive-category-table th,
#firedrive-category-table td,
#firedrive-category-table tr {
display: block;
}

#firedrive-category-table thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}

#firedrive-category-table tr {
border: 1px solid #ccc;
margin-bottom: 3px;
}

#firedrive-category-table td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
vertical-align: top;
}

#firedrive-category-table td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}

#firedrive-category-table .col-title h3 {
margin-top: 0;
margin-bottom: 0;
size: 1em;
}

#firedrive-category-table .col-icon {
display: none;
}

#firedrive-category-table .col-actions {
text-align: left;
}
}
8 changes: 6 additions & 2 deletions site/firedrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
JLoader::register('FiredriveHelperRoute', JPATH_COMPONENT . '/helpers/route.php');
JLoader::register('FiredriveHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/firedrive.php');

$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$session = JFactory::getSession();
$input = $app->input;

$session->set('fdkey', JText::_('COM_FIREDRIVE_CREDITS'));

if ($input->get('view') === 'category' && $input->get('layout') === 'modal')
{
Expand All @@ -27,4 +31,4 @@

$controller = JControllerLegacy::getInstance('Firedrive');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
$controller->redirect();
Loading

0 comments on commit 8a6697a

Please sign in to comment.