Skip to content

Commit

Permalink
Trying to fix the Ajax issue gh-26 we removed the multiple calls and …
Browse files Browse the repository at this point in the history
…restructure the ajax call.
  • Loading branch information
Llewellynvdm committed Dec 5, 2016
1 parent b2516df commit 58de363
Show file tree
Hide file tree
Showing 321 changed files with 1,338 additions and 582 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 27th November, 2016
+ *Last Build*: 4th December, 2016
+ *Version*: 1.4.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

## Build Time :hourglass:

**178 Hours** or **22 Eight Hour Days** (actual time the author saved -
**180 Hours** or **23 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **63763**
+ *Line count*: **64519**
+ *File count*: **436**
+ *Folder count*: **90**

**117 Hours** or **15 Eight Hour Days** (the actual time the author spent)
**119 Hours** or **14 Eight Hour Days** (the actual time the author spent)

> (with the following break down:
> **debugging @44hours** = codingtime / 4;
> **planning @25hours** = codingtime / 7;
> **debugging @45hours** = codingtime / 4;
> **planning @26hours** = codingtime / 7;
> **mapping @18hours** = codingtime / 10;
> **office @30hours** = codingtime / 6;)
**295 Hours** or **37 Eight Hour Days**
**299 Hours** or **37 Eight Hour Days**
(a total of the realistic time frame for this project)

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
Expand Down
14 changes: 7 additions & 7 deletions admin/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:[email protected])
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 27th November, 2016
+ *Last Build*: 4th December, 2016
+ *Version*: 1.4.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

## Build Time :hourglass:

**178 Hours** or **22 Eight Hour Days** (actual time the author saved -
**180 Hours** or **23 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)

+ *Line count*: **63763**
+ *Line count*: **64519**
+ *File count*: **436**
+ *Folder count*: **90**

**117 Hours** or **15 Eight Hour Days** (the actual time the author spent)
**119 Hours** or **14 Eight Hour Days** (the actual time the author spent)

> (with the following break down:
> **debugging @44hours** = codingtime / 4;
> **planning @25hours** = codingtime / 7;
> **debugging @45hours** = codingtime / 4;
> **planning @26hours** = codingtime / 7;
> **mapping @18hours** = codingtime / 10;
> **office @30hours** = codingtime / 6;)

**295 Hours** or **37 Eight Hour Days**
**299 Hours** or **37 Eight Hour Days**
(a total of the realistic time frame for this project)

> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
Expand Down
8 changes: 5 additions & 3 deletions admin/access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<action name="core.edit.created" title="COM_SERMONDISTRIBUTOR_EDIT_CREATED_DATE" description="COM_SERMONDISTRIBUTOR_EDIT_CREATED_DATE_DESC" />
<action name="site.categories.access" title="COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE" description="COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC" />
<action name="site.category.access" title="COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE" description="COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE_DESC" />
<action name="external_source.clear_local_listing" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS_DESC" />
<action name="external_source.reset_update_status" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS_DESC" />
<action name="external_source.access" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS_DESC" />
<action name="external_source.batch" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE_DESC" />
<action name="external_source.create" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE_DESC" />
Expand Down Expand Up @@ -202,10 +204,10 @@
<action name="external_source.edit.update_method" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD_DESC" />
<action name="external_source.edit.filetypes" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES_DESC" />
<action name="external_source.edit.build" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD_DESC" />
<action name="external_source.edit.permissiontype" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE_DESC" />
<action name="external_source.edit.update_timer" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER_DESC" />
<action name="external_source.edit.dropboxoptions" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS_DESC" />
<action name="external_source.edit.folder" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER_DESC" />
<action name="external_source.edit.dropboxoptions" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS_DESC" />
<action name="external_source.edit.update_timer" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER_DESC" />
<action name="external_source.edit.permissiontype" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE_DESC" />
<action name="external_source.edit.sharedurl" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL_DESC" />
<action name="external_source.edit.oauthtoken" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN_DESC" />
<action name="external_source.version" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC" />
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/external_source.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/external_sources.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/help_document.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/help_documents.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/local_listing.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/local_listings.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/manual_updater.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/preacher.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/preachers.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/series.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/series_list.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/sermon.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/sermons.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/statistic.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/css/statistics.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css
Expand Down
16 changes: 16 additions & 0 deletions admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@
default="10"
/>
<field type="spacer" name="spacerHistory" hr="true" />

<!-- Max_execution_time Field. Type: Integer. (joomla) -->
<field
type="integer"
name="max_execution_time"
label="COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_LABEL"
default="500"
description="COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_DESCRIPTION"
class="text_area"
required="true"
first="500"
last="50000"
step="10"
/>
<!-- Spacer_hr_d Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_d" hr="true" class="spacer_hr_d" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"
Expand Down
2 changes: 1 addition & 1 deletion admin/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php
Expand Down
49 changes: 44 additions & 5 deletions admin/controllers/ajax.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php
Expand Down Expand Up @@ -46,7 +46,8 @@ public function __construct($config)
$this->registerTask('updateLocalListingExternal', 'ajax');
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
$this->registerTask('getBuildTable', 'ajax');
$this->registerTask('getBuildTable', 'ajax');
$this->registerTask('getSourceStatus', 'ajax');
}

public function ajax()
Expand All @@ -65,12 +66,12 @@ public function ajax()
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$listingValue = $jinput->get('listing', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
if($idValue && $targetValue && $typeValue)
if($listingValue && $targetValue && $typeValue)
{
$result = $this->getModel('ajax')->autoUpdateLocalListingExternal($idValue, $targetValue, $typeValue);
$result = $this->getModel('ajax')->autoUpdateLocalListingExternal($listingValue, $targetValue, $typeValue);
}
else
{
Expand Down Expand Up @@ -256,6 +257,44 @@ public function ajax()
echo "(".json_encode($e).");";
}
}
break;
case 'getSourceStatus':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getSourceStatus($idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
Expand Down
Loading

0 comments on commit 58de363

Please sign in to comment.