Invalid URL .
+Did you mean + ?
+ +Invalid ID in URL.
+ + + + +›
+ +
-
+
+
+
+
@@ -97,42 +118,145 @@
});
// Switch video plugin facilities
- $('#video-widget-tabs').tabs(); /*{
- ajaxOptions: {
- type: "POST",
- data: { url: "" },
- error: function(xhr, status, index, anchor) {
- $(anchor.hash).html('Could not load the video plugin.');
- }
- }
- });*/
+ $('#video-widget-tabs')
+ .tabs();
$('#switch-to-ns-html5')
.click(function() {
- // TODO switch video plugin
- console.log('switch-to-ns-html5');
+ $('#video-widget')
+ .nsvideo('type', 'ns-html5');
});
$('#switch-to-ns-vlc')
.click(function() {
- // TODO switch video plugin
- console.log('switch-to-ns-vlc');
+ $('#video-widget')
+ .nsvideo('type', 'ns-vlc');
});
-
+
// Video widget
- $('#video-widget').nsvideo({
- type: "",
- definition:
- "",
- src: {
-
- }
- });
+ $('#video-widget')
+ .nsvideo({
+ type: "",
+ src: ,
+
+ showState: false,
+
+ minWidth: 640,
+ maxWidth: 1024,
+ initialDuration: "",
+
+ resize: function() {
+ $('#video-widget-tabs')
+ .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