-
+
@@ -117,7 +123,7 @@
" . JText::_('COM_TJREPORTS_CSV_EXPORT') . "";
endif
?>
@@ -229,6 +235,10 @@ class='icon-download'>" . JText::_('COM_TJREPORTS_CSV_EXPORT') . "";
-->
+
+
+
+
@@ -267,33 +277,24 @@ function getQueryResult(id, Itemid)
if (queryId=="")
{
- window.location.href = 'index.php?option=com_tjreports&view=reports&reportToBuild='+reportToBuild+'&client='+client+'&reportId='+reportId+"&Itemid="+Itemid;
+ window.location.href = '?option=com_tjreports&view=reports&reportToBuild='+reportToBuild+'&client='+client+'&reportId='+reportId+"&Itemid="+Itemid;
}
else
{
- window.location.href = 'index.php?option=com_tjreports&view=reports&savedQuery=1&reportToBuild='+queryId[0]+'&client='+client+'&queryId='+queryId[1]+'&reportId='+reportId+"&Itemid="+Itemid;
+ window.location.href = '?option=com_tjreports&view=reports&savedQuery=1&reportToBuild='+queryId[0]+'&client='+client+'&queryId='+queryId[1]+'&reportId='+reportId+"&Itemid="+Itemid;
}
}
techjoomla.jQuery(document).ready(function()
{
- switch('')
+ if(is_single_report)
+ {
+ jQuery(".dropdown-list").hide();
+ }
+
+ if(reportId == 0)
{
- case 'userreport':
- techjoomla.jQuery('#userreport').addClass('active btn-primary');
- break;
- case 'studentcoursereport':
- techjoomla.jQuery('#studentcoursereport').addClass('active btn-primary');
- break;
- case 'lessonreport':
- techjoomla.jQuery('#lessonreport').addClass('active btn-primary');
- break;
- case 'coursereport':
- techjoomla.jQuery('#coursereport').addClass('active btn-primary');
- break;
- case 'attemptreport':
- techjoomla.jQuery('#attemptreport').addClass('active btn-primary');
- break;
+ loadReport(options[0]->value ?>,id ?>);
}
techjoomla.jQuery('.ColVis_collection input').click(function(){
diff --git a/tjreports/site/views/reports/tmpl/default.xml b/tjreports/site/views/reports/tmpl/default.xml
new file mode 100644
index 0000000..61f5854
--- /dev/null
+++ b/tjreports/site/views/reports/tmpl/default.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/tjreports/site/views/reports/view.html.php b/tjreports/site/views/reports/view.html.php
index 6ab982c..faec027 100755
--- a/tjreports/site/views/reports/view.html.php
+++ b/tjreports/site/views/reports/view.html.php
@@ -39,7 +39,8 @@ class TjreportsViewReports extends JViewLegacy
public function display($tpl = null)
{
$canDo = TjreportsHelpersTjreports::getActions();
- $user_id = JFactory::getUser()->id;
+ $user = JFactory::getUser();
+ $user_id = $user->id;
$input = JFactory::getApplication()->input;
$TjreportsModelReports = new TjreportsModelReports;
$app = JFactory::getApplication();
@@ -109,6 +110,15 @@ public function display($tpl = null)
$param = json_decode($QueryData->param);
$this->colToshow = $param->colToshow;
}
+ // Added By komal to show default field
+ else
+ {
+ $model = $this->getModel();
+ $colToSelect = array('colToshow');
+ $QueryData = $model->getDefaultReport();
+ $param = json_decode($QueryData->param);
+ $this->colToshow = $param->colToshow;
+ }
$input = JFactory::getApplication()->input;