rbbt-views 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  - if defined? step and Step === step
10
10
  - title = "#{step.task.name} [#{step.status}]"
11
11
  - else
12
- - title = "Workflow Explorer"
12
+ - title = $title || "Workflow Explorer"
13
13
  %title
14
14
  = title
15
15
  %link{:rel => "shortcut icon", :type => "image/png", :href => "/favicon.gif"}/
@@ -24,6 +24,7 @@
24
24
 
25
25
  %script{:src => '/plugins/jquery/js/jquery-1.6.2.min.js', :type => 'text/javascript'}
26
26
  %script{:src => '/plugins/jquery/js/jquery.form.js', :type => 'text/javascript'}
27
+ %script{:src => '/plugins/jquery/js/jquery.cookie.js', :type => 'text/javascript'}
27
28
  %script{:src => '/plugins/jmol/Jmol.js', :type => 'text/javascript'}
28
29
 
29
30
  -# %link{:href=>"/plugins/jquery-ui/css/custom-theme/jquery-ui-1.8.14.custom.css", :rel=>"stylesheet", :type=>"text/css"}/
@@ -43,6 +44,8 @@
43
44
  - else
44
45
  Not logged in
45
46
  %a(href="/login") login
47
+ %span.list_dropdown
48
+ %a(href='#lists') Loaded Entity Lists
46
49
 
47
50
  - unless $nomenu
48
51
  #menu
@@ -77,6 +80,8 @@
77
80
  %a.button(href="#" id="back_details") back
78
81
  #details
79
82
 
83
+ #lists
84
+
80
85
  :javascript
81
86
 
82
87
  $('h3.workflow_title').click(function(){
@@ -93,3 +98,17 @@
93
98
  $('#back_details').click(back_details);
94
99
 
95
100
  var details_history = [];
101
+
102
+ $('span.list_dropdown > a').click(function(){ $('#lists').toggle(); return false})
103
+
104
+ var _saved_lists = saved_lists();
105
+ if (_saved_lists == null){ _saved_lists = []; }
106
+
107
+ update_list_viewer();
108
+
109
+ $.each(_saved_lists, function(type, lists){
110
+ $.each(lists, function(id, list){
111
+ add_entity_list(type, list)
112
+ })
113
+ })
114
+
@@ -9,6 +9,7 @@
9
9
  - action ||= ''
10
10
  - klass ||= ''
11
11
  - enctype = method == 'post' ? "multipart/form-data" : ""
12
+ - id ||= ""
12
13
 
13
14
  %form(class=klass action=action method=method id=id enctype=enctype)
14
15
  - if inputs.empty?
@@ -20,8 +21,9 @@
20
21
  - default = input_defaults[name]
21
22
  - value = values[name] || default
22
23
  - description = input_descriptions[name]
24
+ - select_options = defined?(input_options)? input_options[name] : nil
23
25
  - hide = hide_inputs.include? name
24
- = input(input_type, name, :id => input_id, :value => value, :default => default, :description => description, :default => default, :hide => hide)
26
+ = input(input_type, name, :id => input_id, :value => value, :default => default, :description => description, :select_options => select_options, :default => default, :hide => hide)
25
27
 
26
28
  %div.submit_job
27
29
  - if jobname
@@ -6,8 +6,11 @@
6
6
  - header = result.fields
7
7
  - else
8
8
  - header = result.all_fields
9
- - if rows.type == :single
9
+ - case
10
+ - when rows.type == :single
10
11
  - rows = rows.collect{|k,v| [k, NamedArray.setup([k].push(v), header, k, result.namespace)]}
12
+ - when rows.type == :flat
13
+ - rows = rows.collect{|k,v| [k, NamedArray.setup([k].push([v]), header, k, result.namespace)]}
11
14
  - else
12
15
  - rows = rows.collect{|k,v| [k, NamedArray.setup([k].concat(v), header, k, result.namespace)]}
13
16
 
@@ -0,0 +1,47 @@
1
+ /**
2
+ * jQuery Cookie plugin
3
+ *
4
+ * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
5
+ * Dual licensed under the MIT and GPL licenses:
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ * http://www.gnu.org/licenses/gpl.html
8
+ *
9
+ */
10
+ (function($) {
11
+ $.cookie = function(key, value, options) {
12
+
13
+ // key and at least value given, set cookie...
14
+ if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
15
+ options = $.extend({}, options);
16
+
17
+ if (value === null || value === undefined) {
18
+ options.expires = -1;
19
+ }
20
+
21
+ if (typeof options.expires === 'number') {
22
+ var days = options.expires, t = options.expires = new Date();
23
+ t.setDate(t.getDate() + days);
24
+ }
25
+
26
+ value = String(value);
27
+
28
+ return (document.cookie = [
29
+ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
30
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
31
+ options.path ? '; path=' + options.path : '',
32
+ options.domain ? '; domain=' + options.domain : '',
33
+ options.secure ? '; secure' : ''
34
+ ].join(''));
35
+ }
36
+
37
+ // key and possibly options given, get cookie...
38
+ options = value || {};
39
+ var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
40
+
41
+ var pairs = document.cookie.split('; ');
42
+ for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
43
+ if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
44
+ }
45
+ return null;
46
+ };
47
+ })(jQuery);
@@ -0,0 +1,10 @@
1
+
2
+ %dl
3
+ - lists.each do |type, lists|
4
+ %dt= type
5
+ %dd
6
+ %ul
7
+ - lists.each do |list_id|
8
+ %li
9
+ %a(href="/entity_list/#{ type }/#{ list_id }")= list_id
10
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-views
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Miguel Vazquez
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-13 00:00:00 +01:00
19
- default_executable:
18
+ date: 2012-01-31 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: sinatra
@@ -127,15 +126,19 @@ files:
127
126
  - share/views/compass/main.sass
128
127
  - share/views/compass/screen.sass
129
128
  - share/views/dependencies.haml
129
+ - share/views/edit_list.haml
130
130
  - share/views/entity/GOTerm.haml
131
131
  - share/views/entity/Gene.haml
132
132
  - share/views/entity/GenomicMutation.haml
133
133
  - share/views/entity/KeggPathway.haml
134
134
  - share/views/entity/MutatedIsoform.haml
135
- - share/views/entity/NCIBioCartaPathways.haml
136
- - share/views/entity/NCINaturePathways.haml
137
- - share/views/entity/NCIReactomePathways.haml
135
+ - share/views/entity/MutatedIsoform/marked_svg.haml
136
+ - share/views/entity/MutatedIsoform/pdbs.haml
137
+ - share/views/entity/NCIBioCartaPathway.haml
138
+ - share/views/entity/NCINaturePathway.haml
139
+ - share/views/entity/NCIReactomePathway.haml
138
140
  - share/views/entity/PfamDomain.haml
141
+ - share/views/entity/Protein.haml
139
142
  - share/views/entity_list/Default.haml
140
143
  - share/views/error.haml
141
144
  - share/views/files.haml
@@ -787,14 +790,15 @@ files:
787
790
  - share/views/public/plugins/jquery-ui/js/jquery-1.5.1.min.js
788
791
  - share/views/public/plugins/jquery-ui/js/jquery-ui-1.8.14.custom.min.js
789
792
  - share/views/public/plugins/jquery/js/jquery-1.6.2.min.js
793
+ - share/views/public/plugins/jquery/js/jquery.cookie.js
790
794
  - share/views/public/plugins/jquery/js/jquery.form.js
791
795
  - share/views/result.haml
792
796
  - share/views/task_list.haml
797
+ - share/views/user_lists.haml
793
798
  - share/views/wait.haml
794
799
  - LICENSE
795
800
  - test/test_helper.rb
796
801
  - test/rbbt/workflow/rest/test_client.rb
797
- has_rdoc: true
798
802
  homepage: http://github.com/mikisvaz/rbbt-views
799
803
  licenses: []
800
804
 
@@ -824,7 +828,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
824
828
  requirements: []
825
829
 
826
830
  rubyforge_project:
827
- rubygems_version: 1.6.2
831
+ rubygems_version: 1.8.10
828
832
  signing_key:
829
833
  specification_version: 3
830
834
  summary: Rest and HTML interface
@@ -1,9 +0,0 @@
1
- %h3= entity.name
2
-
3
- - genes_in_pathway = entity.genes.ensembl
4
-
5
- %dl
6
-
7
- %dt All Genes in pathway
8
- %dd= genes_in_pathway.link * ", "
9
-
@@ -1,9 +0,0 @@
1
- %h3= entity.name
2
-
3
- - genes_in_pathway = entity.genes.ensembl
4
-
5
- %dl
6
-
7
- %dt All Genes in pathway
8
- %dd= genes_in_pathway.link * ", "
9
-
@@ -1,9 +0,0 @@
1
- %h3= entity.name
2
-
3
- - genes_in_pathway = entity.genes.ensembl
4
-
5
- %dl
6
-
7
- %dt All Genes in pathway
8
- %dd= genes_in_pathway.link * ", "
9
-