Created
January 3, 2019 06:35
-
-
Save keerthanaRajendran/3c3b7fce58ee167fc71a7c88b5a7208d to your computer and use it in GitHub Desktop.
Dropdownlist : events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input type="text" id="skillsets" ej-drop-down-list="e-data-source.bind:dataSource;e-fields.bind:fields;e-watermark-text.bind:watermarkText;" e-on-select.trigger="select($event)" /> | |
</div> | |
<div id="Logger" class="box wide"> | |
<h4>Event Trace</h4> | |
<logger view-model.ref="logger"></logger> | |
<div> | |
<button class="logger-button" ej-button="e-text:Clear" e-on-click.trigger = "logger.clear()" ></button> | |
</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class EventsDropDownList { | |
skillSet = [ | |
{ skill: 'ASP.NET' }, { skill: 'ActionScript' }, { skill: 'Basic' }, | |
{ skill: 'C++' }, { skill: 'C#' }, { skill: 'dBase' }, { skill: 'Delphi' }, | |
{ skill: 'ESPOL' }, { skill: 'F#' }, { skill: 'FoxPro' }, { skill: 'Java' }, | |
{ skill: 'J#' }, { skill: 'Lisp' }, { skill: 'Logo' }, { skill: 'PHP' } | |
]; | |
constructor() { | |
this.fields = {text: 'skill'}; | |
this.dataSource = this.skillSet; | |
this.watermarkText = 'Select your skill'; | |
} | |
select(event) { | |
var target; | |
$("#skillsets_container").append("<span class='e-icon e-close'></span>"); | |
$('.e-icon.e-close').on('mousedown', function(args) { | |
target=$("#skillsets").data("ejDropDownList"); | |
target.clearText(); | |
$(".e-icon.e-close").remove() | |
args.preventDefault(); | |
args.stopPropagation(); | |
return false; | |
}); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="Essential Studio for JavaScript"> | |
<meta name="author" content="Syncfusion"> | |
<title>Untitled</title> | |
<!-- Essential Studio for JavaScript theme reference --> | |
<link rel="stylesheet" href="https://cdn.syncfusion.com/14.2.0.28/js/web/flat-azure/ej.web.all.min.css" /> | |
<script src="https://cdn.syncfusion.com/js/assets/external/jquery-1.11.3.min.js" type="text/javascript"> </script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-syncfusion-bundles/0.0.1/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
<style type="text/css" class="cssStyles"> | |
.e-icon.e-close | |
{ | |
font-size:15px; | |
margin-left: 55px; | |
} | |
</style> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-syncfusion-bridge', syncfusion => syncfusion.useAll()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment