Skip to content

Commit

Permalink
v1.0.3.6 pvs working all booklists
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercreagh committed Jan 23, 2023
1 parent 4575f48 commit f7b796a
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 7 deletions.
42 changes: 41 additions & 1 deletion src/com_xbbooks/site/views/booklist/tmpl/compact.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*******
* @package xbBooks
* @filesource site/views/booklist/tmpl/compact.php
* @version 1.0.3.1 7th January 2023
* @version 1.0.3.6 23rd January 2023
* @author Roger C-O
* @copyright Copyright (c) Roger Creagh-Osborne, 2021
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -32,6 +32,10 @@
require_once JPATH_COMPONENT.'/helpers/route.php';

?>
<style type="text/css" media="screen">
.xbpvmodal .modal-body {max-height: calc(100vh - 190px); }
.xbpvmodal .modal-body iframe { max-height:calc(100vh - 270px);}
</style>
<div class="xbculture ">
<?php if(($this->header['showheading']) || ($this->header['title'] != '') || ($this->header['text'] != '')) {
echo XbcultureHelper::sitePageheader($this->header);
Expand Down Expand Up @@ -102,6 +106,7 @@
<p class="xbtitle">
<a href="<?php echo Route::_(XbbooksHelperRoute::getBookLink($item->id)) ;?>" >
<b><?php echo $this->escape($item->title); ?></b></a>
&nbsp;<a href="" data-toggle="modal" data-target="#ajax-bpvmodal" onclick="window.pvid=<?php echo $item->id; ?>;"><i class="far fa-eye"></i></a>
<?php if (!empty($item->subtitle)) :?>
<br /><span class="xb09 xbnorm" style="padding-left:15px;"><?php echo $this->escape($item->subtitle); ?></span>
<?php endif; ?>
Expand Down Expand Up @@ -179,4 +184,39 @@
</div>
<div class="clearfix"></div>
<p><?php echo XbcultureHelper::credit('xbBooks');?></p>
<script>
jQuery(document).ready(function(){
//for preview modals
jQuery('#ajax-ppvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalppv&tmpl=component');
})
jQuery('#ajax-ppvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-bpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalbpv&tmpl=component');
})
jQuery('#ajax-bpvmodal').on('hidden', function () {
document.location.reload(true);
})
});
</script>
<!-- preview modal windows -->
<div class="modal fade xbpvmodal" id="ajax-ppvmodal" style="max-width:800px">
<div class="modal-dialog">
<div class="modal-content">
<!-- Ajax content will be loaded here -->
</div>
</div>
</div>
<div class="modal fade xbpvmodal" id="ajax-bpvmodal" style="max-width:1000px">
<div class="modal-dialog">
<div class="modal-content">
<!-- Ajax content will be loaded here -->
</div>
</div>
</div>


44 changes: 39 additions & 5 deletions src/com_xbbooks/site/views/booklist/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*******
* @package xbBooks
* @filesource site/views/booklist/tmpl/default.php
* @version 1.0.3.6 20th January 2023
* @version 1.0.3.6 23rd January 2023
* @author Roger C-O
* @copyright Copyright (c) Roger Creagh-Osborne, 2021
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -47,7 +47,8 @@

?>
<style type="text/css" media="screen">
.xbpvmodal .modal-body iframe { max-height:calc(100vh - 190px);}
.xbpvmodal .modal-body {max-height: calc(100vh - 190px); }
.xbpvmodal .modal-body iframe { max-height:calc(100vh - 270px);}
</style>
<div class="xbculture ">
<?php if(($this->header['showheading']) || ($this->header['title'] != '') || ($this->header['text'] != '')) {
Expand Down Expand Up @@ -153,6 +154,7 @@
<p class="xbtitle">
<a href="<?php echo Route::_(XbbooksHelperRoute::getBookLink($item->id)) ;?>" >
<b><?php echo $this->escape($item->title); ?></b></a>
&nbsp;<a href="" data-toggle="modal" data-target="#ajax-bpvmodal" onclick="window.pvid=<?php echo $item->id; ?>;"><i class="far fa-eye"></i></a>
<?php if (!empty($item->subtitle)) :?>
<br /><span class="xb09"><?php echo $this->escape($item->subtitle); ?></span>
<?php endif; ?>
Expand Down Expand Up @@ -250,6 +252,7 @@
<?php echo HtmlHelper::date($rev->rev_date , 'd M Y'); ?>
</span>
<?php if (!empty($rev->summary)) echo '</a>'; ?>
&nbsp;<a href="" data-toggle="modal" data-target="#ajax-rpvmodal" onclick="window.pvid=<?php echo $rev->id; ?>;"><i class="far fa-eye"></i></a>
</div>
<?php endforeach; ?>
<?php endif; ?>
Expand Down Expand Up @@ -309,20 +312,51 @@
<p><?php echo XbcultureHelper::credit('xbBooks');?></p>
<script>
jQuery(document).ready(function(){
//for preview modal
//for preview modals
jQuery('#ajax-ppvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('index.php?option=com_xbbooks&view=books&layout=modalppv&tmpl=component');
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalppv&tmpl=component');
})
jQuery('#ajax-ppvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-bpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalbpv&tmpl=component');
})
jQuery('#ajax-bpvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-rpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalrpv&tmpl=component');
})
jQuery('#ajax-rpvmodal').on('hidden', function () {
document.location.reload(true);
})
});
</script>
<!-- preview modal window -->
<!-- preview modal windows -->
<div class="modal fade xbpvmodal" id="ajax-ppvmodal" style="max-width:800px">
<div class="modal-dialog">
<div class="modal-content">
<!-- Ajax content will be loaded here -->
</div>
</div>
</div>
<div class="modal fade xbpvmodal" id="ajax-bpvmodal" style="max-width:1000px">
<div class="modal-dialog">
<div class="modal-content">
<!-- Ajax content will be loaded here -->
</div>
</div>
</div>
<div class="modal fade xbpvmodal" id="ajax-rpvmodal" style="max-width:1000px">
<div class="modal-dialog">
<div class="modal-content">
<!-- Ajax content will be loaded here -->
</div>
</div>
</div>


17 changes: 16 additions & 1 deletion src/com_xbbooks/site/views/booklist/tmpl/detailslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*******
* @package xbBooks
* @filesource site/views/booklist/tmpl/detailslist.php
* @version 1.0.3.6 19th January 2023
* @version 1.0.3.6 23rd January 2023
* @author Roger C-O
* @copyright Copyright (c) Roger Creagh-Osborne, 2021
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -311,22 +311,37 @@
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalppv&tmpl=component');
})
jQuery('#ajax-ppvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-gpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalgpv&tmpl=component');
})
jQuery('#ajax-gpvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-cpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalcpv&tmpl=component');
})
jQuery('#ajax-cpvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-bpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalbpv&tmpl=component');
})
jQuery('#ajax-bpvmodal').on('hidden', function () {
document.location.reload(true);
})
jQuery('#ajax-rpvmodal').on('show', function () {
// Load view vith AJAX
jQuery(this).find('.modal-content').load('/index.php?option=com_xbbooks&view=booklist&layout=modalrpv&tmpl=component');
})
jQuery('#ajax-rpvmodal').on('hidden', function () {
document.location.reload(true);
})
});
</script>
<!-- preview modal windows -->
Expand Down

0 comments on commit f7b796a

Please sign in to comment.