Skip to content

Commit

Permalink
Merge pull request #60 from techjoomla/release-1.1.0
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
coolbung authored Nov 23, 2018
2 parents 468e21c + ea37271 commit bd0f550
Show file tree
Hide file tree
Showing 75 changed files with 20,990 additions and 786 deletions.
409 changes: 409 additions & 0 deletions build/bump.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/components/com_tjdashboard/administrator/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset label="COM_TJDASHBOARD" name="tjdashboard">
<field name="load_bootstrap" type="radio" default="0" label="COM_TJDASHBOARD_LOAD_BOOTSTRAP" description="COM_TJDASHBOARD_LOAD_BOOTSTRAP_DESC" class="btn-group">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset name="permissions" description="JCONFIG_PERMISSIONS_DESC" label="JCONFIG_PERMISSIONS_LABEL">
<field name="rules" type="rules" component="com_tjdashboard" class="inputbox" filter="rules" validate="rules" label="JCONFIG_PERMISSIONS_LABEL" section="component" />
Expand Down
10 changes: 6 additions & 4 deletions src/components/com_tjdashboard/administrator/controller.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access to this file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
Expand All @@ -17,44 +19,4 @@
*/
class TjDashboardControllerWidget extends JControllerForm
{
/**
* Function to get all the respective renderers for given data source
*
* @return object object
*/
public function getSupportedRenderers()
{
try
{
$app = JFactory::getApplication();
$jinput = $app->input;
$formData = $jinput->post->get('pluginName', '', 'string');
$dataPlugin = explode('.', $formData);
$pluginFolder = $dataPlugin[0] . '/' . $dataPlugin[0];
$pluginFileName = $dataPlugin[1];
require_once JPATH_PLUGINS . '/tjdashboardsource/' . $pluginFolder . '/' . $pluginFileName . '.php';
$className = ucfirst($dataPlugin[0]) . ucfirst($pluginFileName) . 'Datasource';
$dataSourceObject = new $className;
$renderers = $dataSourceObject->getSupportedRenderers();
$lang = JFactory::getLanguage();

foreach ($renderers as $key => $value)
{
$rendererName = explode(".", $key);
$languageFilePath = JPATH_PLUGINS . '/tjdashboardrenderer/' . $rendererName[0];

// Loading renderer language files for loading list of renderers available
$lang->load("plg_tjdashboardrenderer_" . $rendererName[0], $languageFilePath, null, false, true) ||
$lang->load("plg_tjdashboardrenderer_" . $rendererName[0], JPATH_ADMINISTRATOR, null, false, true);
$renderers[$key] = JText::_($value);
}

echo new JResponseJson($renderers);
jexit();
}
catch (Exception $e)
{
echo new JResponseJson($e);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (c) 2009-2015 TechJoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access to this file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
/**
* @package Com_Tjdashboard
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <contact@techjoomla.com>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Techjoomla <extensions@techjoomla.com>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die();

JLoader::discover("Tjdashboard", JPATH_ADMINISTRATOR . '/components/com_tjdashboard/libraries');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
COM_TJDASHBOARD="TjDashboard"
COM_TJDASHBOARD_COMPONENT_LABEL="Tjdashboard"
COM_TJDASHBOARD_CONFIGURATION="Tjdashboard Configuration"

; Bootstrap configuration
COM_TJDASHBOARD_LOAD_BOOTSTRAP="Load Bootstrap CSS manually"
COM_TJDASHBOARD_LOAD_BOOTSTRAP_DESC="If set to 'Yes', Bootstrap CSS will be loaded from TjDashboard component"

COM_TJDASHBOARD_ACCESS_HEADING="Access"
COM_TJDASHBOARD_COMPONENT_DESC=""
COM_TJDASHBOARD_N_ITEMS_ARCHIVED="%d items successfully archived"
Expand Down Expand Up @@ -120,10 +125,11 @@ COM_TJDASHBOARD_WIDGET_FORM_DESC_DASHBOARDID = "Choose dashboard for widget"

COM_TJDASHBOARD_WIDGET_FORM_LBL_DATA_PLUGIN = "Data Plugin"
COM_TJDASHBOARD_WIDGET_FORM_DESC_DATA_PLUGIN = "Select data plugin for widget"
COM_TJDASHBOARD_WIDGET_FORM_DATA_PLUGIN = "Select Data Source"

COM_TJDASHBOARD_WIDGET_FORM_LBL_RENDERER_PLUGIN = "Renderer Plugin"
COM_TJDASHBOARD_WIDGET_FORM_DESC_RENDERER_PLUGIN = "Select renderer plugin"

COM_TJDASHBOARD_WIDGET_FORM_RENDERER_PLUGIN = "Select Renderer"

COM_TJDASHBOARD_WIDGET_FORM_LBL_PRIMARY_TEXT = "Primary Text"
COM_TJDASHBOARD_WIDGET_FORM_DESC_PRIMARY_TEXT = "Primary Text"
Expand All @@ -145,8 +151,15 @@ COM_TJDASHBOARD_WIDGET_FORM_DESC_AUTOREFRESH = "Auto Refresh (Time in seconds)"

COM_TJDASHBOARD_WIDGET_FORM_LBL_PARAMS = "Widget Params"
COM_TJDASHBOARD_WIDGET_FORM_DESC_PARAMS = "You can add widget params here"
COM_TJDASHBOARD_WIDGET_INVALID_JSON_VALUE="Widget Params value is not a valid JSON Object"

;Widgets List view
COM_TJDASHBOARD_DASHBOARDS_FILTER_SEARCH_DESC = "Search in widget title.Prefix with ID:to search for a widget ID"


COM_TJDASHBOARD_DEFAULT_WIDGETS_DELETE_ERROR_MESSAGE = "You can not delete default widget"
COM_TJDASHBOARD_WIDGETS_DELETE_ERROR_MESSAGE = "Could not delete the widget. Something went wrong!"
COM_TJDASHBOARD_WIDGETS_NOTSHOW_ERROR_MESSAGE="No widgets found to show"

;dashboards view
COM_TJDASHBOARD_DASHBOARDS_DELETE_ERROR_MESSAGE = 'Could not delete the dashboard.Please delete the widgets before deleting the dashboard'
COM_TJDASHBOARD_NO_DATA_AVAILABLE_MESSAGE="No data Available"
COM_TJDASHBOARD_DASHBOARD_DELETE_ERROR_MESSAGE_GENERAL="Could not delete the dashboard.Something went wrong"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
COM_TJDASHBOARD="TjDashboard"
COM_TJDASHBOARD_XML_DESCRIPTION=""
COM_TJDASHBOARD_TITLE_DASHBOARDS="Dashboards"
COM_TJDASHBOARD_TITLE_WIDGETS = "Widgets"
;Add/Edit Dashboard view
COM_TJDASHBOARD_DASHBOARD_VIEW_EDIT_TITLE="Create An Dashboard"
COM_TJDASHBOARD_DASHBOARD_VIEW_EDIT_DESC="Shows a form to create a New Dashboard."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die('Unauthorized Access');

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright 2017 Techjoomla
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die('Unauthorized Access');

/**
Expand Down Expand Up @@ -42,6 +45,8 @@ class TjdashboardWidget extends JObject

public $modified_by = 0;

public $core = 0;

public $widget_render_data = array();

public $widget_js = array();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access.

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access to this file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('JPATH_BASE') or die;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
/**
* @package Com_Tjdashboard
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package TJDashboard
* @subpackage com_tjdashboard
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access.
Expand Down Expand Up @@ -134,6 +136,8 @@ protected function getOptions()
$options = $db->setQuery($query)->loadObjectList();
$lang = JFactory::getLanguage();
$j = 0;
$tjDashboardSourcePlugins[$j]['text'] = JText::_('COM_TJDASHBOARD_WIDGET_FORM_DATA_PLUGIN');
$tjDashboardSourcePlugins[$j]['value'] = '';

foreach ($options as $item)
{
Expand Down
Loading

0 comments on commit bd0f550

Please sign in to comment.