rbbt-rest 1.7.7 → 1.7.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d755541d1ba850b137c0da8d8c2352d6ff132b64
4
- data.tar.gz: 1af8cbe39f044f5d2830e412918a8dd4a564a634
3
+ metadata.gz: 8ae96c97e05c9cfa4ee9f482ff553982d71895a9
4
+ data.tar.gz: d07d53dfee35929449e9e6c2818bae23fba46a0f
5
5
  SHA512:
6
- metadata.gz: 5955745c6a807c17ffc35d138415ac970ed09d1be09914ef94254c40d2872bcb983e01cee992bc8da64f233db0cfb29cb10e14f07b55c3cc476e3199e995d2d8
7
- data.tar.gz: d7cc16ebe89f38b8cfbd7c4e8311237124894a267534188dbd3d482f63e9a9022044390cf3ef27d02d45052ca37ea4a91e72d0e7b32b489ed5b7a8024b8573f0
6
+ metadata.gz: f754df3a654c5cd86198022278e4e96d5e16f730e79b80a6393c79e5fd71f5ebd41de11c1c628496f9716bdbe1fab2bee877dd2b53b03f138f6d8ad0ef21492b
7
+ data.tar.gz: b06e33a16fc9c443d98ae327398d4e7b5c1390d7c3cbf860a63c3503eaed3a7a8f977d7bb196a0d1eae942b3683fe466cdfabf3e7d2f60080edf60a7b0f73e0b
@@ -23,6 +23,8 @@ module RbbtRESTHelpers
23
23
  layout_file = (layout ? locate_template('layout') : nil)
24
24
  template_file = locate_template('error')
25
25
 
26
+ reset_js_css
27
+
26
28
  result = render template_file, {:job => job}, layout_file
27
29
 
28
30
  content_type :html
@@ -10,6 +10,11 @@ module RbbtRESTHelpers
10
10
  @recorded_css_files ||= []
11
11
  end
12
12
 
13
+ def reset_js_css
14
+ @recorded_js_files = []
15
+ @recorded_css_files = []
16
+ end
17
+
13
18
 
14
19
  def record_js(file)
15
20
  recorded_js_files << file
@@ -29,7 +29,10 @@ rbbt.post = function(url, data, params){
29
29
  if (request_params.data){
30
30
  var formData = new FormData()
31
31
  forHash(request_params.data, function(key,value){
32
- formData.append(key, value)
32
+ if (typeof value == 'object')
33
+ formData.append(key, JSON.stringify(value))
34
+ else
35
+ formData.append(key, value)
33
36
  })
34
37
  request_params.data = formData
35
38
  }
@@ -24,11 +24,19 @@ KB.list_parents = function(database, list){
24
24
  return list.get().then(function(list_info){
25
25
  var url = '/knowledge_base/user/' + database + '/collection_parents'
26
26
 
27
- collection = {}
27
+ //url = add_parameter(url, 'collection', JSON.stringify(collection))
28
+ //return m.request({url: url, method: "POST", data:{collection:collection}})
29
+ //url = add_parameter(url, '_format', 'tsv_json')
30
+ //return rbbt.post(url, {collection: collection})
31
+
32
+ var collection = {}
28
33
  collection[list.type] = list_info.entities
29
- url = add_parameter(url, 'collection', JSON.stringify(collection))
30
- url = add_parameter(url, '_format', 'tsv_json')
31
- return m.request({url: url, method: "POST"})
34
+
35
+ var data = {}
36
+ data.collection = collection
37
+ data._format = 'tsv_json'
38
+
39
+ return rbbt.post(url, data)
32
40
  })
33
41
  }
34
42
 
@@ -38,6 +46,7 @@ KB.list_children = function(database, list){
38
46
 
39
47
  var collection = {}
40
48
  collection[list.type] = list_info.entities
49
+
41
50
  var data = {}
42
51
  data.collection = JSON.stringify(collection)
43
52
  data._format = 'tsv_json'
@@ -91,7 +91,7 @@ ModalComponent = function(element){
91
91
  var header = [title, close_button];
92
92
  var close_button = rbbt.mview.ibutton({onclick: ctrl.close, class:'small close', style: 'margin-top: -4px'}, m('i.icon.close'))
93
93
  if (ctrl.vm.url){
94
- var link_button = rbbt.mview.ibutton({onclick: ctrl.link, class:'small link', style: 'margin-top: -4px'}, m('a', {href: ctrl.vm.url},[ m('i.icon.arrow.right')]))
94
+ var link_button = rbbt.mview.ibutton({onclick: ctrl.link, class:'small link', style: 'margin-top: -4px'}, m('a', {href: ctrl.vm.url},[ m('i.icon.external')]))
95
95
  header = [title, close_button, link_button];
96
96
  }else{
97
97
  header = [title, close_button];
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7
4
+ version: 1.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake