File indexing completed on 2024-09-22 05:17:46
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 * Created: 31.05.2017 0023 */ 0024 0025 $helperPrintDate = new Default_View_Helper_PrintDate(); 0026 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl(); 0027 $helperImage = new Default_View_Helper_Image(); 0028 $helpMemberUrl = new Default_View_Helper_BuildMemberUrl(); 0029 0030 0031 ?> 0032 0033 <link href="/theme/backend/lib/jquery-ui/themes/smoothness/jquery-ui.min.css" rel="stylesheet"> 0034 <link href="/theme/backend/lib/jtable/themes/jqueryui/jtable_jqueryui.min.css" rel="stylesheet"> 0035 <script src="/theme/backend/lib/jquery-ui/jquery-ui.min.js"></script> 0036 <script src="/theme/backend/lib/jtable/jquery.jtable.min.js"></script> 0037 0038 <style type="text/css"> 0039 img.pimage{ 0040 float: left; 0041 width: 100%; 0042 border: 1px solid #dbdbdb; 0043 border-radius: 999px; 0044 width: 45px; 0045 height: 45px; 0046 } 0047 0048 div.jtable-main-container table.jtable tbody > tr > td{ 0049 vertical-align: top; 0050 border-left:0px; 0051 border-right:0px; 0052 font-size: small; 0053 } 0054 div.jtable-main-container table.jtable{ 0055 border: 0px; 0056 } 0057 div.jtable-main-container table.jtable th{ 0058 border: 0px; 0059 background: none; 0060 font-weight: bold; 0061 } 0062 0063 #products-wrapper{ 0064 padding-bottom: 20px; 0065 } 0066 0067 0068 #explore-content .ui-state-default 0069 { 0070 background: none; 0071 border: 0px; 0072 0073 } 0074 0075 0076 #explore-content div.jtable-main-container table.jtable .rating{ 0077 width:80px; 0078 margin-left:140px; 0079 padding-top:20px; 0080 } 0081 #explore-content div.jtable-main-container table.jtable .tooltipuser{ 0082 color: #2673b0; 0083 cursor: pointer; 0084 } 0085 0086 a.profileimagelink{ 0087 cursor: pointer; 0088 } 0089 0090 0091 0092 0093 </style> 0094 <main id="explore-content"> 0095 0096 0097 <section class="wrapper" id="products-wrapper" > 0098 0099 <div id="TableContainer"></div> 0100 </section> 0101 0102 </main> 0103 <div class="tooltip_templates" style="display: none"> 0104 <span id="tooltip_content"> 0105 <i class="fa fa-spinner"></i> 0106 </span> 0107 </div> 0108 <script type="text/javascript"> 0109 $(document).ready(function () { 0110 0111 $("#dialog-form").dialog({ 0112 autoOpen: false, 0113 //height: 350, 0114 width: 600, 0115 modal: true, 0116 buttons: { 0117 Close: function () { 0118 $(this).dialog("close"); 0119 } 0120 } 0121 }); 0122 0123 0124 $('#TableContainer').jtable({ 0125 jqueryuiTheme: true, 0126 paging: true, 0127 sorting: true, 0128 actions: { 0129 listAction: '/backend/letteravatar/list' 0130 }, 0131 fields: { 0132 member_id: { 0133 title: 'member_id', 0134 key: true, 0135 create: false, 0136 edit: false, 0137 list: true , 0138 display: function (data) { 0139 0140 var html = ' <a href="/member/' + data.record.member_id + '/" target="_blank">'+data.record.member_id+'</a>' ; 0141 return html; 0142 0143 } 0144 }, 0145 username: { 0146 title: 'username', 0147 create: false, 0148 edit: false, 0149 list: true 0150 }, 0151 is_auto_generated: { 0152 title: 'is_auto_generated', 0153 create: false, 0154 edit: false, 0155 list: true 0156 }, 0157 profile_image_url: { 0158 title: 'Profile Image', 0159 create: false, 0160 edit: false, 0161 list: true, 0162 width: '10%', 0163 display: function (data) { 0164 if (data.record.profile_image_url) { 0165 var html = ' <a class="profileimagelink" data-memberid="'+data.record.member_id+'" ><img class="pimage" src='+data.record.profile_image_url+' /></a>' ; 0166 return html; 0167 } 0168 } 0169 } 0170 } 0171 }); 0172 0173 /* 0174 $('body').on("click", 'a.profileimagelink', function (event) { 0175 event.preventDefault(); 0176 event.stopImmediatePropagation(); 0177 var currentklick =$(this); 0178 var mid = $(this).attr('data-memberid'); 0179 0180 jQuery.ajax({ 0181 data: {'member_id': mid}, 0182 url: '/backend/letteravatar/update', 0183 type: 'post', 0184 error: function (jqXHR, textStatus, errorThrown) { 0185 alert('error!'); 0186 return false; 0187 }, 0188 success: function (results) { 0189 //$('#dialog-form').empty().html(results.Message).dialog('open'); 0190 currentklick.append('<span> done </span>'); 0191 return false; 0192 } 0193 }); 0194 return false; 0195 }); 0196 */ 0197 0198 0199 0200 $('#TableContainer').jtable('load',{jtPageSize:10}); 0201 }); 0202 </script> 0203 0204