Skip to content

Commit 8627293

Browse files
authored
Merge pull request #75 from aem-design/develop
Develop
2 parents 947e12d + bd6e57d commit 8627293

File tree

64 files changed

+785
-2810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+785
-2810
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<workspaceFilter version="1.0">
3+
<filter root=""/>
4+
</workspaceFilter>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
3+
jcr:description="used to load dialog helpers into content fragment editor."
4+
jcr:primaryType="cq:ClientLibraryFolder"
5+
allowProxy="{Boolean}true"
6+
categories="[dam.cfm.authoring.v2]"
7+
cssProcessor="[default:none,min:none]"
8+
jsProcessor="[default:none,min:none]"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#base=css
2+
cf-editor.css
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*cf-editor.css - additional styles for content fragment editor*/
2+
3+
/* start counter for every text area */
4+
.paragraphcounter {
5+
counter-reset: cf-rte-par-counter;
6+
}
7+
8+
/* increment counter every par block and add counter */
9+
.paragraphcounter > p:before {
10+
11+
counter-increment: cf-rte-par-counter;
12+
content: "#" counter(cf-rte-par-counter) "";
13+
float: right;
14+
color: black;
15+
background-color: lightgray;
16+
width: 40px;
17+
text-align: center;
18+
border-radius: 100%;
19+
vertical-align: middle;
20+
opacity: .5;
21+
22+
}
23+
24+
/* highlight every par block */
25+
.paragraphcounter > p {
26+
27+
border: 1px dashed rgba(0, 0, 0, .5);
28+
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#base=js
2+
cf-editor.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//cf-editor.js - additional logic for content fragment editor
2+
3+
(function ($) {
4+
'use strict';
5+
6+
$("[data-element$='__asset']").each(function(){
7+
var name = $(this).attr("data-element").split("__asset")[0];
8+
if (name) {
9+
console.log("loading paragraph counter to field [" + name + "].");
10+
var selector = ".cfm-multieditor:has(input[data-element='" + name + "']) .cfm-multieditor-richtext-editor"
11+
$(selector).addClass("paragraphcounter");
12+
}
13+
})
14+
15+
}(jQuery));
Loading

0 commit comments

Comments
 (0)