player.js 630 Bytes
'use strict';

AS.OPTIONS.locale = "ru";
AS.OPTIONS.coreUrl = "http://intern-dev.arta.kz/Synergy/";


var portal = {
    player : null,
  
    clearPlayer : function() {
        if(portal.player) {
            portal.player.destroy();
        }
    },
 
    createPlayer : function(formCode){

        portal.clearPlayer();
        portal.player = AS.FORMS.createPlayer();
        portal.player.showFormByCode(formCode);
	    portal.player.view.appendTo($('#form_player_div'));
    }
};


$(document).ready(function(){

    AS.OPTIONS.login = "intern";
    AS.OPTIONS.password = "intern";
    portal.createPlayer("timesheet");
});