Browse Source

- Improved Ajax tabs code (Web UI)

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

66
src/webui/properties.html

@ -1,45 +1,37 @@
<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"> <script type="text/javascript">
MochaUI.initializeTabs('propertiesTabs');
MochaUI.initializeTabs('propertiesTabs');
MochaUI.updateContent({
'element': $('properties'),
'childElement': $('propertyTab'),
'url': 'prop-general.html'
});
$('PropGeneralLink').addEvent('click', function(e){
MochaUI.updateContent({ MochaUI.updateContent({
'element': $('properties'), 'element': $('properties'),
'childElement': $('propertyTab'), 'url': 'prop-general.html'
'url': 'prop-general.html' });
});
});
$('PropTrackersLink').addEvent('click', function(e){ $('PropGeneralLink').addEvent('click', function(e){
MochaUI.updateContent({ MochaUI.updateContent({
'element': $('properties'), 'element': $('properties'),
'childElement': $('propertyTab'), 'url': 'prop-general.html'
'url': 'prop-trackers.html' });
}); });
});
$('PropFilesLink').addEvent('click', function(e){ $('PropTrackersLink').addEvent('click', function(e){
MochaUI.updateContent({ MochaUI.updateContent({
'element': $('properties'), 'element': $('properties'),
'childElement': $('propertyTab'), 'url': 'prop-trackers.html'
'url': 'prop-files.html' });
}); });
});
$('PropFilesLink').addEvent('click', function(e){
MochaUI.updateContent({
'element': $('properties'),
'url': 'prop-files.html'
});
});
</script> </script>
<div class="toolbarTabs">
<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>

9
src/webui/scripts/client.js

@ -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
}); });

Loading…
Cancel
Save