Skip to content

Commit e473a91

Browse files
author
pipeline
committed
feature(EJ2-4247): changed argument datatype of select event in ListView
1 parent e4bb1f3 commit e473a91

17 files changed

+460
-3
lines changed

src/common/left-pane.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</div>
99
<ej-listview #controlList id="control-list" [fields]='fields' [dataSource]='dataSource' headerTitle='All Controls' (select)='onSampleClick($event)'>
1010
<ng-template #template let-data>
11-
<div class="e-text-content">
12-
<div *ngIf="data.samples" class="e-icons e-icon-collapsible"></div>
13-
<span class="e-list-text" role="list-item">{{data.name}}
11+
<div class="e-text-content e-icon-wrapper">
12+
<span class="e-list-text" role="listitem">{{data.name}}
1413
<span *ngIf="data.type" class="e-samplestatus {{data.type}}"></span>
1514
</span>
15+
<div *ngIf="data.samples" class="e-icons e-icon-collapsible"></div>
1616
</div>
1717
</ng-template>
1818
<ng-template #groupTemplate let-data>

src/common/samplelist.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { circulargaugeAppRoutes } from '../circulargauge/circulargauge.module';
1313
import { lineargaugeAppRoutes } from '../lineargauge/lineargauge.module';
1414
import { textboxesAppRoutes } from '../textboxes/textboxes.module';
1515
import { tooltipAppRoutes } from '../tooltip/tooltip.module';
16+
import { timePickerAppRoutes } from '../timepicker/timepicker.module';
1617
export let samplesList: any = [
1718
{
1819
'name': 'Chart', 'category': 'Datavisualization', 'order': '01', 'path': 'chart', 'samples': chartAppRoutes, 'type': 'update'
@@ -41,6 +42,9 @@ export let samplesList: any = [
4142
{
4243
'name': 'DropDownList', 'category': 'Editors', 'order': '03', 'path': 'dropdownlist', 'samples': dropdownlistAppRoutes, 'type': 'new'
4344
},
45+
{
46+
"name": "TimePicker", "category": "Editors", 'order': '03', "path": "timepicker", "samples": timePickerAppRoutes, type: "new"
47+
},
4448
{
4549
'name': 'NumericTextBox', 'category': 'Editors', 'order': '03', 'path': 'numerictextbox', 'samples': numericAppRoutes
4650
},

src/common/sb.router.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FormValidatorModule } from '../form-validator/form-validator.module';
44
import { DropDownListSampleModule } from '../dropdownlist/dropdownlist.module';
55
import { CalendarSampleModule } from '../calendar/calendar.module';
66
import { DatePickerSampleModule } from '../datepicker/datepicker.module';
7+
import { TimePickerSampleModule } from '../timepicker/timepicker.module';
78
import { ButtonModule } from '../button/button.module';
89
import { ListViewSampleModule } from '../listview/listview.module';
910
import { GridSampleModule } from '../grid/grid.module';
@@ -26,6 +27,7 @@ const appRoutes: any = [
2627
{ path: 'dropdownlist', loadChildren: DropDownListSampleModule },
2728
{ path: 'calendar', loadChildren: CalendarSampleModule },
2829
{ path: 'datepicker', loadChildren: DatePickerSampleModule },
30+
{ path: 'timepicker', loadChildren: TimePickerSampleModule },
2931
{ path: 'numerictextbox', loadChildren: NumericModule },
3032
{ path: 'listview', loadChildren: ListViewSampleModule },
3133
{ path: 'dialog', loadChildren: DialogSampleModule },
@@ -46,6 +48,7 @@ const appRoutes: any = [
4648
DropDownListSampleModule,
4749
CalendarSampleModule,
4850
DatePickerSampleModule,
51+
TimePickerSampleModule,
4952
NumericModule,
5053
ListViewSampleModule,
5154
TextboxesModule,

src/timepicker/default-plnkr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"app.module":"import { DefaultTimePickerComponent } from './default.component';\nimport { HttpModule, JsonpModule } from '@angular/http';\nimport { BrowserModule } from '@angular/platform-browser';\nimport 'rxjs/add/operator/map';\nimport { NgModule, ModuleWithProviders, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\n\n\nimport { TimePickerModule } from '@syncfusion/ej2-ng-calendars';\nimport { DropDownListModule } from '@syncfusion/ej2-ng-dropdowns';\nimport { CheckBoxModule } from '@syncfusion/ej2-ng-buttons';\n\n\n\n\n\n\n\n\n\n\n@NgModule({\n imports: [TimePickerModule, DropDownListModule, CheckBoxModule , HttpModule, JsonpModule, BrowserModule],\ndeclarations: [DefaultTimePickerComponent],\nbootstrap: [DefaultTimePickerComponent]\n})\nexport class AppModule { }","default.component":"import { Component, ViewEncapsulation, Inject, OnInit, ViewChild } from '@angular/core';\nimport { TimePickerComponent } from '@syncfusion/ej2-ng-calendars/src';\n/**\n\n * Default TimePicker Component\n */\n@Component({\n selector: 'control-content',\n styleUrls: ['timepicker-style.css'],\n templateUrl: 'default.html',\n encapsulation: ViewEncapsulation.None\n})\nexport class DefaultTimePickerComponent {\n public watermark: string = 'Select a time';\n}","default.html":"<div class=\"control-section sample\">\n <div class=\"control_wrapper\">\n <div class=\"tabs-wrap\">\n <div class=\"wrap\">\n <ej-timepicker id='timepicker' [placeholder]='watermark'></ej-timepicker>\n </div>\n </div>\n </div>\n</div>\n<style>\n .control-section {\n margin: 30px;\n }\n\n .control_wrapper {\n display: block;\n margin: 0 auto;\n padding: 4% 0;\n max-width: 300px;\n border: none;\n }\n\n .control-section.sample {\n min-height: 160px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 4px;\n }\n\n #description {\n margin: 30px;\n }\n\n .e-bigger .control-section {\n margin-top: 60px;\n }\n\n .e-bigger .control-section.sample {\n border: none;\n }\n\n .tabs-wrap {\n padding: 0px 0px 10px;\n }\n</style>","timepicker-style.css":"\n.control-section {\n margin: 30px;\n}\n\n#control_wrapper #container {\n min-height: 300px;\n}\n\n.e-bigger #control_wrapper #container {\n min-height: 380px;\n}\n\n#description{\n clear: both;\n}\n\n.form-group .content-wrapper {\n float: left;\n padding: 0 10px;\n}\n\n.property-panel-content {\n padding: 0 10px 10px 0;\n}\n","index.html":"<!DOCTYPE html>\n<html>\n \n <head>\n <meta name=\"author\" content=\"Syncfusion\" />\n <link href=\"http://npmci.syncfusion.com/packages/production/material.css\" rel=\"stylesheet\" />\n <script src=\"https://unpkg.com/core-js/client/shim.min.js\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.min.js\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.6.25/zone.min.js\"></script>\n <script src=\"https://unpkg.com/[email protected]\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n </head>\n \n <body>\n <control-content>\n <div id='loader'>Loading...</div>\n </control-content>\n </body>\n \n </html>\n ","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://npmci.syncfusion.com/packages/production/\",\n \"angular:\": \"https://unpkg.com/@angular/\"\n },\n map: {\n main: 'main.ts',\n typescript: \"https://unpkg.com/[email protected]/lib/typescript.js\",\n \"plugin-json\":\"https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js\",\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-dropdowns\": \"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\",\n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\",\n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\",\n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\",\n \"@syncfusion/ej2-lineargauge\": \"syncfusion:ej2-lineargauge/dist/ej2-lineargauge.umd.min.js\",\n\n \"@syncfusion/ej2-ng-base\": \"syncfusion:ej2-ng-base/dist/ej2-ng-base.umd.min.js\",\n \"@syncfusion/ej2-ng-buttons\": \"syncfusion:ej2-ng-buttons/dist/ej2-ng-buttons.umd.min.js\",\n \"@syncfusion/ej2-ng-calendars\": \"syncfusion:ej2-ng-calendars/dist/ej2-ng-calendars.umd.min.js\",\n \"@syncfusion/ej2-ng-charts\": \"syncfusion:ej2-ng-charts/dist/ej2-ng-charts.umd.min.js\",\n \"@syncfusion/ej2-ng-circulargauge\": \"syncfusion:ej2-ng-circulargauge/dist/ej2-ng-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-ng-data\": \"syncfusion:ej2-ng-data/dist/ej2-ng-data.umd.min.js\",\n \"@syncfusion/ej2-ng-dropdowns\": \"syncfusion:ej2-ng-dropdowns/dist/ej2-ng-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-ng-grids\": \"syncfusion:ej2-ng-grids/dist/ej2-ng-grids.umd.min.js\",\n \"@syncfusion/ej2-ng-inputs\": \"syncfusion:ej2-ng-inputs/dist/ej2-ng-inputs.umd.min.js\",\n \"@syncfusion/ej2-ng-lists\": \"syncfusion:ej2-ng-lists/dist/ej2-ng-lists.umd.min.js\",\n \"@syncfusion/ej2-ng-navigations\": \"syncfusion:ej2-ng-navigations/dist/ej2-ng-navigations.umd.min.js\",\n \"@syncfusion/ej2-ng-popups\": \"syncfusion:ej2-ng-popups/dist/ej2-ng-popups.umd.min.js\",\n \"@syncfusion/ej2-ng-lineargauge\": \"syncfusion:ej2-ng-lineargauge/dist/ej2-ng-lineargauge.umd.min.js\",\n\n '@angular/core': 'angular:core/bundles/core.umd.js',\n '@angular/common': 'angular:common/bundles/common.umd.js',\n '@angular/compiler': 'angular:compiler/bundles/compiler.umd.js',\n '@angular/http': 'angular:http/bundles/http.umd.js',\n '@angular/forms': 'angular:forms/bundles/forms.umd.js',\n '@angular/router': 'angular:router/bundles/router.umd.js',\n '@angular/platform-browser': 'angular:platform-browser/bundles/platform-browser.umd.js',\n '@angular/platform-browser-dynamic': 'angular:platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',\n '@angular/material': 'angular:material/bundles/material.umd.js',\n 'rxjs': 'https://unpkg.com/rxjs'\n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\n\nSystem.import('main.ts').catch(console.error.bind(console));\n","main.ts":"import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport { enableProdMode } from '@angular/core';\nimport { AppModule } from './app.module';\nimport { enableRipple } from '@syncfusion/ej2-base';\n\nenableRipple(true);\n\nenableProdMode();\nplatformBrowserDynamic().bootstrapModule(AppModule);"}

src/timepicker/default.component.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, ViewEncapsulation, Inject, OnInit, ViewChild } from '@angular/core';
2+
import { TimePickerComponent } from '@syncfusion/ej2-ng-calendars/src';
3+
/**
4+
5+
* Default TimePicker Component
6+
*/
7+
@Component({
8+
selector: 'control-content',
9+
styleUrls: ['timepicker-style.css'],
10+
templateUrl: 'default.html',
11+
encapsulation: ViewEncapsulation.None
12+
})
13+
export class DefaultTimePickerComponent {
14+
public watermark: string = 'Select a time';
15+
}

src/timepicker/default.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<div class="control-section sample">
2+
<div class="control_wrapper">
3+
<div class="tabs-wrap">
4+
<div class="wrap">
5+
<ej-timepicker id='timepicker' [placeholder]='watermark'></ej-timepicker>
6+
</div>
7+
</div>
8+
</div>
9+
</div>
10+
<div id="description">
11+
<p>
12+
A <code>TimePicker</code> provides a simple and interactive control which provides an option to select a value from
13+
popup list or set a desired time value.
14+
</p>
15+
<p>More information about TimePicker and it's configuration can be found in this
16+
<a href="http://ej2.syncfusion.com/angular/documentation/timepicker/getting-started.html#create-a-simple-timepicker" target="_blank"> documentation section</a>.</p>
17+
</div>
18+
<style>
19+
.control-section {
20+
margin: 30px;
21+
}
22+
23+
.control_wrapper {
24+
display: block;
25+
margin: 0 auto;
26+
padding: 4% 0;
27+
max-width: 300px;
28+
border: none;
29+
}
30+
31+
.control-section.sample {
32+
min-height: 160px;
33+
border: 1px solid rgba(0, 0, 0, 0.12);
34+
border-radius: 4px;
35+
}
36+
37+
#description {
38+
margin: 30px;
39+
}
40+
41+
.e-bigger .control-section {
42+
margin-top: 60px;
43+
}
44+
45+
.e-bigger .control-section.sample {
46+
border: none;
47+
}
48+
49+
.tabs-wrap {
50+
padding: 0px 0px 10px;
51+
}
52+
</style>

0 commit comments

Comments
 (0)