promethee 1.5.0 → 1.5.2

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: cde9040a419b0a61b9a340c507d1d82b66ddb7f1
4
- data.tar.gz: af9235ff2d67f952446e461d770519c2f8b20b7a
3
+ metadata.gz: 2247f4ed854e9275378c439e372d82b57b488e90
4
+ data.tar.gz: 67ad9f3e44476b50c6c3116d21ce1e7f3d8d89fe
5
5
  SHA512:
6
- metadata.gz: 2cc5a00654ecc1fba55747c887b198886f611aed1d65e84b3adc3798b005a628b678977353dc0a09b08ffc8ba65b2e5a24306c81f0952a3d90bac0e2382fad96
7
- data.tar.gz: dd0472af621d3ceca13191c12ef953f426d08236cf6424fe2eb58d2be937e0d6d94b26c14da384ea362e04a61c348c8b4a70bb958c5c91dc773596b600986e55
6
+ metadata.gz: 3ada62bc8663659b56a41c429352b49ea8a576b7fd04668827ea818303d1e291ff567771ca3d442798e9aef729ac691214f46bf5623b16549707de1c25f5b8ec
7
+ data.tar.gz: 2b922873945cf709aead1dbfc7c667b72bf10a73edc1bba70b3c2418d5c48383e873eafb6f38a946a47ff42e03ff691ee0de36c94c0e97332992199731c77108
@@ -2,8 +2,8 @@
2
2
  promethee_data = Promethee::Data.new master_data, localization_data: localization_data
3
3
  %>
4
4
 
5
- <script>
6
- var prometheeLocalizer = angular
5
+ <script type="text/javascript">
6
+ var promethee = angular
7
7
  .module('PrometheeLocalizer', ['summernote'])
8
8
  .value('data', <%= promethee_data.localization_data_to_json.html_safe %>)
9
9
  .filter('htmlSafe', ['$sce', function($sce) {
@@ -11,25 +11,25 @@ promethee_data = Promethee::Data.new master_data, localization_data: localizatio
11
11
  return $sce.trustAsHtml(val);
12
12
  };
13
13
  }]);
14
+ </script>
15
+
16
+ <% promethee_util_partials.each do |partial| %>
17
+ <%= render partial %>
18
+ <% end %>
14
19
 
15
- prometheeLocalizer.controller('PrometheeLocalizerController', ['$scope', 'data', function($scope, data) {
20
+ <script type="text/javascript">
21
+ promethee.controller('PrometheeLocalizerController', ['$scope', 'summernoteConfig', 'data', function($scope, summernoteConfig, data) {
16
22
 
17
23
  $scope.data = data;
18
24
  $scope.component = {children: data.components};
19
25
 
20
- $scope.options = {
21
- toolbar: [
22
- ['headline', ['style']],
23
- ['style', ['bold', 'italic']],
24
- ['alignment', ['ul', 'ol', 'paragraph']],
25
- ['code', ['codeview']]
26
- ]
27
- };
26
+ $scope.summernoteConfig = summernoteConfig;
28
27
 
29
28
  }]);
30
29
  </script>
31
30
 
32
31
 
32
+
33
33
  <div id="prometheeLocalizer"
34
34
  class="promethee-localizer"
35
35
  ng-app="PrometheeLocalizer"
@@ -41,9 +41,8 @@ promethee_data = Promethee::Data.new master_data, localization_data: localizatio
41
41
 
42
42
  <input type="hidden" name="<%= object_name %>[<%= method_name %>]" id="page_data" value="{{data}}" />
43
43
 
44
- <% Dir["#{__dir__}/components/*/_localize.html.erb"].map do |file| %>
45
- <% partial = file.split('app/views/').last.gsub('.html.erb', '').gsub('/_', '/') %>
46
- <%= render partial %>
44
+ <% promethee_localize_partials.each do |partial| %>
45
+ <%= render partial %>
47
46
  <% end %>
48
47
 
49
48
  <% #TODO override templates from current project %>
@@ -4,12 +4,12 @@
4
4
  <div class="row">
5
5
  <div class="col-md-6">
6
6
  <b>Aside visible content</b>
7
- <div class="promethee-edit__wrapper" ng-bind-html="component.master.attributes.visible_content | htmlSafe"></div>
7
+ <div ng-bind-html="component.master.attributes.visible_content | htmlSafe"></div>
8
8
  </div>
9
9
  <div class="col-md-6">
10
10
  <div class="form-group">
11
11
  <label class="label-control">Aside visible content</label>
12
- <input class="form-control" ng-model="component.attributes.visible_content" type="text">
12
+ <summernote config="summernoteConfig" ng-model="component.attributes.visible_content"></summernote>
13
13
  </div>
14
14
  </div>
15
15
  </div>
@@ -17,12 +17,12 @@
17
17
  <div class="row" ng-show="component.master.attributes.collapsed_content">
18
18
  <div class="col-md-6">
19
19
  <b>Aside collapsed content</b>
20
- <p>{{component.master.attributes.collapsed_content}}</p>
20
+ <div ng-bind-html="component.master.attributes.collapsed_content | htmlSafe"></div>
21
21
  </div>
22
22
  <div class="col-md-6">
23
23
  <div class="form-group">
24
24
  <label class="label-control">Aside collapsed content</label>
25
- <input class="form-control" ng-model="component.attributes.collapsed_content" type="text">
25
+ <summernote config="summernoteConfig" ng-model="component.attributes.collapsed_content"></summernote>
26
26
  </div>
27
27
  </div>
28
28
  </div>
@@ -2,13 +2,13 @@
2
2
  <div ng-show="(component.master.contents | json) !== '{}'">
3
3
  <hr>
4
4
 
5
- <div ng-repeat="key, content in component.master.attributes.contents">
5
+ <div ng-repeat="(key, content) in component.master.attributes.contents">
6
6
  <div class="row">
7
7
  <div class="col-md-6">
8
8
  <div class="promethee-edit__wrapper" ng-bind-html="component.master.attributes.contents[key] | htmlSafe"></div>
9
9
  </div>
10
10
  <div class="col-md-6">
11
- <summernote config="options" ng-model="component.attributes.contents[key]"></summernote>
11
+ <summernote config="summernoteConfig" ng-model="component.attributes.contents[key]"></summernote>
12
12
  </div>
13
13
  </div>
14
14
  </div>
@@ -4,10 +4,12 @@
4
4
 
5
5
  <div class="row">
6
6
  <div class="col-md-6">
7
- <div class="promethee-edit__wrapper" ng-bind-html="component.master.attributes.body | htmlSafe"></div>
7
+ <b>Text</b>
8
+ <div ng-bind-html="component.master.attributes.body | htmlSafe"></div>
8
9
  </div>
9
10
  <div class="col-md-6">
10
- <summernote config="options" ng-model="component.attributes.body"></summernote>
11
+ <b>Text</b>
12
+ <summernote config="summernoteConfig" ng-model="component.attributes.body"></summernote>
11
13
  </div>
12
14
  </div>
13
15
  </div>
@@ -30,6 +30,10 @@ module Promethee::Rails::Helper
30
30
  promethee_partials_for 'presets/_*.html.erb'
31
31
  end
32
32
 
33
+ def promethee_localize_partials
34
+ promethee_partials_for 'components/*/_localize.html.erb'
35
+ end
36
+
33
37
  # promethee_bem_classes 'promethee-edit__move__droppable', '--{{type}}', '--first'
34
38
  # -> promethee-edit__move__droppable promethee-edit__move__droppable--{{type}} promethee-edit__move__droppable--{{type}}--first"
35
39
  def promethee_bem_classes(*args)
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.5.0'
3
+ VERSION = '1.5.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Dargelos
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  version: '0'
360
360
  requirements: []
361
361
  rubyforge_project:
362
- rubygems_version: 2.6.13
362
+ rubygems_version: 2.6.11
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Bring fire to your page