Package com.github.dandelion.datatables.core.asset

Examples of com.github.dandelion.datatables.core.asset.JavascriptSnippet


    extensionProcessor.process(new HashSet<Extension>(Arrays.asList(new Bootstrap2Theme())));

    assertThat(AssetRequestContext.get(table.getTableConfiguration().getRequest()).getBundles(true)).hasSize(2);
    assertThat(mainConfig).hasSize(2);
    assertThat(mainConfig).includes(
        entry(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]")),
        entry(DTConstants.DT_PAGINATION_TYPE, "bootstrap"));
  }
View Full Code Here


    extensionProcessor.process(new HashSet<Extension>(Arrays.asList(new Bootstrap3Theme())));

    assertThat(AssetRequestContext.get(table.getTableConfiguration().getRequest()).getBundles(true)).hasSize(1);
    assertThat(mainConfig).hasSize(1);
    assertThat(mainConfig).includes(
        entry(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]")));
  }
View Full Code Here

    extensionProcessor.process(new HashSet<Extension>(Arrays.asList(new Bootstrap3Theme())));

    assertThat(AssetRequestContext.get(table.getTableConfiguration().getRequest()).getBundles(true)).hasSize(1);
    assertThat(mainConfig).hasSize(1);
    assertThat(mainConfig).includes(
        entry(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]")));
  }
View Full Code Here

    extensionProcessor.process(new HashSet<Extension>(Arrays.asList(new Bootstrap3Theme())));

    assertThat(AssetRequestContext.get(table.getTableConfiguration().getRequest()).getBundles(true)).hasSize(1);
    assertThat(mainConfig).hasSize(2);
    assertThat(mainConfig).includes(
        entry(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]")),
        entry(DTConstants.DT_PAGINATION_TYPE, "bootstrap"));
  }
View Full Code Here

      else{
        throw new ExtensionLoadingException("Only the 'tablecloth' theme option is compatible with the 'bootstrap2' theme");
      }
    }
   
    addParameter(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]"));
  }
View Full Code Here

    Boolean pageable = TableConfig.FEATURE_PAGEABLE.valueFrom(table.getTableConfiguration());
    if(pageable != null && pageable){
      addParameter(DTConstants.DT_PAGINATION_TYPE, PaginationType.BOOTSTRAP.toString());
    }
   
    addParameter(DTConstants.DT_AS_STRIPE_CLASSES, new JavascriptSnippet("[]"));
  }
View Full Code Here

    List<Map<String, Object>> columnsProperties = (List<Map<String, Object>>)mainConf.get(DTConstants.DT_AOCOLUMNS);
    assertThat(columnsProperties).hasSize(1);
    Map<String, Object> firstColumnProperties = columnsProperties.get(0);
    Map<String, Object> customProperties = new HashMap<String, Object>(defaultProperties);
    customProperties.put(DTConstants.DT_COLUMN_RENDERER, new JavascriptSnippet("aRenderFunction"));
    customProperties.put(DTConstants.DT_S_DEFAULT_CONTENT, "");
    assertThat(firstColumnProperties).isEqualTo(customProperties);
  }
View Full Code Here

    table.getTableConfiguration().set(TableConfig.FEATURE_LENGTHMENU, "[[100px],[200px]]");

    Map<String, Object> mainConf = generator.generateConfig(table);

    assertThat(mainConf).hasSize(2);
    assertThat(mainConf.get(DTConstants.DT_A_LENGTH_MENU)).isEqualTo(new JavascriptSnippet("[[100px],[200px]]"));
  }
View Full Code Here

    table.getTableConfiguration().set(TableConfig.CSS_STRIPECLASSES, "['oddClass','evenClass']");

    Map<String, Object> mainConf = generator.generateConfig(table);

    assertThat(mainConf).hasSize(2);
    assertThat(mainConf.get(DTConstants.DT_AS_STRIPE_CLASSES)).isEqualTo(new JavascriptSnippet("['oddClass','evenClass']"));
  }
View Full Code Here

    table.getTableConfiguration().set(TableConfig.AJAX_SERVERDATA, "someServerData");

    Map<String, Object> mainConf = generator.generateConfig(table);

    assertThat(mainConf).hasSize(3);
    assertThat(mainConf.get(DTConstants.DT_FN_SERVERDATA)).isEqualTo(new JavascriptSnippet("someServerData"));
  }
View Full Code Here

TOP

Related Classes of com.github.dandelion.datatables.core.asset.JavascriptSnippet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.