1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 14:27:56 +00:00

- Improved Ajax tabs code (Web UI)

This commit is contained in:
Christophe Dumez 2009-12-05 16:09:18 +00:00
parent 8c1a135d16
commit 998352f9f1
2 changed files with 36 additions and 41 deletions

View File

@ -1,45 +1,37 @@
<script type="text/javascript">
MochaUI.initializeTabs('propertiesTabs');
MochaUI.updateContent({
'element': $('properties'),
'url': 'prop-general.html'
});
$('PropGeneralLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'url': 'prop-general.html'
});
});
$('PropTrackersLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'url': 'prop-trackers.html'
});
});
$('PropFilesLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'url': 'prop-files.html'
});
});
</script>
<div class="toolbarTabs"> <div class="toolbarTabs">
<!-- <div style="float:right;padding-top:3px;"><img src="images/icons/help.gif" width="16" height="16" alt="Help" /></div> -->
<ul id="propertiesTabs" class="tab-menu"> <ul id="propertiesTabs" class="tab-menu">
<li id="PropGeneralLink" class="selected"><a>_(General)</a></li> <li id="PropGeneralLink" class="selected"><a>_(General)</a></li>
<li id="PropTrackersLink"><a>_(Trackers)</a></li> <li id="PropTrackersLink"><a>_(Trackers)</a></li>
<li id="PropFilesLink"><a>_(Files)</a></li> <li id="PropFilesLink"><a>_(Files)</a></li>
</ul> </ul>
<div class="clear"></div> <div class="clear"></div>
<div id="propertyTab"></div> </div>
</div>
<script type="text/javascript">
MochaUI.initializeTabs('propertiesTabs');
MochaUI.updateContent({
'element': $('properties'),
'childElement': $('propertyTab'),
'url': 'prop-general.html'
});
$('PropGeneralLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'childElement': $('propertyTab'),
'url': 'prop-general.html'
});
});
$('PropTrackersLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'childElement': $('propertyTab'),
'url': 'prop-trackers.html'
});
});
$('PropFilesLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'childElement': $('propertyTab'),
'url': 'prop-files.html'
});
});
</script>

View File

@ -93,10 +93,13 @@ window.addEvent('load', function(){
new MochaUI.Panel({ new MochaUI.Panel({
id: 'properties', id: 'properties',
title: 'Panel', title: 'Panel',
header: false, header: true,
padding: { top: 0, right: 0, bottom: 0, left: 0 }, padding: { top: 0, right: 0, bottom: 0, left: 0 },
loadMethod: 'xhr', contentURL: 'prop-general.html',
contentURL: 'properties.html', require: {
css: ['css/Tabs.css']
},
tabsURL: 'properties.html',
column: 'mainColumn', column: 'mainColumn',
height: prop_h height: prop_h
}); });