CINXE.COM

Widgets - UC Davis Rehabilitation Hospital

<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Widgets - UC Davis Rehabilitation Hospital</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://static-ui-public.reputation.com/libcss/lib.ce435a45.css"> <link rel="stylesheet" href="https://static-ui-public.reputation.com/css/widgets/widgets-app.de3b3073.css"> <script src="https://cdn.levelaccess.net/accessjs/YW1wMTMwNjg/access.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> </head> <body> <script> var $body = $('body'), widgetTypeIds = {"AamcoReviews":"aamco-reviews","Faq":"faq","Inbox2":"inbox2","Locators":"locators","Reviews":"reviews","Score":"score","Summary":"summary","SurveySummary":"survey-summary","Surveys3":"surveys3","Surveys3Embedded":"surveys3-embedded","Surveys3FeedbackButton":"surveys3-feedback-button","Surveys3NpsScore":"surveys3-nps-score","Surveys3Summary":"surveys3-summary","Testimonial":"testimonial"}, widget = {"id":"66732dbe09f0dc1b5db41996","name":"UC Davis","widgetTypeID":"summary","parameters":{"filterValues":"4093","sources":"GOOGLE_PLACES","filterName":"location","mode":"client","view":"rating-only","width":"360","ratingBuckets":"","widthUnits":"px","height":"150"},"locationID":null,"createdByID":39298940,"title":"Widgets - UC Davis Rehabilitation Hospital","noData":false,"locale":"en_US"}, widgetHeight = widget.parameters.height ? parseInt(widget.parameters.height, 10) : $(window).height(), commentMaxLength = 300, offset = 30, $widget, env = '', region = 'us'; if (widget) { if (widget.widgetTypeID === widgetTypeIds.Surveys3Embedded) { $body.css('overflow', 'hidden'); } else if (widget.widgetTypeID === widgetTypeIds.Surveys3FeedbackButton) { $body.add($body.parent('html')).css({ margin: 0, padding: 0, background: 'transparent' }); } else { $body.css('padding', '10px'); if (widget.widgetTypeID === widgetTypeIds.Score) { $body.css('overflow-x', 'hidden'); } } } // Insert widget html $body.empty().append(htmlDecode('&lt;div class=&#34;r4e-widget summary client&#34;&gt; &lt;div itemscope itemtype=&#34;http://schema.org/Organization&#34;&gt; &lt;meta itemprop=&#34;name&#34; content=&#34;UC Davis Rehabilitation Hospital&#34;&gt; &lt;div class=&#34;rating-only&#34; itemprop=&#34;aggregateRating&#34; itemscope itemtype=&#34;http://schema.org/AggregateRating&#34;&gt; &lt;div class=&#34;rating&#34;&gt; &lt;div class=&#34;rating-value&#34;&gt; &lt;span class=&#34;value&#34; itemprop=&#34;ratingValue&#34;&gt;4.6&lt;/span&gt;&lt;span class=&#34;max&#34;&gt; /5&lt;/span&gt; &lt;/div&gt; &lt;div class=&#34;stars-container&#34;&gt; &lt;div class=&#34;stars empty&#34;&gt; &lt;div class=&#34;stars full&#34; style=&#34;width:92%;&#34;&gt; &lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;count&#34;&gt; &lt;div class=&#34;value&#34;&gt; &lt;meta itemprop=&#34;reviewCount&#34; content=&#34;33&#34;&gt; &lt;span&gt;33&lt;/span&gt;&lt;span&gt; reviews&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/div&gt;')); if (widget) { widget._widgetTypeIds = widgetTypeIds; if (widget.widgetTypeID === widgetTypeIds.Surveys3FeedbackButton) { // dynamic dimensions based on content $widget = $body.find('.r4e-widget'); widget.parameters._clientWidth = $widget.outerWidth(); widget.parameters._clientHeight = $widget.outerHeight(); } else { if (widget.widgetTypeID !== widgetTypeIds.Inbox) { // Apply widget styles $body.css('background-color', widget.parameters.backgroundColor); $body.css('color', widget.parameters.color); } } if (widget.widgetTypeID === widgetTypeIds.Inbox) { widget.html = htmlDecode('&lt;div class=&#34;r4e-widget summary client&#34;&gt; &lt;div itemscope itemtype=&#34;http://schema.org/Organization&#34;&gt; &lt;meta itemprop=&#34;name&#34; content=&#34;UC Davis Rehabilitation Hospital&#34;&gt; &lt;div class=&#34;rating-only&#34; itemprop=&#34;aggregateRating&#34; itemscope itemtype=&#34;http://schema.org/AggregateRating&#34;&gt; &lt;div class=&#34;rating&#34;&gt; &lt;div class=&#34;rating-value&#34;&gt; &lt;span class=&#34;value&#34; itemprop=&#34;ratingValue&#34;&gt;4.6&lt;/span&gt;&lt;span class=&#34;max&#34;&gt; /5&lt;/span&gt; &lt;/div&gt; &lt;div class=&#34;stars-container&#34;&gt; &lt;div class=&#34;stars empty&#34;&gt; &lt;div class=&#34;stars full&#34; style=&#34;width:92%;&#34;&gt; &lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;count&#34;&gt; &lt;div class=&#34;value&#34;&gt; &lt;meta itemprop=&#34;reviewCount&#34; content=&#34;33&#34;&gt; &lt;span&gt;33&lt;/span&gt;&lt;span&gt; reviews&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/div&gt;'); var link = document.createElement('link'), script = document.createElement('script'), div = document.createElement('div'), protocol = /^http:/.test(document.location) ? 'http' : 'https', host; if (env && env === 'local') { host = 'http://localhost:8080/'; } else { host = protocol + '://widgets' + (region && region !== 'us' ? '-' + region : '') + (env ? '.' + env : '') + '.reputation.com/'; } link.type = 'text/css'; link.rel = 'stylesheet'; if (env && env === 'local') { link.href = host + 'src/client/widgets/inbox/inbox-directive.css'; } else { link.href = host + 'lib/inbox-widget.css?ts=1608333984307'; } script.setAttribute('type', 'text/javascript'); script.src = host + 'src/client/widgets/inbox/inbox.js'; document.head.appendChild(link); document.body.appendChild(script); } if (widget.widgetTypeID === widgetTypeIds.Inbox2) { widget.html = htmlDecode('&lt;div class=&#34;r4e-widget summary client&#34;&gt; &lt;div itemscope itemtype=&#34;http://schema.org/Organization&#34;&gt; &lt;meta itemprop=&#34;name&#34; content=&#34;UC Davis Rehabilitation Hospital&#34;&gt; &lt;div class=&#34;rating-only&#34; itemprop=&#34;aggregateRating&#34; itemscope itemtype=&#34;http://schema.org/AggregateRating&#34;&gt; &lt;div class=&#34;rating&#34;&gt; &lt;div class=&#34;rating-value&#34;&gt; &lt;span class=&#34;value&#34; itemprop=&#34;ratingValue&#34;&gt;4.6&lt;/span&gt;&lt;span class=&#34;max&#34;&gt; /5&lt;/span&gt; &lt;/div&gt; &lt;div class=&#34;stars-container&#34;&gt; &lt;div class=&#34;stars empty&#34;&gt; &lt;div class=&#34;stars full&#34; style=&#34;width:92%;&#34;&gt; &lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star icon-star-solid&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt;&lt;i class=&#34;icon-star&#34;&gt;&lt;/i&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;count&#34;&gt; &lt;div class=&#34;value&#34;&gt; &lt;meta itemprop=&#34;reviewCount&#34; content=&#34;33&#34;&gt; &lt;span&gt;33&lt;/span&gt;&lt;span&gt; reviews&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/div&gt;'); var link = document.createElement('link'), script = document.createElement('script'), div = document.createElement('div'), protocol = /^http:/.test(document.location) ? 'http' : 'https', host; if (env && env === 'local') { host = 'http://localhost:8080/'; } else { host = protocol + '://widgets' + (region && region !== 'us' ? '-' + region : '') + (env ? '.' + env : '') + '.reputation.com/'; } link.type = 'text/css'; link.rel = 'stylesheet'; script.setAttribute('type', 'text/javascript'); script.src = host + 'src/client/widgets/inbox2/inbox2.js'; document.head.appendChild(link); document.body.appendChild(script); } // Send widget to parent parent.postMessage(widget, '*'); if (widget.widgetTypeID === widgetTypeIds.Reviews) { // Truncate reviews if (widget.parameters.animation !== 'true') { truncateReviews(); } // Set up pagination if ($('.next-page a').attr('href')) { $('.pagination').hide(); if (widget.parameters.animation === 'true') { setAnimation(widget); } else { if (widgetHeight >= $(document).height() - offset) { $('.load-more').click(loadMore); $('.load-more').show(); } else { $(window).scroll(bindScrollEvent); } } } if (widget.parameters.showReviews2) { var url = window.location.href, searchParams = new URLSearchParams(url), sortParam = searchParams.get('sort') || '0'; // Set selected sort from query string param $('#sort option[value=' + sortParam + ']').attr("selected","selected"); $(document).on('change','select', function() { var option = $('#sort').find('option:selected'); window.location.href = option.data("url"); }); } } else if (widget.widgetTypeID === widgetTypeIds.Testimonial) { if (widget.parameters.animation === 'true') { setAnimation(widget); } } } function setAnimation(widget) { var direction = widget.parameters.direction, delay = parseInt(widget.parameters.delay) * 1000; setTimeout(function() { carousel(direction, delay); }, delay); } // Convert html string to DOM elements function htmlDecode(input) { var textarea = document.createElement('textarea'); textarea.innerHTML = input; return textarea.value; } // Load next page function loadMore() { var $loader = $('.loader:last'), $nextPage = $('.pagination:last .next-page a'); $('.load-more').hide(); $loader.show(); if ($nextPage && $nextPage.attr('href')) { $.ajax({ url: $nextPage.attr('href') + '&paging=true', success: function(result) { if (result) { $body.append(result); } truncateReviews(); $('.pagination').hide(); if (widgetHeight >= $(document).height() - offset) { $('.load-more:last').click(loadMore); $('.load-more:last').show(); } else { $(window).scroll(bindScrollEvent); } $loader.hide(); } }); } else { $body.append('<hr><div class="no-more-reviews">No More Reviews</div>'); $(window).off('scroll'); $loader.hide(); } } // Load carousel function carousel(direction, delay) { var $nextPage = $('.pagination:last .next-page a'), nextUrl = ($nextPage && $nextPage.attr('href')) ? $nextPage.attr('href') : document.URL, height = $(window).height(), width = $(window).width(), animation = { height: height, width: width }, property = 'margin-' + direction; if (direction === 'top') { animation[property] = -1 * height + 'px'; } else if (direction === 'bottom') { property = 'margin-top'; animation[property] = height + 'px'; } else if (direction === 'right') { property = 'margin-left'; animation[property] = width + 'px'; } else if (direction === 'left') { animation[property] = -1 * width + 'px'; } $.ajax({ url: nextUrl + '&paging=true', success: function(result) { if (result) { $body.animate(animation, 500, function() { $body.css(property, 0); $body.empty().append(result); $('.pagination').hide(); setTimeout(function() { carousel(direction, delay); }, delay); }); } } }); } // Bind scroll event function bindScrollEvent() { if ($(window).scrollTop() + $(window).height() >= $(document).height() - offset) { $(window).off('scroll'); loadMore(); } } // Truncate long review comments function truncateReviews() { $('.r4e-widget.reviews:last .review').each(function() { var $comment = $(this).find('.comment'); if ($comment && $comment.text().trim().length > commentMaxLength) { var text = $comment.text().trim(), truncatedText = text.substring(0, commentMaxLength), expandedText = text.substring(commentMaxLength, text.length), $beginning = $(document.createElement('span')), $more = $(document.createElement('a')), $end = $(document.createElement('span')); $comment.empty(); $comment.append($beginning); $comment.append($more); $comment.append($end); $beginning.text(truncatedText + '...') $more.text('Read More'); $end.text(expandedText); $more.addClass('comment-more'); $more.attr('tabIndex', 0); $more.attr('href', 'javascript:void(0)'); $more.attr('aria-label', 'Read More' + '-' + $beginning.text()); $more.click(function() { showMore($more, $beginning, $end, truncatedText); }); $more.keypress(function(e) { if (e.which === 13) { showMore($more, $beginning, $end, truncatedText); } }); $end.hide(); } }); } // Remove ellipses and show truncated text function showMore($more, $beginning, $end, text) { $beginning.text(text); $more.hide(); $end.show(); } </script> </body> </html>