From 792e475a78ffb1f1facd615b00511c9107d0ac5a Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sun, 15 Mar 2015 22:18:59 +0100 Subject: Some JavaScript cleanups. Adding some missing and remove some unnecessary semicolons. Change some comparing operators. Changed access to objects with dot operator. --- view/js/mod_directory.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'view/js/mod_directory.js') diff --git a/view/js/mod_directory.js b/view/js/mod_directory.js index 861900704..90942f9ac 100644 --- a/view/js/mod_directory.js +++ b/view/js/mod_directory.js @@ -1,17 +1,15 @@ function dirdetails(hash) { - $.get('dirprofile' + '?f=&hash=' + hash, function( data ) { $.colorbox({ maxWidth: "80%", maxHeight: "75%", scrolling: false, html: data }); }); } - var ratingVal = 0; 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; @@ -20,22 +18,21 @@ function fetchRatings(hash) { }); } - function doRatings(hash) { fetchRatings(hash); } function buildRatingForm(hash) { - var html = '
'+aStr['rating_desc']+'
'+aStr['rating_text']+'
'; + var html = '
' + aStr.rating_desc + '
' + aStr.rating_text + '
'; $.colorbox({maxwidth: "50%", maxHeight: "50%", scrolling: false, 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(); + $('#edited-' + currentHash).show(); },'json'); } -- cgit v1.2.3