Nextrek
@ 1072
Nextrek / Web / Smartcharging_search / js / template.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
var template = { getCommentContent : function(){ //in sospeso var content = '<div id="content">'+ '<div id="siteNotice">'+ '</div>'+ /*'<h3 id="firstHeading" class="firstHeading">Scrivi una recensione</h3>'+*/ /*'<span class="glyphicon glyphicon-remove"></span>' +*/ '<div id="bodyContent">'+ '<div id="star">' + '<table class="star-table">' + '<tbody>' + '<tr>' + '<td class="star-1">' + '<span class="glyphicon glyphicon-star-empty"></span>' + '</td>' + '<td class="star-2">' + '<span class="glyphicon glyphicon-star-empty"></span>' + '</td>' + '<td class="star-3">' + '<span class="glyphicon glyphicon-star-empty"></span>' + '</td>' + '<td class="star-4">' + '<span class="glyphicon glyphicon-star-empty"></span>' + '</td>' + '<td class="star-5">' + '<span class="glyphicon glyphicon-star-empty"></span>' + '</td>' + '</tr>' + '</tbody>' + '</table>' + '</div>' + '<div class="text-comment">' + '<textarea placeholder="Inserisci Commento" style="min-width: 20em; min-height: 20em;"></textarea>' + '</div>'+ '<div>' + '<span class="glyphicon glyphicon-ok" onclick=""></span>' + '</div>' + '</div>'+ '</div>'; return content; }, getListComments : function(comment){ var html = '<div class="comment" id="' + comment.id + '">' + '<div class="comment-container">'; if(comment.user_avatar && comment.user_avatar != "" && checkValidationFile(comment.user_avatar) === true){ html += '<img class="user-avatar" src="' + comment.user_avatar + '" />'; } else { html += '<img class="user-avatar-default" src="images/default-user.png" />'; } html += '<div id="rating">'+ rating(comment.voto) + '</div>' + '<div><p style="margin: 0.2em 0 0 0;">' + getText("Da", document.documentElement.lang) + ' <b>' + comment.username + '</b></p></div>' + '<div class="date-comment">' + formatDate(comment.data) + '</div>' + '<div class="text-comment"><p style="margin: 0; padding: 1em 0 0 0;">' + comment.descrizione + '</p></div>' + '</div>' + '</div>'; return html; }, getNoComments: function(){ return '<div class="nocomment">' + '<p align="center">'+ getText("Nessun commento per questo locale", document.documentElement.lang) +'</p>' '</div>'; } }; |