X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fviews%2Fvideo%2Fwatch_view.php;h=4477f8fe943aaf1721e705257ed288e1cd82bc70;hb=66dc2204a919e2c29b2aa9330ea18026d58540d9;hp=9f7d091dfb5c67271f6f18d2dca96cf52238f93e;hpb=954fc0210d9151cb86ca4dad6a955f59ba135915;p=living-lab-site.git diff --git a/application/views/video/watch_view.php b/application/views/video/watch_view.php index 9f7d091..4477f8f 100644 --- a/application/views/video/watch_view.php +++ b/application/views/video/watch_view.php @@ -3,7 +3,7 @@ siteUrl = ''; -
+
-

+

    @@ -34,62 +34,74 @@
-
-
- lang->line('ui_uploaded_by') ?> - - lang->line('ui_on_date') ?> - -
+
-
-
- lang->line('ui_view') : - $this->lang->line('ui_views') ); - ?> + -
- -
-
lang->line('ui_category')) - . ': ' ?>
-
-
- -
-
lang->line('ui_tags')). ': ' ?>
-
$score): ?> - - - -
-
- -
-
lang->line('ui_license')).': ' ?>
-
-
+
-
@@ -125,14 +137,10 @@ type: "", src: , - - width: 427, - height: 240, showState: false, - - //minWidth: 640, - //maxWidth: 1024, + minWidth: 640, + maxWidth: 1024, initialDuration: "", resize: function() { @@ -140,5 +148,115 @@ .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(); + + $('#video-info-details').hide(); + + $('#a-show-info-details') +// .button({ +// icons: { +// primary: 'ui-icon-triangle-1-s' +// }, +// text: false +// }) + .click(function(event) { + event.preventDefault(true); + $('#video-shorted-description').toggle(); + $('#video-info-details').fadeToggle(); + + //console.log($(this).button('option', 'icons')); + if ($(this).data('val') == 'more') + { + $(this).data('val', 'less'); + $(this).html('lang->line('video_show_less') ?>'); + } + else + { + $(this).data('val', 'more'); + $(this).html('lang->line('video_show_more') ?>'); + } + }); }); \ No newline at end of file