Skip to content

Commit

Permalink
switched to jquery 1.11
Browse files Browse the repository at this point in the history
Former-commit-id: 102d1a2
  • Loading branch information
cpe committed Oct 15, 2015
1 parent 3f7614e commit e66fd02
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
26 changes: 13 additions & 13 deletions nodes/cdms/node/queryfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def setupResults(sql):
filteronatoms = "Atom" in sql.query
filteroninchi = "Inchi" in sql.query
filteronmols = "Molecule" in sql.query
filteronspecies = ("Ion" in sql.query) | filteronmols | filteroninchi | filteronatoms
filteronspecieid = "SpeciesID" in sql.query
filteronspecies = ("Ion" in sql.query) | filteronmols | filteroninchi | filteronatoms | filteronspecieid

temperature = 300.0
if not sql.parsedSQL.where:
Expand Down Expand Up @@ -336,10 +337,7 @@ def setupResults(sql):
# get atoms and molecules with states which occur in transition-block
atoms, molecules,nspecies,nstates = get_species_and_states(transs, addStates, filteronspecies)

# attach partition functions to each specie
attach_partionfunc(molecules)

# modify filter for transitions:
# modify filter for transitions:
transs = transs.filter(specie__origin=5, specie__archiveflag=0, dataset__archiveflag=0)

# Attach experimental transitions (TransitionsExp) to transitions
Expand Down Expand Up @@ -391,14 +389,16 @@ def setupResults(sql):

if hasattr(sql, 'XRequestMethod') and sql.XRequestMethod == 'HEAD':
return {'HeaderInfo': headerinfo}
else:
return {'RadTrans':transs,
'Atoms':atoms,
'Molecules':molecules,
'Sources':sources,
'Methods':methods,
'HeaderInfo':headerinfo,
}

# attach partition functions to each specie and return the result
attach_partionfunc(molecules)
return {'RadTrans':transs,
'Atoms':atoms,
'Molecules':molecules,
'Sources':sources,
'Methods':methods,
'HeaderInfo':headerinfo,
}



Expand Down
2 changes: 1 addition & 1 deletion nodes/cdms/templates/cdmsportal/portalBase.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="EXPIRES" content="0">
<title>CDMS</title>
<script type="text/javascript" src="/static/cdms/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/static/cdms/js/jquery-1.11.3.min.js"></script>
<script language="JavaScript" src="/static/cdms/js/main_v1.0.js" type="text/javascript"></script>
</head>

Expand Down
26 changes: 12 additions & 14 deletions nodes/jpl/node/queryfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def setupResults(sql):
filteronatoms = "Atom" in sql.query
filteroninchi = "Inchi" in sql.query
filteronmols = "Molecule" in sql.query
filteronspecies = ("Ion" in sql.query) | filteronmols | filteroninchi | filteronatoms
filteronspecieid = "SpeciesID" in sql.query
filteronspecies = ("Ion" in sql.query) | filteronmols | filteroninchi | filteronatoms | filteronspecieid
q = sql2Q(sql)

addStates = (not sql.requestables or 'atomstates' in sql.requestables or 'moleculestates' in sql.requestables)
Expand All @@ -320,9 +321,6 @@ def setupResults(sql):
# get atoms and molecules with states which occur in transition-block
atoms, molecules,nspecies,nstates = get_species_and_states(transs, addStates, filteronspecies)

# attach partition functions to each specie
attach_partionfunc(molecules)

# modify filter for transitions:
transs = transs.filter(specie__origin=0, specie__archiveflag=0, dataset__archiveflag=0)

Expand All @@ -342,7 +340,6 @@ def setupResults(sql):
else:
sources=Sources.objects.none()


nsources = sources.count()
nmolecules = len(molecules)#molecules.count()
natoms = len(atoms) #atoms.count()
Expand All @@ -361,7 +358,6 @@ def setupResults(sql):
size_estimate='%.2f' % (nstates*0.0008755624 +ntranss*0.000561003 +nmolecules*0.001910 +nsources * 0.0005+0.01)
else: size_estimate='0.0'


# this header info is used in xsams-header-info (html-request)
headerinfo={\
'Truncated':"100", # CDMS will not truncate data (at least for now)
Expand All @@ -377,14 +373,16 @@ def setupResults(sql):

if hasattr(sql, 'XRequestMethod') and sql.XRequestMethod == 'HEAD':
return {'HeaderInfo': headerinfo}
else:
return {'RadTrans':transs,
'Atoms':atoms,
'Molecules':molecules,
'Sources':sources,
'Methods':methods,
'HeaderInfo':headerinfo,
}

# attach partition functions to each specie and return the result
attach_partionfunc(molecules)
return {'RadTrans':transs,
'Atoms':atoms,
'Molecules':molecules,
'Sources':sources,
'Methods':methods,
'HeaderInfo':headerinfo,
}



Expand Down
2 changes: 1 addition & 1 deletion vamdclib
Submodule vamdclib updated 3 files
+34 −6 database.py
+15 −6 request.py
+1 −1 settings.py

0 comments on commit e66fd02

Please sign in to comment.