Browse Source

- Improved Ajax tabs code (Web UI)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
998352f9f1
  1. 68
      src/webui/properties.html
  2. 9
      src/webui/scripts/client.js

68
src/webui/properties.html

@ -1,45 +1,37 @@ @@ -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 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">
<li id="PropGeneralLink" class="selected"><a>_(General)</a></li>
<li id="PropTrackersLink"><a>_(Trackers)</a></li>
<li id="PropFilesLink"><a>_(Files)</a></li>
</ul>
<div class="clear"></div>
<div id="propertyTab"></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>
</div>

9
src/webui/scripts/client.js

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

Loading…
Cancel
Save