aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/ratings.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /view/js/ratings.js
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'view/js/ratings.js')
-rw-r--r--view/js/ratings.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/view/js/ratings.js b/view/js/ratings.js
index 3d48ecca5..5ce4c0d00 100644
--- a/view/js/ratings.js
+++ b/view/js/ratings.js
@@ -4,7 +4,7 @@ var ratingText = '';
var currentHash = '';
function fetchRatings(hash) {
- $.get('prate/'+hash, function(data) {
+ $.get('prate/' + hash, function(data) {
if(typeof(data.rating) !== 'undefined') {
ratingVal = data.rating;
ratingText = data.rating_text;
@@ -13,22 +13,20 @@ function fetchRatings(hash) {
});
}
-
function doRatings(hash) {
fetchRatings(hash);
}
function buildRatingForm(hash) {
- var html = '<form id="ratings_form" action="prate" method="post"><input type="hidden" name="target" value="'+hash+'" /><div class="rating-desc">'+aStr['rating_desc']+'</div><input id="dir-rating-range" class="directory-slider" type="text" value="'+ratingVal+'" name="rating" style="display: none;" /><div class="rating-text-label">'+aStr['rating_text']+'<input type="text" name="rating_text" class="directory-rating-text" value="'+ratingText+'" /><br /><input name="submit" class="directory-rating-submit" type="submit" value="'+aStr['submit']+'" onclick="postRatings(); return false;"></form><div class="clear"></div><script>$("#dir-rating-range").jRange({ from: -10, to: 10, step: 1, showLabels: false, showScale: true, scale : [ "-10","-5","0","5","10" ], onstatechange: function(v) { $("#dir-rating-range").val(v); } });</script>';
+ var html = '<form id="ratings_form" action="prate" method="post"><input type="hidden" name="target" value="' + hash + '" /><div class="rating-desc">' + aStr.rating_desc + '</div><input id="dir-rating-range" class="directory-slider" type="text" value="' + ratingVal + '" name="rating" style="display: none;" /><div class="rating-text-label">' + aStr.rating_text + '<input type="text" name="rating_text" class="directory-rating-text" value="' + ratingText + '" /><br><input name="submit" class="directory-rating-submit" type="submit" value="' + aStr.submit + '" onclick="postRatings(); return false;"></form><div class="clear"></div><script>$("#dir-rating-range").jRange({ from: -10, to: 10, step: 1, showLabels: false, showScale: true, scale: [ "-10","-5","0","5","10" ], onstatechange: function(v) { $("#dir-rating-range").val(v); } });</script>';
$.colorbox({maxwidth: "50%", maxHeight: "50%", html: html, close: 'X' });
currentHash = hash;
}
function postRatings() {
- $.post('prate',$('#ratings_form').serialize(),function(data) {
+ $.post('prate', $('#ratings_form').serialize(), function(data) {
$.colorbox.remove();
- $('#edited-'+currentHash).show();
- },'json');
-}
-
+ $('#edited-' + currentHash).show();
+ }, 'json');
+} \ No newline at end of file