This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isValidDate(this.value); | |
function isValidDate(dateString) { | |
var regEx = /^[0-9]{4}(\/){1}[0-9]{2}(\/){1}[0-9]{2}/; | |
if(dateString.match(regEx)){ | |
var d = new Date(dateString); | |
var dNum = d.getTime(); | |
if(!dNum && dNum !== 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add listeners to detect when field focus changes and when form is submitted | |
window.addEventListener("bridgeInitializeStart", function (){ | |
guideBridge.connect(function () { | |
guideBridge.on("elementFocusChanged", function (event,data) { | |
fieldFocus(data); | |
}); | |
guideBridge.on("submitStart", function (event,data) { | |
formSubmit(data,event); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-maven-plugin</artifactId> | |
</plugin> | |
<plugin> | |
<groupId>org.jacoco</groupId> | |
<artifactId>jacoco-maven-plugin</artifactId> | |
<configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
$(window).adaptTo("foundation-registry").register("foundation.collection.action.action", { | |
name: "cq.wcm.copyAssetLink", | |
handler: function() { | |
console.log('Copy link button clicked'); | |
} | |
}); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document, Granite, $) { | |
console.log('copyAssetLink.js loaded'); | |
$(window).adaptTo("foundation-registry").register("foundation.collection.action.action", { | |
name: "cq.wcm.copyAssetLink", | |
handler: function(name, el, config, collection, selections) { | |
if (selections.length != 1) { | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.annotation.PostConstruct; | |
public interface StaticDataSourceModel { | |
@PostConstruct | |
void init(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.tipi.core.models.StaticDataSourceModel; | |
import com.tipi.core.services.DataSourceService; | |
import lombok.extern.slf4j.Slf4j; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.models.annotations.Model; | |
import org.apache.sling.models.annotations.injectorspecific.OSGiService; | |
import org.apache.sling.models.annotations.injectorspecific.Self; | |
import org.osgi.service.component.annotations.Component; | |
import javax.annotation.PostConstruct; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.adobe.granite.ui.components.ds.DataSource; | |
import com.adobe.granite.ui.components.ds.SimpleDataSource; | |
import com.adobe.granite.ui.components.ds.ValueMapResource; | |
import com.day.crx.JcrConstants; | |
import com.fasterxml.jackson.core.type.TypeReference; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.tipi.core.services.DataSourceService; | |
import lombok.Getter; | |
import lombok.NonNull; | |
import lombok.Setter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(window).adaptTo("foundation-registry").register("foundation.validation.validator", { | |
selector: '[name="./jcr:content/metadata/dc:title"]', | |
validate: function(element) { | |
const wrapper = $(element).parents().eq(1); | |
// Apply only if schema is wknd-default | |
if(!wrapper |