X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fviews%2Fvideo%2Fwatch_view.php;h=2da1ba0e309460a4e1cb71348e2fa159db9f6bb6;hb=ada355332b092d2bd0ec7845f62c307587c9aab0;hp=9d83addbea5758534dfd0f80fb37d3cc2334674c;hpb=19dcbb3149e52c88b7a38f05ef85b80db49fcb72;p=living-lab-site.git
diff --git a/application/views/video/watch_view.php b/application/views/video/watch_view.php
index 9d83add..2da1ba0 100644
--- a/application/views/video/watch_view.php
+++ b/application/views/video/watch_view.php
@@ -4,94 +4,100 @@
-
-
-
Invalid URL .
-
Did you mean
- ?
-
-
Invalid ID in URL.
-
-
-
-
-
-
-
+
+
+
Invalid URL .
+
Did you mean
+ ?
+
+
Invalid ID in URL.
+
+
+
+
+
›
+
+
+
+
+
+
@@ -124,8 +130,9 @@
.nsvideo({
type: "",
src: ,
- //width: videoWidth,
- //height: videoHeight
+
+ showState: false,
+
minWidth: 640,
maxWidth: 1024,
initialDuration: "",
@@ -135,5 +142,88 @@
.css('width', $('#video-widget').css('width'));
}
});
+
+ $('.link-vote')
+ .click(function(event) {
+ var user_id = "";
+ var action, idOutput;
+ if ($(this).data('action') == 'like')
+ {
+ var action = 'like';
+ var idOutput = '#video-likes';
+ }
+ else
+ {
+ var action = 'dislike';
+ var idOutput = '#video-dislikes';
+ }
+ //alert(action + " " + user_id);
+
+ event.preventDefault();
+
+ if (user_id.length != 0)
+ {
+ $.ajax({
+ type: "GET",
+ url: "/"
+ + action
+ + "",
+ data: {t: ""+Math.random()},
+ dataType: "text",
+ success: function(text) {
+ if (text)
+ $(idOutput).html(text);
+ else
+ alert('lang->line('ui_msg_repeated_action_restriction') ?>');
+ }
+ });
+ }
+ else
+ alert('lang->line('ui_msg_login_restriction') ?>');
+ })
+ .button();
+
+ $('#link-like')
+ .click(function() {
+ user_id = "";
+
+ if (user_id)
+ {
+ $.ajax({
+ type: "GET",
+ url: "",
+ dataType: "text",
+ success: function(text) {
+ if (text)
+ $('#video-likes').html(text);
+ else
+ alert('lang->line('ui_msg_repeated_action_restriction') ?>');
+ }
+ });
+ }
+ else
+ alert('lang->line('ui_msg_login_restriction') ?>');
+ })
+ .button();
+ $('#link-dislike')
+ .click(function() {
+ user_id = "";
+
+ if (user_id)
+ {
+ $.ajax({
+ type: "GET",
+ url: "",
+ data: {t: ""+Math.random()},
+ dataType: "text",
+ success: function(text) {
+ $('#video-dislikes').html(text);
+ }
+ });
+ }
+ else
+ alert('lang->line('ui_msg_login_restriction') ?>');
+ })
+ .button();
});
\ No newline at end of file