jibay Posted September 9, 2013 Share Posted September 9, 2013 (edited) 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 September 9, 2013 by jibay (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 a jest opcja, zeby to przetestować ? będzie znacznie łatwiej Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 http://dlagracza.com/logowanie?back=my-account, mam nadzieje, że brak niektórych CSS'ów wam nie przeszkodzi : ) Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 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(); 1 Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 Okej div nie znika bardzo dziękuje, ale niestety wczytuję się tam coś co nie powinno, section#product. Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 przyczyną jest fakt, że twój sklep nie dołącza tego skryptu .js <script type="text/javascript" src="/themes/default/js/tools/statesManagement.js"></script> nie usuwałeś go ? Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 Okej div nie znika bardzo dziękuje, ale niestety wczytuję się tam coś co nie powinno, section#product. dzieje się tak ponieważ masz nadrzędny div tj. id=product presta ładuje cały ten div, stąd wydaje sie być zdublowany Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 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 More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 dzieje się tak ponieważ masz nadrzędny div tj. id=product presta ładuje cały ten div, stąd wydaje sie być zdublowany A da się aby ładował tylko i wyłącznie to co powinien? Zmiana id na "product2" nie pomaga Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 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 1 Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 /** * 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 More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 a nie masz override tego kontrolera? w katalogu /overrides/ ? Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 a nie masz override tego kontrolera? w katalogu /overrides/ ? Czyli czy tam istnieje, w folderze controllers? Jeśli tak to go nie ma Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 http://dlagracza.com/themes/default2/js/tools/statesManagement.js czy aby na 100% ten plik tam jest? klikając wywala mi 404 1 Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 Z małej litery jest, już poprawiam : )http://dlagracza.com/themes/default2/js/tools/statesmanagement.js Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 no to teraz możesz odkomentować wcześniej zakomentowan funkcję 1 Link to comment Share on other sites More sharing options...
jibay Posted September 9, 2013 Author Share Posted September 9, 2013 Niby już jest ok, ale div noSlide tworzy się w product2, więć wygląda to tak:#product2 > #noSlide > #product2Już całkiem nie myślę, nie wiem gdzie to przesunąć Link to comment Share on other sites More sharing options...
Recommended Posts