Changeset 10789
- Timestamp:
- 07/21/11 11:20:23 (2 years ago)
- Location:
- ossiedev/trunk/tools/cornetApps
- Files:
-
- 10 modified
-
HtmlPages/__init__.pyc (modified) (previous)
-
HtmlPages/models.pyc (modified) (previous)
-
HtmlPages/static/frames.css (modified) (1 diff)
-
HtmlPages/static/frames.js (modified) (2 diffs)
-
HtmlPages/views.py (modified) (2 diffs)
-
HtmlPages/views.pyc (modified) (previous)
-
cornetApps.db (modified) (previous)
-
settings.py (modified) (2 diffs)
-
static/frames.js (modified) (3 diffs)
-
templates/HtmlPages/main_page.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/tools/cornetApps/HtmlPages/static/frames.css
r10787 r10789 42 42 /**background-image:url('floor1_small_nonodes.jpg');**/ 43 43 height: 300px; 44 width: 800px;44 width: inherit; 45 45 } 46 46 -
ossiedev/trunk/tools/cornetApps/HtmlPages/static/frames.js
r10787 r10789 35 35 // Preload tab on page load 36 36 if($(tabsId + 'LI.current A').length > 0){ 37 loadTab($(tabsId + ' LI.current A'), viewContainer);37 loadTab($(tabsId + ' LI.current A'), "#view"); 38 38 } 39 39 $(tabsId + ' A').click(function(){ … … 41 41 $(tabsId + ' LI.current').removeClass('current'); 42 42 $(this).parent().addClass('current'); 43 loadTab($(this), viewContainer);43 loadTab($(this), "#view"); 44 44 return false; 45 45 }); -
ossiedev/trunk/tools/cornetApps/HtmlPages/views.py
r10786 r10789 5 5 from django.shortcuts import render_to_response 6 6 from django.contrib.auth import logout 7 from wavedash.src.WavedashController import Controller 8 import wavedash.src.WaveformModel 7 9 from HtmlPages.models import * 8 10 from HtmlPages.forms import * … … 10 12 def main_page(request): 11 13 head_title = "Main Page" 14 ctrlr = Controller(False) 15 ctrlr.createWidgetContainer() 16 ctrlr.CORBAutils.init_CORBA(False) 17 ctrlr.buildModel() 18 19 availableList = ctrlr.model.getSystemWaveforms() 12 20 return render_to_response("HtmlPages/main_page.html", locals(), context_instance=RequestContext(request)) 13 21 -
ossiedev/trunk/tools/cornetApps/settings.py
r10785 r10789 57 57 # in apps' "static/" subdirectories and in STATICFILES_DIRS. 58 58 # Example: "/home/media/media.lawrence.com/static/" 59 STATIC_ROOT = '/home/ossie/ django/cornetApps/static/'59 STATIC_ROOT = '/home/ossie/workspace/cornetApps/static/' 60 60 61 61 # URL prefix for static files. … … 73 73 # Always use forward slashes, even on Windows. 74 74 # Don't forget to use absolute paths, not relative paths. 75 '/home/ossie/ django/cornetApps/HtmlPages/static/',75 '/home/ossie/workspace/cornetApps/HtmlPages/static/', 76 76 ) 77 77 -
ossiedev/trunk/tools/cornetApps/static/frames.js
r10787 r10789 26 26 //load console in workspace 27 27 $('#console').click(function(){ 28 $('#workspace').load(' /grid/');28 $('#workspace').load('#'); 29 29 }); 30 30 }); 31 31 32 var viewContainer = "#view"; 32 33 var tabsId = '.tabs'; 33 $( document).ready(function(){34 $("#right-top").ready(function(){ 34 35 // Preload tab on page load 35 if($(tabsId + ' LI.currentA').length > 0){36 loadTab($(tabsId + ' LI.current A'), "# tabs-container");36 if($(tabsId + 'LI.current A').length > 0){ 37 loadTab($(tabsId + ' LI.current A'), "#view"); 37 38 } 38 39 $(tabsId + ' A').click(function(){ … … 40 41 $(tabsId + ' LI.current').removeClass('current'); 41 42 $(this).parent().addClass('current'); 42 loadTab($(this), "#tabs-container");43 loadTab($(this), "#view"); 43 44 return false; 44 45 }); … … 53 54 }); 54 55 } 55 /**56 $(function(){57 $('#tabs').tabs();58 });59 56 60 $(function () {61 var tabs = [];62 var tabContainers = [];63 $('ul.tabs a').each(function () {64 // note that this only compares the pathname, not the entire url65 // which actually may be required for a more terse solution.66 if (this.pathname == window.location.pathname) {67 tabs.push(this);68 tabContainers.push($(this.hash).get(0));69 }70 });71 72 $(tabs).click(function () {73 // hide all tabs74 $(tabContainers).hide().filter(this.hash).show();75 76 // set up the selected class77 $(tabs).removeClass('selected');78 $(this).addClass('selected');79 80 return false;81 });82 });83 84 $(function () {85 var tabContainers = $('div.tabs > div');86 87 $('div.tabs ul.tabNavigation a').click(function () {88 tabContainers.hide().filter(this.hash).show();89 90 $('div.tabs ul.tabNavigation a').removeClass('selected');91 $(this).addClass('selected');92 93 return false;94 }).filter(':first').click();95 });96 **/ -
ossiedev/trunk/tools/cornetApps/templates/HtmlPages/main_page.html
r10785 r10789 8 8 <ul> 9 9 {{user.username}}'s waveforms: 10 <li>ossie_demo</li> 10 {% if availableList %} 11 {% for wave in availableList %} 12 <li>{{ wave.getName }}</li> 13 {% endfor %} 14 {% else %} 15 <p>No waveforms are available.</p> 16 {% endif %} 11 17 </ul> 12 18 <a href="/logout/">Logout here</a> … … 16 22 {% endif %} 17 23 {% endblock %} 24 25 26