Пример #1
0
				
				
				
			</div>
		</div>

	</div>
</div>

<?php 
$script = <<<END

\tvar tree = \$('#emAccountsTree');
\t
\t\$.ajax({
\t\t\turl:GO.url("email/account/tree"), 
\t\t\tdataType:'json',
\t\t\tdata:{
\t\t\t\tnode:'root'
\t\t\t},
\t\t\tsuccess: function(data, textStatus, jqXHR){
\t\t\t\tconsole.log(data);
\t\t\t\tvar html = GO.tmpl("emAccountsTreeTpl", {accounts: data});
\t\t\t\t\tconsole.log(html);
\t\t\t\t\t\$('#emAccountsTree').html(html);
\t\t\t}
\t\t});
END;
GO::scripts()->registerScript('submit', $script);