File indexing completed on 2024-12-29 05:24:44
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 0023 if (false === isset($this->params)) { 0024 $this->params = array(); 0025 } 0026 $serverUrl = $this->serverUrl(); 0027 ?> 0028 <span class="glyphicon glyphicon-refresh spinning" style="display: none"></span> 0029 <ul class="pagination pagination-sm" style="margin: 0;padding:0;"> 0030 <li class="<?php echo isset($this->previous) ? '' : 'disabled' ?>"> 0031 <a class="<?php echo isset($this->previous) ? 'paginationPartial' : '' ?>" 0032 href="<?php echo isset($this->previous) ? $serverUrl . $this->url(array_merge($this->params, array('page' => $this->previous))) : 'javascript:;'; ?>"> 0033 <span class="glyphicon glyphicon-chevron-left"></span> 0034 </a> 0035 </li> 0036 0037 <?php foreach ($this->pagesInRange as $page): ?> 0038 <?php if ($page != $this->current): ?> 0039 <li><a class="ajaxPartial paginationPartial" href="<?php echo $serverUrl . $this->url(array_merge($this->params, array('page' => $page))); ?>"><?php echo $page; ?></a></li> 0040 <?php else: ?> 0041 <li class="active"><a class="paginationPartial" href="<?php echo $serverUrl . $this->url(array_merge($this->params, array('page' => $page))); ?>"><?php echo $page; ?></a> 0042 <?php endif; ?> 0043 <?php endforeach; ?> 0044 0045 <li class="<?php echo isset($this->next) ? '' : 'disabled' ?>"> 0046 <a class="<?php echo isset($this->next) ? 'paginationPartial' : ''?>" 0047 href="<?php echo isset($this->next) ? $serverUrl . $this->url(array_merge($this->params, array('page' => $this->next))) : 'javascript:;'; ?>"> 0048 <span class="glyphicon glyphicon-chevron-right"></span> 0049 </a> 0050 </li> 0051 </ul> 0052 <script type="application/javascript"> 0053 $(document).ready(function () { 0054 $('body').off('click', 'ul.pagination a.paginationPartial').on('click', 'ul.pagination a.paginationPartial',function(event) { 0055 event.preventDefault(); 0056 var target = '<?=$this->dom_target?>'; 0057 var url = $(this).attr("href") + ' ' + target + ' > *'; 0058 $('html, body').scrollTop($(target).offset().top); 0059 $('.glyphicon.glyphicon-refresh.spinning').show(); 0060 $(target).load(url, function (response, status, xhr) { 0061 if (status == "error") { 0062 $(target).empty().html('Service is temporarily unavailable. Our engineers are working quickly to resolve this issue. <br/>Find out why you may have encountered this error.'); 0063 } 0064 ProductDetailCommentTooltip.setup(); 0065 myProducts.setup(); 0066 0067 TagingLoopMyProductsSelect2.setup(); 0068 }); 0069 return false; 0070 }); 0071 }); 0072 </script>