Ignore:
Timestamp:
Mar 26, 2015 4:43:02 PM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/www/deploy/20150304/assets/js/manager.js

    r835 r836  
    539539                    if($.inArray( $ext, [ "xvl"])>=0)
    540540                   {
    541                        var redirect = 'http://spacedemo.violet.vn/frontend/lecture/';
    542                         $.redirectPost(redirect, {fileid: node.id});
     541                       var redirect = o.host + 'frontend/lecture/';
     542                       self.redirectPost(redirect, {fileid: node.id});
    543543                    }
    544544                   
     
    973973                        $(statusbar).text(message);
    974974                }
    975 
     975               
     976                this.redirectPost = function(location, args){
     977                    var form = '';
     978                    $.each( args, function( key, value ) {
     979                        form += '<input type="hidden" name="'+key+'" value="'+value+'">';
     980                    });
     981                    $('<form action="'+location+'" method="POST">'+form+'</form>').appendTo('body').submit();
     982                }
     983               
    976984                this.initialize = function () {
    977985                    init();
     
    983991        });
    984992    })(jQuery);
    985 $.extend(
    986 {
    987     redirectPost: function(location, args)
    988     {
    989         var form = '';
    990         $.each( args, function( key, value ) {
    991             form += '<input type="hidden" name="'+key+'" value="'+value+'">';
    992         });
    993         $('<form action="'+location+'" method="POST">'+form+'</form>').appendTo('body').submit();
    994     }
    995 });
Note: See TracChangeset for help on using the changeset viewer.