billy_cms 0.0.18 → 0.0.19
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/billy_cms/backend/controllers/attributes.controller.js +6 -5
- data/app/assets/javascripts/billy_cms/frontend/editing.es6 +1 -1
- data/app/controllers/api/attributes_controller.rb +1 -1
- data/app/models/billy_cms/additional_attribute.rb +4 -0
- data/lib/billy_cms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ac003fcd657103097aa72393c7866948713dafb
|
4
|
+
data.tar.gz: c4d5897f877e027fa0fd9150364e41a63bd580f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beb64680c5941679e0cf7bbcb2708af749eb6ea468cf8d0268629f8393b4fc089c2bbc94ccde3de968adc592aa70374cf1538d53008077b58fe366368a146a78
|
7
|
+
data.tar.gz: b692f42bd5a42ecd41c61c054a7d2f51ead8f5bcdaf8397645eea7d10630dd7504fe16bf340e58ec2df5fe7773406a8f9e9b277dcd0a2ef42e4338a75d4ccf32
|
@@ -6,22 +6,23 @@ angular.module('BillyCmsBackend').controller('AttributesCtrl', ['$scope', '$http
|
|
6
6
|
this.selectedTabIndex = 0;
|
7
7
|
|
8
8
|
this.resetNewPageType = function() {
|
9
|
-
this.
|
9
|
+
this.newAttribute = new AdditionalAttribute();
|
10
10
|
};
|
11
11
|
this.resetNewPageType();
|
12
12
|
|
13
13
|
this.createAttribute = function() {
|
14
|
-
$http.post('/billy_cms/api/attributes.json', this.
|
14
|
+
$http.post('/billy_cms/api/attributes.json', this.newAttribute)
|
15
15
|
.then(function(result) {
|
16
16
|
var attribute = new AdditionalAttribute(result.data.attribute);
|
17
17
|
$scope.app.allAdditionalAttributes.push(attribute);
|
18
18
|
|
19
19
|
self.selectedTabIndex = 0;
|
20
20
|
})
|
21
|
-
.catch(function(
|
21
|
+
.catch(function(response) {
|
22
|
+
var err = response.status + ': ' + response.data.error;
|
22
23
|
alert(err);
|
23
|
-
})
|
24
|
-
}
|
24
|
+
});
|
25
|
+
};
|
25
26
|
|
26
27
|
return this;
|
27
28
|
}]);
|
@@ -15,7 +15,7 @@ BillyCms.Editing = {
|
|
15
15
|
} else {
|
16
16
|
editableFields = $('[contenteditable]');
|
17
17
|
}
|
18
|
-
var container = $(
|
18
|
+
var container = $(document.body);
|
19
19
|
if (state === true) {
|
20
20
|
container.addClass('edit-mode-enabled');
|
21
21
|
editableFields.attr('contenteditable', true);
|
@@ -4,5 +4,9 @@ module BillyCms
|
|
4
4
|
|
5
5
|
has_many :additional_attributes_page_types, class_name: 'BillyCms::AdditionalAttributesPageTypes'
|
6
6
|
has_many :page_types, through: :additional_attributes_page_types
|
7
|
+
|
8
|
+
validates_presence_of :title
|
9
|
+
validates_presence_of :name
|
10
|
+
validates_presence_of :attribute_type
|
7
11
|
end
|
8
12
|
end
|
data/lib/billy_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: billy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unsdrei GbR
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|