diff options
author | Jayaram R Pai | 2014-06-20 14:53:49 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-06-20 14:53:49 +0530 |
commit | d36eacffe82372c7337d446ad252942ec3ba6b82 (patch) | |
tree | 067342a6bc4a51afca0d3a871ad21247d2d53cc3 | |
parent | 8b2c99bd560cbea010ad051d5614e8e2d11c1729 (diff) | |
download | scilab_cloud_interface-d36eacffe82372c7337d446ad252942ec3ba6b82.tar.gz scilab_cloud_interface-d36eacffe82372c7337d446ad252942ec3ba6b82.tar.bz2 scilab_cloud_interface-d36eacffe82372c7337d446ad252942ec3ba6b82.zip |
added link to display example reviews
-rwxr-xr-x | cloud.css | 25 | ||||
-rwxr-xr-x | comment.php | 4 | ||||
-rwxr-xr-x | getcode.php | 12 | ||||
-rwxr-xr-x | index.php | 26 |
4 files changed, 58 insertions, 9 deletions
@@ -1,3 +1,9 @@ +.pull-left { + float: left !important; +} +.pull-right{ + float: right !important; +} div.lalg { float: left; width: 100px; @@ -151,3 +157,22 @@ display: inline-block; padding: 5px; border: 2px solid green; } +#nos { + display: none; + padding: 2px; + color: #333333; + background: #ffffff; + border: 1px solid #ffffff; + border-radius: 3px; + text-decoration: none; + font-size: 0.9em; + -webkit-transition: all .5s ease-out; + -moz-transition: all .5s ease-out; + -o-transition: all .5s ease-out; + transition: all .5s ease-out; +} +#nos:hover { + background: #333333; + color: #ffffff; + border: 1px solid #ffffff; +} diff --git a/comment.php b/comment.php index f4197d6..75af061 100755 --- a/comment.php +++ b/comment.php @@ -14,8 +14,8 @@ echo "<p>Thank you for your valuable feedback.</p>"; - $to = "rush2jrp@gmail.com, mukulrkulkarni@gmail.com, lavitha89@gmail.com, kannan@iitb.ac.in, kiran@fossee.in, manasdas17@gmail.com"; - // $to = "rush2jrp@gmail.com, jayaram@iitb.ac.in"; + // $to = "rush2jrp@gmail.com, mukulrkulkarni@gmail.com, lavitha89@gmail.com, kannan@iitb.ac.in, kiran@fossee.in, manasdas17@gmail.com"; + $to = "rush2jrp@gmail.com, jayaram@iitb.ac.in"; $subject = "New Cloud Comment"; $message = " A new comment has been posted. <br> diff --git a/getcode.php b/getcode.php index 47cf8db..7b7a54b 100755 --- a/getcode.php +++ b/getcode.php @@ -19,7 +19,17 @@ $data .= $file; } } - echo $data; + $query = " + SELECT id FROM scilab_cloud_comment + WHERE example = {$_REQUEST['eid']} + "; + $result = mysql_query($query); + $nos = mysql_num_rows($result); + + echo json_encode(array( + "code" => $data, + "nos" => $nos + )); exit; }else { echo "Invalid request!"; @@ -12,8 +12,8 @@ <script> $(document).ready(function(){ - var webroot = "http://cloud.scilab.in/"; - // var webroot = "http://localhost/cloud/"; + // var webroot = "http://cloud.scilab.in/"; + var webroot = "http://localhost/cloud/"; var imgdata = '<img src="images/ajax-loader.gif">'; $("#single_image").fancybox(); $('.fancymenu').fancybox({title: ""}); @@ -134,6 +134,7 @@ }); $("#example").live("change", function(){ + $("#nos").hide(); id = $("#example").val(); folder = $("#books").val(); if(id == "") { @@ -146,15 +147,21 @@ data:{ 'eid': id }, + dataType: "json", success: function(output) { - $("#input").val(output); + $("#input").val(output.code); + if(output.nos) { + $("#nos").html(output.nos + " reviews").show(); + $("#nos").attr("href", "http://scilab.in/cloud_comments/" + id); + } $('#output').val(''); } }); } }); - - + $("body").live("change", "#categories, #books, #chapter", function() { + $("#nos").hide(); + }); $("#submit").live("click",function(){ if ($('#graphicsmode').is(':checked')) { val =1; @@ -291,7 +298,14 @@ </tr> <tr class="bclr"> - <td class="white-text">Scilab Code</td> + <td class="white-text"> + <span class="pull-left"> + Scilab Code + </span> + <span class="pull-right"> + <a id="nos" href="#" target="_blank"></a> + </span> + </td> <td class="white-text">Output</td> </tr> |