Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1535

Přidáno uživatelem David Raška před asi 12 roky(ů)

Opravy:
- #220: Pridana indikace nacitani dialogu

Zobrazit rozdíly:

freenetis/branches/testing/application/views/js/base.php
*
* @author Michal Kliment
*/
$('.popup_link').live('click', function(){
$('.popup_link').live('click', function()
{
var $this = $(this);
$('#loading-overlay').show();
var url = ($(this).attr('href')) ? $(this).attr('href') : $(this).parent().attr('href');
// find parent of dialog (another dialog or main page)
var parent = dialogs.links.getParent($(this));
// create new dialog
var dialog = dialogs.add($(this), parent, !$(this).hasClass('isReloadOff'));
// load url in it
dialog.load(url);
// no returned data, close dialog and reload parent
if (dialog.getFormat() != 'html')
{
//var parent = dialog.getParent();
//
// parent is main page
if (parent === undefined)
{
// reload content div with new data
reload_element('#content-padd', window.location.href);
$('html, body').animate({scrollTop: 0}, 'slow');
setTimeout(function()
{
var url = ($this.attr('href')) ? $this.attr('href') : $this.parent().attr('href');
// find parent of dialog (another dialog or main page)
var parent = dialogs.links.getParent($this);
// create new dialog
var dialog = dialogs.add($this, parent, !$this.hasClass('isReloadOff'));
// load url in it
dialog.load(url);
// no returned data, close dialog and reload parent
if (dialog.getFormat() != 'html')
{
//var parent = dialog.getParent();
//
// parent is main page
if (parent === undefined)
{
// reload content div with new data
reload_element('#content-padd', window.location.href);
$('html, body').animate({scrollTop: 0}, 'slow');
}
else
// parent is dialog, reload it
parent.load();
}
else
// parent is dialog, reload it
parent.load();
}
else
// else show dialog
dialog.show();
// else show dialog
dialog.show();
$('#loading-overlay').hide();
}, 2);
return false;
});

Také k dispozici: Unified diff