mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
Second commit mainly containing new files
This commit is contained in:
parent
3a72583836
commit
9fe89232a8
@ -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
|
||||
|
@ -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();
|
||||
// }
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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<ComponentResult, UUID> {
|
||||
|
||||
@Query(value = "SELECT * FROM ComponentResult where certificateId = ?1", nativeQuery = true)
|
||||
List<ComponentResult> getComponentResultsByCertificate(UUID certificateId);
|
||||
}
|
@ -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, UUID> {
|
||||
PolicySettings findByName(String name);
|
||||
}
|
@ -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<SupplyChainValidationSummary, UUID> {
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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<Path> loadAll();
|
||||
}
|
@ -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<Path> loadAll() {
|
||||
try {
|
||||
return Files.walk(this.rootLocation, 1)
|
||||
.filter(path -> !path.equals(this.rootLocation))
|
||||
.map(this.rootLocation::relativize);
|
||||
}
|
||||
catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -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<PolicySettings> {
|
||||
|
||||
@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);
|
||||
// }
|
||||
}
|
@ -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.
|
||||
* <p>
|
||||
* 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;
|
||||
}
|
||||
}
|
@ -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<String, Object> 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);
|
||||
}
|
||||
}
|
@ -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<NoPageParams> {
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
// }
|
||||
}
|
@ -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<NoPageParams> {
|
||||
|
||||
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<SupplyChainValidationSummary> 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<Certificate> scvRoot = criteriaQuery.from(Reference.class);
|
||||
|
||||
criteriaQuery.select(scvRoot).distinct(true).where(cb.isNull(scvRoot.get(Certificate.ARCHIVE_FIELD)));
|
||||
}
|
||||
};
|
||||
|
||||
FilteredRecordsList<SupplyChainValidationSummary> 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<LocalDate> createTimes = new ArrayList<LocalDate>();
|
||||
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<ArrayList<String>> parsedComponents = parseComponents(pc);
|
||||
for (ArrayList<String> 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<ArrayList<String>> 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<String> 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<ArrayList<String>> parseComponents(final PlatformCredential pc) {
|
||||
ArrayList<ArrayList<String>> parsedComponents = new ArrayList<ArrayList<String>>();
|
||||
ArrayList<ArrayList<Object>> 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<PlatformCredential> chainCertificates = certificateRepository.byBoardSerialNumber(pc.getPlatformSerial());
|
||||
// combine all components in each certificate
|
||||
for (ComponentIdentifier ci : pc.getComponentIdentifiers()) {
|
||||
ArrayList<Object> issuerAndComponent = new ArrayList<Object>();
|
||||
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<Object> issuerAndComponent = new ArrayList<Object>();
|
||||
issuerAndComponent.add(cert.getHolderIssuer());
|
||||
issuerAndComponent.add(ci);
|
||||
chainComponents.add(issuerAndComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("Component failures: " + componentFailureString.toString());
|
||||
for (ArrayList<Object> issuerAndComponent : chainComponents) {
|
||||
ArrayList<String> componentData = new ArrayList<String>();
|
||||
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;
|
||||
}
|
||||
}
|
@ -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(
|
||||
|
@ -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 --%>
|
||||
<my:page>
|
||||
|
||||
<jsp:attribute name="script">
|
||||
<script type="text/javascript" src="${lib}/jquery.spring-friendly/jquery.spring-friendly.js"></script>
|
||||
</jsp:attribute>
|
||||
<jsp:attribute name="pageHeaderTitle">Endorsement Key Credentials</jsp:attribute>
|
||||
|
||||
<jsp:body>
|
||||
<div class="aca-input-box-header">
|
||||
<form:form method="POST" action="${portal}/certificate-request/endorsement-key-credentials/upload" enctype="multipart/form-data">
|
||||
Import Endorsement Key Credentials
|
||||
<my:file-chooser id="ek-editor" label="Import Endorsement Key Credentials">
|
||||
<input id="importFile" type="file" name="file" multiple="multiple" />
|
||||
</my:file-chooser>
|
||||
<a href="${portal}/certificate-request/endorsement-key-credentials/bulk">
|
||||
<img src="${icons}/ic_file_download_black_24dp.png" title="Download All Endorsement Certificates">
|
||||
</a>
|
||||
</form:form>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="aca-data-table">
|
||||
<table id="endorsementKeyTable" class="display" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Device</th>
|
||||
<th>Issuer</th>
|
||||
<th>Type</th>
|
||||
<th>Manufacturer</th>
|
||||
<th>Model</th>
|
||||
<th>Version</th>
|
||||
<th>Valid (begin)</th>
|
||||
<th>Valid (end)</th>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var url = pagePath +'/list';
|
||||
var columns = [
|
||||
{
|
||||
data: 'device.name',
|
||||
render: function (data, type, full, meta) {
|
||||
// if there's a device, display its name, otherwise
|
||||
// display nothing
|
||||
if (full.device) {
|
||||
// TODO render a link to a device details page,
|
||||
// passing the device.id
|
||||
return full.device.name;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{data: 'issuer'},
|
||||
{data: 'credentialType'},
|
||||
{data: 'manufacturer'},
|
||||
{data: 'model'},
|
||||
{data: 'version'},
|
||||
{
|
||||
data: 'beginValidity',
|
||||
searchable:false,
|
||||
render: function (data, type, full, meta) {
|
||||
return formatDateTime(full.beginValidity);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'endValidity',
|
||||
searchable:false,
|
||||
render: function (data, type, full, meta) {
|
||||
return formatDateTime(full.endValidity);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'id',
|
||||
orderable: false,
|
||||
searchable:false,
|
||||
render: function(data, type, full, meta) {
|
||||
// Set up a delete icon with link to handleDeleteRequest().
|
||||
// sets up a hidden input field containing the ID which is
|
||||
// used as a parameter to the REST POST call to delete
|
||||
var html = '';
|
||||
html += certificateDetailsLink('endorsement', full.id, true);
|
||||
html += certificateDownloadLink(full.id, pagePath);
|
||||
html += certificateDeleteLink(full.id, pagePath);
|
||||
|
||||
return html;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
//Set data tables
|
||||
setDataTables("#endorsementKeyTable", url, columns);
|
||||
});
|
||||
</script>
|
||||
</jsp:body>
|
||||
</my:page>
|
@ -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 `/*!`.
|
@ -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.
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}));
|
@ -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});
|
@ -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;
|
||||
}));
|
@ -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});
|
@ -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;
|
||||
}));
|
@ -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});
|
@ -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;
|
||||
}));
|
@ -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});
|
@ -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;
|
||||
}));
|
@ -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});
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@
|
||||
/*!
|
||||
AutoFill 2.1.3
|
||||
©2008-2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return e(l,window,document)}):"object"===typeof exports?module.exports=function(l,i){l||(l=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(l,i).$;return e(i,l,l.document)}:e(jQuery,window,document)})(function(e,l,i,q){var k=e.fn.dataTable,o=0,j=function(c,b){if(!k.versionCheck||!k.versionCheck("1.10.8"))throw"Warning: AutoFill requires DataTables 1.10.8 or greater";this.c=e.extend(!0,{},k.defaults.autoFill,
|
||||
j.defaults,b);this.s={dt:new k.Api(c),namespace:".autoFill"+o++,scroll:{},scrollInterval:null,handle:{height:0,width:0}};this.dom={handle:e('<div class="dt-autofill-handle"/>'),select:{top:e('<div class="dt-autofill-select top"/>'),right:e('<div class="dt-autofill-select right"/>'),bottom:e('<div class="dt-autofill-select bottom"/>'),left:e('<div class="dt-autofill-select left"/>')},background:e('<div class="dt-autofill-background"/>'),list:e('<div class="dt-autofill-list">'+this.s.dt.i18n("autoFill.info",
|
||||
"")+"<ul/></div>"),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("<li/>").append('<div class="dt-autofill-question">'+d[h].option(a,c)+"<div>").append(e('<div class="dt-autofill-button">').append(e('<button class="'+j.classes.btn+'">'+a.i18n("autoFill.button",">")+
|
||||
"</button>").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<h.row?d:f;g=a.row<h.row?f:d;c=a.column<h.column?d:f;d=a.column<h.column?f:d;b=this._getPosition(b).top;c=this._getPosition(c).left;a=this._getPosition(g).top+g.outerHeight()-b;d=this._getPosition(d).left+d.outerWidth()-c;f=this.dom.select;f.top.css({top:b,left:c,width:d});f.left.css({top:b,left:c,height:a});f.bottom.css({top:b+a,left:c,width:d});
|
||||
f.right.css({top:b,left:c+d,height:a})}},_editor:function(c){var b=this.s.dt,a=this.c.editor;if(a){for(var d={},f=[],e=a.fields(),g=0,i=c.length;g<i;g++)for(var j=0,l=c[g].length;j<l;j++){var n=c[g][j],k=b.settings()[0].aoColumns[n.index.column],m=k.editField;if(m===q)for(var k=k.mData,p=0,o=e.length;p<o;p++){var r=a.field(e[p]);if(r.dataSrc()===k){m=r.name();break}}if(!m)throw"Could not automatically determine field data. Please see https://datatables.net/tn/11";d[m]||(d[m]={});k=b.row(n.index.row).id();
|
||||
d[m][k]=n.set;f.push(n.index)}a.bubble(f,!1).multiSet(d).submit()}},_emitEvent:function(c,b){this.s.dt.iterator("table",function(a){e(a.nTable).triggerHandler(c+".dt",b)})},_focusListener:function(){var c=this,b=this.s.dt,a=this.s.namespace,d=null!==this.c.focus?this.c.focus:b.init().keys||b.settings()[0].keytable?"focus":"hover";if("focus"===d)b.on("key-focus.autoFill",function(a,b,d){c._attach(d.node())}).on("key-blur.autoFill",function(){c._detach()});else if("click"===d)e(b.table().body()).on("click"+
|
||||
a,"td, th",function(){c._attach(this)}),e(i.body).on("click"+a,function(a){e(a.target).parents().filter(b.table().body()).length||c._detach()});else e(b.table().body()).on("mouseenter"+a,"td, th",function(){c._attach(this)}).on("mouseleave"+a,function(a){e(a.relatedTarget).hasClass("dt-autofill-handle")||c._detach()})},_getPosition:function(c,b){var a=e(c),d,f,h=0,g=0;b||(b=e(this.s.dt.table().node()).offsetParent());do{f=a.position();d=a.offsetParent();h+=f.top+d.scrollTop();g+=f.left+d.scrollLeft();
|
||||
if("body"===a.get(0).nodeName.toLowerCase())break;a=d}while(d.get(0)!==b.get(0));return{top:h,left:g}},_mousedown:function(c){var b=this,a=this.s.dt;this.dom.start=this.dom.attachedTo;this.s.start={row:a.rows({page:"current"}).nodes().indexOf(e(this.dom.start).parent()[0]),column:e(this.dom.start).index()};e(i.body).on("mousemove.autoFill",function(a){b._mousemove(a)}).on("mouseup.autoFill",function(a){b._mouseup(a)});var d=this.dom.select,a=e(a.table().node()).offsetParent();d.top.appendTo(a);d.left.appendTo(a);
|
||||
d.right.appendTo(a);d.bottom.appendTo(a);this._drawSelection(this.dom.start,c);this.dom.handle.css("display","none");c=this.dom.dtScroll;this.s.scroll={windowHeight:e(l).height(),windowWidth:e(l).width(),dtTop:c?c.offset().top:null,dtLeft:c?c.offset().left:null,dtHeight:c?c.outerHeight():null,dtWidth:c?c.outerWidth():null}},_mousemove:function(c){var b=c.target.nodeName.toLowerCase();"td"!==b&&"th"!==b||(this._drawSelection(c.target,c),this._shiftScroll(c))},_mouseup:function(){e(i.body).off(".autoFill");
|
||||
var c=this.s.dt,b=this.dom.select;b.top.remove();b.left.remove();b.right.remove();b.bottom.remove();this.dom.handle.css("display","block");var b=this.s.start,a=this.s.end;if(!(b.row===a.row&&b.column===a.column)){for(var d=this._range(b.row,a.row),b=this._range(b.column,a.column),a=[],f=c.settings()[0],h=f.aoColumns,g=0;g<d.length;g++)a.push(e.map(b,function(a){var a=c.cell(":eq("+d[g]+")",a+":visible",{page:"current"}),b=a.data(),e=a.index(),i=h[e.column].editField;i!==q&&(b=f.oApi._fnGetObjectDataFn(i)(c.row(e.row).data()));
|
||||
return{cell:a,data:b,label:a.data(),index:e}}));this._actionSelector(a);clearInterval(this.s.scrollInterval);this.s.scrollInterval=null}},_range:function(c,b){var a=[],d;if(c<=b)for(d=c;d<=b;d++)a.push(d);else for(d=c;d>=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+65?k=-5:null!==a.dtTop&&c.pageY>
|
||||
a.dtTop+a.dtHeight-65&&(k=5);null!==a.dtLeft&&c.pageX<a.dtLeft+65?l=-5:null!==a.dtLeft&&c.pageX>a.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<e;f++)for(var g=0,i=b[f].length;g<i;g++)d=b[f][g],d.cell.data(d.set);a.draw(!1)}this._emitEvent("autoFill",[a,b])}}});j.actions={increment:{available:function(c,b){return e.isNumeric(b[0][0].label)},
|
||||
option:function(c){return c.i18n("autoFill.increment",'Increment / decrement each cell by: <input type="number" value="1">')},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<f;d++)for(var h=0,g=b[d].length;h<g;h++)b[d][h].set=c,c+=a}},fill:{available:function(){return!0},option:function(c,b){return c.i18n("autoFill.fill","Fill all cells with <i>"+b[0][0].label+"</i>")},execute:function(c,b){for(var a=b[0][0].data,d=0,f=b.length;d<f;d++)for(var e=0,g=b[d].length;e<
|
||||
g;e++)b[d][e].set=a}},fillHorizontal:{available:function(c,b){return 1<b.length&&1<b[0].length},option:function(c){return c.i18n("autoFill.fillHorizontal","Fill cells horizontally")},execute:function(c,b){for(var a=0,d=b.length;a<d;a++)for(var e=0,h=b[a].length;e<h;e++)b[a][e].set=b[a][0].data}},fillVertical:{available:function(c,b){return 1<b.length&&1<b[0].length},option:function(c){return c.i18n("autoFill.fillVertical","Fill cells vertically")},execute:function(c,b){for(var a=0,d=b.length;a<d;a++)for(var e=
|
||||
0,h=b[a].length;e<h;e++)b[a][e].set=b[0][e].data}},cancel:{available:function(){return!1},option:function(c){return c.i18n("autoFill.cancel","Cancel")},execute:function(){return!1}}};j.version="2.1.3";j.defaults={alwaysAsk:!1,focus:null,columns:"",update:null,editor:null};j.classes={btn:"btn"};e(i).on("preInit.dt.autofill",function(c,b){if("dt"===c.namespace){var a=b.oInit.autoFill,d=k.defaults.autoFill;if(a||d)d=e.extend({},a,d),!1!==a&&new j(b,d)}});k.AutoFill=j;return k.AutoFill=j});
|
@ -0,0 +1,22 @@
|
||||
MIT license
|
||||
|
||||
Copyright (c) 2015-2016 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.
|
@ -0,0 +1,39 @@
|
||||
# Buttons
|
||||
|
||||
The Buttons extension for DataTables provides a common set of options, API methods and styling to display buttons on a page that will interact with a DataTable. Modules are also provided for data export, printing and column visibility control.
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
To use Buttons 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](http://datatables.net/extensions/buttons/) 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-buttons`. 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
|
||||
|
||||
Buttons is initialised using the `buttons` option in the DataTables constructor, giving an array of the buttons that should be shown. Further options can be specified using this option as an object - see the documentation for details. For example:
|
||||
|
||||
```js
|
||||
$(document).ready( function () {
|
||||
$('#example').DataTable( {
|
||||
buttons: [ 'csv', 'excel', 'pdf', 'print' ]
|
||||
} );
|
||||
} );
|
||||
```
|
||||
|
||||
|
||||
# Documentation / support
|
||||
|
||||
* [Documentation](https://datatables.net/extensions/buttons/)
|
||||
* [DataTables support forums](http://datatables.net/forums)
|
||||
|
||||
|
||||
# GitHub
|
||||
|
||||
If you fancy getting involved with the development of Buttons and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/Buttons)
|
||||
|
@ -0,0 +1,102 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -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}}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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}}
|
@ -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;
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
@ -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}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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}}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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}}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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 <span class="caret"/>');
|
||||
};
|
||||
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
@ -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 <span class="caret"/>')};return a.Buttons});
|
@ -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;
|
||||
}));
|
@ -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});
|
@ -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;
|
||||
}));
|
@ -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});
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
||||
/*! Foundation integration for DataTables' Buttons
|
||||
* ©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-zf', '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-zf')(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;
|
||||
|
||||
|
||||
// F6 has different requirements for the dropdown button set. We can use the
|
||||
// Foundation version found by DataTables in order to support both F5 and F6 in
|
||||
// the same file, but not that this requires DataTables 1.10.11+ for F6 support.
|
||||
var collection = DataTable.ext.foundationVersion === 6 ?
|
||||
{
|
||||
tag: 'div',
|
||||
className: 'dt-button-collection dropdown-pane is-open button-group stacked'
|
||||
} :
|
||||
{
|
||||
tag: 'ul',
|
||||
className: 'dt-button-collection f-dropdown open dropdown-pane is-open',
|
||||
button: {
|
||||
tag: 'li',
|
||||
className: 'small'
|
||||
},
|
||||
buttonLiner: {
|
||||
tag: 'a'
|
||||
}
|
||||
};
|
||||
|
||||
$.extend( true, DataTable.Buttons.defaults, {
|
||||
dom: {
|
||||
container: {
|
||||
tag: 'div',
|
||||
className: 'dt-buttons button-group'
|
||||
},
|
||||
buttonContainer: {
|
||||
tag: null,
|
||||
className: ''
|
||||
},
|
||||
button: {
|
||||
tag: 'a',
|
||||
className: 'button small'
|
||||
},
|
||||
buttonLiner: {
|
||||
tag: null
|
||||
},
|
||||
collection: collection
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
DataTable.ext.buttons.collection.className = 'buttons-collection dropdown';
|
||||
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
Foundation integration for DataTables' Buttons
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-zf","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-zf")(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:{tag:"div",className:"dt-buttons button-group"},
|
||||
buttonContainer:{tag:null,className:""},button:{tag:"a",className:"button small"},buttonLiner:{tag:null},collection:6===a.ext.foundationVersion?{tag:"div",className:"dt-button-collection dropdown-pane is-open button-group stacked"}:{tag:"ul",className:"dt-button-collection f-dropdown open dropdown-pane is-open",button:{tag:"li",className:"small"},buttonLiner:{tag:"a"}}}});a.ext.buttons.collection.className="buttons-collection dropdown";return a.Buttons});
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,62 @@
|
||||
/*! jQuery UI integration for DataTables' Buttons
|
||||
* ©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-jqui', '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-jqui')(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 ui-buttonset'
|
||||
},
|
||||
button: {
|
||||
className: 'dt-button ui-button ui-state-default ui-button-text-only',
|
||||
disabled: 'ui-state-disabled',
|
||||
active: 'ui-state-active'
|
||||
},
|
||||
buttonLiner: {
|
||||
tag: 'span',
|
||||
className: 'ui-button-text'
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
DataTable.ext.buttons.collection.text = function ( dt ) {
|
||||
return dt.i18n('buttons.collection', 'Collection <span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"/>');
|
||||
};
|
||||
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
jQuery UI integration for DataTables' Buttons
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-jqui","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-jqui")(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 ui-buttonset"},
|
||||
button:{className:"dt-button ui-button ui-state-default ui-button-text-only",disabled:"ui-state-disabled",active:"ui-state-active"},buttonLiner:{tag:"span",className:"ui-button-text"}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection <span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"/>')};return a.Buttons});
|
@ -0,0 +1,178 @@
|
||||
/*!
|
||||
* Print button 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;
|
||||
|
||||
|
||||
var _link = document.createElement( 'a' );
|
||||
|
||||
/**
|
||||
* Convert a `link` tag's URL from a relative to an absolute address so it will
|
||||
* work correctly in the popup window which has no base URL.
|
||||
*
|
||||
* @param {node} el Element to convert
|
||||
*/
|
||||
var _relToAbs = function( el ) {
|
||||
var url;
|
||||
var clone = $(el).clone()[0];
|
||||
var linkHost;
|
||||
|
||||
if ( clone.nodeName.toLowerCase() === 'link' ) {
|
||||
_link.href = clone.href;
|
||||
linkHost = _link.host;
|
||||
|
||||
// IE doesn't have a trailing slash on the host
|
||||
// Chrome has it on the pathname
|
||||
if ( linkHost.indexOf('/') === -1 && _link.pathname.indexOf('/') !== 0) {
|
||||
linkHost += '/';
|
||||
}
|
||||
|
||||
clone.href = _link.protocol+"//"+linkHost+_link.pathname+_link.search;
|
||||
}
|
||||
|
||||
return clone.outerHTML;
|
||||
};
|
||||
|
||||
|
||||
DataTable.ext.buttons.print = {
|
||||
className: 'buttons-print',
|
||||
|
||||
text: function ( dt ) {
|
||||
return dt.i18n( 'buttons.print', 'Print' );
|
||||
},
|
||||
|
||||
action: function ( e, dt, button, config ) {
|
||||
var data = dt.buttons.exportData( config.exportOptions );
|
||||
var addRow = function ( d, tag ) {
|
||||
var str = '<tr>';
|
||||
|
||||
for ( var i=0, ien=d.length ; i<ien ; i++ ) {
|
||||
str += '<'+tag+'>'+d[i]+'</'+tag+'>';
|
||||
}
|
||||
|
||||
return str + '</tr>';
|
||||
};
|
||||
|
||||
// Construct a table for printing
|
||||
var html = '<table class="'+dt.table().node().className+'">';
|
||||
|
||||
if ( config.header ) {
|
||||
html += '<thead>'+ addRow( data.header, 'th' ) +'</thead>';
|
||||
}
|
||||
|
||||
html += '<tbody>';
|
||||
for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
|
||||
html += addRow( data.body[i], 'td' );
|
||||
}
|
||||
html += '</tbody>';
|
||||
|
||||
if ( config.footer && data.footer ) {
|
||||
html += '<tfoot>'+ addRow( data.footer, 'th' ) +'</tfoot>';
|
||||
}
|
||||
|
||||
// Open a new window for the printable table
|
||||
var win = window.open( '', '' );
|
||||
var title = config.title;
|
||||
|
||||
if ( typeof title === 'function' ) {
|
||||
title = title();
|
||||
}
|
||||
|
||||
if ( title.indexOf( '*' ) !== -1 ) {
|
||||
title= title.replace( '*', $('title').text() );
|
||||
}
|
||||
|
||||
win.document.close();
|
||||
|
||||
// Inject the title and also a copy of the style and link tags from this
|
||||
// document so the table can retain its base styling. Note that we have
|
||||
// to use string manipulation as IE won't allow elements to be created
|
||||
// in the host document and then appended to the new window.
|
||||
var head = '<title>'+title+'</title>';
|
||||
$('style, link').each( function () {
|
||||
head += _relToAbs( this );
|
||||
} );
|
||||
|
||||
try {
|
||||
win.document.head.innerHTML = head; // Work around for Edge
|
||||
}
|
||||
catch (e) {
|
||||
$(win.document.head).html( head ); // Old IE
|
||||
}
|
||||
|
||||
// Inject the table and other surrounding information
|
||||
win.document.body.innerHTML =
|
||||
'<h1>'+title+'</h1>'+
|
||||
'<div>'+
|
||||
(typeof config.message === 'function' ?
|
||||
config.message( dt, button, config ) :
|
||||
config.message
|
||||
)+
|
||||
'</div>'+
|
||||
html;
|
||||
|
||||
$(win.document.body).addClass('dt-print-view');
|
||||
|
||||
if ( config.customize ) {
|
||||
config.customize( win );
|
||||
}
|
||||
|
||||
setTimeout( function () {
|
||||
if ( config.autoPrint ) {
|
||||
win.print(); // blocking - so close will not
|
||||
win.close(); // execute until this is done
|
||||
}
|
||||
}, 250 );
|
||||
},
|
||||
|
||||
title: '*',
|
||||
|
||||
message: '',
|
||||
|
||||
exportOptions: {},
|
||||
|
||||
header: true,
|
||||
|
||||
footer: false,
|
||||
|
||||
autoPrint: true,
|
||||
|
||||
customize: null
|
||||
};
|
||||
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
@ -0,0 +1,4 @@
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return e(f,window,document)}):"object"===typeof exports?module.exports=function(f,c){f||(f=window);if(!c||!c.fn.dataTable)c=require("datatables.net")(f,c).$;c.fn.dataTable.Buttons||require("datatables.net-buttons")(f,c);return e(c,f,f.document)}:e(jQuery,window,document)})(function(e,f,c){var i=e.fn.dataTable,h=c.createElement("a");i.ext.buttons.print={className:"buttons-print",
|
||||
text:function(b){return b.i18n("buttons.print","Print")},action:function(b,c,i,d){var a=c.buttons.exportData(d.exportOptions),k=function(b,a){for(var c="<tr>",d=0,e=b.length;d<e;d++)c+="<"+a+">"+b[d]+"</"+a+">";return c+"</tr>"},b='<table class="'+c.table().node().className+'">';d.header&&(b+="<thead>"+k(a.header,"th")+"</thead>");for(var b=b+"<tbody>",l=0,m=a.body.length;l<m;l++)b+=k(a.body[l],"td");b+="</tbody>";d.footer&&a.footer&&(b+="<tfoot>"+k(a.footer,"th")+"</tfoot>");var g=f.open("",""),
|
||||
a=d.title;"function"===typeof a&&(a=a());-1!==a.indexOf("*")&&(a=a.replace("*",e("title").text()));g.document.close();var j="<title>"+a+"</title>";e("style, link").each(function(){var c=j,b=e(this).clone()[0],a;"link"===b.nodeName.toLowerCase()&&(h.href=b.href,a=h.host,-1===a.indexOf("/")&&0!==h.pathname.indexOf("/")&&(a+="/"),b.href=h.protocol+"//"+a+h.pathname+h.search);j=c+b.outerHTML});try{g.document.head.innerHTML=j}catch(n){e(g.document.head).html(j)}g.document.body.innerHTML="<h1>"+a+"</h1><div>"+
|
||||
("function"===typeof d.message?d.message(c,i,d):d.message)+"</div>"+b;e(g.document.body).addClass("dt-print-view");d.customize&&d.customize(g);setTimeout(function(){d.autoPrint&&(g.print(),g.close())},250)},title:"*",message:"",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};return i.Buttons});
|
@ -0,0 +1,57 @@
|
||||
/*! Bootstrap integration for DataTables' Buttons
|
||||
* ©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-se', '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-se')(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 ui basic buttons'
|
||||
},
|
||||
button: {
|
||||
tag: 'button',
|
||||
className: 'ui button'
|
||||
},
|
||||
collection: {
|
||||
tag: 'div',
|
||||
className: 'dt-button-collection ui basic vertical buttons'
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
@ -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-se","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-se")(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 ui basic buttons"},
|
||||
button:{tag:"button",className:"ui button"},collection:{tag:"div",className:"dt-button-collection ui basic vertical buttons"}}});return a.Buttons});
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
/*!
|
||||
Buttons for DataTables 1.2.3
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(n){return d(n,window,document)}):"object"===typeof exports?module.exports=function(n,o){n||(n=window);if(!o||!o.fn.dataTable)o=require("datatables.net")(n,o).$;return d(o,n,n.document)}:d(jQuery,window,document)})(function(d,n,o,m){var i=d.fn.dataTable,u=0,v=0,j=i.ext.buttons,l=function(a,b){!0===b&&(b={});d.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},l.defaults,b);b.buttons&&(this.c.buttons=b.buttons);
|
||||
this.s={dt:new i.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+u++};this.dom={container:d("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(l.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===m)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),e=this.c.dom.button.active,c=d(c.node);if(b===m)return c.hasClass(e);c.toggleClass(e,b===m?!0:b);return this},add:function(a,b){var c=
|
||||
this.s.buttons;if("string"===typeof b){for(var e=b.split("-"),c=this.s,d=0,h=e.length-1;d<h;d++)c=c.buttons[1*e[d]];c=c.buttons;b=1*e[e.length-1]}this._expandButton(c,a,!1,b);this._draw();return this},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);d(a.node).addClass(this.c.dom.button.disabled);return this},destroy:function(){d("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b,c;b=0;for(c=a.length;b<c;b++)this.remove(a[b].node);this.dom.container.remove();
|
||||
a=this.s.dt.settings()[0];b=0;for(c=a.length;b<c;b++)if(a.inst===this){a.splice(b,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);var c=this._nodeToButton(a);d(c.node).removeClass(this.c.dom.button.disabled);return this},name:function(){return this.c.name},node:function(a){a=this._nodeToButton(a);return d(a.node)},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),e=this.s.dt;if(b.buttons.length)for(var g=b.buttons.length-1;0<=g;g--)this.remove(b.buttons[g].node);
|
||||
b.conf.destroy&&b.conf.destroy.call(e.button(a),e,d(a),b.conf);this._removeKey(b.conf);d(b.node).remove();a=d.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a),e=this.c.dom.collection.buttonLiner,e=c.inCollection&&e&&e.tag?e.tag:this.c.dom.buttonLiner.tag,g=this.s.dt,h=d(c.node),f=function(a){return"function"===typeof a?a(g,h,c.conf):a};if(b===m)return f(c.conf.text);c.conf.text=b;e?h.children(e).html(f(b)):h.html(f(b));return this},_constructor:function(){var a=
|
||||
this,b=this.s.dt,c=b.settings()[0],e=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var c=0,g=e.length;c<g;c++)this.add(e[c]);b.on("destroy",function(){a.destroy()});d("body").on("keyup."+this.s.namespace,function(b){if(!o.activeElement||o.activeElement===o.body){var c=String.fromCharCode(b.keyCode).toLowerCase();a.s.listenKeys.toLowerCase().indexOf(c)!==-1&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=d.isPlainObject(a.key)?a.key.key:
|
||||
a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,e=b.length;c<e;c++)a.append(b[c].inserter),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,e){for(var g=this.s.dt,h=0,b=!d.isArray(b)?[b]:b,f=0,r=b.length;f<r;f++){var k=this._resolveExtends(b[f]);if(k)if(d.isArray(k))this._expandButton(a,k,c,e);else{var p=this._buildButton(k,c);if(p){e!==m?(a.splice(e,0,p),e++):a.push(p);if(p.conf.buttons){var s=
|
||||
this.c.dom.collection;p.collection=d("<"+s.tag+"/>").addClass(s.className);p.conf._collection=p.collection;this._expandButton(p.buttons,p.conf.buttons,!0,e)}k.init&&k.init.call(g.button(p.node),g,d(p.node),k);h++}}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner,g=this.c.dom.collection,h=this.s.dt,f=function(b){return"function"===typeof b?b(h,k,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(e=g.buttonLiner);if(a.available&&!a.available(h,a))return!1;var r=function(a,
|
||||
b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,e])},k=d("<"+c.tag+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(b){b.preventDefault();!k.hasClass(c.disabled)&&a.action&&r(b,h,k,a);k.blur()}).on("keyup.dtb",function(b){b.keyCode===13&&!k.hasClass(c.disabled)&&a.action&&r(b,h,k,a)});"a"===c.tag.toLowerCase()&&k.attr("href","#");
|
||||
e.tag?(g=d("<"+e.tag+"/>").html(f(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(f(a.text));!1===a.enabled&&k.addClass(c.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",a.titleAttr);a.namespace||(a.namespace=".dt-button-"+v++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(k):k;this._addKey(a);return{conf:a,node:k.get(0),inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,
|
||||
b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var d=this._nodeToButton(a,b[c].buttons);if(d)return d}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c<e;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var d=this._nodeToHost(a,b[c].buttons);if(d)return d}}},_keypress:function(a,b){var c=function(e){for(var g=0,h=e.length;g<h;g++){var f=e[g].conf,r=e[g].node;if(f.key)if(f.key===a)d(r).click();else if(d.isPlainObject(f.key)&&
|
||||
f.key.key===a&&(!f.key.shiftKey||b.shiftKey))if(!f.key.altKey||b.altKey)if(!f.key.ctrlKey||b.ctrlKey)(!f.key.metaKey||b.metaKey)&&d(r).click();e[g].buttons.length&&c(e[g].buttons)}};c(this.s.buttons)},_removeKey:function(a){if(a.key){var b=d.isPlainObject(a.key)?a.key.key:a.key,a=this.s.listenKeys.split(""),b=d.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){for(var b=this.s.dt,c,e,g=function(c){for(var e=0;!d.isPlainObject(c)&&!d.isArray(c);){if(c===m)return;
|
||||
if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"===typeof c){if(!j[c])throw"Unknown button type: "+c;c=j[c]}e++;if(30<e)throw"Buttons: Too many iterations";}return d.isArray(c)?c:d.extend({},c)},a=g(a);a&&a.extend;){if(!j[a.extend])throw"Cannot extend unknown button type: "+a.extend;var h=g(j[a.extend]);if(d.isArray(h))return h;if(!h)return!1;c=h.className;a=d.extend({},h,a);c&&a.className!==c&&(a.className=c+" "+a.className);var f=a.postfixButtons;if(f){a.buttons||(a.buttons=[]);
|
||||
c=0;for(e=f.length;c<e;c++)a.buttons.push(f[c]);a.postfixButtons=null}if(f=a.prefixButtons){a.buttons||(a.buttons=[]);c=0;for(e=f.length;c<e;c++)a.buttons.splice(c,0,f[c]);a.prefixButtons=null}a.extend=h.extend}return a}});l.background=function(a,b,c){c===m&&(c=400);a?d("<div/>").addClass(b).css("display","none").appendTo("body").fadeIn(c):d("body > div."+b).fadeOut(c,function(){d(this).removeClass(b).remove()})};l.instanceSelector=function(a,b){if(!a)return d.map(b,function(a){return a.inst});var c=
|
||||
[],e=d.map(b,function(a){return a.name}),g=function(a){if(d.isArray(a))for(var f=0,r=a.length;f<r;f++)g(a[f]);else"string"===typeof a?-1!==a.indexOf(",")?g(a.split(",")):(a=d.inArray(d.trim(a),e),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};g(a);return c};l.buttonSelector=function(a,b){for(var c=[],e=function(a,b,c){for(var d,g,f=0,h=b.length;f<h;f++)if(d=b[f])g=c!==m?c+f:f+"",a.push({node:d.node,name:d.conf.name,idx:g}),d.buttons&&e(a,d.buttons,g+"-")},g=function(a,b){var f,
|
||||
h,i=[];e(i,b.s.buttons);f=d.map(i,function(a){return a.node});if(d.isArray(a)||a instanceof d){f=0;for(h=a.length;f<h;f++)g(a[f],b)}else if(null===a||a===m||"*"===a){f=0;for(h=i.length;f<h;f++)c.push({inst:b,node:i[f].node})}else if("number"===typeof a)c.push({inst:b,node:b.s.buttons[a].node});else if("string"===typeof a)if(-1!==a.indexOf(",")){i=a.split(",");f=0;for(h=i.length;f<h;f++)g(d.trim(i[f]),b)}else if(a.match(/^\d+(\-\d+)*$/))f=d.map(i,function(a){return a.idx}),c.push({inst:b,node:i[d.inArray(a,
|
||||
f)].node});else if(-1!==a.indexOf(":name")){var j=a.replace(":name","");f=0;for(h=i.length;f<h;f++)i[f].name===j&&c.push({inst:b,node:i[f].node})}else d(f).filter(a).each(function(){c.push({inst:b,node:this})});else"object"===typeof a&&a.nodeName&&(i=d.inArray(a,f),-1!==i&&c.push({inst:b,node:f[i]}))},h=0,f=a.length;h<f;h++)g(b,a[h]);return c};l.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:"dt-button-collection"},
|
||||
button:{tag:"a",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};l.version="1.2.3";d.extend(j,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",action:function(a,b,c,e){var a=c.offset(),g=d(b.table().container()),h=!1;d("div.dt-button-background").length&&(h=d(".dt-button-collection").offset(),d("body").trigger("click.dtb-collection"));e._collection.addClass(e.collectionLayout).css("display",
|
||||
"none").appendTo("body").fadeIn(e.fade);var f=e._collection.css("position");h&&"absolute"===f?e._collection.css({top:h.top,left:h.left}):"absolute"===f?(e._collection.css({top:a.top+c.outerHeight(),left:a.left}),c=a.left+e._collection.outerWidth(),g=g.offset().left+g.width(),c>g&&e._collection.css("left",a.left-(c-g))):(a=e._collection.height()/2,a>d(n).height()/2&&(a=d(n).height()/2),e._collection.css("marginTop",-1*a));e.background&&l.background(!0,e.backgroundClassName,e.fade);setTimeout(function(){d("div.dt-button-background").on("click.dtb-collection",
|
||||
function(){});d("body").on("click.dtb-collection",function(a){var c=d.fn.addBack?"addBack":"andSelf";if(!d(a.target).parents()[c]().filter(e._collection).length){e._collection.fadeOut(e.fade,function(){e._collection.detach()});d("div.dt-button-background").off("click.dtb-collection");l.background(false,e.backgroundClassName,e.fade);d("body").off("click.dtb-collection");b.off("buttons-action.b-internal")}})},10);if(e.autoClose)b.on("buttons-action.b-internal",function(){d("div.dt-button-background").click()})},
|
||||
background:!0,collectionLayout:"",backgroundClassName:"dt-button-background",autoClose:!1,fade:400},copy:function(a,b){if(j.copyHtml5)return"copyHtml5";if(j.copyFlash&&j.copyFlash.available(a,b))return"copyFlash"},csv:function(a,b){if(j.csvHtml5&&j.csvHtml5.available(a,b))return"csvHtml5";if(j.csvFlash&&j.csvFlash.available(a,b))return"csvFlash"},excel:function(a,b){if(j.excelHtml5&&j.excelHtml5.available(a,b))return"excelHtml5";if(j.excelFlash&&j.excelFlash.available(a,b))return"excelFlash"},pdf:function(a,
|
||||
b){if(j.pdfHtml5&&j.pdfHtml5.available(a,b))return"pdfHtml5";if(j.pdfFlash&&j.pdfFlash.available(a,b))return"pdfFlash"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=d.isArray(a[0])?a[0]:a,c=d.isArray(a[0])?a[1]:a,e=function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())};return{extend:"collection",text:e,className:"buttons-page-length",autoClose:!0,buttons:d.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,
|
||||
c){c.page.len(a).draw()},init:function(b,c,e){var d=this,c=function(){d.active(b.page.len()===a)};b.on("length.dt"+e.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(e(a))})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});i.Api.register("buttons()",function(a,b){b===m&&(b=a,a=m);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return l.buttonSelector(l.instanceSelector(a,
|
||||
c._buttons),b)},!0);c._groupSelector=a;return c});i.Api.register("button()",function(a,b){var c=this.buttons(a,b);1<c.length&&c.splice(1,c.length);return c});i.Api.registerPlural("buttons().active()","button().active()",function(a){return a===m?this.map(function(a){return a.inst.active(a.node)}):this.each(function(b){b.inst.active(b.node,a)})});i.Api.registerPlural("buttons().action()","button().action()",function(a){return a===m?this.map(function(a){return a.inst.action(a.node)}):this.each(function(b){b.inst.action(b.node,
|
||||
a)})});i.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});i.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});i.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=d();d(this.each(function(b){a=a.add(b.inst.node(b.node))}));return a});i.Api.registerPlural("buttons().text()","button().text()",function(a){return a===m?this.map(function(a){return a.inst.text(a.node)}):
|
||||
this.each(function(b){b.inst.text(b.node,a)})});i.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});i.Api.registerPlural("buttons().containers()","buttons().container()",function(){var a=d(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons)for(var c=l.instanceSelector(b,c._buttons),d=0,g=c.length;d<g;d++)a=a.add(c[d].container())});return a});i.Api.register("button().add()",function(a,
|
||||
b){var c=this.context;c.length&&(c=l.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});i.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});i.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var q;i.Api.register("buttons.info()",function(a,b,c){var e=this;if(!1===a)return d("#datatables_buttons_info").fadeOut(function(){d(this).remove()}),
|
||||
clearTimeout(q),q=null,this;q&&clearTimeout(q);d("#datatables_buttons_info").length&&d("#datatables_buttons_info").remove();d('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a?"<h2>"+a+"</h2>":"").append(d("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body").fadeIn();c!==m&&0!==c&&(q=setTimeout(function(){e.buttons.info(!1)},c));return this});i.Api.register("buttons.exportData()",function(a){if(this.context.length){for(var b=new i.Api(this.context[0]),
|
||||
c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return e(a)},footer:function(a){return e(a)},body:function(a){return e(a)}}},a),e=function(a){if("string"!==typeof a)return a;c.stripHtml&&(a=a.replace(/<[^>]*>/g,""));c.trim&&(a=a.replace(/^\s+|\s+$/g,""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(t.innerHTML=a,a=t.value);return a},a=b.columns(c.columns).indexes().map(function(a){var d=
|
||||
b.column(a).header();return c.format.header(d.innerHTML,a,d)}).toArray(),g=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,h=b.cells(c.rows,c.columns,c.modifier),f=h.render(c.orthogonal).toArray(),h=h.nodes().toArray(),j=a.length,k=0<j?f.length/j:0,l=Array(k),m=0,n=0;n<k;n++){for(var o=Array(j),q=0;q<j;q++)o[q]=c.format.body(f[m],n,q,h[m]),m++;l[n]=o}return{header:a,footer:g,body:l}}});var t=
|
||||
d("<textarea/>")[0];d.fn.dataTable.Buttons=l;d.fn.DataTable.Buttons=l;d(o).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||i.defaults.buttons;c&&!b._buttons&&(new l(b,c)).container()}});i.ext.feature.push({fnInit:function(a){var a=new i.Api(a),b=a.init().buttons||i.defaults.buttons;return(new l(a,b)).container()},cFeature:"B"});return l});
|
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
MIT license
|
||||
|
||||
Copyright (c) 2010-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.
|
@ -0,0 +1,35 @@
|
||||
# ColReorder
|
||||
|
||||
ColReorder adds the ability for the end user to click and drag column headers to reorder a table as they see fit, to DataTables. See the [documentation](http://datatables.net/extensions/colreorder/) for full details.
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
To use ColReorder 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](http://datatables.net/extensions/colreorder/) 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-colreorder`. 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
|
||||
|
||||
ColReorder is initialised using the `colReorder` option in the DataTables constructor - a simple boolean `true` will enable the feature. Further options can be specified using this option as an object - see the documentation for details.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
$(document).ready( function () {
|
||||
$('#myTable').DataTable( {
|
||||
colReorder: true
|
||||
} );
|
||||
} );
|
||||
```
|
||||
|
||||
|
||||
# Documentation / support
|
||||
|
||||
* [Documentation](https://datatables.net/extensions/colreorder/)
|
||||
* [DataTables support forums](http://datatables.net/forums)
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #337ab7;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#337ab7;z-index:201}
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #0275d8;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0275d8;z-index:201}
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #0259C4;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0259C4;z-index:201}
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #008CBA;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#008CBA;z-index:201}
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #0259C4;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0259C4;z-index:201}
|
@ -0,0 +1,11 @@
|
||||
table.DTCR_clonedTable.dataTable {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
z-index: 202;
|
||||
}
|
||||
|
||||
div.DTCR_pointer {
|
||||
width: 1px;
|
||||
background-color: #888;
|
||||
z-index: 201;
|
||||
}
|
@ -0,0 +1 @@
|
||||
table.DTCR_clonedTable.dataTable{position:absolute !important;background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#888;z-index:201}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,27 @@
|
||||
/*!
|
||||
ColReorder 1.3.2
|
||||
©2010-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(o){return f(o,window,document)}):"object"===typeof exports?module.exports=function(o,l){o||(o=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(o,l).$;return f(l,o,o.document)}:f(jQuery,window,document)})(function(f,o,l,r){function q(a){for(var b=[],d=0,e=a.length;d<e;d++)b[a[d]]=d;return b}function p(a,b,d){b=a.splice(b,1)[0];a.splice(d,0,b)}function s(a,b,d){for(var e=[],f=0,c=a.childNodes.length;f<
|
||||
c;f++)1==a.childNodes[f].nodeType&&e.push(a.childNodes[f]);b=e[b];null!==d?a.insertBefore(b,e[d]):a.appendChild(b)}var t=f.fn.dataTable;f.fn.dataTableExt.oApi.fnColReorder=function(a,b,d,e,g){var c,h,j,m,i,l=a.aoColumns.length,k;i=function(a,b,c){if(a[b]&&"function"!==typeof a[b]){var d=a[b].split("."),e=d.shift();isNaN(1*e)||(a[b]=c[1*e]+"."+d.join("."))}};if(b!=d)if(0>b||b>=l)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+b);else if(0>d||d>=l)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+
|
||||
d);else{j=[];c=0;for(h=l;c<h;c++)j[c]=c;p(j,b,d);var n=q(j);c=0;for(h=a.aaSorting.length;c<h;c++)a.aaSorting[c][0]=n[a.aaSorting[c][0]];if(null!==a.aaSortingFixed){c=0;for(h=a.aaSortingFixed.length;c<h;c++)a.aaSortingFixed[c][0]=n[a.aaSortingFixed[c][0]]}c=0;for(h=l;c<h;c++){k=a.aoColumns[c];j=0;for(m=k.aDataSort.length;j<m;j++)k.aDataSort[j]=n[k.aDataSort[j]];k.idx=n[k.idx]}f.each(a.aLastSort,function(b,c){a.aLastSort[b].src=n[c.src]});c=0;for(h=l;c<h;c++)k=a.aoColumns[c],"number"==typeof k.mData?
|
||||
k.mData=n[k.mData]:f.isPlainObject(k.mData)&&(i(k.mData,"_",n),i(k.mData,"filter",n),i(k.mData,"sort",n),i(k.mData,"type",n));if(a.aoColumns[b].bVisible){i=this.oApi._fnColumnIndexToVisible(a,b);m=null;for(c=d<b?d:d+1;null===m&&c<l;)m=this.oApi._fnColumnIndexToVisible(a,c),c++;j=a.nTHead.getElementsByTagName("tr");c=0;for(h=j.length;c<h;c++)s(j[c],i,m);if(null!==a.nTFoot){j=a.nTFoot.getElementsByTagName("tr");c=0;for(h=j.length;c<h;c++)s(j[c],i,m)}c=0;for(h=a.aoData.length;c<h;c++)null!==a.aoData[c].nTr&&
|
||||
s(a.aoData[c].nTr,i,m)}p(a.aoColumns,b,d);c=0;for(h=l;c<h;c++)a.oApi._fnColumnOptions(a,c,{});p(a.aoPreSearchCols,b,d);c=0;for(h=a.aoData.length;c<h;c++){m=a.aoData[c];if(k=m.anCells){p(k,b,d);j=0;for(i=k.length;j<i;j++)k[j]&&k[j]._DT_CellIndex&&(k[j]._DT_CellIndex.column=j)}"dom"!==m.src&&f.isArray(m._aData)&&p(m._aData,b,d)}c=0;for(h=a.aoHeader.length;c<h;c++)p(a.aoHeader[c],b,d);if(null!==a.aoFooter){c=0;for(h=a.aoFooter.length;c<h;c++)p(a.aoFooter[c],b,d)}(g||g===r)&&f.fn.dataTable.Api(a).rows().invalidate();
|
||||
c=0;for(h=l;c<h;c++)f(a.aoColumns[c].nTh).off("click.DT"),this.oApi._fnSortAttachListener(a,a.aoColumns[c].nTh,c);f(a.oInstance).trigger("column-reorder.dt",[a,{from:b,to:d,mapping:n,drop:e,iFrom:b,iTo:d,aiInvertMapping:n}])}};var i=function(a,b){var d=(new f.fn.dataTable.Api(a)).settings()[0];if(d._colReorder)return d._colReorder;!0===b&&(b={});var e=f.fn.dataTable.camelToHungarian;e&&(e(i.defaults,i.defaults,!0),e(i.defaults,b||{}));this.s={dt:null,init:f.extend(!0,{},i.defaults,b),fixed:0,fixedRight:0,
|
||||
reorderCallback:null,mouse:{startX:-1,startY:-1,offsetX:-1,offsetY:-1,target:-1,targetIndex:-1,fromIndex:-1},aoTargets:[]};this.dom={drag:null,pointer:null};this.s.dt=d;this.s.dt._colReorder=this;this._fnConstruct();return this};f.extend(i.prototype,{fnReset:function(){this._fnOrderColumns(this.fnOrder());return this},fnGetCurrentOrder:function(){return this.fnOrder()},fnOrder:function(a,b){var d=[],e,g,c=this.s.dt.aoColumns;if(a===r){e=0;for(g=c.length;e<g;e++)d.push(c[e]._ColReorder_iOrigCol);return d}if(b){c=
|
||||
this.fnOrder();e=0;for(g=a.length;e<g;e++)d.push(f.inArray(a[e],c));a=d}this._fnOrderColumns(q(a));return this},fnTranspose:function(a,b){b||(b="toCurrent");var d=this.fnOrder(),e=this.s.dt.aoColumns;return"toCurrent"===b?!f.isArray(a)?f.inArray(a,d):f.map(a,function(a){return f.inArray(a,d)}):!f.isArray(a)?e[a]._ColReorder_iOrigCol:f.map(a,function(a){return e[a]._ColReorder_iOrigCol})},_fnConstruct:function(){var a=this,b=this.s.dt.aoColumns.length,d=this.s.dt.nTable,e;this.s.init.iFixedColumns&&
|
||||
(this.s.fixed=this.s.init.iFixedColumns);this.s.init.iFixedColumnsLeft&&(this.s.fixed=this.s.init.iFixedColumnsLeft);this.s.fixedRight=this.s.init.iFixedColumnsRight?this.s.init.iFixedColumnsRight:0;this.s.init.fnReorderCallback&&(this.s.reorderCallback=this.s.init.fnReorderCallback);for(e=0;e<b;e++)e>this.s.fixed-1&&e<b-this.s.fixedRight&&this._fnMouseListener(e,this.s.dt.aoColumns[e].nTh),this.s.dt.aoColumns[e]._ColReorder_iOrigCol=e;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(b,
|
||||
c){a._fnStateSave.call(a,c)},"ColReorder_State");var g=null;this.s.init.aiOrder&&(g=this.s.init.aiOrder.slice());this.s.dt.oLoadedState&&("undefined"!=typeof this.s.dt.oLoadedState.ColReorder&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length)&&(g=this.s.dt.oLoadedState.ColReorder);if(g)if(a.s.dt._bInitComplete)b=q(g),a._fnOrderColumns.call(a,b);else{var c=!1;f(d).on("draw.dt.colReorder",function(){if(!a.s.dt._bInitComplete&&!c){c=true;var b=q(g);a._fnOrderColumns.call(a,b)}})}else this._fnSetColumnIndexes();
|
||||
f(d).on("destroy.dt.colReorder",function(){f(d).off("destroy.dt.colReorder draw.dt.colReorder");f(a.s.dt.nTHead).find("*").off(".ColReorder");f.each(a.s.dt.aoColumns,function(a,b){f(b.nTh).removeAttr("data-column-index")});a.s.dt._colReorder=null;a.s=null})},_fnOrderColumns:function(a){var b=!1;if(a.length!=this.s.dt.aoColumns.length)this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"ColReorder - array reorder does not match known number of columns. Skipping.");else{for(var d=0,e=a.length;d<e;d++){var g=
|
||||
f.inArray(d,a);d!=g&&(p(a,g,d),this.s.dt.oInstance.fnColReorder(g,d,!0,!1),b=!0)}f.fn.dataTable.Api(this.s.dt).rows().invalidate();this._fnSetColumnIndexes();b&&((""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY)&&this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))}},_fnStateSave:function(a){var b,d,e,g=this.s.dt.aoColumns;a.ColReorder=[];if(a.aaSorting){for(b=0;b<a.aaSorting.length;b++)a.aaSorting[b][0]=
|
||||
g[a.aaSorting[b][0]]._ColReorder_iOrigCol;var c=f.extend(!0,[],a.aoSearchCols);b=0;for(d=g.length;b<d;b++)e=g[b]._ColReorder_iOrigCol,a.aoSearchCols[e]=c[b],a.abVisCols[e]=g[b].bVisible,a.ColReorder.push(e)}else if(a.order){for(b=0;b<a.order.length;b++)a.order[b][0]=g[a.order[b][0]]._ColReorder_iOrigCol;c=f.extend(!0,[],a.columns);b=0;for(d=g.length;b<d;b++)e=g[b]._ColReorder_iOrigCol,a.columns[e]=c[b],a.ColReorder.push(e)}},_fnMouseListener:function(a,b){var d=this;f(b).on("mousedown.ColReorder",
|
||||
function(a){a.preventDefault();d._fnMouseDown.call(d,a,b)})},_fnMouseDown:function(a,b){var d=this,e=f(a.target).closest("th, td").offset(),g=parseInt(f(b).attr("data-column-index"),10);g!==r&&(this.s.mouse.startX=a.pageX,this.s.mouse.startY=a.pageY,this.s.mouse.offsetX=a.pageX-e.left,this.s.mouse.offsetY=a.pageY-e.top,this.s.mouse.target=this.s.dt.aoColumns[g].nTh,this.s.mouse.targetIndex=g,this.s.mouse.fromIndex=g,this._fnRegions(),f(l).on("mousemove.ColReorder",function(a){d._fnMouseMove.call(d,
|
||||
a)}).on("mouseup.ColReorder",function(a){d._fnMouseUp.call(d,a)}))},_fnMouseMove:function(a){if(null===this.dom.drag){if(5>Math.pow(Math.pow(a.pageX-this.s.mouse.startX,2)+Math.pow(a.pageY-this.s.mouse.startY,2),0.5))return;this._fnCreateDragNode()}this.dom.drag.css({left:a.pageX-this.s.mouse.offsetX,top:a.pageY-this.s.mouse.offsetY});for(var b=!1,d=this.s.mouse.toIndex,e=1,f=this.s.aoTargets.length;e<f;e++)if(a.pageX<this.s.aoTargets[e-1].x+(this.s.aoTargets[e].x-this.s.aoTargets[e-1].x)/2){this.dom.pointer.css("left",
|
||||
this.s.aoTargets[e-1].x);this.s.mouse.toIndex=this.s.aoTargets[e-1].to;b=!0;break}b||(this.dom.pointer.css("left",this.s.aoTargets[this.s.aoTargets.length-1].x),this.s.mouse.toIndex=this.s.aoTargets[this.s.aoTargets.length-1].to);this.s.init.bRealtime&&d!==this.s.mouse.toIndex&&(this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex,!1),this.s.mouse.fromIndex=this.s.mouse.toIndex,this._fnRegions())},_fnMouseUp:function(){f(l).off("mousemove.ColReorder mouseup.ColReorder");null!==
|
||||
this.dom.drag&&(this.dom.drag.remove(),this.dom.pointer.remove(),this.dom.drag=null,this.dom.pointer=null,this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex,!0),this._fnSetColumnIndexes(),(""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY)&&this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))},_fnRegions:function(){var a=this.s.dt.aoColumns;this.s.aoTargets.splice(0,
|
||||
this.s.aoTargets.length);this.s.aoTargets.push({x:f(this.s.dt.nTable).offset().left,to:0});for(var b=0,d=this.s.aoTargets[0].x,e=0,g=a.length;e<g;e++)e!=this.s.mouse.fromIndex&&b++,a[e].bVisible&&"none"!==a[e].nTh.style.display&&(d+=f(a[e].nTh).outerWidth(),this.s.aoTargets.push({x:d,to:b}));0!==this.s.fixedRight&&this.s.aoTargets.splice(this.s.aoTargets.length-this.s.fixedRight);0!==this.s.fixed&&this.s.aoTargets.splice(0,this.s.fixed)},_fnCreateDragNode:function(){var a=""!==this.s.dt.oScroll.sX||
|
||||
""!==this.s.dt.oScroll.sY,b=this.s.dt.aoColumns[this.s.mouse.targetIndex].nTh,d=b.parentNode,e=d.parentNode,g=e.parentNode,c=f(b).clone();this.dom.drag=f(g.cloneNode(!1)).addClass("DTCR_clonedTable").append(f(e.cloneNode(!1)).append(f(d.cloneNode(!1)).append(c[0]))).css({position:"absolute",top:0,left:0,width:f(b).outerWidth(),height:f(b).outerHeight()}).appendTo("body");this.dom.pointer=f("<div></div>").addClass("DTCR_pointer").css({position:"absolute",top:a?f("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:
|
||||
f(this.s.dt.nTable).offset().top,height:a?f("div.dataTables_scroll",this.s.dt.nTableWrapper).height():f(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){f.each(this.s.dt.aoColumns,function(a,b){f(b.nTh).attr("data-column-index",a)})}});i.defaults={aiOrder:null,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null};i.version="1.3.2";f.fn.dataTable.ColReorder=i;f.fn.DataTable.ColReorder=i;"function"==typeof f.fn.dataTable&&"function"==typeof f.fn.dataTableExt.fnVersionCheck&&
|
||||
f.fn.dataTableExt.fnVersionCheck("1.10.8")?f.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInstance;a._colReorder?b.oApi._fnLog(a,1,"ColReorder attempted to initialise twice. Ignoring second"):(b=a.oInit,new i(a,b.colReorder||b.oColReorder||{}));return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.10.8 or greater - www.datatables.net/download");f(l).on("preInit.dt.colReorder",function(a,b){if("dt"===a.namespace){var d=b.oInit.colReorder,
|
||||
e=t.defaults.colReorder;if(d||e)e=f.extend({},d,e),!1!==d&&new i(b,e)}});f.fn.dataTable.Api.register("colReorder.reset()",function(){return this.iterator("table",function(a){a._colReorder.fnReset()})});f.fn.dataTable.Api.register("colReorder.order()",function(a,b){return a?this.iterator("table",function(d){d._colReorder.fnOrder(a,b)}):this.context.length?this.context[0]._colReorder.fnOrder():null});f.fn.dataTable.Api.register("colReorder.transpose()",function(a,b){return this.context.length&&this.context[0]._colReorder?
|
||||
this.context[0]._colReorder.fnTranspose(a,b):a});return i});
|
@ -0,0 +1,22 @@
|
||||
MIT license
|
||||
|
||||
Copyright (c) 2010-2016 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.
|
@ -0,0 +1,44 @@
|
||||
# FixedColumns
|
||||
|
||||
When making use of DataTables' x-axis scrolling feature (`scrollX`), you may wish to fix the left or right most columns in place. This extension for DataTables provides exactly this option (for non-scrolling tables, please use the FixedHeader extension, which can fix the header and footer).
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
To use FixedColumns 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](http://datatables.net/extensions/fixedcolumns/) 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-fixedcolumns`. 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
|
||||
|
||||
FixedColumns is initialised using the `fixedColumns` option in the DataTables constructor - a simple boolean `true` will enable the feature. Further options can be specified using this option as an object - see the documentation for details. DataTables' scrolling options should also be enabled to use this feature.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
$(document).ready(function() {
|
||||
var table = $('#example').DataTable( {
|
||||
scrollY: "300px",
|
||||
scrollX: true,
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
fixedColumns: true
|
||||
} );
|
||||
} );
|
||||
```
|
||||
|
||||
|
||||
# Documentation / support
|
||||
|
||||
* [Documentation](https://datatables.net/extensions/fixedcolumns/)
|
||||
* [DataTables support forums](http://datatables.net/forums)
|
||||
|
||||
|
||||
# GitHub
|
||||
|
||||
If you fancy getting involved with the development of FixedColumns and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/FixedColumns).
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user