// Adding a button to top
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10857 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -48,5 +48,6 @@
|
||||
{* ajaxBox allows*}
|
||||
<div id="ajaxBox" style="display:none"></div>
|
||||
{/if}
|
||||
<div id="scrollTop"><a href="#top"></a></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1502,6 +1502,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$this->addJquery();
|
||||
$this->addjQueryPlugin(array('cluetip', 'hoverIntent'));
|
||||
$this->addJqueryPlugin('scrollTo');
|
||||
|
||||
$this->addJS(array(
|
||||
_PS_JS_DIR_.'admin.js',
|
||||
|
||||
@@ -131,15 +131,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
$this->logged_on_addons = true;
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
parent::setMedia();
|
||||
$this->addJqueryPlugin('scrollTo');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Ajax Request Methods
|
||||
**
|
||||
|
||||
@@ -139,7 +139,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->addJS(_PS_JS_DIR_.'admin_order.js');
|
||||
$this->addJS(_PS_JS_DIR_.'tools.js');
|
||||
$this->addJqueryPlugin('autocomplete');
|
||||
$this->addJqueryPlugin('scrollTo');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1946,4 +1946,20 @@ ul.connectedSortable li.module_list {
|
||||
right:10px;
|
||||
}
|
||||
|
||||
/* ScrollTop */
|
||||
div#scrollTop a{
|
||||
display:none;
|
||||
background:url('../img/admin/scroll_top.png');
|
||||
width:80px;
|
||||
height:80px;
|
||||
position:fixed;
|
||||
bottom:30px;
|
||||
right:30px;
|
||||
border-radius:10px;
|
||||
opacity:0.2;
|
||||
}
|
||||
div#scrollTop a:hover{
|
||||
opacity:0.8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
+17
@@ -1000,4 +1000,21 @@ $(document).ready(function(){
|
||||
if(!isArrowKey(e))
|
||||
return copyMeta2friendlyURL()
|
||||
});
|
||||
|
||||
// Adding a button to top
|
||||
var scroll = $('#scrollTop a');
|
||||
var view = $(window);
|
||||
|
||||
scroll.click(function(){
|
||||
$.scrollTo('#top_container', 1200, { offset: -100 });
|
||||
});
|
||||
|
||||
view.bind("scroll", function(e) {
|
||||
var heightView = view.height();
|
||||
var btnPlace = scroll.offset().top;
|
||||
if (heightView < btnPlace)
|
||||
scroll.show();
|
||||
else
|
||||
scroll.hide();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user