Jump to content

Rejestracja, znikający DIV


Recommended Posts

Witam serdecznie!

 

Mam pewien problem z plikiem "authentication.tpl".

Treść pliku pozostała taka jak w oryginalnej templatce "Default" poza jedną zmianą:

					// adding a div to display a transition
					$('#center_column').html('<div id="noSlide">'+$('#center_column').html()+'</div>');
					$('#noSlide').fadeOut('slow', function(){
						$('#noSlide').html(jsonData.page);
						// update the state (when this file is called from AJAX you still need to update the state)									
						bindStateInputAndUpdate();
						$(this).fadeIn('slow', function(){
							document.location = '#account-creation';
						});
					});
Zamieniłem na

					// adding a div to display a transition
					$('.wrapper').html('<div id="noSlide">'+$('.wrapper').html()+'</div>');
					$('#noSlide').fadeOut('slow', function(){
						$('#noSlide').html(jsonData.page);
						// update the state (when this file is called from AJAX you still need to update the state)									
						bindStateInputAndUpdate();
						$(this).fadeIn('slow', function(){
							document.location = '#account-creation';
						});
					});
Ponieważ div w którym znajduję się ta treść ma klasę "wrapper".

 

Wszystko wydawało mi się OK, ale niestety po wpisaniu na stronie adresu e-mail i kliknięciu przycisku "Zarejestruj się" div ten znika.

 

Czy wiecie co może to powodować? Czy potrzebne wam jest coś więcej?

Z góry dziękuje za pomoc : )

Edited by jibay (see edit history)
Link to comment
Share on other sites

w kodzie:

{
// adding a div to display a transition
$('#center_column').html('<div id="noSlide">'+$('#center_column').html()+'</div>');
$('#noSlide').fadeOut('slow', function(){
$('#noSlide').html(jsonData.page);
// update the state (when this file is called from AJAX you still need to update the state)
bindStateInputAndUpdate();
$(this).fadeIn('slow', function(){
document.location = '#account-creation';
});
});
}
 
zakomentuj funkcję:
//bindStateInputAndUpdate();
  • Like 1
Link to comment
Share on other sites

Plik istnieje w tym folderze, a javascripty są czytane w header.tpl przez:
 

{if isset($js_files)}
	{foreach from=$js_files item=js_uri}
	<script type="text/javascript" src="{$js_uri}"></script>
	{/foreach}
{/if}

Czy jak dodam go ręcznie to będzie ok?, czy ten problem ma jakieś inne rozwiązanie?

Link to comment
Share on other sites

w pliku:

 

controllers/front/authcontroller.php masz coś takiego?

	public function setMedia()
	{
		parent::setMedia();
		if (Context::getContext()->getMobileDevice() === false)
			$this->addCSS(_THEME_CSS_DIR_.'authentication.css');
		$this->addJqueryPlugin('typewatch');
		$this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js');
	}

koniecznie musi być tam: $this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js'); 


po prostu w kodzie, tam gdzie zdefiniowałeś .wrapper (w tych skryptach js) zamiast .wrapper użyj #product

  • Like 1
Link to comment
Share on other sites

	/**
	 * Set default medias for this controller
	 * @see FrontController::setMedia()
	 */
	public function setMedia()
	{
		parent::setMedia();
		if (Context::getContext()->getMobileDevice() === false)
			$this->addCSS(_THEME_CSS_DIR_.'authentication.css');
		$this->addJqueryPlugin('typewatch');
		$this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js');
	}

Tak to wygląda

Link to comment
Share on other sites

×
×
  • Create New...