Stable release of v2.0.15
Fixed JavaScript Database Manager. Adds new session option. Adds make public switches to back-end.
This commit is contained in:
parent
8e3210fe62
commit
38c1287100
@ -74,4 +74,10 @@
|
||||
|
||||
- Adds install mysql commands for faster queries on large systems.
|
||||
- Fixes mobile layout on settings active session tab.
|
||||
- Making correction to tag descriptions.
|
||||
- Making correction to tag descriptions.
|
||||
|
||||
# v2.0.15
|
||||
|
||||
- Fixed JavaScript Database Manager
|
||||
- Adds new session option
|
||||
- Adds make public switches to back-end
|
18
README.md
18
README.md
@ -1,4 +1,4 @@
|
||||
# Get Bible (2.0.14)
|
||||
# Get Bible (2.0.15)
|
||||
|
||||
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
|
||||
|
||||
@ -18,32 +18,32 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Get Bible](https://getbible.net)
|
||||
+ *First Build*: 3rd December, 2015
|
||||
+ *Last Build*: 5th August, 2023
|
||||
+ *Version*: 2.0.14
|
||||
+ *Last Build*: 7th August, 2023
|
||||
+ *Version*: 2.0.15
|
||||
+ *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
|
||||
|
||||
**547 Hours** or **68 Eight Hour Days** (actual time the author saved -
|
||||
**549 Hours** or **69 Eight Hour Days** (actual time the author saved -
|
||||
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
|
||||
|
||||
> (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*: **196060**
|
||||
+ *File count*: **1704**
|
||||
+ *Line count*: **196866**
|
||||
+ *File count*: **1710**
|
||||
+ *Folder count*: **163**
|
||||
|
||||
**361 Hours** or **46 Eight Hour Days** (the actual time the author spent)
|
||||
**363 Hours** or **45 Eight Hour Days** (the actual time the author spent)
|
||||
|
||||
> (with the following break down:
|
||||
> **debugging @137hours** = codingtime / 4;
|
||||
> **planning @78hours** = codingtime / 7;
|
||||
> **mapping @55hours** = codingtime / 10;
|
||||
> **office @91hours** = codingtime / 6;)
|
||||
> **office @92hours** = codingtime / 6;)
|
||||
|
||||
**908 Hours** or **114 Eight Hour Days**
|
||||
**912 Hours** or **114 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**,
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Get Bible (2.0.14)
|
||||
# Get Bible (2.0.15)
|
||||
|
||||
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
|
||||
|
||||
@ -18,32 +18,32 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Get Bible](https://getbible.net)
|
||||
+ *First Build*: 3rd December, 2015
|
||||
+ *Last Build*: 5th August, 2023
|
||||
+ *Version*: 2.0.14
|
||||
+ *Last Build*: 7th August, 2023
|
||||
+ *Version*: 2.0.15
|
||||
+ *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
|
||||
|
||||
**547 Hours** or **68 Eight Hour Days** (actual time the author saved -
|
||||
**549 Hours** or **69 Eight Hour Days** (actual time the author saved -
|
||||
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
|
||||
|
||||
> (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*: **196060**
|
||||
+ *File count*: **1704**
|
||||
+ *Line count*: **196866**
|
||||
+ *File count*: **1710**
|
||||
+ *Folder count*: **163**
|
||||
|
||||
**361 Hours** or **46 Eight Hour Days** (the actual time the author spent)
|
||||
**363 Hours** or **45 Eight Hour Days** (the actual time the author spent)
|
||||
|
||||
> (with the following break down:
|
||||
> **debugging @137hours** = codingtime / 4;
|
||||
> **planning @78hours** = codingtime / 7;
|
||||
> **mapping @55hours** = codingtime / 10;
|
||||
> **office @91hours** = codingtime / 6;)
|
||||
> **office @92hours** = codingtime / 6;)
|
||||
|
||||
**908 Hours** or **114 Eight Hour Days**
|
||||
**912 Hours** or **114 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**,
|
||||
|
@ -56,6 +56,8 @@
|
||||
<action name="linker.edit.guid" title="COM_GETBIBLE_LINKERS_EDIT_GUID" description="COM_GETBIBLE_LINKERS_EDIT_GUID_DESC" />
|
||||
<action name="linker.edit.name" title="COM_GETBIBLE_LINKERS_EDIT_NAME" description="COM_GETBIBLE_LINKERS_EDIT_NAME_DESC" />
|
||||
<action name="linker.edit.own" title="COM_GETBIBLE_LINKERS_EDIT_OWN" description="COM_GETBIBLE_LINKERS_EDIT_OWN_DESC" />
|
||||
<action name="linker.edit.public_notes" title="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES" description="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES_DESC" />
|
||||
<action name="linker.edit.public_tagged_verses" title="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES" description="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES_DESC" />
|
||||
<action name="linker.edit.state" title="COM_GETBIBLE_LINKERS_EDIT_STATE" description="COM_GETBIBLE_LINKERS_EDIT_STATE_DESC" />
|
||||
<action name="linker.submenu" title="COM_GETBIBLE_LINKERS_SUBMENU" description="COM_GETBIBLE_LINKERS_SUBMENU_DESC" />
|
||||
<action name="note.access" title="COM_GETBIBLE_NOTES_ACCESS" description="COM_GETBIBLE_NOTES_ACCESS_DESC" />
|
||||
@ -276,6 +278,8 @@
|
||||
<action name="linker.access" title="COM_GETBIBLE_LINKERS_ACCESS" description="COM_GETBIBLE_LINKERS_ACCESS_DESC" />
|
||||
<action name="linker.edit.name" title="COM_GETBIBLE_LINKERS_EDIT_NAME" description="COM_GETBIBLE_LINKERS_EDIT_NAME_DESC" />
|
||||
<action name="linker.edit.guid" title="COM_GETBIBLE_LINKERS_EDIT_GUID" description="COM_GETBIBLE_LINKERS_EDIT_GUID_DESC" />
|
||||
<action name="linker.edit.public_tagged_verses" title="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES" description="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES_DESC" />
|
||||
<action name="linker.edit.public_notes" title="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES" description="COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES_DESC" />
|
||||
</section>
|
||||
<section name="note">
|
||||
<action name="note.edit" title="COM_GETBIBLE_NOTES_EDIT" description="COM_GETBIBLE_NOTES_EDIT_DESC" />
|
||||
|
@ -509,6 +509,10 @@ COM_GETBIBLE_FILTER_PROMPT_ASCENDING="Prompt ascending"
|
||||
COM_GETBIBLE_FILTER_PROMPT_DESCENDING="Prompt descending"
|
||||
COM_GETBIBLE_FILTER_PROMPT_INTEGRATION_SCOPE_ASCENDING="Prompt Integration Scope ascending"
|
||||
COM_GETBIBLE_FILTER_PROMPT_INTEGRATION_SCOPE_DESCENDING="Prompt Integration Scope descending"
|
||||
COM_GETBIBLE_FILTER_PUBLIC_NOTES_ASCENDING="Public Notes ascending"
|
||||
COM_GETBIBLE_FILTER_PUBLIC_NOTES_DESCENDING="Public Notes descending"
|
||||
COM_GETBIBLE_FILTER_PUBLIC_TAGGED_VERSES_ASCENDING="Public Tagged Verses ascending"
|
||||
COM_GETBIBLE_FILTER_PUBLIC_TAGGED_VERSES_DESCENDING="Public Tagged Verses descending"
|
||||
COM_GETBIBLE_FILTER_PUBLISHED="Status"
|
||||
COM_GETBIBLE_FILTER_PUBLISHED_BOOKS="Status options for books"
|
||||
COM_GETBIBLE_FILTER_PUBLISHED_CHAPTERS="Status options for chapters"
|
||||
@ -554,6 +558,8 @@ COM_GETBIBLE_FILTER_SELECT_NAME="Select Name"
|
||||
COM_GETBIBLE_FILTER_SELECT_NUMBER="Select Number"
|
||||
COM_GETBIBLE_FILTER_SELECT_OPEN_AI_RESPONSE="Select Open AI Response"
|
||||
COM_GETBIBLE_FILTER_SELECT_PROMPT="Select Prompt"
|
||||
COM_GETBIBLE_FILTER_SELECT_PUBLIC_NOTES="Select Public Notes"
|
||||
COM_GETBIBLE_FILTER_SELECT_PUBLIC_TAGGED_VERSES="Select Public Tagged Verses"
|
||||
COM_GETBIBLE_FILTER_SELECT_RESPONSE_ID="Select Response ID"
|
||||
COM_GETBIBLE_FILTER_SELECT_RESPONSE_MODEL="Select Response model"
|
||||
COM_GETBIBLE_FILTER_SELECT_ROLE="Select Role"
|
||||
@ -609,6 +615,10 @@ COM_GETBIBLE_LINKERS_EDIT_NAME="Linkers Edit Name"
|
||||
COM_GETBIBLE_LINKERS_EDIT_NAME_DESC="Allows the users in this group to edit name of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_OWN="Linkers Edit Own"
|
||||
COM_GETBIBLE_LINKERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own linkers created by them"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES="Linkers Edit Public Notes"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES_DESC="Allows the users in this group to edit public notes of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES="Linkers Edit Public Tagged Verses"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES_DESC="Allows the users in this group to edit public tagged verses of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_STATE="Linkers Edit State"
|
||||
COM_GETBIBLE_LINKERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the linker"
|
||||
COM_GETBIBLE_LINKERS_N_ITEMS_ARCHIVED="%s Linkers archived."
|
||||
@ -651,16 +661,22 @@ COM_GETBIBLE_LINKER_NAME_HINT="Name Here"
|
||||
COM_GETBIBLE_LINKER_NAME_LABEL="Name"
|
||||
COM_GETBIBLE_LINKER_NAME_MESSAGE="Error! Please add name here."
|
||||
COM_GETBIBLE_LINKER_NEW="A New Linker"
|
||||
COM_GETBIBLE_LINKER_NO="No"
|
||||
COM_GETBIBLE_LINKER_NOTES="Notes"
|
||||
COM_GETBIBLE_LINKER_ORDERING_LABEL="Ordering"
|
||||
COM_GETBIBLE_LINKER_PASSWORDS="Passwords"
|
||||
COM_GETBIBLE_LINKER_PERMISSION="Permissions"
|
||||
COM_GETBIBLE_LINKER_PUBLIC_NOTES_DESCRIPTION="Linker can make their notes public."
|
||||
COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL="Public Notes"
|
||||
COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_DESCRIPTION="Linker can make their tagged verses public."
|
||||
COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL="Public Tagged Verses"
|
||||
COM_GETBIBLE_LINKER_PUBLISHING="Publishing"
|
||||
COM_GETBIBLE_LINKER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Linker to customise the alias."
|
||||
COM_GETBIBLE_LINKER_STATUS="Status"
|
||||
COM_GETBIBLE_LINKER_TAGS="Tags"
|
||||
COM_GETBIBLE_LINKER_VERSION_DESC="A count of the number of times this Linker has been revised."
|
||||
COM_GETBIBLE_LINKER_VERSION_LABEL="Version"
|
||||
COM_GETBIBLE_LINKER_YES="Yes"
|
||||
COM_GETBIBLE_NEW="New"
|
||||
COM_GETBIBLE_NOTE="Note"
|
||||
COM_GETBIBLE_NOTES="Notes"
|
||||
|
@ -92,6 +92,10 @@ COM_GETBIBLE_LINKERS_EDIT_NAME="Linkers Edit Name"
|
||||
COM_GETBIBLE_LINKERS_EDIT_NAME_DESC="Allows the users in this group to edit name of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_OWN="Linkers Edit Own"
|
||||
COM_GETBIBLE_LINKERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own linkers created by them"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES="Linkers Edit Public Notes"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_NOTES_DESC="Allows the users in this group to edit public notes of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES="Linkers Edit Public Tagged Verses"
|
||||
COM_GETBIBLE_LINKERS_EDIT_PUBLIC_TAGGED_VERSES_DESC="Allows the users in this group to edit public tagged verses of linker"
|
||||
COM_GETBIBLE_LINKERS_EDIT_STATE="Linkers Edit State"
|
||||
COM_GETBIBLE_LINKERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the linker"
|
||||
COM_GETBIBLE_LINKERS_SUBMENU="Linkers Submenu"
|
||||
|
50
admin/layouts/linker/details_above.php
Normal file
50
admin/layouts/linker/details_above.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
||||
// get the layout fields override method name (from layout path/ID)
|
||||
$layout_path_array = explode('.', $this->getLayoutId());
|
||||
// Since we cannot pass the layout and tab names as parameters to the model method
|
||||
// this name combination of tab and layout in the method name is the only work around
|
||||
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
|
||||
// example of layout name: details_left.php
|
||||
// example of method name: getFields_details_left()
|
||||
$fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'name'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<div class="form-inline form-inline-header">
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -32,7 +32,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'name'
|
||||
'public_tagged_verses'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
48
admin/layouts/linker/details_right.php
Normal file
48
admin/layouts/linker/details_right.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
||||
// get the layout fields override method name (from layout path/ID)
|
||||
$layout_path_array = explode('.', $this->getLayoutId());
|
||||
// Since we cannot pass the layout and tab names as parameters to the model method
|
||||
// this name combination of tab and layout in the method name is the only work around
|
||||
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
|
||||
// example of layout name: details_left.php
|
||||
// example of method name: getFields_details_left()
|
||||
$fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'public_notes'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
77
admin/models/fields/linkersfilterpublicnotes.php
Normal file
77
admin/models/fields/linkersfilterpublicnotes.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Linkersfilterpublicnotes Form Field class for the Getbible component
|
||||
*/
|
||||
class JFormFieldLinkersfilterpublicnotes extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The linkersfilterpublicnotes field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'linkersfilterpublicnotes';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('public_notes'));
|
||||
$query->from($db->quoteName('#__getbible_linker'));
|
||||
$query->order($db->quoteName('public_notes') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_GETBIBLE_FILTER_SELECT_PUBLIC_NOTES') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get linkersmodel
|
||||
$_model = GetbibleHelper::getModel('linkers');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $public_notes)
|
||||
{
|
||||
// Translate the public_notes selection
|
||||
$_text = $_model->selectionTranslation($public_notes,'public_notes');
|
||||
// Now add the public_notes and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $public_notes, JText::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
77
admin/models/fields/linkersfilterpublictaggedverses.php
Normal file
77
admin/models/fields/linkersfilterpublictaggedverses.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Linkersfilterpublictaggedverses Form Field class for the Getbible component
|
||||
*/
|
||||
class JFormFieldLinkersfilterpublictaggedverses extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The linkersfilterpublictaggedverses field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'linkersfilterpublictaggedverses';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('public_tagged_verses'));
|
||||
$query->from($db->quoteName('#__getbible_linker'));
|
||||
$query->order($db->quoteName('public_tagged_verses') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_GETBIBLE_FILTER_SELECT_PUBLIC_TAGGED_VERSES') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get linkersmodel
|
||||
$_model = GetbibleHelper::getModel('linkers');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $public_tagged_verses)
|
||||
{
|
||||
// Translate the public_tagged_verses selection
|
||||
$_text = $_model->selectionTranslation($public_tagged_verses,'public_tagged_verses');
|
||||
// Now add the public_tagged_verses and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $public_tagged_verses, JText::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -37,6 +37,20 @@
|
||||
multiple="false"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="linkersfilterpublictaggedverses"
|
||||
name="public_tagged_verses"
|
||||
label="COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL"
|
||||
multiple="false"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<field
|
||||
type="linkersfilterpublicnotes"
|
||||
name="public_notes"
|
||||
label="COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL"
|
||||
multiple="false"
|
||||
onchange="this.form.submit();"
|
||||
/>
|
||||
<input type="hidden" name="form_submited" value="1"/>
|
||||
</fields>
|
||||
|
||||
@ -57,6 +71,10 @@
|
||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||
<option value="a.name ASC">COM_GETBIBLE_FILTER_NAME_ASCENDING</option>
|
||||
<option value="a.name DESC">COM_GETBIBLE_FILTER_NAME_DESCENDING</option>
|
||||
<option value="a.public_tagged_verses ASC">COM_GETBIBLE_FILTER_PUBLIC_TAGGED_VERSES_ASCENDING</option>
|
||||
<option value="a.public_tagged_verses DESC">COM_GETBIBLE_FILTER_PUBLIC_TAGGED_VERSES_DESCENDING</option>
|
||||
<option value="a.public_notes ASC">COM_GETBIBLE_FILTER_PUBLIC_NOTES_ASCENDING</option>
|
||||
<option value="a.public_notes DESC">COM_GETBIBLE_FILTER_PUBLIC_NOTES_DESCENDING</option>
|
||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||
</field>
|
||||
|
@ -122,6 +122,34 @@
|
||||
validate="guid"
|
||||
hint="COM_GETBIBLE_LINKER_GUID_HINT"
|
||||
/>
|
||||
<!-- Public_tagged_verses Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="public_tagged_verses"
|
||||
label="COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL"
|
||||
description="COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_GETBIBLE_LINKER_YES</option>
|
||||
<option value="0">
|
||||
COM_GETBIBLE_LINKER_NO</option>
|
||||
</field>
|
||||
<!-- Public_notes Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="public_notes"
|
||||
label="COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL"
|
||||
description="COM_GETBIBLE_LINKER_PUBLIC_NOTES_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_GETBIBLE_LINKER_YES</option>
|
||||
<option value="0">
|
||||
COM_GETBIBLE_LINKER_NO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@ -38,6 +38,12 @@ class GetbibleModelLinker extends AdminModel
|
||||
protected $tabLayoutFields = array(
|
||||
'details' => array(
|
||||
'left' => array(
|
||||
'public_tagged_verses'
|
||||
),
|
||||
'right' => array(
|
||||
'public_notes'
|
||||
),
|
||||
'above' => array(
|
||||
'name'
|
||||
)
|
||||
)
|
||||
@ -580,6 +586,46 @@ class GetbibleModelLinker extends AdminModel
|
||||
$form->setFieldAttribute('guid', 'required', 'false');
|
||||
}
|
||||
}
|
||||
// Modify the form based on Edit Public Tagged Verses access controls.
|
||||
if ($id != 0 && (!$user->authorise('linker.edit.public_tagged_verses', 'com_getbible.linker.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('linker.edit.public_tagged_verses', 'com_getbible')))
|
||||
{
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('public_tagged_verses', 'disabled', 'true');
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('public_tagged_verses', 'readonly', 'true');
|
||||
// Disable radio button for display.
|
||||
$class = $form->getFieldAttribute('public_tagged_verses', 'class', '');
|
||||
$form->setFieldAttribute('public_tagged_verses', 'class', $class.' disabled no-click');
|
||||
// If there is no value continue.
|
||||
if (!$form->getValue('public_tagged_verses'))
|
||||
{
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('public_tagged_verses', 'filter', 'unset');
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('public_tagged_verses', 'required', 'false');
|
||||
}
|
||||
}
|
||||
// Modify the form based on Edit Public Notes access controls.
|
||||
if ($id != 0 && (!$user->authorise('linker.edit.public_notes', 'com_getbible.linker.' . (int) $id))
|
||||
|| ($id == 0 && !$user->authorise('linker.edit.public_notes', 'com_getbible')))
|
||||
{
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('public_notes', 'disabled', 'true');
|
||||
// Disable fields for display.
|
||||
$form->setFieldAttribute('public_notes', 'readonly', 'true');
|
||||
// Disable radio button for display.
|
||||
$class = $form->getFieldAttribute('public_notes', 'class', '');
|
||||
$form->setFieldAttribute('public_notes', 'class', $class.' disabled no-click');
|
||||
// If there is no value continue.
|
||||
if (!$form->getValue('public_notes'))
|
||||
{
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('public_notes', 'filter', 'unset');
|
||||
// Disable fields while saving.
|
||||
$form->setFieldAttribute('public_notes', 'required', 'false');
|
||||
}
|
||||
}
|
||||
// Only load these values if no id is found
|
||||
if (0 == $id)
|
||||
{
|
||||
|
@ -37,7 +37,9 @@ class GetbibleModelLinkers extends ListModel
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name'
|
||||
'a.name','name',
|
||||
'a.public_tagged_verses','public_tagged_verses',
|
||||
'a.public_notes','public_notes'
|
||||
);
|
||||
}
|
||||
|
||||
@ -97,6 +99,20 @@ class GetbibleModelLinkers extends ListModel
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
$public_tagged_verses = $this->getUserStateFromRequest($this->context . '.filter.public_tagged_verses', 'filter_public_tagged_verses');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$public_tagged_verses = $app->input->post->get('public_tagged_verses');
|
||||
$this->setState('filter.public_tagged_verses', $public_tagged_verses);
|
||||
}
|
||||
|
||||
$public_notes = $this->getUserStateFromRequest($this->context . '.filter.public_notes', 'filter_public_notes');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$public_notes = $app->input->post->get('public_notes');
|
||||
$this->setState('filter.public_notes', $public_notes);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -134,10 +150,59 @@ class GetbibleModelLinkers extends ListModel
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// set selection value to a translatable value
|
||||
if (GetbibleHelper::checkArray($items))
|
||||
{
|
||||
foreach ($items as $nr => &$item)
|
||||
{
|
||||
// convert public_tagged_verses
|
||||
$item->public_tagged_verses = $this->selectionTranslation($item->public_tagged_verses, 'public_tagged_verses');
|
||||
// convert public_notes
|
||||
$item->public_notes = $this->selectionTranslation($item->public_notes, 'public_notes');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return items
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to convert selection values to translatable string.
|
||||
*
|
||||
* @return translatable string
|
||||
*/
|
||||
public function selectionTranslation($value,$name)
|
||||
{
|
||||
// Array of public_tagged_verses language strings
|
||||
if ($name === 'public_tagged_verses')
|
||||
{
|
||||
$public_tagged_versesArray = array(
|
||||
1 => 'COM_GETBIBLE_LINKER_YES',
|
||||
0 => 'COM_GETBIBLE_LINKER_NO'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($public_tagged_versesArray[$value]) && GetbibleHelper::checkString($public_tagged_versesArray[$value]))
|
||||
{
|
||||
return $public_tagged_versesArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of public_notes language strings
|
||||
if ($name === 'public_notes')
|
||||
{
|
||||
$public_notesArray = array(
|
||||
1 => 'COM_GETBIBLE_LINKER_YES',
|
||||
0 => 'COM_GETBIBLE_LINKER_NO'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($public_notesArray[$value]) && GetbibleHelper::checkString($public_notesArray[$value]))
|
||||
{
|
||||
return $public_notesArray[$value];
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build an SQL query to load the list data.
|
||||
@ -223,6 +288,40 @@ class GetbibleModelLinkers extends ListModel
|
||||
{
|
||||
$query->where('a.name = ' . $db->quote($db->escape($_name)));
|
||||
}
|
||||
// Filter by Public_tagged_verses.
|
||||
$_public_tagged_verses = $this->getState('filter.public_tagged_verses');
|
||||
if (is_numeric($_public_tagged_verses))
|
||||
{
|
||||
if (is_float($_public_tagged_verses))
|
||||
{
|
||||
$query->where('a.public_tagged_verses = ' . (float) $_public_tagged_verses);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.public_tagged_verses = ' . (int) $_public_tagged_verses);
|
||||
}
|
||||
}
|
||||
elseif (GetbibleHelper::checkString($_public_tagged_verses))
|
||||
{
|
||||
$query->where('a.public_tagged_verses = ' . $db->quote($db->escape($_public_tagged_verses)));
|
||||
}
|
||||
// Filter by Public_notes.
|
||||
$_public_notes = $this->getState('filter.public_notes');
|
||||
if (is_numeric($_public_notes))
|
||||
{
|
||||
if (is_float($_public_notes))
|
||||
{
|
||||
$query->where('a.public_notes = ' . (float) $_public_notes);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.public_notes = ' . (int) $_public_notes);
|
||||
}
|
||||
}
|
||||
elseif (GetbibleHelper::checkString($_public_notes))
|
||||
{
|
||||
$query->where('a.public_notes = ' . $db->quote($db->escape($_public_notes)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
@ -263,6 +362,8 @@ class GetbibleModelLinkers extends ListModel
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.public_tagged_verses');
|
||||
$id .= ':' . $this->getState('filter.public_notes');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ CREATE TABLE IF NOT EXISTS `#__getbible_linker` (
|
||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
||||
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`public_notes` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`public_tagged_verses` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
@ -18,6 +20,8 @@ CREATE TABLE IF NOT EXISTS `#__getbible_linker` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_name` (`name`),
|
||||
KEY `idx_guid` (`guid`),
|
||||
KEY `idx_public_tagged_verses` (`public_tagged_verses`),
|
||||
KEY `idx_public_notes` (`public_notes`),
|
||||
KEY `idx_access` (`access`),
|
||||
KEY `idx_checkout` (`checked_out`),
|
||||
KEY `idx_createdby` (`created_by`),
|
||||
|
3
admin/sql/updates/mysql/2.0.14.sql
Normal file
3
admin/sql/updates/mysql/2.0.14.sql
Normal file
@ -0,0 +1,3 @@
|
||||
ALTER TABLE `#__getbible_linker` ADD `public_notes` TINYINT(1) NOT NULL DEFAULT 0 AFTER `name`;
|
||||
|
||||
ALTER TABLE `#__getbible_linker` ADD `public_tagged_verses` TINYINT(1) NOT NULL DEFAULT 0 AFTER `public_notes`;
|
@ -49,15 +49,19 @@ $componentParams = $this->params; // will be removed just use $this->params inst
|
||||
<div id="getbible_loader" style="display: none;">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_getbible&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('linker.details_above', $this); ?>
|
||||
<div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'linkerTab', array('active' => 'details')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'linkerTab', 'details', JText::_('COM_GETBIBLE_LINKER_DETAILS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('linker.details_left', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('linker.details_right', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
|
@ -78,6 +78,12 @@ $edit = "index.php?option=com_getbible&view=linkers&task=linker.edit";
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->guid); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo JText::_($item->public_tagged_verses); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo JText::_($item->public_notes); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('linker.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
|
@ -20,5 +20,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@ -41,6 +41,12 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_GETBIBLE_LINKER_GUID_LABEL'); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL', 'a.public_tagged_verses', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL', 'a.public_notes', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('searchtools.sort', 'COM_GETBIBLE_LINKER_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
|
||||
|
@ -195,6 +195,46 @@ class GetbibleViewLinkers extends HtmlView
|
||||
JHtml::_('select.options', $this->nameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load Public Tagged Verses batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Set Public Tagged Verses Selection
|
||||
$this->public_tagged_versesOptions = JFormHelper::loadFieldType('linkersfilterpublictaggedverses')->options;
|
||||
// We do some sanitation for Public Tagged Verses filter
|
||||
if (GetbibleHelper::checkArray($this->public_tagged_versesOptions) &&
|
||||
isset($this->public_tagged_versesOptions[0]->value) &&
|
||||
!GetbibleHelper::checkString($this->public_tagged_versesOptions[0]->value))
|
||||
{
|
||||
unset($this->public_tagged_versesOptions[0]);
|
||||
}
|
||||
// Public Tagged Verses Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL').' -',
|
||||
'batch[public_tagged_verses]',
|
||||
JHtml::_('select.options', $this->public_tagged_versesOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load Public Notes batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Set Public Notes Selection
|
||||
$this->public_notesOptions = JFormHelper::loadFieldType('linkersfilterpublicnotes')->options;
|
||||
// We do some sanitation for Public Notes filter
|
||||
if (GetbibleHelper::checkArray($this->public_notesOptions) &&
|
||||
isset($this->public_notesOptions[0]->value) &&
|
||||
!GetbibleHelper::checkString($this->public_notesOptions[0]->value))
|
||||
{
|
||||
unset($this->public_notesOptions[0]);
|
||||
}
|
||||
// Public Notes Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL').' -',
|
||||
'batch[public_notes]',
|
||||
JHtml::_('select.options', $this->public_notesOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,6 +281,8 @@ class GetbibleViewLinkers extends HtmlView
|
||||
'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_GETBIBLE_LINKER_NAME_LABEL'),
|
||||
'a.public_tagged_verses' => JText::_('COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL'),
|
||||
'a.public_notes' => JText::_('COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="4" method="upgrade">
|
||||
<name>COM_GETBIBLE</name>
|
||||
<creationDate>5th August, 2023</creationDate>
|
||||
<creationDate>7th August, 2023</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://getbible.net</authorUrl>
|
||||
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<version>2.0.14</version>
|
||||
<version>2.0.15</version>
|
||||
<description><![CDATA[
|
||||
<h1>Get Bible (v.2.0.14)</h1>
|
||||
<h1>Get Bible (v.2.0.15)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide.
|
||||
|
||||
|
@ -123,6 +123,17 @@ final class Linker
|
||||
return $linker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get GUID of a new Linker
|
||||
*
|
||||
* @return string|null Linker GUID that is new
|
||||
* @since 2.0.1
|
||||
**/
|
||||
public function getNew(): string
|
||||
{
|
||||
return $this->getGuid('linker');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active Linker
|
||||
*
|
||||
|
@ -49,6 +49,24 @@ class Table extends BaseTable implements Tableinterface
|
||||
'store' => NULL,
|
||||
'tab_name' => 'publishing',
|
||||
],
|
||||
'public_tagged_verses' => [
|
||||
'name' => 'public_tagged_verses',
|
||||
'label' => 'COM_GETBIBLE_LINKER_PUBLIC_TAGGED_VERSES_LABEL',
|
||||
'type' => 'radio',
|
||||
'title' => false,
|
||||
'list' => 'linkers',
|
||||
'store' => NULL,
|
||||
'tab_name' => 'Details',
|
||||
],
|
||||
'public_notes' => [
|
||||
'name' => 'public_notes',
|
||||
'label' => 'COM_GETBIBLE_LINKER_PUBLIC_NOTES_LABEL',
|
||||
'type' => 'radio',
|
||||
'title' => false,
|
||||
'list' => 'linkers',
|
||||
'store' => NULL,
|
||||
'tab_name' => 'Details',
|
||||
],
|
||||
],
|
||||
'note' => [
|
||||
'book_nr' => [
|
||||
|
@ -1125,7 +1125,7 @@ class com_getbibleInstallerScript
|
||||
{
|
||||
$rule_length = $db->loadResult();
|
||||
// Check the size of the rules column
|
||||
if ($rule_length <= 44000)
|
||||
if ($rule_length <= 44320)
|
||||
{
|
||||
// Fix the assets table rules column size
|
||||
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` TEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to TEXT by JCB';";
|
||||
@ -1539,7 +1539,7 @@ class com_getbibleInstallerScript
|
||||
echo '<a target="_blank" href="https://getbible.net" title="Get Bible">
|
||||
<img src="components/com_getbible/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 2.0.14 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
<h3>Upgrade to Version 2.0.15 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
|
||||
// Set db if not set already.
|
||||
if (!isset($db))
|
||||
|
@ -200,19 +200,19 @@ class DatabaseManager {
|
||||
}
|
||||
async get(value, key, field = 'guid') {
|
||||
return this.#waitUntilReady().then(() => {
|
||||
if (!this.db) {
|
||||
if (!this.#db) {
|
||||
// If IndexedDB is not available, get value from local storage
|
||||
const item = this.data.find(item => item[field] === value);
|
||||
const item = this.#data.find(item => item[field] === value);
|
||||
return item ? item[key] : undefined;
|
||||
} else {
|
||||
// If IndexedDB is available, get value from the database
|
||||
return new Promise((resolve, reject) => {
|
||||
let transaction = this.db.transaction([this.storeName], "readonly");
|
||||
let store = transaction.objectStore(this.storeName);
|
||||
let transaction = this.#db.transaction([this.#storeName], "readonly");
|
||||
let store = transaction.objectStore(this.#storeName);
|
||||
let request = store.index(field).get(value);
|
||||
request.onsuccess = e => {
|
||||
const item = e.target.result;
|
||||
resolve(item ? item[key] : undefined);
|
||||
resolve(item ? item[key] : undefined);
|
||||
};
|
||||
request.onerror = e => {
|
||||
reject("Error", e.target.error);
|
||||
@ -391,9 +391,8 @@ const isLinkerAuthenticated = async (linker) => {
|
||||
const data = await response.json();
|
||||
if (data.success || data.error) {
|
||||
return data; // return the data object on success
|
||||
} else {
|
||||
throw new Error(data); // throw an error if the request was not successful
|
||||
}
|
||||
return null;
|
||||
};
|
||||
/**
|
||||
* JS Function to revoke linker session
|
||||
@ -522,6 +521,15 @@ const setActiveLinkerOnPage = async (guid) => {
|
||||
for (let i = 0; i < inputs.length; i++) {
|
||||
inputs[i].value = guid;
|
||||
}
|
||||
// get the linker name
|
||||
let name = await linkerManager.get(guid, 'name');
|
||||
if (name) {
|
||||
let nameValues = document.getElementsByClassName('getbible-linker-name-value');
|
||||
// Update the 'textContent' of each name value display
|
||||
for (let i = 0; i < nameValues.length; i++) {
|
||||
nameValues[i].textContent = name;
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* JS Function to set the search url
|
||||
@ -972,4 +980,25 @@ const createGetbileTagDivItem = (id, verse, name, url, canEdit = false, tagged =
|
||||
const removeChildrenElements = (parentId) => {
|
||||
let list = document.querySelector('#' + parentId);
|
||||
list.innerHTML = '';
|
||||
};
|
||||
/**
|
||||
* JS Function for smooth scrolling to
|
||||
*/
|
||||
const smoothScrollTo = (element, offset = 0, duration = 400) => {
|
||||
const startingY = window.pageYOffset;
|
||||
const elementY = window.pageYOffset + element.getBoundingClientRect().top - offset;
|
||||
const diff = elementY - startingY;
|
||||
let start;
|
||||
|
||||
window.requestAnimationFrame(function step(timestamp) {
|
||||
if (!start) start = timestamp;
|
||||
const time = timestamp - start;
|
||||
let percent = Math.min(time / duration, 1);
|
||||
|
||||
window.scrollTo(0, startingY + diff * percent);
|
||||
|
||||
if (time < duration) {
|
||||
window.requestAnimationFrame(step);
|
||||
}
|
||||
});
|
||||
};
|
@ -49,6 +49,7 @@ COM_GETBIBLE_DESCRIPTION="Description"
|
||||
COM_GETBIBLE_DETAILS="Details"
|
||||
COM_GETBIBLE_DIRECTION="Direction"
|
||||
COM_GETBIBLE_DISTRIBUTION_ABBREVIATION="Distribution Abbreviation"
|
||||
COM_GETBIBLE_DO_NOT_FORGET_THIS_SELECTED_VERSE_AS_IT_WILL_BE_NEEDED_TO_OPEN_THIS_NEW_SESSION_IN_THE_FUTURE="Do not forget this selected verse, as it will be needed to open this new session in the future."
|
||||
COM_GETBIBLE_DRAG_AND_DROP_THE_DESIRED_TAG_FROM_THE_AVAILABLE_ONES_TO_THE_ACTIVE_AREA="Drag and drop the desired tag from the available ones to the active area."
|
||||
COM_GETBIBLE_EDIT_NOTE="Edit note"
|
||||
COM_GETBIBLE_EDIT_S="Edit %s"
|
||||
@ -238,11 +239,13 @@ COM_GETBIBLE_WHAT_IS_THIS_HASH_ALL_ABOUT_CLICK_HERE_TO_READ_MORE="What is this H
|
||||
COM_GETBIBLE_WITHOUT_SELECTING_THE_CORRECT_FAVOURITE_VERSEBR_YOU_CANT_PERFORM_THE_INITIAL_ACTION="Without selecting the correct favourite verse,<br />you can't perform the initial action."
|
||||
COM_GETBIBLE_WORDS="Words"
|
||||
COM_GETBIBLE_YOUR_ACTIVE_PERSISTENT_SESSION="Your Active Persistent Session:"
|
||||
COM_GETBIBLE_YOUR_FAVOURITE_VERSE_SELECTION="Your favourite verse selection"
|
||||
COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_AND_FAVOURITE_VERSE_PROVIDE_YOU_EXCLUSIVE_ACCESS_TO_EDIT_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_THINK_OF_YOUR_PERSISTENT_SESSION_KEY_AS_A_USERNAME_AND_YOUR_FAVOURITE_VERSE_AS_A_PASSWORD_THEREFORE_ENSURE_YOUR_FAVOURITE_VERSE_IS_KEPT_PRIVATE="Your persistent session key and favourite verse provide you exclusive access to edit your <span class="getbible-activity-notes-and-tags">notes and tags</span>. Think of your persistent session key as a username and your favourite verse as a password. Therefore, ensure your favourite verse is kept private."
|
||||
COM_GETBIBLE_YOUR_PERSISTENT_SESSION_KEY_TOGETHER_WITH_YOUR_FAVOURITE_VERSE_AUTHENTICATES_YOU_IT_LINKS_TO_ALL_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN_IN_THE_BIBLE_YOU_CAN_SHARE_IT_WITH_LOVED_ONES_SO_THEY_CAN_SEE_YOUR_SPAN_CLASSGETBIBLEACTIVITYNOTESANDTAGSNOTES_AND_TAGSSPAN="Your persistent session key, together with your favourite verse, authenticates you. It links to all your <span class="getbible-activity-notes-and-tags">notes and tags</span> in the Bible. You can share it with loved ones so they can see your <span class="getbible-activity-notes-and-tags">notes and tags</span>."
|
||||
COM_GETBIBLE_YOUR_SEARCH_DIDNT_YIELD_ANY_RESULTS_PLEASE_TYPE_A_DIFFERENT_KEYWORD_OR_PHRASE_INTO_THE_SEARCH_BOX_AND_PRESS_ENTER_TO_TRY_AGAIN="Your search didn't yield any results. Please type a different keyword or phrase into the search box and press [ENTER] to try again!"
|
||||
COM_GETBIBLE_YOU_ARE_ABOUT_TO_INITIATE_THE_INSTALLATION_PROCESS_FOR_THIS_TRANSLATION_PLEASE_NOTE_THIS_PROCEDURE_IS_QUITE_EXTENSIVE_AND_MAY_TAKE_A_SIGNIFICANT_AMOUNT_OF_TIME_TO_COMPLETE_DEPENDING_ON_YOUR_NETWORK_SPEED_IT_COULD_RANGE_FROM_SEVERAL_MINUTES_TO_A_FEW_HOURS_DURING_THIS_PERIOD_IT_IS_ESSENTIAL_THAT_YOU_DO_NOT_NAVIGATE_AWAY_FROM_THIS_PAGE_CLOSE_THE_BROWSER_OR_SHUT_DOWN_YOUR_COMPUTER_AS_THIS_COULD_INTERRUPT_THE_INSTALLATION_PROCESS_PLEASE_ENSURE_YOU_HAVE_A_STABLE_INTERNET_CONNECTION_AND_SUFFICIENT_TIME_BEFORE_PROCEEDING_WE_RECOMMEND_INITIATING_THIS_WHEN_YOU_DO_NOT_REQUIRE_IMMEDIATE_USE_OF_YOUR_DEVICE_ARE_YOU_SURE_YOU_WANT_TO_START_THE_INSTALLATION_NOW="You are about to initiate the installation process for this translation. Please note, this procedure is quite extensive and may take a significant amount of time to complete, depending on your network speed. It could range from several minutes to a few hours. During this period, it is essential that you do not navigate away from this page, close the browser or shut down your computer as this could interrupt the installation process. Please ensure you have a stable internet connection and sufficient time before proceeding. We recommend initiating this when you do not require immediate use of your device. Are you sure you want to start the installation now?"
|
||||
COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_ANOTHER_PERSISTENT_SESSION_KEY_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="You are about to load another persistent session key, are you sure you would like to continue?"
|
||||
COM_GETBIBLE_YOU_ARE_ABOUT_TO_LOAD_A_BNEW_PERSISTENT_SESSIONB_LINKED_TO_THIS_FAVOURITE_VERSE="You are about to load a <b>NEW Persistent Session</b> linked to this favourite verse"
|
||||
COM_GETBIBLE_YOU_ARE_ABOUT_TO_REMOVE_THE_ACTIVE_PERSISTENT_SESSION="You are about to remove the active persistent session."
|
||||
COM_GETBIBLE_YOU_ARE_ABOUT_TO_REMOVE_THIS_TAG_ENTIRELY_THIS_PROCESS_WILL_ALSO_DISCONNECT_THIS_TAG_FROM_ALL_VERSES_MEANING_THAT_IT_WILL_NO_LONGER_EXIST_IN_ANY_CONTEXT="You are about to remove this tag entirely. This process will also disconnect this tag from all verses, meaning that it will no longer exist in any context."
|
||||
COM_GETBIBLE_YOU_CAN_ADD_IT_HERE_TO_LOAD_YOUR_PREVIOUS_SESSION="You can add it here to load your previous session."
|
||||
|
87
site/layouts/getbiblefavouriteverse.php
Normal file
87
site/layouts/getbiblefavouriteverse.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package getBible.net
|
||||
|
||||
@created 3rd December, 2015
|
||||
@author Llewellyn van der Merwe <https://getbible.net>
|
||||
@git Get Bible <https://git.vdm.dev/getBible>
|
||||
@github Get Bible <https://github.com/getBible>
|
||||
@support Get Bible <https://git.vdm.dev/getBible/support>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die('Restricted access');
|
||||
|
||||
// chapters
|
||||
$chapters = array_map( function ($item) {
|
||||
return (object) ['key' => $item, 'value' => $item];
|
||||
}, range(1, 150));
|
||||
// verses
|
||||
$verses = array_map( function ($item) {
|
||||
return (object) ['key' => $item, 'value' => $item];
|
||||
}, range(1, 180));
|
||||
|
||||
?>
|
||||
<div class="uk-alert-warning" id="getbible_favourite_error" uk-alert style="display:none">
|
||||
<p id="getbible_favourite_error_message"></p>
|
||||
</div>
|
||||
<p class="uk-text-emphasis uk-text-center">
|
||||
<?php echo JText::_('COM_GETBIBLE_YOU_SHOULD_SELECT_ONE_OF_BYOUR_FAVOURITEB_VERSES'); ?>
|
||||
</p>
|
||||
<p class="uk-text-muted uk-text-center">
|
||||
<?php echo JText::_('COM_GETBIBLE_THIS_VERSE_IN_COMBINATION_WITH_YOUR_ISESSION_KEYI_WILL_BE_USED_TO_AUTHENTICATE_YOU_IN_THE_FUTURE'); ?>
|
||||
</p>
|
||||
<div class="uk-child-width-expand uk-text-center" uk-grid>
|
||||
<div>
|
||||
<div class="uk-card">
|
||||
<?php echo JLayoutHelper::render('selectbox', [
|
||||
'id' => 'getbible_favourite_book',
|
||||
'label' => JText::_('COM_GETBIBLE_BOOKS'),
|
||||
'options' => $displayData['book_options'],
|
||||
'default' => $displayData['book_default']
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card">
|
||||
<?php echo JLayoutHelper::render('selectbox', [
|
||||
'id' => 'getbible_favourite_chapter',
|
||||
'label' => JText::_('COM_GETBIBLE_CHAPTERS'),
|
||||
'options' => $chapters,
|
||||
'default' => $displayData['chapter_default']
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card">
|
||||
<?php echo JLayoutHelper::render('selectbox', [
|
||||
'id' => 'getbible_favourite_verse',
|
||||
'label' => JText::_('COM_GETBIBLE_VERSES'),
|
||||
'options' => $verses,
|
||||
'default' => $displayData['verse_default']
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="uk-text-emphasis uk-text-center">
|
||||
<?php echo JText::_('COM_GETBIBLE_THIS_IS_CURRENTLY_THE_ACTIVE_SESSION_KEY'); ?>
|
||||
</p>
|
||||
<div class="uk-child-width-expand uk-text-center" uk-grid>
|
||||
<?php echo JLayoutHelper::render('inputbox', [
|
||||
'id' => 'getbible_favourite_linker',
|
||||
'class_other' => 'getbible-linker-guid-input uk-text-center',
|
||||
'label' => JText::_('COM_GETBIBLE_SESSION_KEY'),
|
||||
'class_other_label' => 'getbible-linker-name-value',
|
||||
'placeholder' => JText::_('COM_GETBIBLE_AUTO_GENERATED')
|
||||
]); ?>
|
||||
</div>
|
||||
<p class="uk-text-muted">
|
||||
<?php echo JText::_('COM_GETBIBLE_SHOULD_YOU_HAVE_BANOTHER_SESSION_KEYB_FROM_A_PREVIOUS_SESSION'); ?><br />
|
||||
<?php echo JText::_('COM_GETBIBLE_YOU_CAN_ADD_IT_HERE_TO_LOAD_YOUR_PREVIOUS_SESSION'); ?>
|
||||
</p>
|
@ -356,11 +356,7 @@ if (tmp !== null && typeof tmp.target !== 'undefined') {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var element = document.getElementById('getbible-verse-<?php echo $this->verses->first; ?>');
|
||||
if(element) {
|
||||
var rect = element.getBoundingClientRect();
|
||||
window.scrollTo({
|
||||
top: rect.top + window.scrollY - 40, // Subtracting 40px offset
|
||||
behavior: "smooth"
|
||||
});
|
||||
smoothScrollTo(element, 40);
|
||||
}
|
||||
});
|
||||
<?php endif; ?>
|
||||
|
@ -18,40 +18,20 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// set content
|
||||
$options = array_map( function ($item) {
|
||||
return (object) ['key' => $item->nr, 'value' => $item->name];
|
||||
// set book
|
||||
$favourite_verse['book_options'] = array_map( function ($item) {
|
||||
return (object) ['key' => (int) $item->nr, 'value' => $item->name];
|
||||
}, $this->books);
|
||||
$content = '<div class="uk-alert-success" id="getbible_favourite_error" uk-alert style="display:none"><p id="getbible_favourite_error_message"></p></div>';
|
||||
$content .= '<p class="uk-text-emphasis uk-text-center">' . JText::_('COM_GETBIBLE_YOU_SHOULD_SELECT_ONE_OF_BYOUR_FAVOURITEB_VERSES') . '</p>';
|
||||
$content .= '<p class="uk-text-muted uk-text-center">' . JText::_('COM_GETBIBLE_THIS_VERSE_IN_COMBINATION_WITH_YOUR_ISESSION_KEYI_WILL_BE_USED_TO_AUTHENTICATE_YOU_IN_THE_FUTURE') . '</p>';
|
||||
$content .= '<div class="uk-child-width-expand uk-text-center" uk-grid>';
|
||||
$content .= '<div><div class="uk-card">';
|
||||
$content .= JLayoutHelper::render('selectbox', ['id' => 'getbible_favourite_book', 'label' => JText::_('COM_GETBIBLE_BOOKS'), 'options' => $options, 'default' => $this->chapter->book_nr]);
|
||||
$content .= '</div></div>';
|
||||
$options = array_map( function ($item) {
|
||||
return (object) ['key' => $item, 'value' => $item];
|
||||
}, range(1, 150));
|
||||
$content .= '<div><div class="uk-card">';
|
||||
$content .= JLayoutHelper::render('selectbox', ['id' => 'getbible_favourite_chapter', 'label' => JText::_('COM_GETBIBLE_CHAPTERS'), 'options' => $options, 'default' => $this->chapter->chapter]);
|
||||
$content .= '</div></div>';
|
||||
$options = array_map( function ($item) {
|
||||
return (object) ['key' => $item, 'value' => $item];
|
||||
}, range(1, 176));
|
||||
$content .= '<div><div class="uk-card">';
|
||||
$content .= JLayoutHelper::render('selectbox', ['id' => 'getbible_favourite_verse', 'label' => JText::_('COM_GETBIBLE_VERSES'), 'options' => $options, 'default' => (string) $this->verses->first]);
|
||||
$content .= '</div></div>';
|
||||
$content .= '</div>';
|
||||
$content .= '<p class="uk-text-emphasis uk-text-center">' . JText::_('COM_GETBIBLE_THIS_IS_CURRENTLY_THE_ACTIVE_SESSION_KEY') . '</p>';
|
||||
$content .= '<div class="uk-child-width-expand uk-text-center" uk-grid>';
|
||||
$content .= JLayoutHelper::render('inputbox', ['id' => 'getbible_favourite_linker', 'class_other' => 'getbible-linker-guid-input uk-text-center', 'label' => JText::_('COM_GETBIBLE_SESSION_KEY'), 'placeholder' => JText::_('COM_GETBIBLE_AUTO_GENERATED')]);
|
||||
$content .= '</div>';
|
||||
$content .= '<p class="uk-text-muted">' . JText::_('COM_GETBIBLE_SHOULD_YOU_HAVE_BANOTHER_SESSION_KEYB_FROM_A_PREVIOUS_SESSION') . '<br />' . JText::_('COM_GETBIBLE_YOU_CAN_ADD_IT_HERE_TO_LOAD_YOUR_PREVIOUS_SESSION') . '</p>';
|
||||
|
||||
$favourite_verse['book_default'] = (int) $this->chapter->book_nr;
|
||||
// set chapter
|
||||
$favourite_verse['chapter_default'] = (int) $this->chapter->chapter;
|
||||
// set verse
|
||||
$favourite_verse['verse_default'] = (int) $this->verses->first;
|
||||
// set buttons
|
||||
$buttons = [
|
||||
['id' => 'getbible-select-favourite-verse', 'name' => JText::_('COM_GETBIBLE_SELECT'), 'class' => 'uk-button uk-button-default uk-width-2-3'],
|
||||
['id' => 'getbible-cancel-favourite-verse', 'close' => true, 'name' => JText::_('COM_GETBIBLE_CANCEL'), 'class' => 'uk-button uk-button-danger uk-width-1-3']
|
||||
['id' => 'getbible-new-favourite-verse-session', 'name' => JText::_('COM_GETBIBLE_NEW'), 'class' => 'uk-button uk-button-default uk-width-1-4'],
|
||||
['id' => 'getbible-select-favourite-verse', 'name' => JText::_('COM_GETBIBLE_SELECT'), 'class' => 'uk-button uk-button-default uk-width-2-4'],
|
||||
['id' => 'getbible-cancel-favourite-verse', 'close' => true, 'name' => JText::_('COM_GETBIBLE_CANCEL'), 'class' => 'uk-button uk-button-danger uk-width-1-4']
|
||||
];
|
||||
|
||||
|
||||
@ -61,7 +41,7 @@ $buttons = [
|
||||
'header' => JText::_('COM_GETBIBLE_FAVOURITE_VERSE'),
|
||||
'header_class_other' => 'uk-text-center',
|
||||
'close' => true,
|
||||
'content' => $content,
|
||||
'content' => JLayoutHelper::render('getbiblefavouriteverse', $favourite_verse),
|
||||
'buttons_class' => 'uk-button-group uk-width-1-1',
|
||||
'buttons_id' => 'getbible-favourite-buttons',
|
||||
'buttons' => $buttons
|
||||
@ -76,6 +56,8 @@ const favouriteVerse = document.getElementById('getbible_favourite_verse');
|
||||
const favouriteLinker = document.getElementById('getbible_favourite_linker');
|
||||
const favouriteSelection = document.getElementById('getbible-select-favourite-verse');
|
||||
const cancelFavouriteSelection = document.getElementById('getbible-cancel-favourite-verse');
|
||||
const newFavouriteSession = document.getElementById('getbible-new-favourite-verse-session');
|
||||
const favouriteBooks = <?php echo json_encode($favourite_verse['book_options']); ?>;
|
||||