diff --git a/HIRS_AttestationCA/build.gradle b/HIRS_AttestationCA/build.gradle index 1580bfce..c6f20171 100644 --- a/HIRS_AttestationCA/build.gradle +++ b/HIRS_AttestationCA/build.gradle @@ -27,6 +27,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.0.1' implementation 'com.github.darrachequesne:spring-data-jpa-datatables:6.0.1' implementation 'org.springframework.retry:spring-retry:2.0.0' + implementation libs.springdatajpa implementation libs.bouncycastle implementation libs.commons.codec diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/PersistenceConfiguration.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/PersistenceConfiguration.java new file mode 100644 index 00000000..384f2bc7 --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/PersistenceConfiguration.java @@ -0,0 +1,92 @@ +package hirs.attestationca.persist; + +import hirs.attestationca.persist.service.FilesStorageService; +import hirs.attestationca.persist.service.FilesStorageServiceImpl; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Persistence Configuration for Spring enabled applications. Constructs a Hibernate SessionFactory + * backed powered by a HikariCP connection pooled data source. Module-specific settings + * need to be set in the persistence-extended.properties file on the classpath. If another module + * such as the HIRS_Portal uses this class and doesn't have a persistence-extended.properties + * file, the default persistence file will be used instead. + */ +@Configuration +public class PersistenceConfiguration { + + @Bean + public FilesStorageService filesStorageService() { + FilesStorageServiceImpl filesStorageService = new FilesStorageServiceImpl(new StorageProperties()); + filesStorageService.init(); + return filesStorageService; + } + +// /** +// * Creates a {@link CertificateServiceImpl} ready to use. +// * +// * @return {@link CertificateServiceImpl} +// */ +// @Bean +// public CertificateServiceImpl certificateServiceImpl() { +// CertificateServiceImpl manager = new CertificateServiceImpl(); +// setDbManagerRetrySettings(manager); +// return manager; +// } +// +// /** +// * Creates a {@link DeviceServiceImpl} ready to use. +// * +// * @return {@link DeviceServiceImpl} +// */ +// @Bean +// public DeviceServiceImpl deviceServiceImpl() { +// DeviceServiceImpl manager = new DeviceServiceImpl(); +// setDbManagerRetrySettings(manager); +// return manager; +// } +// +// /** +// * Creates a {@link PolicyServiceImpl} ready to use. +// * +// * @return {@link PolicyServiceImpl} +// */ +// @Bean +// public PolicyServiceImpl policyServiceImpl() { +// PolicyServiceImpl manager = new PolicyServiceImpl(); +// setDbManagerRetrySettings(manager); +// return manager; +// } +// +// /** +// * Creates a {@link ReferenceManifestServiceImpl} ready to use. +// * +// * @return {@link ReferenceManifestServiceImpl} +// */ +// @Bean +// public ReferenceManifestServiceImpl referenceManifestServiceImpl() { +// ReferenceManifestServiceImpl manager = new ReferenceManifestServiceImpl(); +// setDbManagerRetrySettings(manager); +// return manager; +// } +// +// /** +// * Creates a {@link ReferenceDigestValueServiceImpl} ready to use. +// * +// * @return {@link ReferenceDigestValueServiceImpl} +// */ +// @Bean +// public ReferenceDigestValueServiceImpl referenceDigestValueServiceImpl() { +// ReferenceDigestValueServiceImpl manager = new ReferenceDigestValueServiceImpl(); +// setDbManagerRetrySettings(manager); +// return manager; +// } +// +// /** +// * Apply the spring-wired retry template settings to the db manager. +// * @param dbManager the manager to apply the retry settings to +// */ +// private void setDbManagerRetrySettings(final DefaultDbService dbManager) { +// dbManager.setRetryTemplate(); +// } +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/StorageProperties.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/StorageProperties.java new file mode 100644 index 00000000..6dad847c --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/StorageProperties.java @@ -0,0 +1,21 @@ +package hirs.attestationca.persist; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties("storage") +public class StorageProperties { + + /** + * Folder location for storing files + */ + private String location = "/tmp/hirs"; + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/ComponentResultRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/ComponentResultRepository.java new file mode 100644 index 00000000..b0f6f62f --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/ComponentResultRepository.java @@ -0,0 +1,16 @@ +package hirs.attestationca.persist.entity.manager; + +import hirs.attestationca.persist.entity.userdefined.certificate.ComponentResult; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.UUID; + +@Repository +public interface ComponentResultRepository extends JpaRepository { + + @Query(value = "SELECT * FROM ComponentResult where certificateId = ?1", nativeQuery = true) + List getComponentResultsByCertificate(UUID certificateId); +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/PolicyRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/PolicyRepository.java new file mode 100644 index 00000000..78c48cde --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/PolicyRepository.java @@ -0,0 +1,12 @@ +package hirs.attestationca.persist.entity.manager; + +import hirs.attestationca.persist.entity.userdefined.PolicySettings; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.UUID; + +@Repository +public interface PolicyRepository extends JpaRepository { + PolicySettings findByName(String name); +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java new file mode 100644 index 00000000..f92d9c28 --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java @@ -0,0 +1,11 @@ +package hirs.attestationca.persist.entity.manager; + +import hirs.attestationca.persist.entity.userdefined.SupplyChainValidationSummary; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.UUID; + +@Repository +public interface SupplyChainValidationSummaryRepository extends JpaRepository { +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/PolicySettings.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/PolicySettings.java new file mode 100644 index 00000000..a076dc6f --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/userdefined/PolicySettings.java @@ -0,0 +1,123 @@ +package hirs.attestationca.persist.entity.userdefined; + +import hirs.attestationca.persist.entity.UserDefinedEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +/** + * Class represents Supply Chain policy. Supply Chain Policy identifies the methods in + * SupplyChainValidator that should be used in order to validate a supply chain. + * By default, the policy does not enable any validations. + */ +@Table(name = "PolicySettings") +@Getter +@Setter +@Entity +@ToString(callSuper = true) +public class PolicySettings extends UserDefinedEntity { + /** + * Name of the default Supply Chain Policy. + */ + public static final String DEFAULT_POLICY = "Default Supply Chain Policy"; + /** + * Number of days in 10 years. + */ + public static final String TEN_YEARS = "3651"; + /** + * Number of days in 1 year. + */ + public static final String YEAR = "365"; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean ecValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean pcValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean pcAttributeValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean firmwareValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean utcValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean expiredCertificateValidationEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean replaceEC = false; + + @Column(nullable = false, columnDefinition = "boolean default true") + private boolean issueAttestationCertificate = true; + + @Column(nullable = false, columnDefinition = "boolean default true") + private boolean issueDevIdCertificate = true; + + @Column(nullable = false) + private String validityDays = TEN_YEARS; + + @Column(nullable = false) + private String devIdValidityDays = TEN_YEARS; + + @Column(nullable = false) + private String reissueThreshold = YEAR; + + @Column(nullable = false) + private String devIdReissueThreshold = YEAR; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean generateOnExpiration = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean devIdExpirationFlag = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean ignoreImaEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean ignoretBootEnabled = false; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean linuxOs = false; + + @Column(nullable = false, columnDefinition = "boolean default true") + private boolean ignoreGptEnabled = true; + + @Column(nullable = false, columnDefinition = "boolean default false") + private boolean ignoreOsEvtEnabled = false; + + /** + * Default constructor necessary for Hibernate. + */ + protected PolicySettings() { + super(); + } + + /** + * Constructor used to initialize PolicySettings object. + * + * @param name + * A name used to uniquely identify and reference the Supply Chain policy. + */ + public PolicySettings(final String name) { + super(name); + } + + /** + * Constructor used to initialize PolicySettings object. + * + * @param name + * A name used to uniquely identify and reference the supply chain policy. + * @param description + * Optional description of the policy that can be added by the user + */ + public PolicySettings(final String name, final String description) { + super(name, description); + } +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultDbService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultDbService.java index f98f003c..a90799fd 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultDbService.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/DefaultDbService.java @@ -19,7 +19,9 @@ import org.springframework.stereotype.Service; import java.io.Serializable; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.UUID; @Log4j2 @Service diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageService.java new file mode 100644 index 00000000..6d54f7ff --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageService.java @@ -0,0 +1,20 @@ +package hirs.attestationca.persist.service; + +import org.springframework.web.multipart.MultipartFile; + +import java.nio.file.Path; +import java.util.stream.Stream; + +public interface FilesStorageService { + public void init(); + + public void save(MultipartFile file); + + public Path load(String filename); + + public boolean delete(String filename); + + public void deleteAll(); + + public Stream loadAll(); +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageServiceImpl.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageServiceImpl.java new file mode 100644 index 00000000..d9ce0e3d --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/FilesStorageServiceImpl.java @@ -0,0 +1,88 @@ +package hirs.attestationca.persist.service; + +import hirs.attestationca.persist.StorageProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.FileAlreadyExistsException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.stream.Stream; + +@Service +public class FilesStorageServiceImpl implements FilesStorageService { + + private final Path rootLocation; + + @Autowired + public FilesStorageServiceImpl(StorageProperties properties) { + this.rootLocation = Paths.get(properties.getLocation()); + } + + @Override + public void init() { + try { + Files.createDirectories(rootLocation); + } catch (IOException e) { + throw new RuntimeException("Could not initialize folder for upload!"); + } + } + + @Override + public void save(MultipartFile file) { + try { + if (file.isEmpty()) { + return ; + } + Path destinationFile = this.rootLocation.resolve( + Paths.get(file.getOriginalFilename())) + .normalize().toAbsolutePath(); + if (!destinationFile.getParent().equals(this.rootLocation.toAbsolutePath())) { + // This is a security check + return ; + } + try (InputStream inputStream = file.getInputStream()) { + Files.copy(inputStream, destinationFile, + StandardCopyOption.REPLACE_EXISTING); + } + } catch (Exception e) { + if (e instanceof FileAlreadyExistsException) { + throw new RuntimeException("A file of that name already exists."); + } + + throw new RuntimeException(e.getMessage()); + } + } + + @Override + public Path load(String filename) { + return rootLocation.resolve(filename); + } + + @Override + public boolean delete(String filename) { + return false; + } + + @Override + public void deleteAll() { + + } + + @Override + public Stream loadAll() { + try { + return Files.walk(this.rootLocation, 1) + .filter(path -> !path.equals(this.rootLocation)) + .map(this.rootLocation::relativize); + } + catch (IOException e) { + return null; + } + } +} diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/PolicyServiceImpl.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/PolicyServiceImpl.java new file mode 100644 index 00000000..47cc45ea --- /dev/null +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/PolicyServiceImpl.java @@ -0,0 +1,25 @@ +package hirs.attestationca.persist.service; + +import hirs.attestationca.persist.entity.manager.PolicyRepository; +import hirs.attestationca.persist.entity.userdefined.PolicySettings; +import jakarta.persistence.EntityManager; +import org.springframework.beans.factory.annotation.Autowired; + +//@Service +public class PolicyServiceImpl extends DefaultDbService { + + @Autowired + private EntityManager entityManager; + + @Autowired + private PolicyRepository repository; + + public void saveSettings(PolicySettings settings) { + repository.save(settings); + } + + +// public Policy getDefaultPolicy(Appraiser appraiser) { +// return repository.findByAppraiser(appraiser); +// } +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PageConfiguration.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PageConfiguration.java new file mode 100644 index 00000000..a1550aa9 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/PageConfiguration.java @@ -0,0 +1,60 @@ +package hirs.attestationca.portal; + +import hirs.attestationca.portal.datatables.DataTableView; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.view.InternalResourceViewResolver; +import org.springframework.web.servlet.view.UrlBasedViewResolver; + + +/** + * Specifies the location to scan for page controllers, view resolver for JSON data, and view + * resolver to map view names to jsp files. + */ +@Configuration +@EnableWebMvc +@ComponentScan("hirs.attestationca.portal.page.controllers") +public class PageConfiguration { + + /** + * @return bean to resolve injected annotation.Value + * property expressions for beans. + */ + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + /** + * Makes all URLs that end in "dataTable" use DataTableView to serialize DataTableResponse. + * + * @return ViewResolver that uses DataTableView. + */ + @Bean + public ViewResolver dataTableViewResolver() { + UrlBasedViewResolver resolver = new UrlBasedViewResolver(); + resolver.setViewClass(DataTableView.class); + resolver.setViewNames("*dataTable"); + resolver.setOrder(0); + return resolver; + } + + /** + * Maps view names to the appropriate jsp file. + *

+ * Only seems to apply to GET requests. + * + * @return a ViewResolver bean containing the mapping. + */ + @Bean + public ViewResolver pageViewResolver() { + InternalResourceViewResolver resolver = new InternalResourceViewResolver(); + resolver.setPrefix("/WEB-INF/jsp/"); + resolver.setSuffix(".jsp"); + return resolver; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/DataTableView.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/DataTableView.java new file mode 100644 index 00000000..034fc819 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/datatables/DataTableView.java @@ -0,0 +1,45 @@ +package hirs.attestationca.portal.datatables; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import java.util.Map; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.http.MediaType; +import org.springframework.web.servlet.view.AbstractUrlBasedView; + +/** + * Serializes the DataTableResponse from the view as JSON and writes it to the HTTP response. + * + */ +public class DataTableView extends AbstractUrlBasedView { + + private static final Gson GSON = new GsonBuilder().create(); + private static final String MODEL_FIELD; + static { + final String name = DataTableResponse.class.getSimpleName(); + MODEL_FIELD = name.substring(0, 1).toLowerCase() + name.substring(1); + } + + /** + * Serializes the DataTableResponse from the view as JSON and writes it to the HTTP response. + * + * @param model combined output Map (never {@code null}), with dynamic values taking precedence + * over static attributes + * @param request current HTTP request + * @param response current HTTP response + * @throws Exception if rendering failed + */ + @Override + protected void renderMergedOutputModel( + final Map model, + final HttpServletRequest request, + final HttpServletResponse response) throws Exception { + response.setContentType(MediaType.APPLICATION_JSON_VALUE); + DataTableResponse dataTable = (DataTableResponse) model.get(MODEL_FIELD); + ServletOutputStream out = response.getOutputStream(); + String json = GSON.toJson(dataTable); + out.print(json); + } +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/HelpPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/HelpPageController.java new file mode 100644 index 00000000..c9b97938 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/HelpPageController.java @@ -0,0 +1,62 @@ +package hirs.attestationca.portal.page.controllers; + +import hirs.attestationca.portal.page.PageController; +import hirs.attestationca.portal.page.params.NoPageParams; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import java.io.File; +import java.io.IOException; + +import static hirs.attestationca.portal.page.Page.HELP; + +/** + * Controller for the Help page. + */ +@Log4j2 +@Controller +@RequestMapping("/help") +public class HelpPageController extends PageController { + + @Autowired + private ApplicationContext applicationContext; + + private static final String PATH = "/docs"; + + /** + * Constructor providing the Page's display and routing specification. + */ + public HelpPageController() { + super(HELP); + } + + /** + * Returns the path for the view and the data model for the page. + * + * @param params The object to map url parameters into. + * @param model The data model for the request. Can contain data from redirect. + * @return the path for the view and data model for the page. + */ + @Override + @RequestMapping + public ModelAndView initPage(final NoPageParams params, final Model model) { + ModelAndView mav = getBaseModelAndView(); + + try { + File[] documents = new File( + applicationContext.getResource(PATH).getFile().getPath() + ).listFiles(); + mav.addObject("docs", documents); + } catch (IOException ex) { + log.error("Could not get files from resource."); + } + + return mav; + } + +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/RestfulAttestationCertificateAuthority.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/RestfulAttestationCertificateAuthority.java new file mode 100644 index 00000000..74213318 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/RestfulAttestationCertificateAuthority.java @@ -0,0 +1,35 @@ +package hirs.attestationca.portal.page.controllers; + +/** + * Restful implementation of the {@link }. + * Exposes the ACA methods as REST endpoints. + */ +//@RestController +//@RequestMapping("/") +public class RestfulAttestationCertificateAuthority { +// private final ReferenceManifestRepository referenceManifestRepository; +// private final ReferenceDigestValueRepository referenceDigestValueRepository; +// +// @Autowired +// public RestfulAttestationCertificateAuthority( +// final ReferenceManifestRepository referenceManifestRepository, +// final ReferenceDigestValueRepository referenceDigestValueRepository) { +// +// this.referenceManifestRepository = referenceManifestRepository; +// this.referenceDigestValueRepository = referenceDigestValueRepository; +// +// } +// +// +// @ResponseBody +// @RequestMapping(value = "/upload-swidtag", method = RequestMethod.POST, consumes = MediaType.APPLICATION_OCTET_STREAM_VALUE) +// public byte[] uploadSwidtag(@RequestBody final byte[] request) { +// return null; +// } +// +// @ResponseBody +// @RequestMapping(value = "/upload-rimel", method = RequestMethod.POST, consumes = MediaType.APPLICATION_OCTET_STREAM_VALUE) +// public byte[] uploadRimel(@RequestBody final byte[] request) { +// return null; +// } +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java new file mode 100644 index 00000000..554b6ef7 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ValidationReportsPageController.java @@ -0,0 +1,457 @@ +package hirs.attestationca.portal.page.controllers; + +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import hirs.attestationca.persist.CriteriaModifier; +import hirs.attestationca.persist.FilteredRecordsList; +import hirs.attestationca.persist.entity.manager.CertificateRepository; +import hirs.attestationca.persist.entity.manager.DeviceRepository; +import hirs.attestationca.persist.entity.manager.SupplyChainValidationSummaryRepository; +import hirs.attestationca.persist.entity.userdefined.Certificate; +import hirs.attestationca.persist.entity.userdefined.SupplyChainValidationSummary; +import hirs.attestationca.persist.entity.userdefined.certificate.PlatformCredential; +import hirs.attestationca.persist.entity.userdefined.certificate.attributes.ComponentIdentifier; +import hirs.attestationca.persist.entity.userdefined.certificate.attributes.V2.ComponentIdentifierV2; +import hirs.attestationca.portal.datatables.DataTableInput; +import hirs.attestationca.portal.datatables.DataTableResponse; +import hirs.attestationca.portal.datatables.OrderedListQueryDataTableAdapter; +import hirs.attestationca.portal.page.Page; +import hirs.attestationca.portal.page.PageController; +import hirs.attestationca.portal.page.params.NoPageParams; +import jakarta.persistence.EntityManager; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Root; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.log4j.Log4j2; +import org.hibernate.Session; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.lang.ref.Reference; +import java.nio.charset.StandardCharsets; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Controller for the Validation Reports page. + */ +@Log4j2 +@Controller +@RequestMapping("/validation-reports") +public class ValidationReportsPageController extends PageController { + + private final SupplyChainValidationSummaryRepository supplyChainValidatorSummaryRepository; + private final CertificateRepository certificateRepository; + private final DeviceRepository deviceRepository; + @Autowired(required = false) + private EntityManager entityManager; + + private static String systemColumnHeaders = "Verified Manufacturer," + + "Model,SN,Verification Date,Device Status"; + private static String componentColumnHeaders = "Component name,Component manufacturer," + + "Component model,Component SN,Issuer,Component status"; + private static final String DEFAULT_COMPANY = "AllDevices"; + private static final String UNDEFINED = "undefined"; + private static final String TRUE = "true"; + + /** + * Constructor providing the Page's display and routing specification. + * @param supplyChainValidatorSummaryRepository the manager + * @param certificateRepository the certificate manager + * @param deviceRepository the device manager + */ + @Autowired + public ValidationReportsPageController( + final SupplyChainValidationSummaryRepository supplyChainValidatorSummaryRepository, + final CertificateRepository certificateRepository, + final DeviceRepository deviceRepository) { + super(Page.VALIDATION_REPORTS); + this.supplyChainValidatorSummaryRepository = supplyChainValidatorSummaryRepository; + this.certificateRepository = certificateRepository; + this.deviceRepository = deviceRepository; + } + + /** + * Returns the path for the view and the data model for the page. + * + * @param params The object to map url parameters into. + * @param model The data model for the request. Can contain data from redirect. + * @return the path for the view and data model for the page. + */ + @Override + @RequestMapping + public ModelAndView initPage(final NoPageParams params, final Model model) { + return getBaseModelAndView(); + } + + /** + * Gets the list of validation summaries per the data table input query. + * @param input the data table query. + * @return the data table response containing the supply chain summary records + */ + @ResponseBody + @RequestMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE, + method = RequestMethod.GET) + public DataTableResponse getTableData( + final DataTableInput input) { + + log.debug("Handling request for summary list: " + input); + + // attempt to get the column property based on the order index. + String orderColumnName = input.getOrderColumnName(); + + log.debug("Ordering on column: " + orderColumnName); + + // define an alias so the composite object, device, can be used by the + // datatables / query. This is necessary so the device.name property can + // be used. +// CriteriaModifier criteriaModifier = new CriteriaModifier() { +// @Override +// public void modify(final Criteria criteria) { +// criteria.add(RowMutationOperations.Restrictions.isNull(Certificate.ARCHIVE_FIELD)); +// criteria.createAlias("device", "device"); +// } +// }; + + CriteriaModifier criteriaModifier = new CriteriaModifier() { + @Override + public void modify(final CriteriaQuery criteriaQuery) { + Session session = entityManager.unwrap(Session.class); + CriteriaBuilder cb = session.getCriteriaBuilder(); + Root scvRoot = criteriaQuery.from(Reference.class); + + criteriaQuery.select(scvRoot).distinct(true).where(cb.isNull(scvRoot.get(Certificate.ARCHIVE_FIELD))); + } + }; + + FilteredRecordsList records = + OrderedListQueryDataTableAdapter.getOrderedList( + SupplyChainValidationSummary.class, + supplyChainValidatorSummaryRepository, input, orderColumnName, + criteriaModifier); + + return new DataTableResponse<>(records, input); + } + + /** + * This method handles downloading a validation report. + * @param request object + * @param response object + * @throws IOException thrown by BufferedWriter object + */ + @SuppressWarnings({"checkstyle:magicnumber", "checkstyle:methodlength" }) + @RequestMapping(value = "download", method = RequestMethod.POST) + public void download(final HttpServletRequest request, + final HttpServletResponse response) throws IOException { + + log.info("Downloading validation report"); + String company = ""; + String contractNumber = ""; + Pattern pattern = Pattern.compile("^\\w*$"); + DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("uuuu-MM-dd"); + DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss"); + LocalDate startDate = null; + LocalDate endDate = null; + ArrayList createTimes = new ArrayList(); + String[] deviceNames = new String[]{}; + String columnHeaders = ""; + boolean systemOnly = false; + boolean componentOnly = false; + String filterManufacturer = ""; + String filterSerial = ""; + boolean jsonVersion = false; + + Enumeration parameters = request.getParameterNames(); + while (parameters.hasMoreElements()) { + String parameter = (String) parameters.nextElement(); + String parameterValue = request.getParameter(parameter); + log.info(parameter + ": " + parameterValue); + switch (parameter) { + case "company": + Matcher companyMatcher = pattern.matcher(parameterValue); + if (companyMatcher.matches()) { + company = parameterValue; + } else { + company = DEFAULT_COMPANY; + } + break; + case "contract": + Matcher contractMatcher = pattern.matcher(parameterValue); + if (contractMatcher.matches()) { + contractNumber = parameterValue; + } else { + contractNumber = "none"; + } + break; + case "dateStart": + if (parameterValue != null && !parameterValue.isEmpty()) { + startDate = LocalDate.parse(parameterValue, dateFormat); + } else { + startDate = LocalDate.ofEpochDay(0); + } + break; + case "dateEnd": + if (parameterValue != null && !parameterValue.isEmpty()) { + endDate = LocalDate.parse(parameterValue, dateFormat); + } else { + endDate = LocalDate.now(ZoneId.of("America/New_York")); + } + break; + case "createTimes": + if (!parameterValue.equals(UNDEFINED) + && !parameterValue.isEmpty()) { + String[] timestamps = parameterValue.split(","); + for (String timestamp : timestamps) { + createTimes.add(LocalDateTime.parse(timestamp, + dateTimeFormat).toLocalDate()); + } + } + break; + case "deviceNames": + if (!parameterValue.equals(UNDEFINED) + && !parameterValue.isEmpty()) { + deviceNames = parameterValue.split(","); + } + break; + case "system": + if (parameterValue.equals(TRUE)) { + systemOnly = true; + if (!columnHeaders.isEmpty()) { + columnHeaders = "," + columnHeaders; + } + columnHeaders = systemColumnHeaders + columnHeaders; + } + break; + case "component": + if (parameterValue.equals(TRUE)) { + componentOnly = true; + if (!columnHeaders.isEmpty()) { + columnHeaders += ","; + } + columnHeaders += componentColumnHeaders; + } + break; + case "manufacturer": + if (parameterValue != null && !parameterValue.isEmpty()) { + filterManufacturer = parameterValue; + } + break; + case "serial": + if (parameterValue != null && !parameterValue.isEmpty()) { + filterSerial = parameterValue; + } + break; + case "json": + response.setHeader("Content-Type", "application/json"); + jsonVersion = true; + break; + default: + } + } + + if (!jsonVersion) { + response.setHeader("Content-Type", "text/csv"); + response.setHeader("Content-Disposition", + "attachment;filename=validation_report.csv"); + } + BufferedWriter bufferedWriter = new BufferedWriter( + new OutputStreamWriter(response.getOutputStream(), StandardCharsets.UTF_8)); + StringBuilder reportData = new StringBuilder(); + JsonArray jsonReportData = new JsonArray(); + for (int i = 0; i < deviceNames.length; i++) { + if ((createTimes.get(i).isAfter(startDate) || createTimes.get(i).isEqual(startDate)) + && (createTimes.get(i).isBefore(endDate) + || createTimes.get(i).isEqual(endDate))) { + UUID deviceId = deviceRepository.findByName(deviceNames[i]).getId(); + PlatformCredential pc = certificateRepository.findByDeviceId(deviceId); + if (jsonVersion) { + jsonReportData.add(assembleJsonContent(pc, parseComponents(pc), + company, contractNumber)); + } else { + if (i == 0) { + bufferedWriter.append("Company: " + company + "\n"); + bufferedWriter.append("Contract number: " + contractNumber + "\n"); + } + if (systemOnly && componentOnly) { + systemOnly = false; + componentOnly = false; + } + if ((filterManufacturer.isEmpty() || filterManufacturer.equals( + pc.getManufacturer())) + && (filterSerial.isEmpty() || filterSerial.equals( + pc.getPlatformSerial()))) { + if (!componentOnly) { + reportData.append(pc.getManufacturer() + "," + + pc.getModel() + "," + + pc.getPlatformSerial() + "," + + LocalDateTime.now().toString() + "," + + pc.getDevice().getSupplyChainValidationStatus() + ","); + } + if (!systemOnly) { + ArrayList> parsedComponents = parseComponents(pc); + for (ArrayList component : parsedComponents) { + for (String data : component) { + reportData.append(data + ","); + } + reportData.deleteCharAt(reportData.length() - 1); + reportData.append(System.lineSeparator()); + if (!componentOnly) { + reportData.append(",,,,,"); + } + } + reportData = reportData.delete( + reportData.lastIndexOf(System.lineSeparator()) + 1, + reportData.length()); + } + } + } + } + } + if (!jsonVersion) { + if (columnHeaders.isEmpty()) { + columnHeaders = systemColumnHeaders + "," + componentColumnHeaders; + } + bufferedWriter.append(columnHeaders + System.lineSeparator()); + bufferedWriter.append(reportData.toString()); + } else { + bufferedWriter.append(jsonReportData.toString()); + } + bufferedWriter.flush(); + } + + /** + * This method builds a JSON object from the system and component data in a + * validation report. + * @param pc the platform credential used to validate. + * @param parsedComponents component data parsed from the platform credential. + * @param company company name. + * @param contractNumber contract number. + * @return the JSON object in String format. + */ + @SuppressWarnings({"checkstyle:magicnumber" }) + private JsonObject assembleJsonContent(final PlatformCredential pc, + final ArrayList> parsedComponents, + final String company, + final String contractNumber) { + JsonObject systemData = new JsonObject(); + + systemData.addProperty("Company", company); + systemData.addProperty("Contract number", contractNumber); + systemData.addProperty("Verified Manufacturer", pc.getManufacturer()); + systemData.addProperty("Model", pc.getModel()); + systemData.addProperty("SN", pc.getPlatformSerial()); + systemData.addProperty("Verification Date", LocalDateTime.now().toString()); + systemData.addProperty("Device Status", pc.getDevice().getSupplyChainValidationStatus().toString()); + + JsonArray components = new JsonArray(); + for (ArrayList componentData : parsedComponents) { + JsonObject component = new JsonObject(); + component.addProperty("Component name", componentData.get(0)); + component.addProperty("Component manufacturer", componentData.get(1)); + component.addProperty("Component model", componentData.get(2)); + component.addProperty("Component SN", componentData.get(3)); + component.addProperty("Issuer", componentData.get(4)); + component.addProperty("Component status", componentData.get(5)); + components.add(component); + } + systemData.add("Components", components); + + return systemData; + } + + /** + * This method parses the following ComponentIdentifier fields into an ArrayList of ArrayLists. + * - ComponentClass + * - Manufacturer + * - Model + * - Serial number + * - Pass/fail status (based on componentFailures string) + * @param pc the platform credential. + * @return the ArrayList of ArrayLists containing the parsed component data. + */ + private ArrayList> parseComponents(final PlatformCredential pc) { + ArrayList> parsedComponents = new ArrayList>(); + ArrayList> chainComponents = new ArrayList<>(); + + StringBuilder componentFailureString = new StringBuilder(); + if (pc.getComponentIdentifiers() != null + && pc.getComponentIdentifiers().size() > 0) { + componentFailureString.append(pc.getComponentFailures()); + // get all the certificates associated with the platform serial + List chainCertificates = certificateRepository.byBoardSerialNumber(pc.getPlatformSerial()); + // combine all components in each certificate + for (ComponentIdentifier ci : pc.getComponentIdentifiers()) { + ArrayList issuerAndComponent = new ArrayList(); + issuerAndComponent.add(pc.getHolderIssuer()); + issuerAndComponent.add(ci); + chainComponents.add(issuerAndComponent); + } + + for (PlatformCredential cert : chainCertificates) { + componentFailureString.append(cert.getComponentFailures()); + if (!cert.isPlatformBase()) { + for (ComponentIdentifier ci : cert.getComponentIdentifiers()) { + ArrayList issuerAndComponent = new ArrayList(); + issuerAndComponent.add(cert.getHolderIssuer()); + issuerAndComponent.add(ci); + chainComponents.add(issuerAndComponent); + } + } + } + log.info("Component failures: " + componentFailureString.toString()); + for (ArrayList issuerAndComponent : chainComponents) { + ArrayList componentData = new ArrayList(); + String issuer = (String) issuerAndComponent.get(0); + issuer = issuer.replaceAll(",", " "); + ComponentIdentifier ci = (ComponentIdentifier) issuerAndComponent.get(1); + if (ci instanceof ComponentIdentifierV2) { + String componentClass = + ((ComponentIdentifierV2) ci).getComponentClass().toString(); + String[] splitStrings = componentClass.split("\r\n|\n|\r"); + StringBuilder sb = new StringBuilder(); + for (String s : splitStrings) { + sb.append(s); + sb.append(" "); + } + sb = sb.deleteCharAt(sb.length() - 1); + componentData.add(sb.toString()); + } else { + componentData.add("Platform Component"); + } + componentData.add(ci.getComponentManufacturer().getString()); + componentData.add(ci.getComponentModel().getString()); + componentData.add(ci.getComponentSerial().getString()); + componentData.add(issuer); + //Failing components are identified by hashcode + if (componentFailureString.toString().contains(String.valueOf(ci.hashCode()))) { + componentData.add("Fail"); + } else { + componentData.add("Pass"); + } + parsedComponents.add(componentData); + log.info(String.join(",", componentData)); + } + } + + return parsedComponents; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java index b5bc8e25..53357f0c 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/utils/CertificateStringMapBuilder.java @@ -135,7 +135,7 @@ public final class CertificateStringMapBuilder { * Recursive function that check if all the certificate chain is present. * * @param certificate certificate to get the issuer - * @param certificateServiceImpl the certificate manager for retrieving certs. + * @param certificateRepository the certificate repository for retrieving certs. * @return a boolean indicating if it has the full chain or not. */ public static Certificate containsAllChain( diff --git a/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/endorsement-key-credentials.jsp b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/endorsement-key-credentials.jsp new file mode 100644 index 00000000..5e40dce6 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/WEB-INF/jsp/endorsement-key-credentials.jsp @@ -0,0 +1,106 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%-- JSP TAGS --%> +<%@taglib prefix="c" uri="jakarta.tags.core" %> +<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@taglib prefix="my" tagdir="/WEB-INF/tags"%> + +<%-- CONTENT --%> + + + + + + Endorsement Key Credentials + + +
+ + Import Endorsement Key Credentials + + + + + + + +
+
+
+ + + + + + + + + + + + + + +
DeviceIssuerTypeManufacturerModelVersionValid (begin)Valid (end)Options
+
+ +
+
\ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/Readme.md b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/Readme.md new file mode 100644 index 00000000..09c8c8f7 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/Readme.md @@ -0,0 +1,59 @@ +# DataTables plug-in for jQuery + +DataTables is a table enhancing plug-in for the [jQuery](//jquery.com) Javascript library, adding sorting, paging and filtering abilities to plain HTML tables with minimal effort. The stated goal of DataTables is: + +> To enhance the accessibility of data in HTML tables. + +To meet this goal, DataTables is developed with two distinct groups of users in mind: + +* You the developers using DataTables. For developers DataTables provides a wide array of options for how data should be obtained, displayed and acted upon, along with an extensive API for accessing and manipulating the table. + +* End users. For those using the interface DataTables presents, actions to get the most from the information contained in tables, such as sorting and filtering, along with paging and scrolling of the data in table, are easy to use, intuitive and fast. + + +## Installing DataTables + +To use DataTables, the primary way to obtain the software is to use the [DataTables downloader](//datatables.net/download). You can also include the individual files from the [DataTables CDN](//cdn.datatables.net). See the [documentation](//datatables.net/manual/installation) for full details. + +### NPM and Bower + +If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name `datatables.net`. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name. + +Please see the DataTables [NPM](//datatables.net/download/npm) and [Bower](//datatables.net/download/bower) installation pages for further information. The [DataTables installation manual](//datatables.net/manual/installation) also has details on how to use package managers with DataTables. + + +## Usage + +In its simplest case, DataTables can be initialised with a single line of Javascript: + +```js +$('table').dataTable(); +``` + +where the jQuery selector is used to obtain a reference to the table you want to enhance with DataTables. Optional configuration parameters can be passed in to DataTables to have it perform certain actions by using a configuration object as the parameter passed in to the DataTables constructor. For example: + +```js +$('table').dataTable( { + paginate: false, + scrollY: 300 +} ); +``` + +will disable paging and enable scrolling. + +A full list of the options available for DataTables are available in the [documentation](//datatables.net). + + +## Documentation + +Full documentation of the DataTables options, API and plug-in interface are available on the [DataTables web-site](//datatables.net). The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further. + + +## Support + +Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available. + + +## License + +DataTables is release under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with `/*!`. diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/License.txt b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/License.txt new file mode 100644 index 00000000..ac88d831 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/License.txt @@ -0,0 +1,22 @@ +MIT license + +Copyright (c) 2008-2015 SpryMedia Limited +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/Readme.md b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/Readme.md new file mode 100644 index 00000000..d5f8110a --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/Readme.md @@ -0,0 +1,39 @@ +# AutoFill + +AutoFill adds an Excel data fill like option to a DataTable to click and drag over multiple cells, filling in information over the selected cells and incrementing numbers as needed. + + +# Installation + +To use AutoFill the best way to obtain the software is to use the [DataTables downloader](//datatables.net/download). You can also include the individual files from the [DataTables CDN](//cdn.datatables.net). See the [documentation](http://datatables.net/extensions/autofill/) for full details. + +## NPM and Bower + +If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name `datatables.net-autofill`. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name. + +Please see the DataTables [NPM](//datatables.net/download/npm) and [Bower](//datatables.net/download/bower) installation pages for further information. The [DataTables installation manual](//datatables.net/manual/installation) also has details on how to use package managers with DataTables. + + +# Basic usage + +AutoFill is initialised using the `autoFill` option in the DataTables constructor. Further options can be specified using this option as an object - see the documentation for details. For example: + +```js +$(document).ready( function () { + $('#example').DataTable( { + autoFill: true + } ); +} ); +``` + + +# Documentation / support + +* [Documentation](https://datatables.net/extensions/autofill/) +* [DataTables support forums](http://datatables.net/forums) + + +# GitHub + +If you fancy getting involved with the development of AutoFill and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/AutoFill) + diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.css new file mode 100644 index 00000000..2f926236 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.css @@ -0,0 +1,81 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #337ab7; + background: #337ab7; +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #337ab7; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.min.css new file mode 100644 index 00000000..bbd2a111 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #337ab7;background:#337ab7}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#337ab7;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.css new file mode 100644 index 00000000..fef79ac7 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.css @@ -0,0 +1,81 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #0275d8; + background: #0275d8; +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #0275d8; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.min.css new file mode 100644 index 00000000..58a210ee --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.bootstrap4.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #0275d8;background:#0275d8}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#0275d8;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.css new file mode 100644 index 00000000..e6a27b5c --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.css @@ -0,0 +1,92 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #316ad1; + background: linear-gradient(to bottom, #abcffb 0%, #4989de 100%); +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #4989de; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-button button { + color: white; + margin: 0; + padding: 6px 12px; + text-align: center; + border: 1px solid #2e6da4; + background-color: #337ab7; + border-radius: 4px; + cursor: pointer; + vertical-align: middle; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.min.css new file mode 100644 index 00000000..57238a83 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.dataTables.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #316ad1;background:linear-gradient(to bottom, #abcffb 0%, #4989de 100%)}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#4989de;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-button button{color:white;margin:0;padding:6px 12px;text-align:center;border:1px solid #2e6da4;background-color:#337ab7;border-radius:4px;cursor:pointer;vertical-align:middle}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.css new file mode 100644 index 00000000..14693db7 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.css @@ -0,0 +1,85 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #008CBA; + background: #008CBA; +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #008CBA; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} + +div.dt-autofill-list button { + margin: 0; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.min.css new file mode 100644 index 00000000..74f02a70 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.foundation.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #008CBA;background:#008CBA}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#008CBA;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10}div.dt-autofill-list button{margin:0} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.css new file mode 100644 index 00000000..0fb0f109 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.css @@ -0,0 +1,85 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #316ad1; + background: linear-gradient(to bottom, #abcffb 0%, #4989de 100%); +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #4989de; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} + +div.dt-autofill-list button { + padding: 0.35em 1em; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.min.css new file mode 100644 index 00000000..28b15d62 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.jqueryui.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #316ad1;background:linear-gradient(to bottom, #abcffb 0%, #4989de 100%)}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#4989de;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10}div.dt-autofill-list button{padding:0.35em 1em} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.css new file mode 100644 index 00000000..e0cca042 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.css @@ -0,0 +1,81 @@ +div.dt-autofill-handle { + position: absolute; + height: 8px; + width: 8px; + z-index: 102; + box-sizing: border-box; + border: 1px solid #888; + background: #888; +} + +div.dt-autofill-select { + position: absolute; + z-index: 1001; + background-color: #888; + background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 10px); +} +div.dt-autofill-select.top, div.dt-autofill-select.bottom { + height: 3px; + margin-top: -1px; +} +div.dt-autofill-select.left, div.dt-autofill-select.right { + width: 3px; + margin-left: -1px; +} + +div.dt-autofill-list { + position: fixed; + top: 50%; + left: 50%; + width: 500px; + margin-left: -250px; + background-color: white; + border-radius: 6px; + box-shadow: 0 0 5px #555; + border: 2px solid #444; + z-index: 11; + box-sizing: border-box; + padding: 1.5em 2em; +} +div.dt-autofill-list ul { + display: table; + margin: 0; + padding: 0; + list-style: none; + width: 100%; +} +div.dt-autofill-list ul li { + display: table-row; +} +div.dt-autofill-list ul li:last-child div.dt-autofill-question, div.dt-autofill-list ul li:last-child div.dt-autofill-button { + border-bottom: none; +} +div.dt-autofill-list ul li:hover { + background-color: #f6f6f6; +} +div.dt-autofill-list div.dt-autofill-question { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} +div.dt-autofill-list div.dt-autofill-question input[type=number] { + padding: 6px; + width: 30px; + margin: -2px 0; +} +div.dt-autofill-list div.dt-autofill-button { + display: table-cell; + padding: 0.5em 0; + border-bottom: 1px solid #ccc; +} + +div.dt-autofill-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + z-index: 10; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.min.css new file mode 100644 index 00000000..33b4824d --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/css/autoFill.semanticui.min.css @@ -0,0 +1 @@ +div.dt-autofill-handle{position:absolute;height:8px;width:8px;z-index:102;box-sizing:border-box;border:1px solid #888;background:#888}div.dt-autofill-select{position:absolute;z-index:1001;background-color:#888;background-image:repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.5) 5px, rgba(255,255,255,0.5) 10px)}div.dt-autofill-select.top,div.dt-autofill-select.bottom{height:3px;margin-top:-1px}div.dt-autofill-select.left,div.dt-autofill-select.right{width:3px;margin-left:-1px}div.dt-autofill-list{position:fixed;top:50%;left:50%;width:500px;margin-left:-250px;background-color:white;border-radius:6px;box-shadow:0 0 5px #555;border:2px solid #444;z-index:11;box-sizing:border-box;padding:1.5em 2em}div.dt-autofill-list ul{display:table;margin:0;padding:0;list-style:none;width:100%}div.dt-autofill-list ul li{display:table-row}div.dt-autofill-list ul li:last-child div.dt-autofill-question,div.dt-autofill-list ul li:last-child div.dt-autofill-button{border-bottom:none}div.dt-autofill-list ul li:hover{background-color:#f6f6f6}div.dt-autofill-list div.dt-autofill-question{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-list div.dt-autofill-question input[type=number]{padding:6px;width:30px;margin:-2px 0}div.dt-autofill-list div.dt-autofill-button{display:table-cell;padding:0.5em 0;border-bottom:1px solid #ccc}div.dt-autofill-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:10} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.js new file mode 100644 index 00000000..48e4d495 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.js @@ -0,0 +1,43 @@ +/*! Bootstrap integration for DataTables' AutoFill + * ©2015 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-bs', 'datatables.net-autofill'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-bs')(root, $).$; + } + + if ( ! $.fn.dataTable.AutoFill ) { + require('datatables.net-autofill')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +DataTable.AutoFill.classes.btn = 'btn btn-primary'; + + +return DataTable; +})); \ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.min.js new file mode 100644 index 00000000..7a8d071d --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap.min.js @@ -0,0 +1,5 @@ +/*! + Bootstrap integration for DataTables' AutoFill + ©2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-bs")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="btn btn-primary";return a}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.js new file mode 100644 index 00000000..40037e4f --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.js @@ -0,0 +1,43 @@ +/*! Bootstrap integration for DataTables' AutoFill + * ©2015 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-bs4', 'datatables.net-autofill'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-bs4')(root, $).$; + } + + if ( ! $.fn.dataTable.AutoFill ) { + require('datatables.net-autofill')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +DataTable.AutoFill.classes.btn = 'btn btn-primary'; + + +return DataTable; +})); \ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.min.js new file mode 100644 index 00000000..87ea58cd --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.bootstrap4.min.js @@ -0,0 +1,5 @@ +/*! + Bootstrap integration for DataTables' AutoFill + ©2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-bs4")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="btn btn-primary";return a}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.js new file mode 100644 index 00000000..7f46e9af --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.js @@ -0,0 +1,43 @@ +/*! Foundation integration for DataTables' AutoFill + * ©2015 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-zf', 'datatables.net-autofill'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-zf')(root, $).$; + } + + if ( ! $.fn.dataTable.AutoFill ) { + require('datatables.net-autofill')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +DataTable.AutoFill.classes.btn = 'button tiny'; + + +return DataTable; +})); \ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.min.js new file mode 100644 index 00000000..df655a53 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.foundation.min.js @@ -0,0 +1,5 @@ +/*! + Foundation integration for DataTables' AutoFill + ©2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-zf","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-zf")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="button tiny";return a}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.js new file mode 100644 index 00000000..b645433e --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.js @@ -0,0 +1,43 @@ +/*! jQuery UI integration for DataTables' AutoFill + * ©2015 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-jqui', 'datatables.net-autofill'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-jqui')(root, $).$; + } + + if ( ! $.fn.dataTable.AutoFill ) { + require('datatables.net-autofill')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +DataTable.AutoFill.classes.btn = 'ui-button ui-state-default ui-corner-all'; + + +return DataTable; +})); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.min.js new file mode 100644 index 00000000..4bb198fc --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.jqueryui.min.js @@ -0,0 +1,6 @@ +/*! + jQuery UI integration for DataTables' AutoFill + ©2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-jqui","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-jqui")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="ui-button ui-state-default ui-corner-all"; +return a}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.js new file mode 100644 index 00000000..88f53bec --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.js @@ -0,0 +1,43 @@ +/*! Bootstrap integration for DataTables' AutoFill + * ©2015 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-se', 'datatables.net-autofill'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-se')(root, $).$; + } + + if ( ! $.fn.dataTable.AutoFill ) { + require('datatables.net-autofill')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +DataTable.AutoFill.classes.btn = 'ui button'; + + +return DataTable; +})); \ No newline at end of file diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.min.js new file mode 100644 index 00000000..b67185b5 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/autoFill.semanticui.min.js @@ -0,0 +1,5 @@ +/*! + Bootstrap integration for DataTables' AutoFill + ©2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-autofill"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);if(!c||!c.fn.dataTable)c=require("datatables.net-se")(b,c).$;c.fn.dataTable.AutoFill||require("datatables.net-autofill")(b,c);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a){a=a.fn.dataTable;a.AutoFill.classes.btn="ui button";return a}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/dataTables.autoFill.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/dataTables.autoFill.js new file mode 100644 index 00000000..b12e41e6 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/AutoFill/js/dataTables.autoFill.js @@ -0,0 +1,1068 @@ +/*! AutoFill 2.1.3 + * ©2008-2016 SpryMedia Ltd - datatables.net/license + */ + +/** + * @summary AutoFill + * @description Add Excel like click and drag auto-fill options to DataTables + * @version 2.1.3 + * @file dataTables.autoFill.js + * @author SpryMedia Ltd (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * @copyright Copyright 2010-2016 SpryMedia Ltd. + * + * This source file is free software, available under the following license: + * MIT license - http://datatables.net/license/mit + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net')(root, $).$; + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +var _instance = 0; + +/** + * AutoFill provides Excel like auto-fill features for a DataTable + * + * @class AutoFill + * @constructor + * @param {object} oTD DataTables settings object + * @param {object} oConfig Configuration object for AutoFill + */ +var AutoFill = function( dt, opts ) +{ + if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.8' ) ) { + throw( "Warning: AutoFill requires DataTables 1.10.8 or greater"); + } + + // User and defaults configuration object + this.c = $.extend( true, {}, + DataTable.defaults.autoFill, + AutoFill.defaults, + opts + ); + + /** + * @namespace Settings object which contains customisable information for AutoFill instance + */ + this.s = { + /** @type {DataTable.Api} DataTables' API instance */ + dt: new DataTable.Api( dt ), + + /** @type {String} Unique namespace for events attached to the document */ + namespace: '.autoFill'+(_instance++), + + /** @type {Object} Cached dimension information for use in the mouse move event handler */ + scroll: {}, + + /** @type {integer} Interval object used for smooth scrolling */ + scrollInterval: null, + + handle: { + height: 0, + width: 0 + } + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + /** @type {jQuery} AutoFill handle */ + handle: $('
'), + + /** + * @type {Object} Selected cells outline - Need to use 4 elements, + * otherwise the mouse over if you back into the selected rectangle + * will be over that element, rather than the cells! + */ + select: { + top: $('
'), + right: $('
'), + bottom: $('
'), + left: $('
') + }, + + /** @type {jQuery} Fill type chooser background */ + background: $('
'), + + /** @type {jQuery} Fill type chooser */ + list: $('
'+this.s.dt.i18n('autoFill.info', '')+'
    '), + + /** @type {jQuery} DataTables scrolling container */ + dtScroll: null, + + /** @type {jQuery} Offset parent element */ + offsetParent: null + }; + + + /* Constructor logic */ + this._constructor(); +}; + + + +$.extend( AutoFill.prototype, { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Constructor + */ + + /** + * Initialise the RowReorder instance + * + * @private + */ + _constructor: function () + { + var that = this; + var dt = this.s.dt; + var dtScroll = $('div.dataTables_scrollBody', this.s.dt.table().container()); + + if ( dtScroll.length ) { + this.dom.dtScroll = dtScroll; + + // Need to scroll container to be the offset parent + if ( dtScroll.css('position') === 'static' ) { + dtScroll.css( 'position', 'relative' ); + } + } + + this._focusListener(); + + this.dom.handle.on( 'mousedown', function (e) { + that._mousedown( e ); + return false; + } ); + + dt.on( 'destroy.autoFill', function () { + dt.off( '.autoFill' ); + $(dt.table().body()).off( that.s.namespace ); + $(document.body).off( that.s.namespace ); + } ); + }, + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private methods + */ + + /** + * Display the AutoFill drag handle by appending it to a table cell. This + * is the opposite of the _detach method. + * + * @param {node} node TD/TH cell to insert the handle into + * @private + */ + _attach: function ( node ) + { + var dt = this.s.dt; + var idx = dt.cell( node ).index(); + var handle = this.dom.handle; + var handleDim = this.s.handle; + + if ( ! idx || dt.columns( this.c.columns ).indexes().indexOf( idx.column ) === -1 ) { + this._detach(); + return; + } + + if ( ! this.dom.offsetParent ) { + // We attach to the table's offset parent + this.dom.offsetParent = $( dt.table().node() ).offsetParent(); + } + + if ( ! handleDim.height || ! handleDim.width ) { + // Append to document so we can get its size. Not expecting it to + // change during the life time of the page + handle.appendTo( 'body' ); + handleDim.height = handle.outerHeight(); + handleDim.width = handle.outerWidth(); + } + + // Might need to go through multiple offset parents + var offset = this._getPosition( node, this.dom.offsetParent ); + + this.dom.attachedTo = node; + handle + .css( { + top: offset.top + node.offsetHeight - handleDim.height, + left: offset.left + node.offsetWidth - handleDim.width + } ) + .appendTo( this.dom.offsetParent ); + }, + + + /** + * Determine can the fill type should be. This can be automatic, or ask the + * end user. + * + * @param {array} cells Information about the selected cells from the key + * up function + * @private + */ + _actionSelector: function ( cells ) + { + var that = this; + var dt = this.s.dt; + var actions = AutoFill.actions; + var available = []; + + // "Ask" each plug-in if it wants to handle this data + $.each( actions, function ( key, action ) { + if ( action.available( dt, cells ) ) { + available.push( key ); + } + } ); + + if ( available.length === 1 && this.c.alwaysAsk === false ) { + // Only one action available - enact it immediately + var result = actions[ available[0] ].execute( dt, cells ); + this._update( result, cells ); + } + else { + // Multiple actions available - ask the end user what they want to do + var list = this.dom.list.children('ul').empty(); + + // Add a cancel option + available.push( 'cancel' ); + + $.each( available, function ( i, name ) { + list.append( $('
  • ') + .append( + '
    '+ + actions[ name ].option( dt, cells )+ + '
    ' + ) + .append( $('
    ' ) + .append( $('') + .on( 'click', function () { + var result = actions[ name ].execute( + dt, cells, $(this).closest('li') + ); + that._update( result, cells ); + + that.dom.background.remove(); + that.dom.list.remove(); + } ) + ) + ) + ); + } ); + + this.dom.background.appendTo( 'body' ); + this.dom.list.appendTo( 'body' ); + + this.dom.list.css( 'margin-top', this.dom.list.outerHeight()/2 * -1 ); + } + }, + + + /** + * Remove the AutoFill handle from the document + * + * @private + */ + _detach: function () + { + this.dom.attachedTo = null; + this.dom.handle.detach(); + }, + + + /** + * Draw the selection outline by calculating the range between the start + * and end cells, then placing the highlighting elements to draw a rectangle + * + * @param {node} target End cell + * @param {object} e Originating event + * @private + */ + _drawSelection: function ( target, e ) + { + // Calculate boundary for start cell to this one + var dt = this.s.dt; + var start = this.s.start; + var startCell = $(this.dom.start); + var endCell = $(target); + var end = { + row: dt.rows( { page: 'current' } ).nodes().indexOf( endCell.parent()[0] ), + column: endCell.index() + }; + var colIndx = dt.column.index( 'toData', end.column ); + + // Be sure that is a DataTables controlled cell + if ( ! dt.cell( endCell ).any() ) { + return; + } + + // if target is not in the columns available - do nothing + if ( dt.columns( this.c.columns ).indexes().indexOf( colIndx ) === -1 ) { + return; + } + + this.s.end = end; + + var top, bottom, left, right, height, width; + + top = start.row < end.row ? startCell : endCell; + bottom = start.row < end.row ? endCell : startCell; + left = start.column < end.column ? startCell : endCell; + right = start.column < end.column ? endCell : startCell; + + top = this._getPosition( top ).top; + left = this._getPosition( left ).left; + height = this._getPosition( bottom ).top + bottom.outerHeight() - top; + width = this._getPosition( right ).left + right.outerWidth() - left; + + var select = this.dom.select; + select.top.css( { + top: top, + left: left, + width: width + } ); + + select.left.css( { + top: top, + left: left, + height: height + } ); + + select.bottom.css( { + top: top + height, + left: left, + width: width + } ); + + select.right.css( { + top: top, + left: left + width, + height: height + } ); + }, + + + /** + * Use the Editor API to perform an update based on the new data for the + * cells + * + * @param {array} cells Information about the selected cells from the key + * up function + * @private + */ + _editor: function ( cells ) + { + var dt = this.s.dt; + var editor = this.c.editor; + + if ( ! editor ) { + return; + } + + // Build the object structure for Editor's multi-row editing + var idValues = {}; + var nodes = []; + var fields = editor.fields(); + + for ( var i=0, ien=cells.length ; i=end ; i-- ) { + out.push( i ); + } + } + + return out; + }, + + + /** + * Move the window and DataTables scrolling during a drag to scroll new + * content into view. This is done by proximity to the edge of the scrolling + * container of the mouse - for example near the top edge of the window + * should scroll up. This is a little complicated as there are two elements + * that can be scrolled - the window and the DataTables scrolling view port + * (if scrollX and / or scrollY is enabled). + * + * @param {object} e Mouse move event object + * @private + */ + _shiftScroll: function ( e ) + { + var that = this; + var dt = this.s.dt; + var scroll = this.s.scroll; + var runInterval = false; + var scrollSpeed = 5; + var buffer = 65; + var + windowY = e.pageY - document.body.scrollTop, + windowX = e.pageX - document.body.scrollLeft, + windowVert, windowHoriz, + dtVert, dtHoriz; + + // Window calculations - based on the mouse position in the window, + // regardless of scrolling + if ( windowY < buffer ) { + windowVert = scrollSpeed * -1; + } + else if ( windowY > scroll.windowHeight - buffer ) { + windowVert = scrollSpeed; + } + + if ( windowX < buffer ) { + windowHoriz = scrollSpeed * -1; + } + else if ( windowX > scroll.windowWidth - buffer ) { + windowHoriz = scrollSpeed; + } + + // DataTables scrolling calculations - based on the table's position in + // the document and the mouse position on the page + if ( scroll.dtTop !== null && e.pageY < scroll.dtTop + buffer ) { + dtVert = scrollSpeed * -1; + } + else if ( scroll.dtTop !== null && e.pageY > scroll.dtTop + scroll.dtHeight - buffer ) { + dtVert = scrollSpeed; + } + + if ( scroll.dtLeft !== null && e.pageX < scroll.dtLeft + buffer ) { + dtHoriz = scrollSpeed * -1; + } + else if ( scroll.dtLeft !== null && e.pageX > scroll.dtLeft + scroll.dtWidth - buffer ) { + dtHoriz = scrollSpeed; + } + + // This is where it gets interesting. We want to continue scrolling + // without requiring a mouse move, so we need an interval to be + // triggered. The interval should continue until it is no longer needed, + // but it must also use the latest scroll commands (for example consider + // that the mouse might move from scrolling up to scrolling left, all + // with the same interval running. We use the `scroll` object to "pass" + // this information to the interval. Can't use local variables as they + // wouldn't be the ones that are used by an already existing interval! + if ( windowVert || windowHoriz || dtVert || dtHoriz ) { + scroll.windowVert = windowVert; + scroll.windowHoriz = windowHoriz; + scroll.dtVert = dtVert; + scroll.dtHoriz = dtHoriz; + runInterval = true; + } + else if ( this.s.scrollInterval ) { + // Don't need to scroll - remove any existing timer + clearInterval( this.s.scrollInterval ); + this.s.scrollInterval = null; + } + + // If we need to run the interval to scroll and there is no existing + // interval (if there is an existing one, it will continue to run) + if ( ! this.s.scrollInterval && runInterval ) { + this.s.scrollInterval = setInterval( function () { + // Don't need to worry about setting scroll <0 or beyond the + // scroll bound as the browser will just reject that. + if ( scroll.windowVert ) { + document.body.scrollTop += scroll.windowVert; + } + if ( scroll.windowHoriz ) { + document.body.scrollLeft += scroll.windowHoriz; + } + + // DataTables scrolling + if ( scroll.dtVert || scroll.dtHoriz ) { + var scroller = that.dom.dtScroll[0]; + + if ( scroll.dtVert ) { + scroller.scrollTop += scroll.dtVert; + } + if ( scroll.dtHoriz ) { + scroller.scrollLeft += scroll.dtHoriz; + } + } + }, 20 ); + } + }, + + + /** + * Update the DataTable after the user has selected what they want to do + * + * @param {false|undefined} result Return from the `execute` method - can + * be false internally to do nothing. This is not documented for plug-ins + * and is used only by the cancel option. + * @param {array} cells Information about the selected cells from the key + * up function, argumented with the set values + * @private + */ + _update: function ( result, cells ) + { + // Do nothing on `false` return from an execute function + if ( result === false ) { + return; + } + + var dt = this.s.dt; + var cell; + + // Potentially allow modifications to the cells matrix + this._emitEvent( 'preAutoFill', [ dt, cells ] ); + + this._editor( cells ); + + // Automatic updates are not performed if `update` is null and the + // `editor` parameter is passed in - the reason being that Editor will + // update the data once submitted + var update = this.c.update !== null ? + this.c.update : + this.c.editor ? + false : + true; + + if ( update ) { + for ( var i=0, ien=cells.length ; i' + ); + }, + + execute: function ( dt, cells, node ) { + var value = cells[0][0].data * 1; + var increment = $('input', node).val() * 1; + + for ( var i=0, ien=cells.length ; i'+cells[0][0].label+'' ); + }, + + execute: function ( dt, cells, node ) { + var value = cells[0][0].data; + + for ( var i=0, ien=cells.length ; i 1 && cells[0].length > 1; + }, + + option: function ( dt, cells ) { + return dt.i18n('autoFill.fillHorizontal', 'Fill cells horizontally' ); + }, + + execute: function ( dt, cells, node ) { + for ( var i=0, ien=cells.length ; i 1 && cells[0].length > 1; + }, + + option: function ( dt, cells ) { + return dt.i18n('autoFill.fillVertical', 'Fill cells vertically' ); + }, + + execute: function ( dt, cells, node ) { + for ( var i=0, ien=cells.length ; i'),select:{top:e('
    '),right:e('
    '),bottom:e('
    '),left:e('
    ')},background:e('
    '),list:e('
    '+this.s.dt.i18n("autoFill.info", +"")+"
      "),dtScroll:null,offsetParent:null};this._constructor()};e.extend(j.prototype,{_constructor:function(){var c=this,b=this.s.dt,a=e("div.dataTables_scrollBody",this.s.dt.table().container());a.length&&(this.dom.dtScroll=a,"static"===a.css("position")&&a.css("position","relative"));this._focusListener();this.dom.handle.on("mousedown",function(a){c._mousedown(a);return false});b.on("destroy.autoFill",function(){b.off(".autoFill");e(b.table().body()).off(c.s.namespace);e(i.body).off(c.s.namespace)})}, +_attach:function(c){var b=this.s.dt,a=b.cell(c).index(),d=this.dom.handle,f=this.s.handle;if(!a||-1===b.columns(this.c.columns).indexes().indexOf(a.column))this._detach();else{this.dom.offsetParent||(this.dom.offsetParent=e(b.table().node()).offsetParent());if(!f.height||!f.width)d.appendTo("body"),f.height=d.outerHeight(),f.width=d.outerWidth();b=this._getPosition(c,this.dom.offsetParent);this.dom.attachedTo=c;d.css({top:b.top+c.offsetHeight-f.height,left:b.left+c.offsetWidth-f.width}).appendTo(this.dom.offsetParent)}}, +_actionSelector:function(c){var b=this,a=this.s.dt,d=j.actions,f=[];e.each(d,function(b,d){d.available(a,c)&&f.push(b)});if(1===f.length&&!1===this.c.alwaysAsk){var h=d[f[0]].execute(a,c);this._update(h,c)}else{var g=this.dom.list.children("ul").empty();f.push("cancel");e.each(f,function(f,h){g.append(e("
    • ").append('
      '+d[h].option(a,c)+"
      ").append(e('
      ').append(e('").on("click",function(){var f=d[h].execute(a,c,e(this).closest("li"));b._update(f,c);b.dom.background.remove();b.dom.list.remove()}))))});this.dom.background.appendTo("body");this.dom.list.appendTo("body");this.dom.list.css("margin-top",-1*(this.dom.list.outerHeight()/2))}},_detach:function(){this.dom.attachedTo=null;this.dom.handle.detach()},_drawSelection:function(c){var b=this.s.dt,a=this.s.start,d=e(this.dom.start),f=e(c),h={row:b.rows({page:"current"}).nodes().indexOf(f.parent()[0]), +column:f.index()},c=b.column.index("toData",h.column);if(b.cell(f).any()&&-1!==b.columns(this.c.columns).indexes().indexOf(c)){this.s.end=h;var g,b=a.row=b;d--)a.push(d);return a},_shiftScroll:function(c){var b=this,a=this.s.scroll,d=!1,f=c.pageY-i.body.scrollTop,e=c.pageX-i.body.scrollLeft,g,j,k,l;65>f?g=-5:f>a.windowHeight-65&&(g=5);65>e?j=-5:e>a.windowWidth-65&&(j=5);null!==a.dtTop&&c.pageY +a.dtTop+a.dtHeight-65&&(k=5);null!==a.dtLeft&&c.pageXa.dtLeft+a.dtWidth-65&&(l=5);g||j||k||l?(a.windowVert=g,a.windowHoriz=j,a.dtVert=k,a.dtHoriz=l,d=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null);!this.s.scrollInterval&&d&&(this.s.scrollInterval=setInterval(function(){if(a.windowVert)i.body.scrollTop=i.body.scrollTop+a.windowVert;if(a.windowHoriz)i.body.scrollLeft=i.body.scrollLeft+a.windowHoriz;if(a.dtVert|| +a.dtHoriz){var c=b.dom.dtScroll[0];if(a.dtVert)c.scrollTop=c.scrollTop+a.dtVert;if(a.dtHoriz)c.scrollLeft=c.scrollLeft+a.dtHoriz}},20))},_update:function(c,b){if(!1!==c){var a=this.s.dt,d;this._emitEvent("preAutoFill",[a,b]);this._editor(b);if(null!==this.c.update?this.c.update:!this.c.editor){for(var f=0,e=b.length;f')},execute:function(c,b,a){for(var c=1*b[0][0].data,a=1*e("input",a).val(),d=0,f=b.length;d"+b[0][0].label+"")},execute:function(c,b){for(var a=b[0][0].data,d=0,f=b.length;d div { + padding: 1em; +} + +ul.dt-button-collection.dropdown-menu { + display: block; + z-index: 2002; + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +ul.dt-button-collection.dropdown-menu.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +ul.dt-button-collection.dropdown-menu.fixed.two-column { + margin-left: -150px; +} +ul.dt-button-collection.dropdown-menu.fixed.three-column { + margin-left: -225px; +} +ul.dt-button-collection.dropdown-menu.fixed.four-column { + margin-left: -300px; +} +ul.dt-button-collection.dropdown-menu > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +ul.dt-button-collection.dropdown-menu.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +ul.dt-button-collection.dropdown-menu.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +ul.dt-button-collection.dropdown-menu.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2001; +} + +@media screen and (max-width: 767px) { + div.dt-buttons { + float: none; + width: 100%; + text-align: center; + margin-bottom: 0.5em; + } + div.dt-buttons a.btn { + float: none; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap.min.css new file mode 100644 index 00000000..05b6c22d --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}ul.dt-button-collection.dropdown-menu{display:block;z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.dropdown-menu.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.dropdown-menu.fixed.two-column{margin-left:-150px}ul.dt-button-collection.dropdown-menu.fixed.three-column{margin-left:-225px}ul.dt-button-collection.dropdown-menu.fixed.four-column{margin-left:-300px}ul.dt-button-collection.dropdown-menu>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.dropdown-menu.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.dropdown-menu.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.dropdown-menu.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.css new file mode 100644 index 00000000..903400da --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.css @@ -0,0 +1,163 @@ +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; +} +div.dt-button-info h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; +} +div.dt-button-info > div { + padding: 1em; +} + +ul.dt-button-collection.dropdown-menu { + display: block; + z-index: 2002; + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +ul.dt-button-collection.dropdown-menu.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +ul.dt-button-collection.dropdown-menu.fixed.two-column { + margin-left: -150px; +} +ul.dt-button-collection.dropdown-menu.fixed.three-column { + margin-left: -225px; +} +ul.dt-button-collection.dropdown-menu.fixed.four-column { + margin-left: -300px; +} +ul.dt-button-collection.dropdown-menu > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +ul.dt-button-collection.dropdown-menu.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +ul.dt-button-collection.dropdown-menu.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +ul.dt-button-collection.dropdown-menu.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} + +ul.dt-button-collection { + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +ul.dt-button-collection.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +ul.dt-button-collection.fixed.two-column { + margin-left: -150px; +} +ul.dt-button-collection.fixed.three-column { + margin-left: -225px; +} +ul.dt-button-collection.fixed.four-column { + margin-left: -300px; +} +ul.dt-button-collection > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +ul.dt-button-collection.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +ul.dt-button-collection.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +ul.dt-button-collection.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} +ul.dt-button-collection.fixed { + max-width: none; +} +ul.dt-button-collection.fixed:before, ul.dt-button-collection.fixed:after { + display: none; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; +} + +@media screen and (max-width: 767px) { + div.dt-buttons { + float: none; + width: 100%; + text-align: center; + margin-bottom: 0.5em; + } + div.dt-buttons a.btn { + float: none; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.min.css new file mode 100644 index 00000000..50839c56 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.bootstrap4.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}ul.dt-button-collection.dropdown-menu{display:block;z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.dropdown-menu.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.dropdown-menu.fixed.two-column{margin-left:-150px}ul.dt-button-collection.dropdown-menu.fixed.three-column{margin-left:-225px}ul.dt-button-collection.dropdown-menu.fixed.four-column{margin-left:-300px}ul.dt-button-collection.dropdown-menu>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.dropdown-menu.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.dropdown-menu.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.dropdown-menu.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}ul.dt-button-collection{-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.fixed.two-column{margin-left:-150px}ul.dt-button-collection.fixed.three-column{margin-left:-225px}ul.dt-button-collection.fixed.four-column{margin-left:-300px}ul.dt-button-collection>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}ul.dt-button-collection.fixed{max-width:none}ul.dt-button-collection.fixed:before,ul.dt-button-collection.fixed:after{display:none}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.css new file mode 100644 index 00000000..acf2127d --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.css @@ -0,0 +1,298 @@ +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; +} +div.dt-button-info h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; +} +div.dt-button-info > div { + padding: 1em; +} + +button.dt-button, +div.dt-button, +a.dt-button { + position: relative; + display: inline-block; + box-sizing: border-box; + margin-right: 0.333em; + padding: 0.5em 1em; + border: 1px solid #999; + border-radius: 2px; + cursor: pointer; + font-size: 0.88em; + color: black; + white-space: nowrap; + overflow: hidden; + background-color: #e9e9e9; + /* Fallback */ + background-image: -webkit-linear-gradient(top, white 0%, #e9e9e9 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, white 0%, #e9e9e9 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, white 0%, #e9e9e9 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, white 0%, #e9e9e9 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, white 0%, #e9e9e9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='white', EndColorStr='#e9e9e9'); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + text-decoration: none; + outline: none; +} +button.dt-button.disabled, +div.dt-button.disabled, +a.dt-button.disabled { + color: #999; + border: 1px solid #d0d0d0; + cursor: default; + background-color: #f9f9f9; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #ffffff 0%, #f9f9f9 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #ffffff 0%, #f9f9f9 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #ffffff 0%, #f9f9f9 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #ffffff 0%, #f9f9f9 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ffffff', EndColorStr='#f9f9f9'); +} +button.dt-button:active:not(.disabled), button.dt-button.active:not(.disabled), +div.dt-button:active:not(.disabled), +div.dt-button.active:not(.disabled), +a.dt-button:active:not(.disabled), +a.dt-button.active:not(.disabled) { + background-color: #e2e2e2; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #f3f3f3 0%, #e2e2e2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f3f3f3', EndColorStr='#e2e2e2'); + box-shadow: inset 1px 1px 3px #999999; +} +button.dt-button:active:not(.disabled):hover:not(.disabled), button.dt-button.active:not(.disabled):hover:not(.disabled), +div.dt-button:active:not(.disabled):hover:not(.disabled), +div.dt-button.active:not(.disabled):hover:not(.disabled), +a.dt-button:active:not(.disabled):hover:not(.disabled), +a.dt-button.active:not(.disabled):hover:not(.disabled) { + box-shadow: inset 1px 1px 3px #999999; + background-color: #cccccc; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #eaeaea 0%, #cccccc 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #eaeaea 0%, #cccccc 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #eaeaea 0%, #cccccc 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #eaeaea 0%, #cccccc 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #eaeaea 0%, #cccccc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#eaeaea', EndColorStr='#cccccc'); +} +button.dt-button:hover, +div.dt-button:hover, +a.dt-button:hover { + text-decoration: none; +} +button.dt-button:hover:not(.disabled), +div.dt-button:hover:not(.disabled), +a.dt-button:hover:not(.disabled) { + border: 1px solid #666; + background-color: #e0e0e0; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f9f9f9', EndColorStr='#e0e0e0'); +} +button.dt-button:focus:not(.disabled), +div.dt-button:focus:not(.disabled), +a.dt-button:focus:not(.disabled) { + border: 1px solid #426c9e; + text-shadow: 0 1px 0 #c4def1; + outline: none; + background-color: #79ace9; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #bddef4 0%, #79ace9 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #bddef4 0%, #79ace9 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #bddef4 0%, #79ace9 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #bddef4 0%, #79ace9 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #bddef4 0%, #79ace9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#bddef4', EndColorStr='#79ace9'); +} + +.dt-button embed { + outline: none; +} + +div.dt-buttons { + position: relative; + float: left; +} +div.dt-buttons.buttons-right { + float: right; +} + +div.dt-button-collection { + position: absolute; + top: 0; + left: 0; + width: 150px; + margin-top: 3px; + padding: 8px 8px 4px 8px; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: white; + overflow: hidden; + z-index: 2002; + border-radius: 5px; + box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + z-index: 2002; + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +div.dt-button-collection button.dt-button, +div.dt-button-collection div.dt-button, +div.dt-button-collection a.dt-button { + position: relative; + left: 0; + right: 0; + display: block; + float: none; + margin-bottom: 4px; + margin-right: 0; +} +div.dt-button-collection button.dt-button:active:not(.disabled), div.dt-button-collection button.dt-button.active:not(.disabled), +div.dt-button-collection div.dt-button:active:not(.disabled), +div.dt-button-collection div.dt-button.active:not(.disabled), +div.dt-button-collection a.dt-button:active:not(.disabled), +div.dt-button-collection a.dt-button.active:not(.disabled) { + background-color: #dadada; + /* Fallback */ + background-image: -webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%); + /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, #f0f0f0 0%, #dadada 100%); + /* FF3.6 */ + background-image: -ms-linear-gradient(top, #f0f0f0 0%, #dadada 100%); + /* IE10 */ + background-image: -o-linear-gradient(top, #f0f0f0 0%, #dadada 100%); + /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, #f0f0f0 0%, #dadada 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f0f0f0', EndColorStr='#dadada'); + box-shadow: inset 1px 1px 3px #666; +} +div.dt-button-collection.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +div.dt-button-collection.fixed.two-column { + margin-left: -150px; +} +div.dt-button-collection.fixed.three-column { + margin-left: -225px; +} +div.dt-button-collection.fixed.four-column { + margin-left: -300px; +} +div.dt-button-collection > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +div.dt-button-collection.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +div.dt-button-collection.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +div.dt-button-collection.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + /* Fallback */ + background: -ms-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* IE10 Consumer Preview */ + background: -moz-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Firefox */ + background: -o-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Opera */ + background: -webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0, 0, 0, 0.3)), color-stop(1, rgba(0, 0, 0, 0.7))); + /* Webkit (Safari/Chrome 10) */ + background: -webkit-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Webkit (Chrome 11+) */ + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* W3C Markup, IE10 Release Preview */ + z-index: 2001; +} + +@media screen and (max-width: 640px) { + div.dt-buttons { + float: none !important; + text-align: center; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.min.css new file mode 100644 index 00000000..a8758eef --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.dataTables.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}button.dt-button,div.dt-button,a.dt-button{position:relative;display:inline-block;box-sizing:border-box;margin-right:0.333em;padding:0.5em 1em;border:1px solid #999;border-radius:2px;cursor:pointer;font-size:0.88em;color:black;white-space:nowrap;overflow:hidden;background-color:#e9e9e9;background-image:-webkit-linear-gradient(top, #fff 0%, #e9e9e9 100%);background-image:-moz-linear-gradient(top, #fff 0%, #e9e9e9 100%);background-image:-ms-linear-gradient(top, #fff 0%, #e9e9e9 100%);background-image:-o-linear-gradient(top, #fff 0%, #e9e9e9 100%);background-image:linear-gradient(to bottom, #fff 0%, #e9e9e9 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='white', EndColorStr='#e9e9e9');-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;outline:none}button.dt-button.disabled,div.dt-button.disabled,a.dt-button.disabled{color:#999;border:1px solid #d0d0d0;cursor:default;background-color:#f9f9f9;background-image:-webkit-linear-gradient(top, #fff 0%, #f9f9f9 100%);background-image:-moz-linear-gradient(top, #fff 0%, #f9f9f9 100%);background-image:-ms-linear-gradient(top, #fff 0%, #f9f9f9 100%);background-image:-o-linear-gradient(top, #fff 0%, #f9f9f9 100%);background-image:linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ffffff', EndColorStr='#f9f9f9')}button.dt-button:active:not(.disabled),button.dt-button.active:not(.disabled),div.dt-button:active:not(.disabled),div.dt-button.active:not(.disabled),a.dt-button:active:not(.disabled),a.dt-button.active:not(.disabled){background-color:#e2e2e2;background-image:-webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%);background-image:-moz-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%);background-image:-ms-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%);background-image:-o-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%);background-image:linear-gradient(to bottom, #f3f3f3 0%, #e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f3f3f3', EndColorStr='#e2e2e2');box-shadow:inset 1px 1px 3px #999999}button.dt-button:active:not(.disabled):hover:not(.disabled),button.dt-button.active:not(.disabled):hover:not(.disabled),div.dt-button:active:not(.disabled):hover:not(.disabled),div.dt-button.active:not(.disabled):hover:not(.disabled),a.dt-button:active:not(.disabled):hover:not(.disabled),a.dt-button.active:not(.disabled):hover:not(.disabled){box-shadow:inset 1px 1px 3px #999999;background-color:#cccccc;background-image:-webkit-linear-gradient(top, #eaeaea 0%, #ccc 100%);background-image:-moz-linear-gradient(top, #eaeaea 0%, #ccc 100%);background-image:-ms-linear-gradient(top, #eaeaea 0%, #ccc 100%);background-image:-o-linear-gradient(top, #eaeaea 0%, #ccc 100%);background-image:linear-gradient(to bottom, #eaeaea 0%, #ccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#eaeaea', EndColorStr='#cccccc')}button.dt-button:hover,div.dt-button:hover,a.dt-button:hover{text-decoration:none}button.dt-button:hover:not(.disabled),div.dt-button:hover:not(.disabled),a.dt-button:hover:not(.disabled){border:1px solid #666;background-color:#e0e0e0;background-image:-webkit-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%);background-image:-moz-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%);background-image:-ms-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%);background-image:-o-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%);background-image:linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f9f9f9', EndColorStr='#e0e0e0')}button.dt-button:focus:not(.disabled),div.dt-button:focus:not(.disabled),a.dt-button:focus:not(.disabled){border:1px solid #426c9e;text-shadow:0 1px 0 #c4def1;outline:none;background-color:#79ace9;background-image:-webkit-linear-gradient(top, #bddef4 0%, #79ace9 100%);background-image:-moz-linear-gradient(top, #bddef4 0%, #79ace9 100%);background-image:-ms-linear-gradient(top, #bddef4 0%, #79ace9 100%);background-image:-o-linear-gradient(top, #bddef4 0%, #79ace9 100%);background-image:linear-gradient(to bottom, #bddef4 0%, #79ace9 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#bddef4', EndColorStr='#79ace9')}.dt-button embed{outline:none}div.dt-buttons{position:relative;float:left}div.dt-buttons.buttons-right{float:right}div.dt-button-collection{position:absolute;top:0;left:0;width:150px;margin-top:3px;padding:8px 8px 4px 8px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.4);background-color:white;overflow:hidden;z-index:2002;border-radius:5px;box-shadow:3px 3px 5px rgba(0,0,0,0.3);z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection button.dt-button,div.dt-button-collection div.dt-button,div.dt-button-collection a.dt-button{position:relative;left:0;right:0;display:block;float:none;margin-bottom:4px;margin-right:0}div.dt-button-collection button.dt-button:active:not(.disabled),div.dt-button-collection button.dt-button.active:not(.disabled),div.dt-button-collection div.dt-button:active:not(.disabled),div.dt-button-collection div.dt-button.active:not(.disabled),div.dt-button-collection a.dt-button:active:not(.disabled),div.dt-button-collection a.dt-button.active:not(.disabled){background-color:#dadada;background-image:-webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background-image:-moz-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background-image:-ms-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background-image:-o-linear-gradient(top, #f0f0f0 0%, #dadada 100%);background-image:linear-gradient(to bottom, #f0f0f0 0%, #dadada 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f0f0f0', EndColorStr='#dadada');box-shadow:inset 1px 1px 3px #666}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-150px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:-ms-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-moz-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-o-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0,0,0,0.3)), color-stop(1, rgba(0,0,0,0.7)));background:-webkit-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:2001}@media screen and (max-width: 640px){div.dt-buttons{float:none !important;text-align:center}} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.css new file mode 100644 index 00000000..4b103f40 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.css @@ -0,0 +1,129 @@ +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; +} +div.dt-button-info h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; +} +div.dt-button-info > div { + padding: 1em; +} + +ul.dt-buttons li { + margin: 0; +} +ul.dt-buttons li.active a { + box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6); +} + +ul.dt-buttons.button-group a { + margin-bottom: 0; +} + +ul.dt-button-collection.f-dropdown { + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +ul.dt-button-collection.f-dropdown.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +ul.dt-button-collection.f-dropdown.fixed.two-column { + margin-left: -150px; +} +ul.dt-button-collection.f-dropdown.fixed.three-column { + margin-left: -225px; +} +ul.dt-button-collection.f-dropdown.fixed.four-column { + margin-left: -300px; +} +ul.dt-button-collection.f-dropdown > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +ul.dt-button-collection.f-dropdown.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +ul.dt-button-collection.f-dropdown.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +ul.dt-button-collection.f-dropdown.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} +ul.dt-button-collection.f-dropdown.fixed { + max-width: none; +} +ul.dt-button-collection.f-dropdown.fixed:before, ul.dt-button-collection.f-dropdown.fixed:after { + display: none; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 88; +} + +@media screen and (max-width: 767px) { + ul.dt-buttons { + float: none; + width: 100%; + text-align: center; + margin-bottom: 0.5rem; + } + ul.dt-buttons li { + float: none; + } +} +div.button-group.stacked.dropdown-pane { + margin-top: 2px; + padding: 1px; + z-index: 89; +} +div.button-group.stacked.dropdown-pane a.button { + margin-bottom: 1px; + border-right: none; +} +div.button-group.stacked.dropdown-pane a.button:last-child { + margin-bottom: 0; +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.min.css new file mode 100644 index 00000000..6caef673 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.foundation.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}ul.dt-buttons li{margin:0}ul.dt-buttons li.active a{box-shadow:inset 0 0 10px rgba(0,0,0,0.6)}ul.dt-buttons.button-group a{margin-bottom:0}ul.dt-button-collection.f-dropdown{-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.f-dropdown.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.f-dropdown.fixed.two-column{margin-left:-150px}ul.dt-button-collection.f-dropdown.fixed.three-column{margin-left:-225px}ul.dt-button-collection.f-dropdown.fixed.four-column{margin-left:-300px}ul.dt-button-collection.f-dropdown>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.f-dropdown.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.f-dropdown.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.f-dropdown.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}ul.dt-button-collection.f-dropdown.fixed{max-width:none}ul.dt-button-collection.f-dropdown.fixed:before,ul.dt-button-collection.f-dropdown.fixed:after{display:none}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:88}@media screen and (max-width: 767px){ul.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5rem}ul.dt-buttons li{float:none}}div.button-group.stacked.dropdown-pane{margin-top:2px;padding:1px;z-index:89}div.button-group.stacked.dropdown-pane a.button{margin-bottom:1px;border-right:none}div.button-group.stacked.dropdown-pane a.button:last-child{margin-bottom:0} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.css new file mode 100644 index 00000000..2235eb72 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.css @@ -0,0 +1,162 @@ +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; +} +div.dt-button-info h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; +} +div.dt-button-info > div { + padding: 1em; +} + +div.dt-buttons { + position: relative; + float: left; +} +div.dt-buttons .dt-button { + margin-right: 0; +} +div.dt-buttons .dt-button span.ui-icon { + display: inline-block; + vertical-align: middle; + margin-top: -2px; +} +div.dt-buttons .dt-button:active { + outline: none; +} +div.dt-buttons .dt-button:hover > span { + background-color: rgba(0, 0, 0, 0.05); +} + +div.dt-button-collection { + position: absolute; + top: 0; + left: 0; + width: 150px; + margin-top: 3px; + padding: 8px 8px 4px 8px; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: #f3f3f3; + background-color: rgba(255, 255, 255, 0.3); + overflow: hidden; + z-index: 2002; + border-radius: 5px; + box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + z-index: 2002; + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; + -webkit-column-gap: 0; + -moz-column-gap: 0; + -ms-column-gap: 0; + -o-column-gap: 0; + column-gap: 0; +} +div.dt-button-collection .dt-button { + position: relative; + left: 0; + right: 0; + display: block; + float: none; + margin-right: 0; +} +div.dt-button-collection .dt-button:last-child { + margin-bottom: 4px; +} +div.dt-button-collection .dt-button:hover > span { + background-color: rgba(0, 0, 0, 0.05); +} +div.dt-button-collection.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +div.dt-button-collection.fixed.two-column { + margin-left: -150px; +} +div.dt-button-collection.fixed.three-column { + margin-left: -225px; +} +div.dt-button-collection.fixed.four-column { + margin-left: -300px; +} +div.dt-button-collection > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +div.dt-button-collection.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +div.dt-button-collection.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +div.dt-button-collection.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + /* Fallback */ + background: -ms-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* IE10 Consumer Preview */ + background: -moz-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Firefox */ + background: -o-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Opera */ + background: -webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0, 0, 0, 0.3)), color-stop(1, rgba(0, 0, 0, 0.7))); + /* Webkit (Safari/Chrome 10) */ + background: -webkit-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* Webkit (Chrome 11+) */ + background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%); + /* W3C Markup, IE10 Release Preview */ + z-index: 2001; +} + +@media screen and (max-width: 640px) { + div.dt-buttons { + float: none !important; + text-align: center; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.min.css new file mode 100644 index 00000000..51662b2f --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.jqueryui.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-buttons{position:relative;float:left}div.dt-buttons .dt-button{margin-right:0}div.dt-buttons .dt-button span.ui-icon{display:inline-block;vertical-align:middle;margin-top:-2px}div.dt-buttons .dt-button:active{outline:none}div.dt-buttons .dt-button:hover>span{background-color:rgba(0,0,0,0.05)}div.dt-button-collection{position:absolute;top:0;left:0;width:150px;margin-top:3px;padding:8px 8px 4px 8px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.4);background-color:#f3f3f3;background-color:rgba(255,255,255,0.3);overflow:hidden;z-index:2002;border-radius:5px;box-shadow:3px 3px 5px rgba(0,0,0,0.3);z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px;-webkit-column-gap:0;-moz-column-gap:0;-ms-column-gap:0;-o-column-gap:0;column-gap:0}div.dt-button-collection .dt-button{position:relative;left:0;right:0;display:block;float:none;margin-right:0}div.dt-button-collection .dt-button:last-child{margin-bottom:4px}div.dt-button-collection .dt-button:hover>span{background-color:rgba(0,0,0,0.05)}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-150px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);background:-ms-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-moz-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-o-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:-webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0,0,0,0.3)), color-stop(1, rgba(0,0,0,0.7)));background:-webkit-radial-gradient(center, ellipse farthest-corner, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);background:radial-gradient(ellipse farthest-corner at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);z-index:2001}@media screen and (max-width: 640px){div.dt-buttons{float:none !important;text-align:center}} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.css new file mode 100644 index 00000000..eb237899 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.css @@ -0,0 +1,114 @@ +@charset "UTF-8"; +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; +} +div.dt-button-info h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; +} +div.dt-button-info > div { + padding: 1em; +} + +div.dt-button-collection { + position: absolute; + top: 0; + left: 0; + width: 150px; + margin-top: 3px !important; + z-index: 2002; + background: white; + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; +} +div.dt-button-collection.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; +} +div.dt-button-collection.fixed.two-column { + margin-left: -150px; +} +div.dt-button-collection.fixed.three-column { + margin-left: -225px; +} +div.dt-button-collection.fixed.four-column { + margin-left: -300px; +} +div.dt-button-collection > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} +div.dt-button-collection.two-column { + width: 300px; + padding-bottom: 1px; + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} +div.dt-button-collection.three-column { + width: 450px; + padding-bottom: 1px; + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; +} +div.dt-button-collection.four-column { + width: 600px; + padding-bottom: 1px; + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; +} + +button.buttons-collection.ui.button span:after { + display: inline-block; + content: "▾"; + padding-left: 0.5em; +} + +div.dt-button-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2001; +} + +@media screen and (max-width: 767px) { + div.dt-buttons { + float: none; + width: 100%; + text-align: center; + margin-bottom: 0.5em; + } + div.dt-buttons a.btn { + float: none; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.min.css b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.min.css new file mode 100644 index 00000000..cb48f54a --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/buttons.semanticui.min.css @@ -0,0 +1 @@ +div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection{position:absolute;top:0;left:0;width:150px;margin-top:3px !important;z-index:2002;background:white;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-150px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}button.buttons-collection.ui.button span:after{display:inline-block;content:"▾";padding-left:0.5em}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/common.scss b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/common.scss new file mode 100644 index 00000000..8312ccd8 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/common.scss @@ -0,0 +1,27 @@ + +div.dt-button-info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + margin-top: -100px; + margin-left: -200px; + background-color: white; + border: 2px solid #111; + box-shadow: 3px 3px 8px rgba( 0, 0, 0, 0.3); + border-radius: 3px; + text-align: center; + z-index: 21; + + h2 { + padding: 0.5em; + margin: 0; + font-weight: normal; + border-bottom: 1px solid #ddd; + background-color: #f3f3f3; + } + + > div { + padding: 1em; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/mixins.scss b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/mixins.scss new file mode 100644 index 00000000..a7fe990a --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/css/mixins.scss @@ -0,0 +1,89 @@ + +@mixin dtb-two-stop-gradient($fromColor, $toColor) { + background-color: $toColor; /* Fallback */ + background-image: -webkit-linear-gradient(top, $fromColor 0%, $toColor 100%); /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, $fromColor 0%, $toColor 100%); /* FF3.6 */ + background-image: -ms-linear-gradient(top, $fromColor 0%, $toColor 100%); /* IE10 */ + background-image: -o-linear-gradient(top, $fromColor 0%, $toColor 100%); /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, $fromColor 0%, $toColor 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#{nth( $fromColor, 1 )}', EndColorStr='#{nth( $toColor, 1 )}'); +} + +@mixin dtb-radial-gradient ($fromColor, $toColor ) { + background: $toColor; /* Fallback */ + background: -ms-radial-gradient(center, ellipse farthest-corner, $fromColor 0%, $toColor 100%); /* IE10 Consumer Preview */ + background: -moz-radial-gradient(center, ellipse farthest-corner, $fromColor 0%, $toColor 100%); /* Firefox */ + background: -o-radial-gradient(center, ellipse farthest-corner, $fromColor 0%, $toColor 100%); /* Opera */ + background: -webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, $fromColor), color-stop(1, $toColor)); /* Webkit (Safari/Chrome 10) */ + background: -webkit-radial-gradient(center, ellipse farthest-corner, $fromColor 0%, $toColor 100%); /* Webkit (Chrome 11+) */ + background: radial-gradient(ellipse farthest-corner at center, $fromColor 0%, $toColor 100%); /* W3C Markup, IE10 Release Preview */ +} + + +@mixin dtb-fixed-collection { + // Fixed positioning feature + &.fixed { + position: fixed; + top: 50%; + left: 50%; + margin-left: -75px; + border-radius: 0; + + &.two-column { + margin-left: -150px; + } + + &.three-column { + margin-left: -225px; + } + + &.four-column { + margin-left: -300px; + } + } + + // Multi-column layout feature + -webkit-column-gap: 8px; + -moz-column-gap: 8px; + -ms-column-gap: 8px; + -o-column-gap: 8px; + column-gap: 8px; + + > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; + } + + &.two-column { + width: 300px; + padding-bottom: 1px; + + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; + } + + &.three-column { + width: 450px; + padding-bottom: 1px; + + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; + } + + &.four-column { + width: 600px; + padding-bottom: 1px; + + -webkit-column-count: 4; + -moz-column-count: 4; + -ms-column-count: 4; + -o-column-count: 4; + column-count: 4; + } +} diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.js new file mode 100644 index 00000000..0dc7b5bb --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.js @@ -0,0 +1,68 @@ +/*! Bootstrap integration for DataTables' Buttons + * ©2016 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-bs', 'datatables.net-buttons'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-bs')(root, $).$; + } + + if ( ! $.fn.dataTable.Buttons ) { + require('datatables.net-buttons')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +$.extend( true, DataTable.Buttons.defaults, { + dom: { + container: { + className: 'dt-buttons btn-group' + }, + button: { + className: 'btn btn-default' + }, + collection: { + tag: 'ul', + className: 'dt-button-collection dropdown-menu', + button: { + tag: 'li', + className: 'dt-button' + }, + buttonLiner: { + tag: 'a', + className: '' + } + } + } +} ); + +DataTable.ext.buttons.collection.text = function ( dt ) { + return dt.i18n('buttons.collection', 'Collection '); +}; + + +return DataTable.Buttons; +})); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.min.js new file mode 100644 index 00000000..dc28bac1 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap.min.js @@ -0,0 +1,6 @@ +/*! + Bootstrap integration for DataTables' Buttons + ©2016 SpryMedia Ltd - datatables.net/license +*/ +(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs")(a,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"}, +button:{className:"btn btn-default"},collection:{tag:"ul",className:"dt-button-collection dropdown-menu",button:{tag:"li",className:"dt-button"},buttonLiner:{tag:"a",className:""}}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection ')};return a.Buttons}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.js new file mode 100644 index 00000000..8e0212e7 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.js @@ -0,0 +1,60 @@ +/*! Bootstrap integration for DataTables' Buttons + * ©2016 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-bs4', 'datatables.net-buttons'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-bs4')(root, $).$; + } + + if ( ! $.fn.dataTable.Buttons ) { + require('datatables.net-buttons')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + +$.extend( true, DataTable.Buttons.defaults, { + dom: { + container: { + className: 'dt-buttons btn-group' + }, + button: { + className: 'btn btn-secondary' + }, + collection: { + tag: 'div', + className: 'dt-button-collection dropdown-menu', + button: { + tag: 'a', + className: 'dt-button dropdown-item' + } + } + } +} ); + +DataTable.ext.buttons.collection.className += ' dropdown-toggle'; + +return DataTable.Buttons; +})); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.min.js new file mode 100644 index 00000000..048b857a --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.bootstrap4.min.js @@ -0,0 +1,6 @@ +/*! + Bootstrap integration for DataTables' Buttons + ©2016 SpryMedia Ltd - datatables.net/license +*/ +(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"}, +button:{className:"btn btn-secondary"},collection:{tag:"div",className:"dt-button-collection dropdown-menu",button:{tag:"a",className:"dt-button dropdown-item"}}}});a.ext.buttons.collection.className+=" dropdown-toggle";return a.Buttons}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.js new file mode 100644 index 00000000..d6490996 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.js @@ -0,0 +1,198 @@ +/*! + * Column visibility buttons for Buttons and DataTables. + * 2016 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net')(root, $).$; + } + + if ( ! $.fn.dataTable.Buttons ) { + require('datatables.net-buttons')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +$.extend( DataTable.ext.buttons, { + // A collection of column visibility buttons + colvis: function ( dt, conf ) { + return { + extend: 'collection', + text: function ( dt ) { + return dt.i18n( 'buttons.colvis', 'Column visibility' ); + }, + className: 'buttons-colvis', + buttons: [ { + extend: 'columnsToggle', + columns: conf.columns + } ] + }; + }, + + // Selected columns with individual buttons - toggle column visibility + columnsToggle: function ( dt, conf ) { + var columns = dt.columns( conf.columns ).indexes().map( function ( idx ) { + return { + extend: 'columnToggle', + columns: idx + }; + } ).toArray(); + + return columns; + }, + + // Single button to toggle column visibility + columnToggle: function ( dt, conf ) { + return { + extend: 'columnVisibility', + columns: conf.columns + }; + }, + + // Selected columns with individual buttons - set column visibility + columnsVisibility: function ( dt, conf ) { + var columns = dt.columns( conf.columns ).indexes().map( function ( idx ) { + return { + extend: 'columnVisibility', + columns: idx, + visibility: conf.visibility + }; + } ).toArray(); + + return columns; + }, + + // Single button to set column visibility + columnVisibility: { + columns: undefined, // column selector + text: function ( dt, button, conf ) { + return conf._columnText( dt, conf.columns ); + }, + className: 'buttons-columnVisibility', + action: function ( e, dt, button, conf ) { + var col = dt.columns( conf.columns ); + var curr = col.visible(); + + col.visible( conf.visibility !== undefined ? + conf.visibility : + ! (curr.length ? curr[0] : false ) + ); + }, + init: function ( dt, button, conf ) { + var that = this; + + dt + .on( 'column-visibility.dt'+conf.namespace, function (e, settings) { + if ( ! settings.bDestroying ) { + that.active( dt.column( conf.columns ).visible() ); + } + } ) + .on( 'column-reorder.dt'+conf.namespace, function (e, settings, details) { + // Don't rename buttons based on column name if the button + // controls more than one column! + if ( dt.columns( conf.columns ).count() !== 1 ) { + return; + } + + if ( typeof conf.columns === 'number' ) { + conf.columns = details.mapping[ conf.columns ]; + } + + var col = dt.column( conf.columns ); + + that.text( conf._columnText( dt, conf.columns ) ); + that.active( col.visible() ); + } ); + + this.active( dt.column( conf.columns ).visible() ); + }, + destroy: function ( dt, button, conf ) { + dt + .off( 'column-visibility.dt'+conf.namespace ) + .off( 'column-reorder.dt'+conf.namespace ); + }, + + _columnText: function ( dt, col ) { + // Use DataTables' internal data structure until this is presented + // is a public API. The other option is to use + // `$( column(col).node() ).text()` but the node might not have been + // populated when Buttons is constructed. + var idx = dt.column( col ).index(); + return dt.settings()[0].aoColumns[ idx ].sTitle + .replace(/\n/g," ") // remove new lines + .replace( /<.*?>/g, "" ) // strip HTML + .replace(/^\s+|\s+$/g,""); // trim + } + }, + + + colvisRestore: { + className: 'buttons-colvisRestore', + + text: function ( dt ) { + return dt.i18n( 'buttons.colvisRestore', 'Restore visibility' ); + }, + + init: function ( dt, button, conf ) { + conf._visOriginal = dt.columns().indexes().map( function ( idx ) { + return dt.column( idx ).visible(); + } ).toArray(); + }, + + action: function ( e, dt, button, conf ) { + dt.columns().every( function ( i ) { + // Take into account that ColReorder might have disrupted our + // indexes + var idx = dt.colReorder && dt.colReorder.transpose ? + dt.colReorder.transpose( i, 'toOriginal' ) : + i; + + this.visible( conf._visOriginal[ idx ] ); + } ); + } + }, + + + colvisGroup: { + className: 'buttons-colvisGroup', + + action: function ( e, dt, button, conf ) { + dt.columns( conf.show ).visible( true, false ); + dt.columns( conf.hide ).visible( false, false ); + + dt.columns.adjust(); + }, + + show: [], + + hide: [] + } +} ); + + +return DataTable.Buttons; +})); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.min.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.min.js new file mode 100644 index 00000000..16af2273 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.colVis.min.js @@ -0,0 +1,5 @@ +(function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(d){return g(d,window,document)}):"object"===typeof exports?module.exports=function(d,e){d||(d=window);if(!e||!e.fn.dataTable)e=require("datatables.net")(d,e).$;e.fn.dataTable.Buttons||require("datatables.net-buttons")(d,e);return g(e,d,d.document)}:g(jQuery,window,document)})(function(g,d,e,h){d=g.fn.dataTable;g.extend(d.ext.buttons,{colvis:function(a,b){return{extend:"collection", +text:function(a){return a.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:b.columns}]}},columnsToggle:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnToggle",columns:a}}).toArray()},columnToggle:function(a,b){return{extend:"columnVisibility",columns:b.columns}},columnsVisibility:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnVisibility",columns:a,visibility:b.visibility}}).toArray()}, +columnVisibility:{columns:h,text:function(a,b,c){return c._columnText(a,c.columns)},className:"buttons-columnVisibility",action:function(a,b,c,f){a=b.columns(f.columns);b=a.visible();a.visible(f.visibility!==h?f.visibility:!(b.length&&b[0]))},init:function(a,b,c){var f=this;a.on("column-visibility.dt"+c.namespace,function(b,d){d.bDestroying||f.active(a.column(c.columns).visible())}).on("column-reorder.dt"+c.namespace,function(b,d,e){1===a.columns(c.columns).count()&&("number"===typeof c.columns&& +(c.columns=e.mapping[c.columns]),b=a.column(c.columns),f.text(c._columnText(a,c.columns)),f.active(b.visible()))});this.active(a.column(c.columns).visible())},destroy:function(a,b,c){a.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(a,b){var c=a.column(b).index();return a.settings()[0].aoColumns[c].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"")}},colvisRestore:{className:"buttons-colvisRestore",text:function(a){return a.i18n("buttons.colvisRestore", +"Restore visibility")},init:function(a,b,c){c._visOriginal=a.columns().indexes().map(function(b){return a.column(b).visible()}).toArray()},action:function(a,b,c,d){b.columns().every(function(a){a=b.colReorder&&b.colReorder.transpose?b.colReorder.transpose(a,"toOriginal"):a;this.visible(d._visOriginal[a])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(a,b,c,d){b.columns(d.show).visible(!0,!1);b.columns(d.hide).visible(!1,!1);b.columns.adjust()},show:[],hide:[]}});return d.Buttons}); diff --git a/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.flash.js b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.flash.js new file mode 100644 index 00000000..33b0e547 --- /dev/null +++ b/HIRS_AttestationCAPortal/src/main/webapp/lib/jquery.dataTables-1.10.13/extensions/Buttons/js/buttons.flash.js @@ -0,0 +1,1415 @@ +/*! + * Flash export buttons for Buttons and DataTables. + * 2015 SpryMedia Ltd - datatables.net/license + * + * ZeroClipbaord - MIT license + * Copyright (c) 2012 Joseph Huckaby + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net')(root, $).$; + } + + if ( ! $.fn.dataTable.Buttons ) { + require('datatables.net-buttons')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * ZeroClipboard dependency + */ + +/* + * ZeroClipboard 1.0.4 with modifications + * Author: Joseph Huckaby + * License: MIT + * + * Copyright (c) 2012 Joseph Huckaby + */ +var ZeroClipboard_TableTools = { + version: "1.0.4-TableTools2", + clients: {}, // registered upload clients on page, indexed by id + moviePath: '', // URL to movie + nextId: 1, // ID of next movie + + $: function(thingy) { + // simple DOM lookup utility function + if (typeof(thingy) == 'string') { + thingy = document.getElementById(thingy); + } + if (!thingy.addClass) { + // extend element with a few useful methods + thingy.hide = function() { this.style.display = 'none'; }; + thingy.show = function() { this.style.display = ''; }; + thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; + thingy.removeClass = function(name) { + this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); + }; + thingy.hasClass = function(name) { + return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); + }; + } + return thingy; + }, + + setMoviePath: function(path) { + // set path to ZeroClipboard.swf + this.moviePath = path; + }, + + dispatch: function(id, eventName, args) { + // receive event from flash movie, send to client + var client = this.clients[id]; + if (client) { + client.receiveEvent(eventName, args); + } + }, + + log: function ( str ) { + console.log( 'Flash: '+str ); + }, + + register: function(id, client) { + // register new client to receive events + this.clients[id] = client; + }, + + getDOMObjectPosition: function(obj) { + // get absolute coordinates for dom element + var info = { + left: 0, + top: 0, + width: obj.width ? obj.width : obj.offsetWidth, + height: obj.height ? obj.height : obj.offsetHeight + }; + + if ( obj.style.width !== "" ) { + info.width = obj.style.width.replace("px",""); + } + + if ( obj.style.height !== "" ) { + info.height = obj.style.height.replace("px",""); + } + + while (obj) { + info.left += obj.offsetLeft; + info.top += obj.offsetTop; + obj = obj.offsetParent; + } + + return info; + }, + + Client: function(elem) { + // constructor for new simple upload client + this.handlers = {}; + + // unique ID + this.id = ZeroClipboard_TableTools.nextId++; + this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id; + + // register client with singleton to receive flash events + ZeroClipboard_TableTools.register(this.id, this); + + // create movie + if (elem) { + this.glue(elem); + } + } +}; + +ZeroClipboard_TableTools.Client.prototype = { + + id: 0, // unique ID for us + ready: false, // whether movie is ready to receive events or not + movie: null, // reference to movie object + clipText: '', // text to copy to clipboard + fileName: '', // default file save name + action: 'copy', // action to perform + handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor + cssEffects: true, // enable CSS mouse effects on dom container + handlers: null, // user event handlers + sized: false, + sheetName: '', // default sheet name for excel export + + glue: function(elem, title) { + // glue to DOM element + // elem can be ID or actual DOM element object + this.domElement = ZeroClipboard_TableTools.$(elem); + + // float just above object, or zIndex 99 if dom element isn't set + var zIndex = 99; + if (this.domElement.style.zIndex) { + zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; + } + + // find X/Y position of domElement + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + + // create floating DIV above element + this.div = document.createElement('div'); + var style = this.div.style; + style.position = 'absolute'; + style.left = '0px'; + style.top = '0px'; + style.width = (box.width) + 'px'; + style.height = box.height + 'px'; + style.zIndex = zIndex; + + if ( typeof title != "undefined" && title !== "" ) { + this.div.title = title; + } + if ( box.width !== 0 && box.height !== 0 ) { + this.sized = true; + } + + // style.backgroundColor = '#f00'; // debug + if ( this.domElement ) { + this.domElement.appendChild(this.div); + this.div.innerHTML = this.getHTML( box.width, box.height ).replace(/&/g, '&'); + } + }, + + positionElement: function() { + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var style = this.div.style; + + style.position = 'absolute'; + //style.left = (this.domElement.offsetLeft)+'px'; + //style.top = this.domElement.offsetTop+'px'; + style.width = box.width + 'px'; + style.height = box.height + 'px'; + + if ( box.width !== 0 && box.height !== 0 ) { + this.sized = true; + } else { + return; + } + + var flash = this.div.childNodes[0]; + flash.width = box.width; + flash.height = box.height; + }, + + getHTML: function(width, height) { + // return HTML for movie + var html = ''; + var flashvars = 'id=' + this.id + + '&width=' + width + + '&height=' + height; + + if (navigator.userAgent.match(/MSIE/)) { + // IE gets an OBJECT tag + var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; + html += ''; + } + else { + // all other browsers get an EMBED tag + html += ''; + } + return html; + }, + + hide: function() { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function() { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function() { + // destroy control and floater + var that = this; + + if (this.domElement && this.div) { + $(this.div).remove(); + + this.domElement = null; + this.div = null; + + $.each( ZeroClipboard_TableTools.clients, function ( id, client ) { + if ( client === that ) { + delete ZeroClipboard_TableTools.clients[ id ]; + } + } ); + } + }, + + reposition: function(elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard_TableTools.$(elem); + if (!this.domElement) { + this.hide(); + } + } + + if (this.domElement && this.div) { + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + clearText: function() { + // clear the text to be copy / saved + this.clipText = ''; + if (this.ready) { + this.movie.clearText(); + } + }, + + appendText: function(newText) { + // append text to that which is to be copied / saved + this.clipText += newText; + if (this.ready) { this.movie.appendText(newText) ;} + }, + + setText: function(newText) { + // set text to be copied to be copied / saved + this.clipText = newText; + if (this.ready) { this.movie.setText(newText) ;} + }, + + setFileName: function(newText) { + // set the file name + this.fileName = newText; + if (this.ready) { + this.movie.setFileName(newText); + } + }, + + setSheetData: function(data) { + // set the xlsx sheet data + if (this.ready) { + this.movie.setSheetData( JSON.stringify( data ) ); + } + }, + + setAction: function(newText) { + // set action (save or copy) + this.action = newText; + if (this.ready) { + this.movie.setAction(newText); + } + }, + + addEventListener: function(eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(func); + }, + + setHandCursor: function(enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) { + this.movie.setHandCursor(enabled); + } + }, + + setCSSEffects: function(enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !!enabled; + }, + + receiveEvent: function(eventName, args) { + var self; + + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 1 ); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 100 ); + this.ready = true; + return; + } + + this.ready = true; + this.movie.clearText(); + this.movie.appendText( this.clipText ); + this.movie.setFileName( this.fileName ); + this.movie.setAction( this.action ); + this.movie.setHandCursor( this.handCursorEnabled ); + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + //this.domElement.addClass('hover'); + if (this.recoverActive) { + this.domElement.addClass('active'); + } + } + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + //this.domElement.removeClass('hover'); + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } + else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][ func[1] ](this, args); + } + else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } +}; + +ZeroClipboard_TableTools.hasFlash = function () +{ + try { + var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); + if (fo) { + return true; + } + } + catch (e) { + if ( + navigator.mimeTypes && + navigator.mimeTypes['application/x-shockwave-flash'] !== undefined && + navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin + ) { + return true; + } + } + + return false; +}; + +// For the Flash binding to work, ZeroClipboard_TableTools must be on the global +// object list +window.ZeroClipboard_TableTools = ZeroClipboard_TableTools; + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Local (private) functions + */ + +/** + * If a Buttons instance is initlaised before it is placed into the DOM, Flash + * won't be able to bind to it, so we need to wait until it is available, this + * method abstracts that out. + * + * @param {ZeroClipboard} flash ZeroClipboard instance + * @param {jQuery} node Button + */ +var _glue = function ( flash, node ) +{ + var id = node.attr('id'); + + if ( node.parents('html').length ) { + flash.glue( node[0], '' ); + } + else { + setTimeout( function () { + _glue( flash, node ); + }, 500 ); + } +}; + +/** + * Get the file name for an exported file. + * + * @param {object} config Button configuration + * @param {boolean} incExtension Include the file name extension + */ +var _filename = function ( config, incExtension ) +{ + // Backwards compatibility + var filename = config.filename === '*' && config.title !== '*' && config.title !== undefined ? + config.title : + config.filename; + + if ( typeof filename === 'function' ) { + filename = filename(); + } + + if ( filename.indexOf( '*' ) !== -1 ) { + filename = $.trim( filename.replace( '*', $('title').text() ) ); + } + + // Strip characters which the OS will object to + filename = filename.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, ""); + + return incExtension === undefined || incExtension === true ? + filename+config.extension : + filename; +}; + +/** + * Get the sheet name for Excel exports. + * + * @param {object} config Button configuration + */ +var _sheetname = function ( config ) +{ + var sheetName = 'Sheet1'; + + if ( config.sheetName ) { + sheetName = config.sheetName.replace(/[\[\]\*\/\\\?\:]/g, ''); + } + + return sheetName; +}; + +/** + * Get the title for an exported file. + * + * @param {object} config Button configuration + */ +var _title = function ( config ) +{ + var title = config.title; + + if ( typeof title === 'function' ) { + title = title(); + } + + return title.indexOf( '*' ) !== -1 ? + title.replace( '*', $('title').text() || 'Exported data' ) : + title; +}; + +/** + * Set the flash text. This has to be broken up into chunks as the Javascript / + * Flash bridge has a size limit. There is no indication in the Flash + * documentation what this is, and it probably depends upon the browser. + * Experimentation shows that the point is around 50k when data starts to get + * lost, so an 8K limit used here is safe. + * + * @param {ZeroClipboard} flash ZeroClipboard instance + * @param {string} data Data to send to Flash + */ +var _setText = function ( flash, data ) +{ + var parts = data.match(/[\s\S]{1,8192}/g) || []; + + flash.clearText(); + for ( var i=0, len=parts.length ; i 0 ) { + s += separator; + } + + s += boundary ? + boundary + ('' + a[i]).replace( reBoundary, escapeChar+boundary ) + boundary : + a[i]; + } + + return s; + }; + + var header = config.header ? join( data.header )+newLine : ''; + var footer = config.footer && data.footer ? newLine+join( data.footer ) : ''; + var body = []; + + for ( var i=0, ien=data.body.length ; i= 0 ) { + s = String.fromCharCode(n % len + ordA) + s; + n = Math.floor(n / len) - 1; + } + + return s; +} + +/** + * Create an XML node and add any children, attributes, etc without needing to + * be verbose in the DOM. + * + * @param {object} doc XML document + * @param {string} nodeName Node name + * @param {object} opts Options - can be `attr` (attributes), `children` + * (child nodes) and `text` (text content) + * @return {node} Created node + */ +function _createNode( doc, nodeName, opts ){ + var tempNode = doc.createElement( nodeName ); + + if ( opts ) { + if ( opts.attr ) { + $(tempNode).attr( opts.attr ); + } + + if( opts.children ) { + $.each( opts.children, function ( key, value ) { + tempNode.appendChild( value ); + }); + } + + if( opts.text ) { + tempNode.appendChild( doc.createTextNode( opts.text ) ); + } + } + + return tempNode; +} + +/** + * Get the width for an Excel column based on the contents of that column + * @param {object} data Data for export + * @param {int} col Column index + * @return {int} Column width + */ +function _excelColWidth( data, col ) { + var max = data.header[col].length; + var len, lineSplit, str; + + if ( data.footer && data.footer[col].length > max ) { + max = data.footer[col].length; + } + + for ( var i=0, ien=data.body.length ; i max ) { + max = len; + } + + // Max width rather than having potentially massive column widths + if ( max > 40 ) { + break; + } + } + + max *= 1.3; + + // And a min width + return max > 6 ? max : 6; +} + +try { + var _serialiser = new XMLSerializer(); + var _ieExcel; +} +catch (t) {} + +/** + * Convert XML documents in an object to strings + * @param {object} obj XLSX document object + */ +function _xlsxToStrings( obj ) { + if ( _ieExcel === undefined ) { + // Detect if we are dealing with IE's _awful_ serialiser by seeing if it + // drop attributes + _ieExcel = _serialiser + .serializeToString( + $.parseXML( excelStrings['xl/worksheets/sheet1.xml'] ) + ) + .indexOf( 'xmlns:r' ) === -1; + } + + $.each( obj, function ( name, val ) { + if ( $.isPlainObject( val ) ) { + _xlsxToStrings( val ); + } + else { + if ( _ieExcel ) { + // IE's XML serialiser will drop some name space attributes from + // from the root node, so we need to save them. Do this by + // replacing the namespace nodes with a regular attribute that + // we convert back when serialised. Edge does not have this + // issue + var worksheet = val.childNodes[0]; + var i, ien; + var attrs = []; + + for ( i=worksheet.attributes.length-1 ; i>=0 ; i-- ) { + var attrName = worksheet.attributes[i].nodeName; + var attrValue = worksheet.attributes[i].nodeValue; + + if ( attrName.indexOf( ':' ) !== -1 ) { + attrs.push( { name: attrName, value: attrValue } ); + + worksheet.removeAttribute( attrName ); + } + } + + for ( i=0, ien=attrs.length ; i/g, '<$1 $2>' ); + + obj[ name ] = str; + } + } ); +} + +// Excel - Pre-defined strings to build a basic XLSX file +var excelStrings = { + "_rels/.rels": + ''+ + ''+ + ''+ + '', + + "xl/_rels/workbook.xml.rels": + ''+ + ''+ + ''+ + ''+ + '', + + "[Content_Types].xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '', + + "xl/workbook.xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '', + + "xl/worksheets/sheet1.xml": + ''+ + ''+ + ''+ + '', + + "xl/styles.xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ // Excel appears to use this as a dotted background regardless of values + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' +}; +// Note we could use 3 `for` loops for the styles, but when gzipped there is +// virtually no difference in size, since the above can be easily compressed + +// Pattern matching for special number formats. Perhaps this should be exposed +// via an API in future? +var _excelSpecials = [ + { match: /^\-?\d+\.\d%$/, style: 60, fmt: function (d) { return d/100; } }, // Precent with d.p. + { match: /^\-?\d+\.?\d*%$/, style: 56, fmt: function (d) { return d/100; } }, // Percent + { match: /^\-?\$[\d,]+.?\d*$/, style: 57 }, // Dollars + { match: /^\-?£[\d,]+.?\d*$/, style: 58 }, // Pounds + { match: /^\-?€[\d,]+.?\d*$/, style: 59 }, // Euros + { match: /^\([\d,]+\)$/, style: 61, fmt: function (d) { return -1 * d.replace(/[\(\)]/g, ''); } }, // Negative numbers indicated by brackets + { match: /^\([\d,]+\.\d{2}\)$/, style: 62, fmt: function (d) { return -1 * d.replace(/[\(\)]/g, ''); } }, // Negative numbers indicated by brackets - 2d.p. + { match: /^[\d,]+$/, style: 63 }, // Numbers with thousand separators + { match: /^[\d,]+\.\d{2}$/, style: 64 } // Numbers with 2d.p. and thousands separators +]; + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * DataTables options and methods + */ + +// Set the default SWF path +DataTable.Buttons.swfPath = '//cdn.datatables.net/buttons/1.2.0/swf/flashExport.swf'; + +// Method to allow Flash buttons to be resized when made visible - as they are +// of zero height and width if initialised hidden +DataTable.Api.register( 'buttons.resize()', function () { + $.each( ZeroClipboard_TableTools.clients, function ( i, client ) { + if ( client.domElement !== undefined && client.domElement.parentNode ) { + client.positionElement(); + } + } ); +} ); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Button definitions + */ + +// Copy to clipboard +DataTable.ext.buttons.copyFlash = $.extend( {}, flashButton, { + className: 'buttons-copy buttons-flash', + + text: function ( dt ) { + return dt.i18n( 'buttons.copy', 'Copy' ); + }, + + action: function ( e, dt, button, config ) { + // Check that the trigger did actually occur due to a Flash activation + if ( ! config._fromFlash ) { + return; + } + + var flash = config._flash; + var data = _exportData( dt, config ); + var output = config.customize ? + config.customize( data.str, config ) : + data.str; + + flash.setAction( 'copy' ); + _setText( flash, output ); + + dt.buttons.info( + dt.i18n( 'buttons.copyTitle', 'Copy to clipboard' ), + dt.i18n( 'buttons.copySuccess', { + _: 'Copied %d rows to clipboard', + 1: 'Copied 1 row to clipboard' + }, data.rows ), + 3000 + ); + }, + + fieldSeparator: '\t', + + fieldBoundary: '' +} ); + +// CSV save file +DataTable.ext.buttons.csvFlash = $.extend( {}, flashButton, { + className: 'buttons-csv buttons-flash', + + text: function ( dt ) { + return dt.i18n( 'buttons.csv', 'CSV' ); + }, + + action: function ( e, dt, button, config ) { + // Set the text + var flash = config._flash; + var data = _exportData( dt, config ); + var output = config.customize ? + config.customize( data.str, config ) : + data.str; + + flash.setAction( 'csv' ); + flash.setFileName( _filename( config ) ); + _setText( flash, output ); + }, + + escapeChar: '"' +} ); + +// Excel save file - this is really a CSV file using UTF-8 that Excel can read +DataTable.ext.buttons.excelFlash = $.extend( {}, flashButton, { + className: 'buttons-excel buttons-flash', + + text: function ( dt ) { + return dt.i18n( 'buttons.excel', 'Excel' ); + }, + + action: function ( e, dt, button, config ) { + var flash = config._flash; + var rowPos = 0; + var rels = $.parseXML( excelStrings['xl/worksheets/sheet1.xml'] ) ; //Parses xml + var relsGet = rels.getElementsByTagName( "sheetData" )[0]; + + var xlsx = { + _rels: { + ".rels": $.parseXML( excelStrings['_rels/.rels'] ) + }, + xl: { + _rels: { + "workbook.xml.rels": $.parseXML( excelStrings['xl/_rels/workbook.xml.rels'] ) + }, + "workbook.xml": $.parseXML( excelStrings['xl/workbook.xml'] ), + "styles.xml": $.parseXML( excelStrings['xl/styles.xml'] ), + "worksheets": { + "sheet1.xml": rels + } + + }, + "[Content_Types].xml": $.parseXML( excelStrings['[Content_Types].xml']) + }; + + var data = dt.buttons.exportData( config.exportOptions ); + var currentRow, rowNode; + var addRow = function ( row ) { + currentRow = rowPos+1; + rowNode = _createNode( rels, "row", { attr: {r:currentRow} } ); + + for ( var i=0, ien=row.length ; id&&(d=a.footer[b].length);for(var e=0,f=a.body.length;ed&&(d=c),40'+ +c),c=c.replace(/_dt_b_namespace_token_/g,":"));c=c.replace(/<(.*?) xmlns=""(.*?)>/g,"<$1 $2>");a[b]=c}})}var i=g.fn.dataTable,h={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=l.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*"), +" ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,d){(a=this.clients[a])&&a.receiveEvent(b,d)},log:function(a){console.log("Flash: "+a)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!==a.style.width&&(b.width=a.style.width.replace("px", +""));""!==a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},Client:function(a){this.handlers={};this.id=h.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;h.register(this.id,this);a&&this.glue(a)}};h.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,sheetName:"",glue:function(a,b){this.domElement=h.$(a);var d=99; +this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1);var c=h.getDOMObjectPosition(this.domElement);this.div=l.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=c.width+"px";e.height=c.height+"px";e.zIndex=d;"undefined"!=typeof b&&""!==b&&(this.div.title=b);0!==c.width&&0!==c.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(c.width,c.height).replace(/&/g,"&"))}, +positionElement:function(){var a=h.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!==a.width&&0!==a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=a.height)},getHTML:function(a,b){var d="",c="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",d=d+(''); +else d+='';return d},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){var a= +this;this.domElement&&this.div&&(g(this.div).remove(),this.div=this.domElement=null,g.each(h.clients,function(b,d){d===a&&delete h.clients[b]}))},reposition:function(a){a&&((this.domElement=h.$(a))||this.hide());if(this.domElement&&this.div){var a=h.getDOMObjectPosition(this.domElement),b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)}, +setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},setSheetData:function(a){this.ready&&this.movie.setSheetData(JSON.stringify(a))},setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&& +this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){var d,a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=l.getElementById(this.movieId);if(!this.movie){d=this;setTimeout(function(){d.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){d=this;setTimeout(function(){d.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText(); +this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setHandCursor(this.handCursorEnabled);break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&& +this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var c=0,e=this.handlers[a].length;c', +"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'', +"xl/workbook.xml":'', +"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''}, +z=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(a){return a/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\([\d,]+\)$/,style:61,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^[\d,]+$/,style:63},{match:/^[\d,]+\.\d{2}$/,style:64}];i.Buttons.swfPath="//cdn.datatables.net/buttons/1.2.0/swf/flashExport.swf"; +i.Api.register("buttons.resize()",function(){g.each(h.clients,function(a,b){b.domElement!==p&&b.domElement.parentNode&&b.positionElement()})});i.ext.buttons.copyFlash=g.extend({},t,{className:"buttons-copy buttons-flash",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,d,c){c._fromFlash&&(a=c._flash,d=y(b,c),c=c.customize?c.customize(d.str,c):d.str,a.setAction("copy"),s(a,c),b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copySuccess",{_:"Copied %d rows to clipboard", +1:"Copied 1 row to clipboard"},d.rows),3E3))},fieldSeparator:"\t",fieldBoundary:""});i.ext.buttons.csvFlash=g.extend({},t,{className:"buttons-csv buttons-flash",text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,d,c){a=c._flash;b=y(b,c);b=c.customize?c.customize(b.str,c):b.str;a.setAction("csv");a.setFileName(r(c));s(a,b)},escapeChar:'"'});i.ext.buttons.excelFlash=g.extend({},t,{className:"buttons-excel buttons-flash",text:function(a){return a.i18n("buttons.excel","Excel")}, +action:function(a,b,d,c){var a=c._flash,e=0,f=g.parseXML(o["xl/worksheets/sheet1.xml"]),h=f.getElementsByTagName("sheetData")[0],d={_rels:{".rels":g.parseXML(o["_rels/.rels"])},xl:{_rels:{"workbook.xml.rels":g.parseXML(o["xl/_rels/workbook.xml.rels"])},"workbook.xml":g.parseXML(o["xl/workbook.xml"]),"styles.xml":g.parseXML(o["xl/styles.xml"]),worksheets:{"sheet1.xml":f}},"[Content_Types].xml":g.parseXML(o["[Content_Types].xml"])},b=b.buttons.exportData(c.exportOptions),k,l,i=function(a){k=e+1;l=m(f, +"row",{attr:{r:k}});for(var b=0,c=a.length;b 0 ) { + s += separator; + } + + s += boundary ? + boundary + ('' + a[i]).replace( reBoundary, escapeChar+boundary ) + boundary : + a[i]; + } + + return s; + }; + + var header = config.header ? join( data.header )+newLine : ''; + var footer = config.footer && data.footer ? newLine+join( data.footer ) : ''; + var body = []; + + for ( var i=0, ien=data.body.length ; i 1 && version[1]*1 < 603.1 ) { + return true; + } + + return false; +}; + +/** + * Convert from numeric position to letter for column names in Excel + * @param {int} n Column number + * @return {string} Column letter(s) name + */ +function createCellPos( n ){ + var ordA = 'A'.charCodeAt(0); + var ordZ = 'Z'.charCodeAt(0); + var len = ordZ - ordA + 1; + var s = ""; + + while( n >= 0 ) { + s = String.fromCharCode(n % len + ordA) + s; + n = Math.floor(n / len) - 1; + } + + return s; +} + +try { + var _serialiser = new XMLSerializer(); + var _ieExcel; +} +catch (t) {} + +/** + * Recursively add XML files from an object's structure to a ZIP file. This + * allows the XSLX file to be easily defined with an object's structure matching + * the files structure. + * + * @param {JSZip} zip ZIP package + * @param {object} obj Object to add (recursive) + */ +function _addToZip( zip, obj ) { + if ( _ieExcel === undefined ) { + // Detect if we are dealing with IE's _awful_ serialiser by seeing if it + // drop attributes + _ieExcel = _serialiser + .serializeToString( + $.parseXML( excelStrings['xl/worksheets/sheet1.xml'] ) + ) + .indexOf( 'xmlns:r' ) === -1; + } + + $.each( obj, function ( name, val ) { + if ( $.isPlainObject( val ) ) { + var newDir = zip.folder( name ); + _addToZip( newDir, val ); + } + else { + if ( _ieExcel ) { + // IE's XML serialiser will drop some name space attributes from + // from the root node, so we need to save them. Do this by + // replacing the namespace nodes with a regular attribute that + // we convert back when serialised. Edge does not have this + // issue + var worksheet = val.childNodes[0]; + var i, ien; + var attrs = []; + + for ( i=worksheet.attributes.length-1 ; i>=0 ; i-- ) { + var attrName = worksheet.attributes[i].nodeName; + var attrValue = worksheet.attributes[i].nodeValue; + + if ( attrName.indexOf( ':' ) !== -1 ) { + attrs.push( { name: attrName, value: attrValue } ); + + worksheet.removeAttribute( attrName ); + } + } + + for ( i=0, ien=attrs.length ; i/g, '<$1 $2>' ); + + zip.file( name, str ); + } + } ); +} + +/** + * Create an XML node and add any children, attributes, etc without needing to + * be verbose in the DOM. + * + * @param {object} doc XML document + * @param {string} nodeName Node name + * @param {object} opts Options - can be `attr` (attributes), `children` + * (child nodes) and `text` (text content) + * @return {node} Created node + */ +function _createNode( doc, nodeName, opts ) { + var tempNode = doc.createElement( nodeName ); + + if ( opts ) { + if ( opts.attr ) { + $(tempNode).attr( opts.attr ); + } + + if( opts.children ) { + $.each( opts.children, function ( key, value ) { + tempNode.appendChild( value ); + }); + } + + if( opts.text ) { + tempNode.appendChild( doc.createTextNode( opts.text ) ); + } + } + + return tempNode; +} + +/** + * Get the width for an Excel column based on the contents of that column + * @param {object} data Data for export + * @param {int} col Column index + * @return {int} Column width + */ +function _excelColWidth( data, col ) { + var max = data.header[col].length; + var len, lineSplit, str; + + if ( data.footer && data.footer[col].length > max ) { + max = data.footer[col].length; + } + + for ( var i=0, ien=data.body.length ; i max ) { + max = len; + } + + // Max width rather than having potentially massive column widths + if ( max > 40 ) { + break; + } + } + + max *= 1.3; + + // And a min width + return max > 6 ? max : 6; +} + +// Excel - Pre-defined strings to build a basic XLSX file +var excelStrings = { + "_rels/.rels": + ''+ + ''+ + ''+ + '', + + "xl/_rels/workbook.xml.rels": + ''+ + ''+ + ''+ + ''+ + '', + + "[Content_Types].xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '', + + "xl/workbook.xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '', + + "xl/worksheets/sheet1.xml": + ''+ + ''+ + ''+ + '', + + "xl/styles.xml": + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ // Excel appears to use this as a dotted background regardless of values + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' +}; +// Note we could use 3 `for` loops for the styles, but when gzipped there is +// virtually no difference in size, since the above can be easily compressed + +// Pattern matching for special number formats. Perhaps this should be exposed +// via an API in future? +// Ref: section 3.8.30 - built in formatters in open spreadsheet +// https://www.ecma-international.org/news/TC45_current_work/Office%20Open%20XML%20Part%204%20-%20Markup%20Language%20Reference.pdf +var _excelSpecials = [ + { match: /^\-?\d+\.\d%$/, style: 60, fmt: function (d) { return d/100; } }, // Precent with d.p. + { match: /^\-?\d+\.?\d*%$/, style: 56, fmt: function (d) { return d/100; } }, // Percent + { match: /^\-?\$[\d,]+.?\d*$/, style: 57 }, // Dollars + { match: /^\-?£[\d,]+.?\d*$/, style: 58 }, // Pounds + { match: /^\-?€[\d,]+.?\d*$/, style: 59 }, // Euros + { match: /^\([\d,]+\)$/, style: 61, fmt: function (d) { return -1 * d.replace(/[\(\)]/g, ''); } }, // Negative numbers indicated by brackets + { match: /^\([\d,]+\.\d{2}\)$/, style: 62, fmt: function (d) { return -1 * d.replace(/[\(\)]/g, ''); } }, // Negative numbers indicated by brackets - 2d.p. + { match: /^[\d,]+$/, style: 63 }, // Numbers with thousand separators + { match: /^[\d,]+\.\d{2}$/, style: 64 } // Numbers with 2d.p. and thousands separators +]; + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Buttons + */ + +// +// Copy to clipboard +// +DataTable.ext.buttons.copyHtml5 = { + className: 'buttons-copy buttons-html5', + + text: function ( dt ) { + return dt.i18n( 'buttons.copy', 'Copy' ); + }, + + action: function ( e, dt, button, config ) { + var exportData = _exportData( dt, config ); + var output = exportData.str; + var hiddenDiv = $('
      ') + .css( { + height: 1, + width: 1, + overflow: 'hidden', + position: 'fixed', + top: 0, + left: 0 + } ); + + if ( config.customize ) { + output = config.customize( output, config ); + } + + var textarea = $('",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
      ","
      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
      "],tr:[2,"","
      "],col:[2,"","
      "],td:[3,"","
      "],_default:l.htmlSerialize?[0,"",""]:[1,"X
      ","
      "]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("