diff --git a/include/js_strings.php b/include/js_strings.php index 14293c5ce..56ffa9536 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -19,6 +19,7 @@ function js_strings() { '$rating_desc' => t('Rate This Channel (this is public)'), '$rating_val' => t('Rating'), '$rating_text' => t('Describe (optional)'), + '$submit' => t('Submit'), '$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''), '$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''), diff --git a/mod/prate.php b/mod/prate.php index 62f188891..b89d16f42 100644 --- a/mod/prate.php +++ b/mod/prate.php @@ -1,5 +1,26 @@ get_channel(); + + $target = argv(1); + if(! $target) + return; + + $r = q("select * from xlink where xlink_xchan = '%s' and xlink_link = '%s' and xlink_static = 1", + dbesc($channel['channel_hash']), + dbesc($target) + ); + if($r) + json_return_and_die(array('rating' => $r[0]['xlink_rating'],'rating_text' => $r[0]['xlink_rating_text'])); + killme(); +} function prate_post(&$a) { @@ -63,7 +84,7 @@ function prate_post(&$a) { proc_run('php','include/ratenotif.php','rating',$record); } - return; + json_return_and_die(array('result' => true));; } @@ -75,3 +96,4 @@ function prate_post(&$a) { + diff --git a/view/css/mod_directory.css b/view/css/mod_directory.css index d4cf23b39..c562764ea 100644 --- a/view/css/mod_directory.css +++ b/view/css/mod_directory.css @@ -15,7 +15,7 @@ padding: 15px; } -.rating-text { +.rating-text-label { margin-top: 30px; } diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 0aef13aa6..ba4ec9b61 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -10,8 +10,3 @@ margin-top: 15px; width: 400px; } - -.required { - color: #ff0000; - font-size: 1.2rem; -} \ No newline at end of file diff --git a/view/js/mod_directory.js b/view/js/mod_directory.js index 09b103352..87e4f92b5 100644 --- a/view/js/mod_directory.js +++ b/view/js/mod_directory.js @@ -6,15 +6,39 @@ function dirdetails(hash) { } -function doRatings(hash) { - - var html = '