From f3733aa972a3b1ab2eb1ab9d02d859eb75cebbb9 Mon Sep 17 00:00:00 2001 From: Sam Ockman Date: Thu, 7 Jun 2012 04:10:16 -0400 Subject: Before generating hidden fields in the template --- wqflask/wqflask/show_trait/DataEditingPage.py | 68 +++++++++++---------- .../wqflask/templates/trait_data_and_analysis.html | 71 +++++++++++++++------- 2 files changed, 86 insertions(+), 53 deletions(-) diff --git a/wqflask/wqflask/show_trait/DataEditingPage.py b/wqflask/wqflask/show_trait/DataEditingPage.py index fda26322..20840975 100755 --- a/wqflask/wqflask/show_trait/DataEditingPage.py +++ b/wqflask/wqflask/show_trait/DataEditingPage.py @@ -1,6 +1,7 @@ import string import os import cPickle +from collections import OrderedDict #import pyXLWriter as xl from htmlgen import HTMLgen2 as HT @@ -77,37 +78,37 @@ class DataEditingPage(templatePage): ############################# # Some fields, like method, are defaulted to None; otherwise in IE the field can't be changed using jquery - hddn = { - 'FormID':fmID, - 'RISet':fd.RISet, - 'submitID':'', - 'scale':'physic', - 'additiveCheck':'ON', - 'showSNP':'ON', - 'showGenes':'ON', - 'method':None, - 'parentsf14regression':'OFF', - 'stats_method':'1', - 'chromosomes':'-1', - 'topten':'', - 'viewLegend':'ON', - 'intervalAnalystCheck':'ON', - 'valsHidden':'OFF', - 'database':'', - 'criteria':None, - 'MDPChoice':None, - 'bootCheck':None, - 'permCheck':None, - 'applyVarianceSE':None, - 'strainNames':'_', - 'strainVals':'_', - 'strainVars':'_', - 'otherStrainNames':'_', - 'otherStrainVals':'_', - 'otherStrainVars':'_', - 'extra_attributes':'_', - 'other_extra_attributes':'_' - } + hddn = OrderedDict( + FormID = fmID, + RISet = fd.RISet, + submitID = '', + scale = 'physic', + additiveCheck = 'ON', + showSNP = 'ON', + showGenes = 'ON', + method = None, + parentsf14regression = 'OFF', + stats_method = '1', + chromosomes = '-1', + topten = '', + viewLegend = 'ON', + intervalAnalystCheck = 'ON', + valsHidden = 'OFF', + database = '', + criteria = None, + MDPChoice = None, + bootCheck = None, + permCheck = None, + applyVarianceSE = None, + strainNames = '_', + strainVals = '_', + strainVars = '_', + otherStrainNames = '_', + otherStrainVals = '_', + otherStrainVars = '_', + extra_attributes = '_', + other_extra_attributes = '_' + ) if fd.enablevariance: hddn['enablevariance']='ON' @@ -486,6 +487,7 @@ class DataEditingPage(templatePage): # )) #pass + thisTrait.species = _Species # We need this in the template, so we tuck it into thisTrait thisTrait.database = thisTrait.get_database() #XZ: ID links @@ -1683,8 +1685,10 @@ class DataEditingPage(templatePage): or (fd.f1list and thisTrait.data.has_key(fd.f1list[1])): fd.allstrainlist = allstrainlist_neworder + # Sam - is this correct? if nCols == 6 and fd.varianceDispName != 'Variance': - mainForm.append(HT.Input(name='isSE', value="yes", type='hidden')) + #mainForm.append(HT.Input(name='isSE', value="yes", type='hidden')) + hddn['isSE'] = "yes" primary_div = HT.Div(primary_table, Id="primary") #Container for table with primary (for example, BXD) strain values container.append(primary_div) diff --git a/wqflask/wqflask/templates/trait_data_and_analysis.html b/wqflask/wqflask/templates/trait_data_and_analysis.html index 1e67834c..81d6540f 100644 --- a/wqflask/wqflask/templates/trait_data_and_analysis.html +++ b/wqflask/wqflask/templates/trait_data_and_analysis.html @@ -9,23 +9,46 @@
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -91,7 +114,7 @@ - Mouse, BXD + {{ thisTrait.species.capitalize() }}, {{fd.RISet}} @@ -113,9 +136,15 @@ - Gene   + + + + Gene + + +   UniGene