Permalink
Browse files

backup

  • Loading branch information...
1 parent 2f1b8aa commit 197cb6cf4f9116c5d9cf17a46949ce997a21e944 @mjtognetti mjtognetti committed Mar 12, 2012
Showing with 1,315 additions and 370 deletions.
  1. BIN public/images/sort-asc.png
  2. BIN public/images/sort-desc.png
  3. BIN public/images/sort-inactive.png
  4. +10 −1 public/js/lib/jquery.fixedheadertable.js
  5. +7 −2 public/js/src/collections/comparisons.js
  6. +5 −3 public/js/src/collections/elements.js
  7. +7 −11 public/js/src/collections/experiments.js
  8. +6 −4 public/js/src/collections/factors.js
  9. +6 −4 public/js/src/collections/genes.js
  10. +7 −2 public/js/src/collections/species.js
  11. BIN public/js/src/controllers/.superList.js.swp
  12. +29 −10 public/js/src/controllers/elementDetail.js
  13. +58 −0 public/js/src/controllers/geneDetail.js
  14. +147 −0 public/js/src/controllers/pages/.back.browse.js
  15. +9 −49 public/js/src/controllers/pages/browse.js
  16. +53 −0 public/js/src/controllers/pages/factorSearch.js
  17. +41 −11 public/js/src/controllers/pages/geneSearch.js
  18. +87 −0 public/js/src/controllers/pages/page.js
  19. +43 −0 public/js/src/controllers/superBar.js
  20. +116 −17 public/js/src/controllers/superList.js
  21. +7 −3 public/js/src/models/comparison.js
  22. +47 −16 public/js/src/models/element.js
  23. +18 −12 public/js/src/models/elementDetail.js
  24. +17 −5 public/js/src/models/experiment.js
  25. +7 −3 public/js/src/models/factor.js
  26. +27 −8 public/js/src/models/gene.js
  27. +12 −22 public/js/src/models/geneDetail.js
  28. +7 −7 public/js/src/models/species.js
  29. +13 −3 public/js/src/router.js
  30. +2 −0 public/styles/elementDetail.less
  31. +2 −0 public/styles/geneDetail.less
  32. +3 −19 public/styles/main.less
  33. +19 −0 public/styles/superBar.less
  34. +104 −0 public/styles/superList.less
  35. +59 −0 public/styles/superPane.less
  36. +3 −0 public/styles/variables.less
  37. +3 −3 public/templates/components/elementDetail.html
  38. +13 −0 public/templates/components/geneDetail.html
  39. +14 −0 public/templates/components/superBar.html
  40. +8 −3 public/templates/components/superList.html
  41. +1 −1 public/templates/components/superPane.html
  42. +1 −0 public/templates/main.html
  43. +1 −3 public/templates/pages/fileUpload.html
  44. +7 −0 public/templates/pages/panePage.html
  45. +1 −1 public/templates/test.html
  46. +183 −93 query.py
  47. BIN query.pyc
  48. +18 −1 queryResources.py
  49. BIN queryResources.pyc
  50. +87 −53 server.py
  51. BIN sql/.DB-setup.sql.swp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -16,6 +16,10 @@
*
*
* all CSS sizing (width,height) is done in pixels (px)
+ *
+ *
+ * MODIFIED BY MATT TOGNETTI - line 187
+ *
*/
(function ($) {
@@ -176,6 +180,11 @@
}
helpers._bindScroll($divBody, tableProps);
+
+
+ // Prevent visible header shifting.
+ // This is definitely a hack - Matt T.
+ $thead.css('visibility', 'hidden');
return self;
},
@@ -689,4 +698,4 @@
};
-})(jQuery);
+})(jQuery);
@@ -14,7 +14,10 @@ define([
url: '/comparisons',
- sortBy: 'stage',
+ sortOn: 'comparison',
+ sortOrder: 'asc',
+
+ dirty: false,
//displayProperties: {
// 'Stage': 'stage'
@@ -33,10 +36,12 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy
+ sortby: this.sortOn,
+ order: this.sortOrder
}
};
+ this.dirty = true;
$.ajax(this.url, _.extend(options, params));
}
});
@@ -12,8 +12,9 @@ define([
RegulatoryElementList = Backbone.Collection.extend({
model: Element,
url: '/elements',
- sortBy: 'name',
+ sortOn: 'beginning',
order: 'asc',
+ dirty: false,
//displayProperties: {
// 'Name': 'name'
@@ -27,7 +28,7 @@ define([
+ '/elements';
}
else if (options.gene) {
- this.url = '/genes/' + options.gene + '/elements';
+ this.url = '/genes/' + encodeURIComponent(options.gene) + '/elements';
}
},
@@ -37,11 +38,12 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy,
+ sortby: this.sortOn,
order: this.order
}
};
+ this.dirty = true;
$.ajax(this.url, _.extend(options, params));
}
});
@@ -16,11 +16,10 @@ define([
ExperimentList = Backbone.Collection.extend({
model: Experiment,
url: '/experiments',
- sortBy: 'name',
- //displayProperties: {
- // 'Stage': 'stage'
- //},
+ sortOn: 'dateof',
+ sortOrder: 'asc',
filter: {},
+ dirty: false,
initialize: function(models, options) {
this.timerange = {};
@@ -37,16 +36,13 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy,
- timeRange: {
- from: this.timerange.from,
- to: this.timerange.to
- },
- filter: this.filter,
- value: this.value
+ sortby: this.sortOn,
+ order: this.sortOrder,
+ filter: this.filter
}
};
+ this.dirty = true;
$.ajax(this.url, _.extend(options, params));
}
});
@@ -12,8 +12,9 @@ define([
FactorList = Backbone.Collection.extend({
model: Factor,
url: '/factors',
- sortBy: 'name',
- order: 'asc',
+ sortOn: 'name',
+ sortOrder: 'asc',
+ dirty: false,
//displayProperties: {
//'Name': 'name'
@@ -33,11 +34,12 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy,
- order: this.order
+ sortby: this.sortOn,
+ order: this.sortOrder
}
};
+ this.dirty = true;
$.ajax(this.url, _.extend(options, params));
}
});
@@ -15,8 +15,9 @@ define([
GeneList = Backbone.Collection.extend({
model: Gene,
url: '/genes',
- sortBy: 'name',
- order: 'asc',
+ sortOn: 'name',
+ sortOrder: 'asc',
+ dirty: false,
//displayProperties: {
//'Name': 'name'
@@ -35,11 +36,12 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy,
- order: this.order
+ sortby: this.sortOn,
+ order: this.sortOrder
}
};
+ this.dirty = true;
$.ajax(this.url, _.extend(options, params));
}
});
@@ -12,9 +12,11 @@ define([
SpeciesList = Backbone.Collection.extend({
model: Species,
url: '/species',
- sortBy: 'name',
+ sortOn: 'name',
+ sortOrder: 'asc',
intialize: function(models, options) {
+ this.dirty = false;
},
sync: function(method, model, options) {
@@ -23,10 +25,13 @@ define([
params = {
dataType: 'json',
data: {
- sortBy: this.sortBy
+ sortby: this.sortOn,
+ order: this.sortOrder
}
};
+ this.dirty = true;
+
$.ajax(this.url, _.extend(options, params));
}
});
Binary file not shown.
@@ -1,39 +1,58 @@
define([
'jquery',
'underscore',
- 'backbone'
-], function($, _, Backbone) {
- var elementDetailView;
+ 'backbone',
+ 'text!/public/templates/components/superPane.html',
+ 'text!/public/templates/components/elementDetail.html'
+], function($, _, Backbone, SuperPaneTemplate, ElementDetailTemplate) {
+ var ElementDetail;
- elementDetailView = Backbone.View.extend({
+ ElementDetail = Backbone.View.extend({
className: 'pane',
paneTemplate: _.template(SuperPaneTemplate),
detailTemplate: _.template(ElementDetailTemplate),
events: {
+ 'focus': 'focus',
+ 'blur': 'blur'
},
- initialize: function(options) {
+ initialize: function(options) {
+ this.model.bind('change', this.render, this);
},
focus: function() {
-
+ if (!this.active) this.trigger('focus', this);
},
blur: function() {
+ this.trigger('blur', this);
},
render: function() {
if (!this.rendered) {
- this.$el.html(this.paneTemplate(paneContext));
- this.$('.content').html(
- this.detailTemplate(this.model.toJSON()));
+
+ var paneContext = {
+ title: 'Element Detail',
+ width: 300
+ };
+
+ this.setElement(this.paneTemplate(paneContext));
this.rendered = true;
+ }
+ if (this.model.dirty) {
+ this.$('.content').html(
+ this.detailTemplate(this.model.toJSON()));
}
+
+ if (this.active)
+ this.$('.title').addClass('active');
+ else
+ this.$('.title').removeClass('active');
}
});
- return elementDetailView;
+ return ElementDetail;
});
@@ -0,0 +1,58 @@
+define([
+ 'jquery',
+ 'underscore',
+ 'backbone',
+ 'text!/public/templates/components/superPane.html',
+ 'text!/public/templates/components/geneDetail.html'
+], function($, _, Backbone, SuperPaneTemplate, GeneDetailTemplate) {
+ var GeneDetail;
+
+ GeneDetail = Backbone.View.extend({
+ className: 'pane',
+ paneTemplate: _.template(SuperPaneTemplate),
+ detailTemplate: _.template(GeneDetailTemplate),
+
+ events: {
+ 'focus': 'focus',
+ 'blur': 'blur'
+ },
+
+ initialize: function(options) {
+ this.model.bind('change', this.render, this);
+ },
+
+ focus: function() {
+ if (!this.active) this.trigger('focus', this);
+ },
+
+ blur: function() {
+ this.trigger('blur', this);
+ },
+
+ render: function() {
+ if (!this.rendered) {
+
+ var paneContext = {
+ title: 'Gene Detail',
+ width: 300
+ };
+
+ this.setElement(this.paneTemplate(paneContext));
+ this.rendered = true;
+ }
+
+ if (this.model.dirty) {
+ this.$('.content').html(
+ this.detailTemplate(this.model.toJSON()));
+ }
+
+ if (this.active)
+ this.$('.title').addClass('active');
+ else
+ this.$('.title').removeClass('active');
+
+ }
+ });
+
+ return GeneDetail;
+});
Oops, something went wrong.

0 comments on commit 197cb6c

Please sign in to comment.