├── .gitignore ├── .npmignore ├── README.md ├── components.d.js ├── components.d.ts ├── components.js ├── examples ├── app │ ├── app.component.js │ ├── app.component.js.map │ ├── app.component.ts │ ├── edit │ │ ├── ndv.edit.component.js │ │ ├── ndv.edit.component.ts │ │ ├── ndv.edit.date.component.js │ │ ├── ndv.edit.date.component.ts │ │ ├── ‏‏ndv.edit.drop.component.js │ │ ├── ‏‏ndv.edit.drop.component.ts │ │ ├── ‏‏ndv.edit.time.component.js │ │ └── ‏‏ndv.edit.time.component.ts │ ├── main.js │ ├── main.js.map │ └── main.ts ├── css │ ├── bootstrap.min.css │ └── font-awesome.css ├── index.html ├── package.json ├── systemjs.config.js ├── tsconfig.json ├── typings.json └── typings │ ├── globals │ ├── core-js │ │ ├── index.d.ts │ │ └── typings.json │ ├── jasmine │ │ ├── index.d.ts │ │ └── typings.json │ └── node │ │ ├── index.d.ts │ │ └── typings.json │ └── index.d.ts ├── package.json ├── preview.jpg └── src ├── ndv.edit.area.component.js ├── ndv.edit.area.component.ts ├── ndv.edit.component.js ├── ndv.edit.component.js.map ├── ndv.edit.component.ts ├── ndv.edit.date.component.ts ├── ndv.edit.select.component.ts ├── ndv.edit.time.component.ts ├── ndv.ts ├── tsconfig.json ├── ‏‏ndv.edit.drop.component.ts └── ‏‏ndv.edit.time.component.ts /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules 3 | jspm_packages 4 | .idea 5 | lib 6 | build 7 | 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | examples 2 | node_modules 3 | src 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Angular 2 Click-To-Edit 3 | ##Click on a data-binding to make it an input field, and save the changes! 4 | 5 | ![Example](preview.jpg) 6 | ## Examples: 7 | - Plunker Example - http://plnkr.co/edit/4dGYAe?p=info 8 | 9 | ## Newly Added! 10 | 11 | - Easy permission enabling/disabling edit functionality. 12 | - Easy to attach Field-Validation. 13 | 14 | ## This Version Has: 15 | 16 | - Easy to implement component to wrap your bindings. 17 | - onSave event that calls your own save method. 18 | - Nice looking css style(inspired by Jira) 19 | - Canceling method when choosing to cancel or when clicking outside. 20 | 21 | ## Installation 22 | ``` 23 | npm install angular2-click-to-edit 24 | ``` 25 | 26 | # How To Use: 27 | 28 | ## Adding package to SystemJS: 29 | systemjs.config.js 30 | ``` 31 | var map = { 32 | 'angular2-click-to-edit': 'node_modules/angular2-click-to-edit', 33 | } 34 | ``` 35 | ``` 36 | var packages = { 37 | 'angular2-click-to-edit': { main: 'index' } 38 | } 39 | ``` 40 | 41 | ## Step 1: 42 | component.ts 43 | ``` 44 | // Import to the component where you want to implement the click-to-edit. 45 | import { NDV_DIRECTIVES } from 'angular2-click-to-edit/components'; 46 | 47 | // Include it in the Component directives 48 | @Component({ 49 | directives: [NDV_DIRECTIVES] 50 | }) 51 | 52 | ``` 53 | 54 | ## Step 2: 55 | page.html 56 | ``` 57 | 58 |

{{user.firstName}}

59 | 60 | 61 |

62 | ``` 63 | # Important Notes! 64 | As you can see there are few parameters passed: 65 | - [title] - this is the name of the field you want to send back to the server. i.e: "email". 66 | 67 | - [placeholder] - this is the text that will be displayed by default(before editing) 68 | so we would probably like to bind our data to it. 69 | 70 | - [min] - this one is similar to minlength(for validation) and can set the minimum requirement of chars. 71 | 72 | - [max] - this one is similar to maxlength(for validation) and can limit the number of chars. 73 | 74 | -[regex] - this one is similar to pattern(for validation) and can use regular expressions. 75 | 76 | - [permission] - a simple attribute, once equal to false the edit field is changed to read-only. 77 | 78 | - (onSave) - this one takes the function you give it and 79 | call it when the user saved his edited info! 80 | 81 | # VERY IMPORTANT TO NOTICE 82 | $event - is the object containing the information based on the [title]!!! 83 | - for instance: [title]="firstName"* 84 | then $event = { firstName: 'the user edited text' }. 85 | 86 | 87 | ## Thanks 88 | - for this awesome tutorial by Ben Nadel - http://www.bennadel.com/blog/3009-tracking-click-events-outside-the-current-component-in-angular-2-beta-1.html 89 | -------------------------------------------------------------------------------- /components.d.js: -------------------------------------------------------------------------------- 1 | export * from './lib/ndv.edit.component'; 2 | export * from './lib/ndv.edit.drop.component'; 3 | export * from './lib/ndv.edit.date.component'; 4 | export * from './lib/ndv.edit.time.component'; 5 | export declare const NDV_DIRECTIVES; -------------------------------------------------------------------------------- /components.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/ndv.edit.component'; 2 | export * from './lib/ndv.edit.date.component'; 3 | export * from './lib/ndv.edit.time.component'; 4 | export * from './lib/ndv.select.component'; -------------------------------------------------------------------------------- /components.js: -------------------------------------------------------------------------------- 1 | exports.NDV_DIRECTIVES = [ 2 | require('./lib/ndv.edit.component').NdvEditComponent, 3 | require('./lib/ndv.edit.select.component').NdvEditSelectComponent, 4 | require('./lib/ndv.edit.time.component').NdvEditTimeComponent, 5 | require('./lib/ndv.edit.date.component').NdvEditDateComponent, 6 | require('./lib/ndv.edit.area.component').NdvEditAreaComponent, 7 | ]; -------------------------------------------------------------------------------- /examples/app/app.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | var core_1 = require('@angular/core'); 11 | var components_1 = require('angular2-click-to-edit/components'); 12 | var AppComponent = (function () { 13 | function AppComponent() { 14 | this.firstName = 'Robert'; 15 | this.lastName = 'Johnson'; 16 | this.age = 23; 17 | } 18 | AppComponent.prototype.saveMethod = function (obj) { 19 | alert(' saved! the obj - ' + JSON.stringify(obj)); 20 | }; 21 | AppComponent = __decorate([ 22 | core_1.Component({ 23 | selector: 'my-app', 24 | styles: ["\n\n h3 {\n padding:6px;\n border-radius: 3px;\n }\n "], 25 | template: "\n\n
\n
\n

Angular2-Click-to-Edit Example

\n
\n
\n

Click on a binding to edit it!

\n

First Name

\n

Last Name

\n

Age

\n
\n \n\n \n\n
\n ", 26 | directives: [components_1.NDV_DIRECTIVES] 27 | }), 28 | __metadata('design:paramtypes', []) 29 | ], AppComponent); 30 | return AppComponent; 31 | })(); 32 | exports.AppComponent = AppComponent; 33 | //# sourceMappingURL=app.component.js.map -------------------------------------------------------------------------------- /examples/app/app.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":["AppComponent","AppComponent.constructor","AppComponent.saveMethod"],"mappings":";;;;;;;;;AAAA,qBAA0B,eAAe,CAAC,CAAA;AAC1C,2BAA+B,mCAAmC,CAAC,CAAA;AAEnE;IAAAA;QAiCIC,cAASA,GAAWA,QAAQA,CAACA;QAC7BA,aAAQA,GAAWA,SAASA,CAACA;QAC7BA,QAAGA,GAAWA,EAAEA,CAACA;IAMrBA,CAACA;IAJGD,iCAAUA,GAAVA,UAAWA,GAAGA;QACVE,KAAKA,CAACA,qBAAqBA,GAAGA,IAAIA,CAACA,SAASA,CAACA,GAAGA,CAACA,CAACA,CAACA;IACvDA,CAACA;IAvCLF;QAACA,gBAASA,CAACA;YACPA,QAAQA,EAAEA,QAAQA;YAClBA,MAAMA,EAAEA,CAACA,8FAMRA,CAACA;YACFA,QAAQA,EAAEA,2xBAmBTA;YACDA,UAAUA,EAAEA,CAACA,2BAAcA,CAACA;SAC/BA,CAACA;;qBAWDA;IAADA,mBAACA;AAADA,CAACA,AAzCD,IAyCC;AATY,oBAAY,eASxB,CAAA"} -------------------------------------------------------------------------------- /examples/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NDV_DIRECTIVES } from 'angular2-click-to-edit/components'; 3 | 4 | @Component({ 5 | selector: 'my-app', 6 | styles: [` 7 | 8 | h3 { 9 | padding:6px; 10 | border-radius: 3px; 11 | } 12 | `], 13 | template: ` 14 | 15 |
16 |
17 |

Angular2-Click-to-Edit Example

18 |
19 |
20 |

Click on a binding to edit it!

21 |

First Name

22 |

Last Name

23 |

Age

24 |
25 | 26 | 27 | 30 | 31 |
32 | `, 33 | directives: [NDV_DIRECTIVES] 34 | }) 35 | 36 | export class AppComponent { 37 | firstName: String = 'Robert'; 38 | lastName: String = 'Johnson'; 39 | age: Number = 23; 40 | 41 | saveMethod(obj) { 42 | alert(' saved! the obj - ' + JSON.stringify(obj)); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /examples/app/edit/ndv.edit.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | var core_1 = require('@angular/core'); 11 | var NdvEditComponent = (function () { 12 | function NdvEditComponent(el) { 13 | this.show = false; 14 | this.save = new core_1.EventEmitter; 15 | this.el = el; 16 | } 17 | NdvEditComponent.prototype.ngOnInit = function () { 18 | this.originalText = this.text; 19 | }; 20 | NdvEditComponent.prototype.makeEditable = function () { 21 | if (this.show == false) { 22 | this.show = true; 23 | } 24 | }; 25 | NdvEditComponent.prototype.compareEvent = function (globalEvent) { 26 | if (this.tracker != globalEvent && this.show) { 27 | this.cancelEditable(); 28 | } 29 | }; 30 | NdvEditComponent.prototype.trackEvent = function (newHostEvent) { 31 | this.tracker = newHostEvent; 32 | }; 33 | NdvEditComponent.prototype.cancelEditable = function () { 34 | this.show = false; 35 | this.text = this.originalText; 36 | }; 37 | NdvEditComponent.prototype.callSave = function () { 38 | var _this = this; 39 | var data = {}; 40 | data["" + this.fieldName] = this.text; 41 | var oldText = this.text; 42 | setTimeout(function () { _this.originalText = oldText; _this.text = oldText; }, 0); 43 | this.save.emit(data); 44 | this.show = false; 45 | }; 46 | __decorate([ 47 | core_1.Input('placeholder'), 48 | __metadata('design:type', Object) 49 | ], NdvEditComponent.prototype, "text", void 0); 50 | __decorate([ 51 | core_1.Input('title'), 52 | __metadata('design:type', Object) 53 | ], NdvEditComponent.prototype, "fieldName", void 0); 54 | NdvEditComponent = __decorate([ 55 | core_1.Component({ 56 | selector: 'ndv-edit', 57 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n\n .ndv-save {\n margin-right:3px;\n }\n\n "], 58 | template: "\n \n \u270E\n {{text || '-Empty Field-'}}\n \n
\n \n \n
", 59 | host: { 60 | "(document: click)": "compareEvent($event)", 61 | "(click)": "trackEvent($event)" 62 | }, 63 | outputs: ['save : onSave'] 64 | }), 65 | __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object]) 66 | ], NdvEditComponent); 67 | return NdvEditComponent; 68 | var _a; 69 | })(); 70 | exports.NdvEditComponent = NdvEditComponent; 71 | //# sourceMappingURL=ndv.edit.component.js.map -------------------------------------------------------------------------------- /examples/app/edit/ndv.edit.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-edit', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 51 | 52 | {{text || '-Empty Field-'}} 53 | 54 |
55 | 56 | 57 |
`, 58 | host: { 59 | "(document: click)": "compareEvent($event)", 60 | "(click)": "trackEvent($event)" 61 | }, 62 | outputs: ['save : onSave'] 63 | }) 64 | 65 | export class NdvEditComponent { 66 | @Input('placeholder') text; 67 | @Input('title') fieldName; 68 | originalText; 69 | tracker; 70 | el: ElementRef; 71 | show = false; 72 | save = new EventEmitter; 73 | 74 | constructor(el: ElementRef) { 75 | this.el = el; 76 | } 77 | 78 | ngOnInit() { 79 | this.originalText = this.text; //Saves a copy of the original field info. 80 | } 81 | 82 | makeEditable() { 83 | if (this.show == false) { 84 | this.show = true; 85 | } 86 | } 87 | 88 | compareEvent(globalEvent) { 89 | if (this.tracker != globalEvent && this.show) { 90 | this.cancelEditable(); 91 | } 92 | } 93 | 94 | trackEvent(newHostEvent) { 95 | this.tracker = newHostEvent; 96 | } 97 | 98 | cancelEditable() { 99 | this.show = false; 100 | this.text = this.originalText; 101 | } 102 | 103 | callSave() { 104 | var data = {}; //BUILD OBJ FOR EXPORT. 105 | data["" + this.fieldName] = this.text; 106 | var oldText = this.text; 107 | setTimeout(() => { this.originalText = oldText; this.text = oldText }, 0); //Sets the field with the new text; 108 | this.save.emit(data); 109 | this.show = false; 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /examples/app/edit/ndv.edit.date.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | var core_1 = require('@angular/core'); 11 | var NdvEditDateComponent = (function () { 12 | function NdvEditDateComponent(el) { 13 | this.show = false; 14 | this.save = new core_1.EventEmitter; 15 | this.el = el; 16 | } 17 | NdvEditDateComponent.prototype.ngOnInit = function () { 18 | this.originalddate = this.ddate; 19 | }; 20 | NdvEditDateComponent.prototype.makeEditable = function () { 21 | if (this.show == false) { 22 | this.show = true; 23 | } 24 | }; 25 | NdvEditDateComponent.prototype.compareEvent = function (globalEvent) { 26 | if (this.tracker != globalEvent && this.show) { 27 | this.cancelEditable(); 28 | } 29 | }; 30 | NdvEditDateComponent.prototype.trackEvent = function (newHostEvent) { 31 | this.tracker = newHostEvent; 32 | }; 33 | NdvEditDateComponent.prototype.cancelEditable = function () { 34 | this.show = false; 35 | this.ddate = this.originalddate; 36 | }; 37 | NdvEditDateComponent.prototype.callSave = function () { 38 | var _this = this; 39 | var data = {}; 40 | data["" + this.fieldName] = this.ddate; 41 | var oldddate = this.ddate; 42 | setTimeout(function () { _this.originalddate = oldddate; _this.ddate = oldddate; }, 0); 43 | this.save.emit(data); 44 | this.show = false; 45 | }; 46 | __decorate([ 47 | core_1.Input('placeholder'), 48 | __metadata('design:type', Object) 49 | ], NdvEditDateComponent.prototype, "ddate", void 0); 50 | __decorate([ 51 | core_1.Input('title'), 52 | __metadata('design:type', Object) 53 | ], NdvEditDateComponent.prototype, "fieldName", void 0); 54 | NdvEditDateComponent = __decorate([ 55 | core_1.Component({ 56 | selector: 'ndv-edit', 57 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n\n .ndv-save {\n margin-right:3px;\n }\n\n "], 58 | template: "\n \n \u270E\n {{ddate || '-Empty Field-'}}\n \n
\n \n \n
", 59 | host: { 60 | "(document: click)": "compareEvent($event)", 61 | "(click)": "trackEvent($event)" 62 | }, 63 | outputs: ['save : onSave'] 64 | }), 65 | __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object]) 66 | ], NdvEditDateComponent); 67 | return NdvEditDateComponent; 68 | var _a; 69 | })(); 70 | exports.NdvEditDateComponent = NdvEditDateComponent; 71 | //# sourceMappingURL=ndv.edit.date.component.js.map -------------------------------------------------------------------------------- /examples/app/edit/ndv.edit.date.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-edit', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 51 | 52 | {{ddate || '-Empty Field-'}} 53 | 54 |
55 | 56 | 57 |
`, 58 | host: { 59 | "(document: click)": "compareEvent($event)", 60 | "(click)": "trackEvent($event)" 61 | }, 62 | outputs: ['save : onSave'] 63 | }) 64 | 65 | export class NdvEditDateComponent { 66 | @Input('placeholder') ddate; 67 | @Input('title') fieldName; 68 | originalddate; 69 | tracker; 70 | el: ElementRef; 71 | show = false; 72 | save = new EventEmitter; 73 | 74 | constructor(el: ElementRef) { 75 | this.el = el; 76 | } 77 | 78 | ngOnInit() { 79 | this.originalddate = this.ddate; //Saves a copy of the original field info. 80 | } 81 | 82 | makeEditable() { 83 | if (this.show == false) { 84 | this.show = true; 85 | } 86 | } 87 | 88 | compareEvent(globalEvent) { 89 | if (this.tracker != globalEvent && this.show) { 90 | this.cancelEditable(); 91 | } 92 | } 93 | 94 | trackEvent(newHostEvent) { 95 | this.tracker = newHostEvent; 96 | } 97 | 98 | cancelEditable() { 99 | this.show = false; 100 | this.ddate = this.originalddate; 101 | } 102 | 103 | callSave() { 104 | var data = {}; //BUILD OBJ FOR EXPORT. 105 | data["" + this.fieldName] = this.ddate; 106 | var oldddate = this.ddate; 107 | setTimeout(() => { this.originalddate = oldddate; this.ddate = oldddate }, 0); //Sets the field with the new ddate; 108 | this.save.emit(data); 109 | this.show = false; 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /examples/app/edit/‏‏ndv.edit.drop.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | var core_1 = require('@angular/core'); 11 | var NdvEditDropComponent = (function () { 12 | function NdvEditDropComponent(el) { 13 | this.selectedOption = {}; 14 | this.show = false; 15 | this.save = new core_1.EventEmitter; 16 | this.el = el; 17 | } 18 | NdvEditDropComponent.prototype.ngOnInit = function () { 19 | this.originalOption = this.selectedOption; 20 | }; 21 | NdvEditDropComponent.prototype.makeEditable = function () { 22 | if (this.show == false) { 23 | this.show = true; 24 | } 25 | }; 26 | NdvEditDropComponent.prototype.compareEvent = function (globalEvent) { 27 | if (this.tracker != globalEvent && this.show) { 28 | this.cancelEditable(); 29 | } 30 | }; 31 | NdvEditDropComponent.prototype.trackEvent = function (newHostEvent) { 32 | this.tracker = newHostEvent; 33 | }; 34 | NdvEditDropComponent.prototype.cancelEditable = function () { 35 | this.show = false; 36 | this.option = this.originalOption; 37 | }; 38 | NdvEditDropComponent.prototype.callSave = function () { 39 | var _this = this; 40 | var data = {}; 41 | data["" + this.fieldName] = this.selectedOption; 42 | var oldoption = this.selectedOption; 43 | setTimeout(function () { _this.originalOption = oldoption; _this.selectedOption = oldoption; }, 0); 44 | this.save.emit(data); 45 | this.show = false; 46 | }; 47 | __decorate([ 48 | core_1.Input('options'), 49 | __metadata('design:type', Object) 50 | ], NdvEditDropComponent.prototype, "items", void 0); 51 | __decorate([ 52 | core_1.Input('selected'), 53 | __metadata('design:type', Object) 54 | ], NdvEditDropComponent.prototype, "selectedOption", void 0); 55 | __decorate([ 56 | core_1.Input('title'), 57 | __metadata('design:type', Object) 58 | ], NdvEditDropComponent.prototype, "fieldName", void 0); 59 | NdvEditDropComponent = __decorate([ 60 | core_1.Component({ 61 | selector: 'ndv-edit', 62 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n\n .ndv-save {\n margin-right:3px;\n }\n\n "], 63 | template: "\n \n \u270E\n {{option || '-Empty Field-'}}\n \n
\n \n \n
", 64 | host: { 65 | "(document: click)": "compareEvent($event)", 66 | "(click)": "trackEvent($event)" 67 | }, 68 | outputs: ['save : onSave'] 69 | }), 70 | __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object]) 71 | ], NdvEditDropComponent); 72 | return NdvEditDropComponent; 73 | var _a; 74 | })(); 75 | exports.NdvEditDropComponent = NdvEditDropComponent; 76 | //# sourceMappingURL=‏‏ndv.edit.drop.component.js.map -------------------------------------------------------------------------------- /examples/app/edit/‏‏ndv.edit.drop.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-edit', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 53 | 54 | {{option || '-Empty Field-'}} 55 | 56 |
57 | 58 | 59 |
`, 60 | host: { 61 | "(document: click)": "compareEvent($event)", 62 | "(click)": "trackEvent($event)" 63 | }, 64 | outputs: ['save : onSave'] 65 | }) 66 | 67 | export class NdvEditDropComponent { 68 | @Input('options') items; 69 | @Input('selected') selectedOption = {}; 70 | @Input('title') fieldName; 71 | selectedItem; 72 | originalOption; 73 | tracker; 74 | el: ElementRef; 75 | show = false; 76 | save = new EventEmitter; 77 | 78 | constructor(el: ElementRef) { 79 | this.el = el; 80 | } 81 | 82 | ngOnInit() { 83 | this.originalOption = this.selectedOption; //Saves a copy of the original field info. 84 | } 85 | 86 | makeEditable() { 87 | if (this.show == false) { 88 | this.show = true; 89 | } 90 | } 91 | 92 | compareEvent(globalEvent) { 93 | if (this.tracker != globalEvent && this.show) { 94 | this.cancelEditable(); 95 | } 96 | } 97 | 98 | trackEvent(newHostEvent) { 99 | this.tracker = newHostEvent; 100 | } 101 | 102 | cancelEditable() { 103 | this.show = false; 104 | this.option = this.originalOption; 105 | } 106 | 107 | callSave() { 108 | var data = {}; //BUILD OBJ FOR EXPORT. 109 | data["" + this.fieldName] = this.selectedOption; 110 | var oldoption = this.selectedOption; 111 | setTimeout(() => { this.originalOption = oldoption; this.selectedOption = oldoption }, 0); //Sets the field with the new option; 112 | this.save.emit(data); 113 | this.show = false; 114 | 115 | } 116 | } -------------------------------------------------------------------------------- /examples/app/edit/‏‏ndv.edit.time.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | var core_1 = require('@angular/core'); 11 | var NdvEditTimeComponent = (function () { 12 | function NdvEditTimeComponent(el) { 13 | this.show = false; 14 | this.save = new core_1.EventEmitter; 15 | this.el = el; 16 | } 17 | NdvEditTimeComponent.prototype.ngOnInit = function () { 18 | this.originalTime = this.time; 19 | }; 20 | NdvEditTimeComponent.prototype.makeEditable = function () { 21 | if (this.show == false) { 22 | this.show = true; 23 | } 24 | }; 25 | NdvEditTimeComponent.prototype.compareEvent = function (globalEvent) { 26 | if (this.tracker != globalEvent && this.show) { 27 | this.cancelEditable(); 28 | } 29 | }; 30 | NdvEditTimeComponent.prototype.trackEvent = function (newHostEvent) { 31 | this.tracker = newHostEvent; 32 | }; 33 | NdvEditTimeComponent.prototype.cancelEditable = function () { 34 | this.show = false; 35 | this.time = this.originalTime; 36 | }; 37 | NdvEditTimeComponent.prototype.callSave = function () { 38 | var _this = this; 39 | var data = {}; 40 | data["" + this.fieldName] = this.time; 41 | var oldtime = this.time; 42 | setTimeout(function () { _this.originalTime = oldtime; _this.time = oldtime; }, 0); 43 | this.save.emit(data); 44 | this.show = false; 45 | }; 46 | __decorate([ 47 | core_1.Input('placeholder'), 48 | __metadata('design:type', Object) 49 | ], NdvEditTimeComponent.prototype, "time", void 0); 50 | __decorate([ 51 | core_1.Input('title'), 52 | __metadata('design:type', Object) 53 | ], NdvEditTimeComponent.prototype, "fieldName", void 0); 54 | NdvEditTimeComponent = __decorate([ 55 | core_1.Component({ 56 | selector: 'ndv-edit', 57 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n\n .ndv-save {\n margin-right:3px;\n }\n\n "], 58 | template: "\n \n \u270E\n {{time || '-Empty Field-'}}\n \n
\n \n \n
", 59 | host: { 60 | "(document: click)": "compareEvent($event)", 61 | "(click)": "trackEvent($event)" 62 | }, 63 | outputs: ['save : onSave'] 64 | }), 65 | __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object]) 66 | ], NdvEditTimeComponent); 67 | return NdvEditTimeComponent; 68 | var _a; 69 | })(); 70 | exports.NdvEditTimeComponent = NdvEditTimeComponent; 71 | //# sourceMappingURL=‏‏ndv.edit.time.component.js.map -------------------------------------------------------------------------------- /examples/app/edit/‏‏ndv.edit.time.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-edit', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 51 | 52 | {{time || '-Empty Field-'}} 53 | 54 |
55 | 56 | 57 |
`, 58 | host: { 59 | "(document: click)": "compareEvent($event)", 60 | "(click)": "trackEvent($event)" 61 | }, 62 | outputs: ['save : onSave'] 63 | }) 64 | 65 | export class NdvEditTimeComponent { 66 | @Input('placeholder') time; 67 | @Input('title') fieldName; 68 | originalTime; 69 | tracker; 70 | el: ElementRef; 71 | show = false; 72 | save = new EventEmitter; 73 | 74 | constructor(el: ElementRef) { 75 | this.el = el; 76 | } 77 | 78 | ngOnInit() { 79 | this.originalTime = this.time; //Saves a copy of the original field info. 80 | } 81 | 82 | makeEditable() { 83 | if (this.show == false) { 84 | this.show = true; 85 | } 86 | } 87 | 88 | compareEvent(globalEvent) { 89 | if (this.tracker != globalEvent && this.show) { 90 | this.cancelEditable(); 91 | } 92 | } 93 | 94 | trackEvent(newHostEvent) { 95 | this.tracker = newHostEvent; 96 | } 97 | 98 | cancelEditable() { 99 | this.show = false; 100 | this.time = this.originalTime; 101 | } 102 | 103 | callSave() { 104 | var data = {}; //BUILD OBJ FOR EXPORT. 105 | data["" + this.fieldName] = this.time; 106 | var oldtime = this.time; 107 | setTimeout(() => { this.originalTime = oldtime; this.time = oldtime }, 0); //Sets the field with the new time; 108 | this.save.emit(data); 109 | this.show = false; 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /examples/app/main.js: -------------------------------------------------------------------------------- 1 | var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic'); 2 | var app_component_1 = require('./app.component'); 3 | platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent); 4 | //# sourceMappingURL=main.js.map -------------------------------------------------------------------------------- /examples/app/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":"AAAA,yCAA6B,mCAAmC,CAAC,CAAA;AACjE,8BAA6B,iBAAiB,CAAC,CAAA;AAC/C,oCAAS,CAAC,4BAAY,CAAC,CAAC"} -------------------------------------------------------------------------------- /examples/app/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrap } from '@angular/platform-browser-dynamic'; 2 | import { AppComponent } from './app.component'; 3 | bootstrap(AppComponent); -------------------------------------------------------------------------------- /examples/css/font-awesome.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | /* FONT PATH 6 | * -------------------------- */ 7 | @font-face { 8 | font-family: 'FontAwesome'; 9 | src: url('../fonts/fontawesome-webfont.eot?v=4.6.3'); 10 | src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | .fa { 15 | display: inline-block; 16 | font: normal normal normal 14px/1 FontAwesome; 17 | font-size: inherit; 18 | text-rendering: auto; 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | } 22 | /* makes the font 33% larger relative to the icon container */ 23 | .fa-lg { 24 | font-size: 1.33333333em; 25 | line-height: 0.75em; 26 | vertical-align: -15%; 27 | } 28 | .fa-2x { 29 | font-size: 2em; 30 | } 31 | .fa-3x { 32 | font-size: 3em; 33 | } 34 | .fa-4x { 35 | font-size: 4em; 36 | } 37 | .fa-5x { 38 | font-size: 5em; 39 | } 40 | .fa-fw { 41 | width: 1.28571429em; 42 | text-align: center; 43 | } 44 | .fa-ul { 45 | padding-left: 0; 46 | margin-left: 2.14285714em; 47 | list-style-type: none; 48 | } 49 | .fa-ul > li { 50 | position: relative; 51 | } 52 | .fa-li { 53 | position: absolute; 54 | left: -2.14285714em; 55 | width: 2.14285714em; 56 | top: 0.14285714em; 57 | text-align: center; 58 | } 59 | .fa-li.fa-lg { 60 | left: -1.85714286em; 61 | } 62 | .fa-border { 63 | padding: .2em .25em .15em; 64 | border: solid 0.08em #eeeeee; 65 | border-radius: .1em; 66 | } 67 | .fa-pull-left { 68 | float: left; 69 | } 70 | .fa-pull-right { 71 | float: right; 72 | } 73 | .fa.fa-pull-left { 74 | margin-right: .3em; 75 | } 76 | .fa.fa-pull-right { 77 | margin-left: .3em; 78 | } 79 | /* Deprecated as of 4.4.0 */ 80 | .pull-right { 81 | float: right; 82 | } 83 | .pull-left { 84 | float: left; 85 | } 86 | .fa.pull-left { 87 | margin-right: .3em; 88 | } 89 | .fa.pull-right { 90 | margin-left: .3em; 91 | } 92 | .fa-spin { 93 | -webkit-animation: fa-spin 2s infinite linear; 94 | animation: fa-spin 2s infinite linear; 95 | } 96 | .fa-pulse { 97 | -webkit-animation: fa-spin 1s infinite steps(8); 98 | animation: fa-spin 1s infinite steps(8); 99 | } 100 | @-webkit-keyframes fa-spin { 101 | 0% { 102 | -webkit-transform: rotate(0deg); 103 | transform: rotate(0deg); 104 | } 105 | 100% { 106 | -webkit-transform: rotate(359deg); 107 | transform: rotate(359deg); 108 | } 109 | } 110 | @keyframes fa-spin { 111 | 0% { 112 | -webkit-transform: rotate(0deg); 113 | transform: rotate(0deg); 114 | } 115 | 100% { 116 | -webkit-transform: rotate(359deg); 117 | transform: rotate(359deg); 118 | } 119 | } 120 | .fa-rotate-90 { 121 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; 122 | -webkit-transform: rotate(90deg); 123 | -ms-transform: rotate(90deg); 124 | transform: rotate(90deg); 125 | } 126 | .fa-rotate-180 { 127 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; 128 | -webkit-transform: rotate(180deg); 129 | -ms-transform: rotate(180deg); 130 | transform: rotate(180deg); 131 | } 132 | .fa-rotate-270 { 133 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; 134 | -webkit-transform: rotate(270deg); 135 | -ms-transform: rotate(270deg); 136 | transform: rotate(270deg); 137 | } 138 | .fa-flip-horizontal { 139 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; 140 | -webkit-transform: scale(-1, 1); 141 | -ms-transform: scale(-1, 1); 142 | transform: scale(-1, 1); 143 | } 144 | .fa-flip-vertical { 145 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; 146 | -webkit-transform: scale(1, -1); 147 | -ms-transform: scale(1, -1); 148 | transform: scale(1, -1); 149 | } 150 | :root .fa-rotate-90, 151 | :root .fa-rotate-180, 152 | :root .fa-rotate-270, 153 | :root .fa-flip-horizontal, 154 | :root .fa-flip-vertical { 155 | filter: none; 156 | } 157 | .fa-stack { 158 | position: relative; 159 | display: inline-block; 160 | width: 2em; 161 | height: 2em; 162 | line-height: 2em; 163 | vertical-align: middle; 164 | } 165 | .fa-stack-1x, 166 | .fa-stack-2x { 167 | position: absolute; 168 | left: 0; 169 | width: 100%; 170 | text-align: center; 171 | } 172 | .fa-stack-1x { 173 | line-height: inherit; 174 | } 175 | .fa-stack-2x { 176 | font-size: 2em; 177 | } 178 | .fa-inverse { 179 | color: #ffffff; 180 | } 181 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen 182 | readers do not read off random characters that represent icons */ 183 | .fa-glass:before { 184 | content: "\f000"; 185 | } 186 | .fa-music:before { 187 | content: "\f001"; 188 | } 189 | .fa-search:before { 190 | content: "\f002"; 191 | } 192 | .fa-envelope-o:before { 193 | content: "\f003"; 194 | } 195 | .fa-heart:before { 196 | content: "\f004"; 197 | } 198 | .fa-star:before { 199 | content: "\f005"; 200 | } 201 | .fa-star-o:before { 202 | content: "\f006"; 203 | } 204 | .fa-user:before { 205 | content: "\f007"; 206 | } 207 | .fa-film:before { 208 | content: "\f008"; 209 | } 210 | .fa-th-large:before { 211 | content: "\f009"; 212 | } 213 | .fa-th:before { 214 | content: "\f00a"; 215 | } 216 | .fa-th-list:before { 217 | content: "\f00b"; 218 | } 219 | .fa-check:before { 220 | content: "\f00c"; 221 | } 222 | .fa-remove:before, 223 | .fa-close:before, 224 | .fa-times:before { 225 | content: "\f00d"; 226 | } 227 | .fa-search-plus:before { 228 | content: "\f00e"; 229 | } 230 | .fa-search-minus:before { 231 | content: "\f010"; 232 | } 233 | .fa-power-off:before { 234 | content: "\f011"; 235 | } 236 | .fa-signal:before { 237 | content: "\f012"; 238 | } 239 | .fa-gear:before, 240 | .fa-cog:before { 241 | content: "\f013"; 242 | } 243 | .fa-trash-o:before { 244 | content: "\f014"; 245 | } 246 | .fa-home:before { 247 | content: "\f015"; 248 | } 249 | .fa-file-o:before { 250 | content: "\f016"; 251 | } 252 | .fa-clock-o:before { 253 | content: "\f017"; 254 | } 255 | .fa-road:before { 256 | content: "\f018"; 257 | } 258 | .fa-download:before { 259 | content: "\f019"; 260 | } 261 | .fa-arrow-circle-o-down:before { 262 | content: "\f01a"; 263 | } 264 | .fa-arrow-circle-o-up:before { 265 | content: "\f01b"; 266 | } 267 | .fa-inbox:before { 268 | content: "\f01c"; 269 | } 270 | .fa-play-circle-o:before { 271 | content: "\f01d"; 272 | } 273 | .fa-rotate-right:before, 274 | .fa-repeat:before { 275 | content: "\f01e"; 276 | } 277 | .fa-refresh:before { 278 | content: "\f021"; 279 | } 280 | .fa-list-alt:before { 281 | content: "\f022"; 282 | } 283 | .fa-lock:before { 284 | content: "\f023"; 285 | } 286 | .fa-flag:before { 287 | content: "\f024"; 288 | } 289 | .fa-headphones:before { 290 | content: "\f025"; 291 | } 292 | .fa-volume-off:before { 293 | content: "\f026"; 294 | } 295 | .fa-volume-down:before { 296 | content: "\f027"; 297 | } 298 | .fa-volume-up:before { 299 | content: "\f028"; 300 | } 301 | .fa-qrcode:before { 302 | content: "\f029"; 303 | } 304 | .fa-barcode:before { 305 | content: "\f02a"; 306 | } 307 | .fa-tag:before { 308 | content: "\f02b"; 309 | } 310 | .fa-tags:before { 311 | content: "\f02c"; 312 | } 313 | .fa-book:before { 314 | content: "\f02d"; 315 | } 316 | .fa-bookmark:before { 317 | content: "\f02e"; 318 | } 319 | .fa-print:before { 320 | content: "\f02f"; 321 | } 322 | .fa-camera:before { 323 | content: "\f030"; 324 | } 325 | .fa-font:before { 326 | content: "\f031"; 327 | } 328 | .fa-bold:before { 329 | content: "\f032"; 330 | } 331 | .fa-italic:before { 332 | content: "\f033"; 333 | } 334 | .fa-text-height:before { 335 | content: "\f034"; 336 | } 337 | .fa-text-width:before { 338 | content: "\f035"; 339 | } 340 | .fa-align-left:before { 341 | content: "\f036"; 342 | } 343 | .fa-align-center:before { 344 | content: "\f037"; 345 | } 346 | .fa-align-right:before { 347 | content: "\f038"; 348 | } 349 | .fa-align-justify:before { 350 | content: "\f039"; 351 | } 352 | .fa-list:before { 353 | content: "\f03a"; 354 | } 355 | .fa-dedent:before, 356 | .fa-outdent:before { 357 | content: "\f03b"; 358 | } 359 | .fa-indent:before { 360 | content: "\f03c"; 361 | } 362 | .fa-video-camera:before { 363 | content: "\f03d"; 364 | } 365 | .fa-photo:before, 366 | .fa-image:before, 367 | .fa-picture-o:before { 368 | content: "\f03e"; 369 | } 370 | .fa-pencil:before { 371 | content: "\f040"; 372 | } 373 | .fa-map-marker:before { 374 | content: "\f041"; 375 | } 376 | .fa-adjust:before { 377 | content: "\f042"; 378 | } 379 | .fa-tint:before { 380 | content: "\f043"; 381 | } 382 | .fa-edit:before, 383 | .fa-pencil-square-o:before { 384 | content: "\f044"; 385 | } 386 | .fa-share-square-o:before { 387 | content: "\f045"; 388 | } 389 | .fa-check-square-o:before { 390 | content: "\f046"; 391 | } 392 | .fa-arrows:before { 393 | content: "\f047"; 394 | } 395 | .fa-step-backward:before { 396 | content: "\f048"; 397 | } 398 | .fa-fast-backward:before { 399 | content: "\f049"; 400 | } 401 | .fa-backward:before { 402 | content: "\f04a"; 403 | } 404 | .fa-play:before { 405 | content: "\f04b"; 406 | } 407 | .fa-pause:before { 408 | content: "\f04c"; 409 | } 410 | .fa-stop:before { 411 | content: "\f04d"; 412 | } 413 | .fa-forward:before { 414 | content: "\f04e"; 415 | } 416 | .fa-fast-forward:before { 417 | content: "\f050"; 418 | } 419 | .fa-step-forward:before { 420 | content: "\f051"; 421 | } 422 | .fa-eject:before { 423 | content: "\f052"; 424 | } 425 | .fa-chevron-left:before { 426 | content: "\f053"; 427 | } 428 | .fa-chevron-right:before { 429 | content: "\f054"; 430 | } 431 | .fa-plus-circle:before { 432 | content: "\f055"; 433 | } 434 | .fa-minus-circle:before { 435 | content: "\f056"; 436 | } 437 | .fa-times-circle:before { 438 | content: "\f057"; 439 | } 440 | .fa-check-circle:before { 441 | content: "\f058"; 442 | } 443 | .fa-question-circle:before { 444 | content: "\f059"; 445 | } 446 | .fa-info-circle:before { 447 | content: "\f05a"; 448 | } 449 | .fa-crosshairs:before { 450 | content: "\f05b"; 451 | } 452 | .fa-times-circle-o:before { 453 | content: "\f05c"; 454 | } 455 | .fa-check-circle-o:before { 456 | content: "\f05d"; 457 | } 458 | .fa-ban:before { 459 | content: "\f05e"; 460 | } 461 | .fa-arrow-left:before { 462 | content: "\f060"; 463 | } 464 | .fa-arrow-right:before { 465 | content: "\f061"; 466 | } 467 | .fa-arrow-up:before { 468 | content: "\f062"; 469 | } 470 | .fa-arrow-down:before { 471 | content: "\f063"; 472 | } 473 | .fa-mail-forward:before, 474 | .fa-share:before { 475 | content: "\f064"; 476 | } 477 | .fa-expand:before { 478 | content: "\f065"; 479 | } 480 | .fa-compress:before { 481 | content: "\f066"; 482 | } 483 | .fa-plus:before { 484 | content: "\f067"; 485 | } 486 | .fa-minus:before { 487 | content: "\f068"; 488 | } 489 | .fa-asterisk:before { 490 | content: "\f069"; 491 | } 492 | .fa-exclamation-circle:before { 493 | content: "\f06a"; 494 | } 495 | .fa-gift:before { 496 | content: "\f06b"; 497 | } 498 | .fa-leaf:before { 499 | content: "\f06c"; 500 | } 501 | .fa-fire:before { 502 | content: "\f06d"; 503 | } 504 | .fa-eye:before { 505 | content: "\f06e"; 506 | } 507 | .fa-eye-slash:before { 508 | content: "\f070"; 509 | } 510 | .fa-warning:before, 511 | .fa-exclamation-triangle:before { 512 | content: "\f071"; 513 | } 514 | .fa-plane:before { 515 | content: "\f072"; 516 | } 517 | .fa-calendar:before { 518 | content: "\f073"; 519 | } 520 | .fa-random:before { 521 | content: "\f074"; 522 | } 523 | .fa-comment:before { 524 | content: "\f075"; 525 | } 526 | .fa-magnet:before { 527 | content: "\f076"; 528 | } 529 | .fa-chevron-up:before { 530 | content: "\f077"; 531 | } 532 | .fa-chevron-down:before { 533 | content: "\f078"; 534 | } 535 | .fa-retweet:before { 536 | content: "\f079"; 537 | } 538 | .fa-shopping-cart:before { 539 | content: "\f07a"; 540 | } 541 | .fa-folder:before { 542 | content: "\f07b"; 543 | } 544 | .fa-folder-open:before { 545 | content: "\f07c"; 546 | } 547 | .fa-arrows-v:before { 548 | content: "\f07d"; 549 | } 550 | .fa-arrows-h:before { 551 | content: "\f07e"; 552 | } 553 | .fa-bar-chart-o:before, 554 | .fa-bar-chart:before { 555 | content: "\f080"; 556 | } 557 | .fa-twitter-square:before { 558 | content: "\f081"; 559 | } 560 | .fa-facebook-square:before { 561 | content: "\f082"; 562 | } 563 | .fa-camera-retro:before { 564 | content: "\f083"; 565 | } 566 | .fa-key:before { 567 | content: "\f084"; 568 | } 569 | .fa-gears:before, 570 | .fa-cogs:before { 571 | content: "\f085"; 572 | } 573 | .fa-comments:before { 574 | content: "\f086"; 575 | } 576 | .fa-thumbs-o-up:before { 577 | content: "\f087"; 578 | } 579 | .fa-thumbs-o-down:before { 580 | content: "\f088"; 581 | } 582 | .fa-star-half:before { 583 | content: "\f089"; 584 | } 585 | .fa-heart-o:before { 586 | content: "\f08a"; 587 | } 588 | .fa-sign-out:before { 589 | content: "\f08b"; 590 | } 591 | .fa-linkedin-square:before { 592 | content: "\f08c"; 593 | } 594 | .fa-thumb-tack:before { 595 | content: "\f08d"; 596 | } 597 | .fa-external-link:before { 598 | content: "\f08e"; 599 | } 600 | .fa-sign-in:before { 601 | content: "\f090"; 602 | } 603 | .fa-trophy:before { 604 | content: "\f091"; 605 | } 606 | .fa-github-square:before { 607 | content: "\f092"; 608 | } 609 | .fa-upload:before { 610 | content: "\f093"; 611 | } 612 | .fa-lemon-o:before { 613 | content: "\f094"; 614 | } 615 | .fa-phone:before { 616 | content: "\f095"; 617 | } 618 | .fa-square-o:before { 619 | content: "\f096"; 620 | } 621 | .fa-bookmark-o:before { 622 | content: "\f097"; 623 | } 624 | .fa-phone-square:before { 625 | content: "\f098"; 626 | } 627 | .fa-twitter:before { 628 | content: "\f099"; 629 | } 630 | .fa-facebook-f:before, 631 | .fa-facebook:before { 632 | content: "\f09a"; 633 | } 634 | .fa-github:before { 635 | content: "\f09b"; 636 | } 637 | .fa-unlock:before { 638 | content: "\f09c"; 639 | } 640 | .fa-credit-card:before { 641 | content: "\f09d"; 642 | } 643 | .fa-feed:before, 644 | .fa-rss:before { 645 | content: "\f09e"; 646 | } 647 | .fa-hdd-o:before { 648 | content: "\f0a0"; 649 | } 650 | .fa-bullhorn:before { 651 | content: "\f0a1"; 652 | } 653 | .fa-bell:before { 654 | content: "\f0f3"; 655 | } 656 | .fa-certificate:before { 657 | content: "\f0a3"; 658 | } 659 | .fa-hand-o-right:before { 660 | content: "\f0a4"; 661 | } 662 | .fa-hand-o-left:before { 663 | content: "\f0a5"; 664 | } 665 | .fa-hand-o-up:before { 666 | content: "\f0a6"; 667 | } 668 | .fa-hand-o-down:before { 669 | content: "\f0a7"; 670 | } 671 | .fa-arrow-circle-left:before { 672 | content: "\f0a8"; 673 | } 674 | .fa-arrow-circle-right:before { 675 | content: "\f0a9"; 676 | } 677 | .fa-arrow-circle-up:before { 678 | content: "\f0aa"; 679 | } 680 | .fa-arrow-circle-down:before { 681 | content: "\f0ab"; 682 | } 683 | .fa-globe:before { 684 | content: "\f0ac"; 685 | } 686 | .fa-wrench:before { 687 | content: "\f0ad"; 688 | } 689 | .fa-tasks:before { 690 | content: "\f0ae"; 691 | } 692 | .fa-filter:before { 693 | content: "\f0b0"; 694 | } 695 | .fa-briefcase:before { 696 | content: "\f0b1"; 697 | } 698 | .fa-arrows-alt:before { 699 | content: "\f0b2"; 700 | } 701 | .fa-group:before, 702 | .fa-users:before { 703 | content: "\f0c0"; 704 | } 705 | .fa-chain:before, 706 | .fa-link:before { 707 | content: "\f0c1"; 708 | } 709 | .fa-cloud:before { 710 | content: "\f0c2"; 711 | } 712 | .fa-flask:before { 713 | content: "\f0c3"; 714 | } 715 | .fa-cut:before, 716 | .fa-scissors:before { 717 | content: "\f0c4"; 718 | } 719 | .fa-copy:before, 720 | .fa-files-o:before { 721 | content: "\f0c5"; 722 | } 723 | .fa-paperclip:before { 724 | content: "\f0c6"; 725 | } 726 | .fa-save:before, 727 | .fa-floppy-o:before { 728 | content: "\f0c7"; 729 | } 730 | .fa-square:before { 731 | content: "\f0c8"; 732 | } 733 | .fa-navicon:before, 734 | .fa-reorder:before, 735 | .fa-bars:before { 736 | content: "\f0c9"; 737 | } 738 | .fa-list-ul:before { 739 | content: "\f0ca"; 740 | } 741 | .fa-list-ol:before { 742 | content: "\f0cb"; 743 | } 744 | .fa-strikethrough:before { 745 | content: "\f0cc"; 746 | } 747 | .fa-underline:before { 748 | content: "\f0cd"; 749 | } 750 | .fa-table:before { 751 | content: "\f0ce"; 752 | } 753 | .fa-magic:before { 754 | content: "\f0d0"; 755 | } 756 | .fa-truck:before { 757 | content: "\f0d1"; 758 | } 759 | .fa-pinterest:before { 760 | content: "\f0d2"; 761 | } 762 | .fa-pinterest-square:before { 763 | content: "\f0d3"; 764 | } 765 | .fa-google-plus-square:before { 766 | content: "\f0d4"; 767 | } 768 | .fa-google-plus:before { 769 | content: "\f0d5"; 770 | } 771 | .fa-money:before { 772 | content: "\f0d6"; 773 | } 774 | .fa-caret-down:before { 775 | content: "\f0d7"; 776 | } 777 | .fa-caret-up:before { 778 | content: "\f0d8"; 779 | } 780 | .fa-caret-left:before { 781 | content: "\f0d9"; 782 | } 783 | .fa-caret-right:before { 784 | content: "\f0da"; 785 | } 786 | .fa-columns:before { 787 | content: "\f0db"; 788 | } 789 | .fa-unsorted:before, 790 | .fa-sort:before { 791 | content: "\f0dc"; 792 | } 793 | .fa-sort-down:before, 794 | .fa-sort-desc:before { 795 | content: "\f0dd"; 796 | } 797 | .fa-sort-up:before, 798 | .fa-sort-asc:before { 799 | content: "\f0de"; 800 | } 801 | .fa-envelope:before { 802 | content: "\f0e0"; 803 | } 804 | .fa-linkedin:before { 805 | content: "\f0e1"; 806 | } 807 | .fa-rotate-left:before, 808 | .fa-undo:before { 809 | content: "\f0e2"; 810 | } 811 | .fa-legal:before, 812 | .fa-gavel:before { 813 | content: "\f0e3"; 814 | } 815 | .fa-dashboard:before, 816 | .fa-tachometer:before { 817 | content: "\f0e4"; 818 | } 819 | .fa-comment-o:before { 820 | content: "\f0e5"; 821 | } 822 | .fa-comments-o:before { 823 | content: "\f0e6"; 824 | } 825 | .fa-flash:before, 826 | .fa-bolt:before { 827 | content: "\f0e7"; 828 | } 829 | .fa-sitemap:before { 830 | content: "\f0e8"; 831 | } 832 | .fa-umbrella:before { 833 | content: "\f0e9"; 834 | } 835 | .fa-paste:before, 836 | .fa-clipboard:before { 837 | content: "\f0ea"; 838 | } 839 | .fa-lightbulb-o:before { 840 | content: "\f0eb"; 841 | } 842 | .fa-exchange:before { 843 | content: "\f0ec"; 844 | } 845 | .fa-cloud-download:before { 846 | content: "\f0ed"; 847 | } 848 | .fa-cloud-upload:before { 849 | content: "\f0ee"; 850 | } 851 | .fa-user-md:before { 852 | content: "\f0f0"; 853 | } 854 | .fa-stethoscope:before { 855 | content: "\f0f1"; 856 | } 857 | .fa-suitcase:before { 858 | content: "\f0f2"; 859 | } 860 | .fa-bell-o:before { 861 | content: "\f0a2"; 862 | } 863 | .fa-coffee:before { 864 | content: "\f0f4"; 865 | } 866 | .fa-cutlery:before { 867 | content: "\f0f5"; 868 | } 869 | .fa-file-text-o:before { 870 | content: "\f0f6"; 871 | } 872 | .fa-building-o:before { 873 | content: "\f0f7"; 874 | } 875 | .fa-hospital-o:before { 876 | content: "\f0f8"; 877 | } 878 | .fa-ambulance:before { 879 | content: "\f0f9"; 880 | } 881 | .fa-medkit:before { 882 | content: "\f0fa"; 883 | } 884 | .fa-fighter-jet:before { 885 | content: "\f0fb"; 886 | } 887 | .fa-beer:before { 888 | content: "\f0fc"; 889 | } 890 | .fa-h-square:before { 891 | content: "\f0fd"; 892 | } 893 | .fa-plus-square:before { 894 | content: "\f0fe"; 895 | } 896 | .fa-angle-double-left:before { 897 | content: "\f100"; 898 | } 899 | .fa-angle-double-right:before { 900 | content: "\f101"; 901 | } 902 | .fa-angle-double-up:before { 903 | content: "\f102"; 904 | } 905 | .fa-angle-double-down:before { 906 | content: "\f103"; 907 | } 908 | .fa-angle-left:before { 909 | content: "\f104"; 910 | } 911 | .fa-angle-right:before { 912 | content: "\f105"; 913 | } 914 | .fa-angle-up:before { 915 | content: "\f106"; 916 | } 917 | .fa-angle-down:before { 918 | content: "\f107"; 919 | } 920 | .fa-desktop:before { 921 | content: "\f108"; 922 | } 923 | .fa-laptop:before { 924 | content: "\f109"; 925 | } 926 | .fa-tablet:before { 927 | content: "\f10a"; 928 | } 929 | .fa-mobile-phone:before, 930 | .fa-mobile:before { 931 | content: "\f10b"; 932 | } 933 | .fa-circle-o:before { 934 | content: "\f10c"; 935 | } 936 | .fa-quote-left:before { 937 | content: "\f10d"; 938 | } 939 | .fa-quote-right:before { 940 | content: "\f10e"; 941 | } 942 | .fa-spinner:before { 943 | content: "\f110"; 944 | } 945 | .fa-circle:before { 946 | content: "\f111"; 947 | } 948 | .fa-mail-reply:before, 949 | .fa-reply:before { 950 | content: "\f112"; 951 | } 952 | .fa-github-alt:before { 953 | content: "\f113"; 954 | } 955 | .fa-folder-o:before { 956 | content: "\f114"; 957 | } 958 | .fa-folder-open-o:before { 959 | content: "\f115"; 960 | } 961 | .fa-smile-o:before { 962 | content: "\f118"; 963 | } 964 | .fa-frown-o:before { 965 | content: "\f119"; 966 | } 967 | .fa-meh-o:before { 968 | content: "\f11a"; 969 | } 970 | .fa-gamepad:before { 971 | content: "\f11b"; 972 | } 973 | .fa-keyboard-o:before { 974 | content: "\f11c"; 975 | } 976 | .fa-flag-o:before { 977 | content: "\f11d"; 978 | } 979 | .fa-flag-checkered:before { 980 | content: "\f11e"; 981 | } 982 | .fa-terminal:before { 983 | content: "\f120"; 984 | } 985 | .fa-code:before { 986 | content: "\f121"; 987 | } 988 | .fa-mail-reply-all:before, 989 | .fa-reply-all:before { 990 | content: "\f122"; 991 | } 992 | .fa-star-half-empty:before, 993 | .fa-star-half-full:before, 994 | .fa-star-half-o:before { 995 | content: "\f123"; 996 | } 997 | .fa-location-arrow:before { 998 | content: "\f124"; 999 | } 1000 | .fa-crop:before { 1001 | content: "\f125"; 1002 | } 1003 | .fa-code-fork:before { 1004 | content: "\f126"; 1005 | } 1006 | .fa-unlink:before, 1007 | .fa-chain-broken:before { 1008 | content: "\f127"; 1009 | } 1010 | .fa-question:before { 1011 | content: "\f128"; 1012 | } 1013 | .fa-info:before { 1014 | content: "\f129"; 1015 | } 1016 | .fa-exclamation:before { 1017 | content: "\f12a"; 1018 | } 1019 | .fa-superscript:before { 1020 | content: "\f12b"; 1021 | } 1022 | .fa-subscript:before { 1023 | content: "\f12c"; 1024 | } 1025 | .fa-eraser:before { 1026 | content: "\f12d"; 1027 | } 1028 | .fa-puzzle-piece:before { 1029 | content: "\f12e"; 1030 | } 1031 | .fa-microphone:before { 1032 | content: "\f130"; 1033 | } 1034 | .fa-microphone-slash:before { 1035 | content: "\f131"; 1036 | } 1037 | .fa-shield:before { 1038 | content: "\f132"; 1039 | } 1040 | .fa-calendar-o:before { 1041 | content: "\f133"; 1042 | } 1043 | .fa-fire-extinguisher:before { 1044 | content: "\f134"; 1045 | } 1046 | .fa-rocket:before { 1047 | content: "\f135"; 1048 | } 1049 | .fa-maxcdn:before { 1050 | content: "\f136"; 1051 | } 1052 | .fa-chevron-circle-left:before { 1053 | content: "\f137"; 1054 | } 1055 | .fa-chevron-circle-right:before { 1056 | content: "\f138"; 1057 | } 1058 | .fa-chevron-circle-up:before { 1059 | content: "\f139"; 1060 | } 1061 | .fa-chevron-circle-down:before { 1062 | content: "\f13a"; 1063 | } 1064 | .fa-html5:before { 1065 | content: "\f13b"; 1066 | } 1067 | .fa-css3:before { 1068 | content: "\f13c"; 1069 | } 1070 | .fa-anchor:before { 1071 | content: "\f13d"; 1072 | } 1073 | .fa-unlock-alt:before { 1074 | content: "\f13e"; 1075 | } 1076 | .fa-bullseye:before { 1077 | content: "\f140"; 1078 | } 1079 | .fa-ellipsis-h:before { 1080 | content: "\f141"; 1081 | } 1082 | .fa-ellipsis-v:before { 1083 | content: "\f142"; 1084 | } 1085 | .fa-rss-square:before { 1086 | content: "\f143"; 1087 | } 1088 | .fa-play-circle:before { 1089 | content: "\f144"; 1090 | } 1091 | .fa-ticket:before { 1092 | content: "\f145"; 1093 | } 1094 | .fa-minus-square:before { 1095 | content: "\f146"; 1096 | } 1097 | .fa-minus-square-o:before { 1098 | content: "\f147"; 1099 | } 1100 | .fa-level-up:before { 1101 | content: "\f148"; 1102 | } 1103 | .fa-level-down:before { 1104 | content: "\f149"; 1105 | } 1106 | .fa-check-square:before { 1107 | content: "\f14a"; 1108 | } 1109 | .fa-pencil-square:before { 1110 | content: "\f14b"; 1111 | } 1112 | .fa-external-link-square:before { 1113 | content: "\f14c"; 1114 | } 1115 | .fa-share-square:before { 1116 | content: "\f14d"; 1117 | } 1118 | .fa-compass:before { 1119 | content: "\f14e"; 1120 | } 1121 | .fa-toggle-down:before, 1122 | .fa-caret-square-o-down:before { 1123 | content: "\f150"; 1124 | } 1125 | .fa-toggle-up:before, 1126 | .fa-caret-square-o-up:before { 1127 | content: "\f151"; 1128 | } 1129 | .fa-toggle-right:before, 1130 | .fa-caret-square-o-right:before { 1131 | content: "\f152"; 1132 | } 1133 | .fa-euro:before, 1134 | .fa-eur:before { 1135 | content: "\f153"; 1136 | } 1137 | .fa-gbp:before { 1138 | content: "\f154"; 1139 | } 1140 | .fa-dollar:before, 1141 | .fa-usd:before { 1142 | content: "\f155"; 1143 | } 1144 | .fa-rupee:before, 1145 | .fa-inr:before { 1146 | content: "\f156"; 1147 | } 1148 | .fa-cny:before, 1149 | .fa-rmb:before, 1150 | .fa-yen:before, 1151 | .fa-jpy:before { 1152 | content: "\f157"; 1153 | } 1154 | .fa-ruble:before, 1155 | .fa-rouble:before, 1156 | .fa-rub:before { 1157 | content: "\f158"; 1158 | } 1159 | .fa-won:before, 1160 | .fa-krw:before { 1161 | content: "\f159"; 1162 | } 1163 | .fa-bitcoin:before, 1164 | .fa-btc:before { 1165 | content: "\f15a"; 1166 | } 1167 | .fa-file:before { 1168 | content: "\f15b"; 1169 | } 1170 | .fa-file-text:before { 1171 | content: "\f15c"; 1172 | } 1173 | .fa-sort-alpha-asc:before { 1174 | content: "\f15d"; 1175 | } 1176 | .fa-sort-alpha-desc:before { 1177 | content: "\f15e"; 1178 | } 1179 | .fa-sort-amount-asc:before { 1180 | content: "\f160"; 1181 | } 1182 | .fa-sort-amount-desc:before { 1183 | content: "\f161"; 1184 | } 1185 | .fa-sort-numeric-asc:before { 1186 | content: "\f162"; 1187 | } 1188 | .fa-sort-numeric-desc:before { 1189 | content: "\f163"; 1190 | } 1191 | .fa-thumbs-up:before { 1192 | content: "\f164"; 1193 | } 1194 | .fa-thumbs-down:before { 1195 | content: "\f165"; 1196 | } 1197 | .fa-youtube-square:before { 1198 | content: "\f166"; 1199 | } 1200 | .fa-youtube:before { 1201 | content: "\f167"; 1202 | } 1203 | .fa-xing:before { 1204 | content: "\f168"; 1205 | } 1206 | .fa-xing-square:before { 1207 | content: "\f169"; 1208 | } 1209 | .fa-youtube-play:before { 1210 | content: "\f16a"; 1211 | } 1212 | .fa-dropbox:before { 1213 | content: "\f16b"; 1214 | } 1215 | .fa-stack-overflow:before { 1216 | content: "\f16c"; 1217 | } 1218 | .fa-instagram:before { 1219 | content: "\f16d"; 1220 | } 1221 | .fa-flickr:before { 1222 | content: "\f16e"; 1223 | } 1224 | .fa-adn:before { 1225 | content: "\f170"; 1226 | } 1227 | .fa-bitbucket:before { 1228 | content: "\f171"; 1229 | } 1230 | .fa-bitbucket-square:before { 1231 | content: "\f172"; 1232 | } 1233 | .fa-tumblr:before { 1234 | content: "\f173"; 1235 | } 1236 | .fa-tumblr-square:before { 1237 | content: "\f174"; 1238 | } 1239 | .fa-long-arrow-down:before { 1240 | content: "\f175"; 1241 | } 1242 | .fa-long-arrow-up:before { 1243 | content: "\f176"; 1244 | } 1245 | .fa-long-arrow-left:before { 1246 | content: "\f177"; 1247 | } 1248 | .fa-long-arrow-right:before { 1249 | content: "\f178"; 1250 | } 1251 | .fa-apple:before { 1252 | content: "\f179"; 1253 | } 1254 | .fa-windows:before { 1255 | content: "\f17a"; 1256 | } 1257 | .fa-android:before { 1258 | content: "\f17b"; 1259 | } 1260 | .fa-linux:before { 1261 | content: "\f17c"; 1262 | } 1263 | .fa-dribbble:before { 1264 | content: "\f17d"; 1265 | } 1266 | .fa-skype:before { 1267 | content: "\f17e"; 1268 | } 1269 | .fa-foursquare:before { 1270 | content: "\f180"; 1271 | } 1272 | .fa-trello:before { 1273 | content: "\f181"; 1274 | } 1275 | .fa-female:before { 1276 | content: "\f182"; 1277 | } 1278 | .fa-male:before { 1279 | content: "\f183"; 1280 | } 1281 | .fa-gittip:before, 1282 | .fa-gratipay:before { 1283 | content: "\f184"; 1284 | } 1285 | .fa-sun-o:before { 1286 | content: "\f185"; 1287 | } 1288 | .fa-moon-o:before { 1289 | content: "\f186"; 1290 | } 1291 | .fa-archive:before { 1292 | content: "\f187"; 1293 | } 1294 | .fa-bug:before { 1295 | content: "\f188"; 1296 | } 1297 | .fa-vk:before { 1298 | content: "\f189"; 1299 | } 1300 | .fa-weibo:before { 1301 | content: "\f18a"; 1302 | } 1303 | .fa-renren:before { 1304 | content: "\f18b"; 1305 | } 1306 | .fa-pagelines:before { 1307 | content: "\f18c"; 1308 | } 1309 | .fa-stack-exchange:before { 1310 | content: "\f18d"; 1311 | } 1312 | .fa-arrow-circle-o-right:before { 1313 | content: "\f18e"; 1314 | } 1315 | .fa-arrow-circle-o-left:before { 1316 | content: "\f190"; 1317 | } 1318 | .fa-toggle-left:before, 1319 | .fa-caret-square-o-left:before { 1320 | content: "\f191"; 1321 | } 1322 | .fa-dot-circle-o:before { 1323 | content: "\f192"; 1324 | } 1325 | .fa-wheelchair:before { 1326 | content: "\f193"; 1327 | } 1328 | .fa-vimeo-square:before { 1329 | content: "\f194"; 1330 | } 1331 | .fa-turkish-lira:before, 1332 | .fa-try:before { 1333 | content: "\f195"; 1334 | } 1335 | .fa-plus-square-o:before { 1336 | content: "\f196"; 1337 | } 1338 | .fa-space-shuttle:before { 1339 | content: "\f197"; 1340 | } 1341 | .fa-slack:before { 1342 | content: "\f198"; 1343 | } 1344 | .fa-envelope-square:before { 1345 | content: "\f199"; 1346 | } 1347 | .fa-wordpress:before { 1348 | content: "\f19a"; 1349 | } 1350 | .fa-openid:before { 1351 | content: "\f19b"; 1352 | } 1353 | .fa-institution:before, 1354 | .fa-bank:before, 1355 | .fa-university:before { 1356 | content: "\f19c"; 1357 | } 1358 | .fa-mortar-board:before, 1359 | .fa-graduation-cap:before { 1360 | content: "\f19d"; 1361 | } 1362 | .fa-yahoo:before { 1363 | content: "\f19e"; 1364 | } 1365 | .fa-google:before { 1366 | content: "\f1a0"; 1367 | } 1368 | .fa-reddit:before { 1369 | content: "\f1a1"; 1370 | } 1371 | .fa-reddit-square:before { 1372 | content: "\f1a2"; 1373 | } 1374 | .fa-stumbleupon-circle:before { 1375 | content: "\f1a3"; 1376 | } 1377 | .fa-stumbleupon:before { 1378 | content: "\f1a4"; 1379 | } 1380 | .fa-delicious:before { 1381 | content: "\f1a5"; 1382 | } 1383 | .fa-digg:before { 1384 | content: "\f1a6"; 1385 | } 1386 | .fa-pied-piper-pp:before { 1387 | content: "\f1a7"; 1388 | } 1389 | .fa-pied-piper-alt:before { 1390 | content: "\f1a8"; 1391 | } 1392 | .fa-drupal:before { 1393 | content: "\f1a9"; 1394 | } 1395 | .fa-joomla:before { 1396 | content: "\f1aa"; 1397 | } 1398 | .fa-language:before { 1399 | content: "\f1ab"; 1400 | } 1401 | .fa-fax:before { 1402 | content: "\f1ac"; 1403 | } 1404 | .fa-building:before { 1405 | content: "\f1ad"; 1406 | } 1407 | .fa-child:before { 1408 | content: "\f1ae"; 1409 | } 1410 | .fa-paw:before { 1411 | content: "\f1b0"; 1412 | } 1413 | .fa-spoon:before { 1414 | content: "\f1b1"; 1415 | } 1416 | .fa-cube:before { 1417 | content: "\f1b2"; 1418 | } 1419 | .fa-cubes:before { 1420 | content: "\f1b3"; 1421 | } 1422 | .fa-behance:before { 1423 | content: "\f1b4"; 1424 | } 1425 | .fa-behance-square:before { 1426 | content: "\f1b5"; 1427 | } 1428 | .fa-steam:before { 1429 | content: "\f1b6"; 1430 | } 1431 | .fa-steam-square:before { 1432 | content: "\f1b7"; 1433 | } 1434 | .fa-recycle:before { 1435 | content: "\f1b8"; 1436 | } 1437 | .fa-automobile:before, 1438 | .fa-car:before { 1439 | content: "\f1b9"; 1440 | } 1441 | .fa-cab:before, 1442 | .fa-taxi:before { 1443 | content: "\f1ba"; 1444 | } 1445 | .fa-tree:before { 1446 | content: "\f1bb"; 1447 | } 1448 | .fa-spotify:before { 1449 | content: "\f1bc"; 1450 | } 1451 | .fa-deviantart:before { 1452 | content: "\f1bd"; 1453 | } 1454 | .fa-soundcloud:before { 1455 | content: "\f1be"; 1456 | } 1457 | .fa-database:before { 1458 | content: "\f1c0"; 1459 | } 1460 | .fa-file-pdf-o:before { 1461 | content: "\f1c1"; 1462 | } 1463 | .fa-file-word-o:before { 1464 | content: "\f1c2"; 1465 | } 1466 | .fa-file-excel-o:before { 1467 | content: "\f1c3"; 1468 | } 1469 | .fa-file-powerpoint-o:before { 1470 | content: "\f1c4"; 1471 | } 1472 | .fa-file-photo-o:before, 1473 | .fa-file-picture-o:before, 1474 | .fa-file-image-o:before { 1475 | content: "\f1c5"; 1476 | } 1477 | .fa-file-zip-o:before, 1478 | .fa-file-archive-o:before { 1479 | content: "\f1c6"; 1480 | } 1481 | .fa-file-sound-o:before, 1482 | .fa-file-audio-o:before { 1483 | content: "\f1c7"; 1484 | } 1485 | .fa-file-movie-o:before, 1486 | .fa-file-video-o:before { 1487 | content: "\f1c8"; 1488 | } 1489 | .fa-file-code-o:before { 1490 | content: "\f1c9"; 1491 | } 1492 | .fa-vine:before { 1493 | content: "\f1ca"; 1494 | } 1495 | .fa-codepen:before { 1496 | content: "\f1cb"; 1497 | } 1498 | .fa-jsfiddle:before { 1499 | content: "\f1cc"; 1500 | } 1501 | .fa-life-bouy:before, 1502 | .fa-life-buoy:before, 1503 | .fa-life-saver:before, 1504 | .fa-support:before, 1505 | .fa-life-ring:before { 1506 | content: "\f1cd"; 1507 | } 1508 | .fa-circle-o-notch:before { 1509 | content: "\f1ce"; 1510 | } 1511 | .fa-ra:before, 1512 | .fa-resistance:before, 1513 | .fa-rebel:before { 1514 | content: "\f1d0"; 1515 | } 1516 | .fa-ge:before, 1517 | .fa-empire:before { 1518 | content: "\f1d1"; 1519 | } 1520 | .fa-git-square:before { 1521 | content: "\f1d2"; 1522 | } 1523 | .fa-git:before { 1524 | content: "\f1d3"; 1525 | } 1526 | .fa-y-combinator-square:before, 1527 | .fa-yc-square:before, 1528 | .fa-hacker-news:before { 1529 | content: "\f1d4"; 1530 | } 1531 | .fa-tencent-weibo:before { 1532 | content: "\f1d5"; 1533 | } 1534 | .fa-qq:before { 1535 | content: "\f1d6"; 1536 | } 1537 | .fa-wechat:before, 1538 | .fa-weixin:before { 1539 | content: "\f1d7"; 1540 | } 1541 | .fa-send:before, 1542 | .fa-paper-plane:before { 1543 | content: "\f1d8"; 1544 | } 1545 | .fa-send-o:before, 1546 | .fa-paper-plane-o:before { 1547 | content: "\f1d9"; 1548 | } 1549 | .fa-history:before { 1550 | content: "\f1da"; 1551 | } 1552 | .fa-circle-thin:before { 1553 | content: "\f1db"; 1554 | } 1555 | .fa-header:before { 1556 | content: "\f1dc"; 1557 | } 1558 | .fa-paragraph:before { 1559 | content: "\f1dd"; 1560 | } 1561 | .fa-sliders:before { 1562 | content: "\f1de"; 1563 | } 1564 | .fa-share-alt:before { 1565 | content: "\f1e0"; 1566 | } 1567 | .fa-share-alt-square:before { 1568 | content: "\f1e1"; 1569 | } 1570 | .fa-bomb:before { 1571 | content: "\f1e2"; 1572 | } 1573 | .fa-soccer-ball-o:before, 1574 | .fa-futbol-o:before { 1575 | content: "\f1e3"; 1576 | } 1577 | .fa-tty:before { 1578 | content: "\f1e4"; 1579 | } 1580 | .fa-binoculars:before { 1581 | content: "\f1e5"; 1582 | } 1583 | .fa-plug:before { 1584 | content: "\f1e6"; 1585 | } 1586 | .fa-slideshare:before { 1587 | content: "\f1e7"; 1588 | } 1589 | .fa-twitch:before { 1590 | content: "\f1e8"; 1591 | } 1592 | .fa-yelp:before { 1593 | content: "\f1e9"; 1594 | } 1595 | .fa-newspaper-o:before { 1596 | content: "\f1ea"; 1597 | } 1598 | .fa-wifi:before { 1599 | content: "\f1eb"; 1600 | } 1601 | .fa-calculator:before { 1602 | content: "\f1ec"; 1603 | } 1604 | .fa-paypal:before { 1605 | content: "\f1ed"; 1606 | } 1607 | .fa-google-wallet:before { 1608 | content: "\f1ee"; 1609 | } 1610 | .fa-cc-visa:before { 1611 | content: "\f1f0"; 1612 | } 1613 | .fa-cc-mastercard:before { 1614 | content: "\f1f1"; 1615 | } 1616 | .fa-cc-discover:before { 1617 | content: "\f1f2"; 1618 | } 1619 | .fa-cc-amex:before { 1620 | content: "\f1f3"; 1621 | } 1622 | .fa-cc-paypal:before { 1623 | content: "\f1f4"; 1624 | } 1625 | .fa-cc-stripe:before { 1626 | content: "\f1f5"; 1627 | } 1628 | .fa-bell-slash:before { 1629 | content: "\f1f6"; 1630 | } 1631 | .fa-bell-slash-o:before { 1632 | content: "\f1f7"; 1633 | } 1634 | .fa-trash:before { 1635 | content: "\f1f8"; 1636 | } 1637 | .fa-copyright:before { 1638 | content: "\f1f9"; 1639 | } 1640 | .fa-at:before { 1641 | content: "\f1fa"; 1642 | } 1643 | .fa-eyedropper:before { 1644 | content: "\f1fb"; 1645 | } 1646 | .fa-paint-brush:before { 1647 | content: "\f1fc"; 1648 | } 1649 | .fa-birthday-cake:before { 1650 | content: "\f1fd"; 1651 | } 1652 | .fa-area-chart:before { 1653 | content: "\f1fe"; 1654 | } 1655 | .fa-pie-chart:before { 1656 | content: "\f200"; 1657 | } 1658 | .fa-line-chart:before { 1659 | content: "\f201"; 1660 | } 1661 | .fa-lastfm:before { 1662 | content: "\f202"; 1663 | } 1664 | .fa-lastfm-square:before { 1665 | content: "\f203"; 1666 | } 1667 | .fa-toggle-off:before { 1668 | content: "\f204"; 1669 | } 1670 | .fa-toggle-on:before { 1671 | content: "\f205"; 1672 | } 1673 | .fa-bicycle:before { 1674 | content: "\f206"; 1675 | } 1676 | .fa-bus:before { 1677 | content: "\f207"; 1678 | } 1679 | .fa-ioxhost:before { 1680 | content: "\f208"; 1681 | } 1682 | .fa-angellist:before { 1683 | content: "\f209"; 1684 | } 1685 | .fa-cc:before { 1686 | content: "\f20a"; 1687 | } 1688 | .fa-shekel:before, 1689 | .fa-sheqel:before, 1690 | .fa-ils:before { 1691 | content: "\f20b"; 1692 | } 1693 | .fa-meanpath:before { 1694 | content: "\f20c"; 1695 | } 1696 | .fa-buysellads:before { 1697 | content: "\f20d"; 1698 | } 1699 | .fa-connectdevelop:before { 1700 | content: "\f20e"; 1701 | } 1702 | .fa-dashcube:before { 1703 | content: "\f210"; 1704 | } 1705 | .fa-forumbee:before { 1706 | content: "\f211"; 1707 | } 1708 | .fa-leanpub:before { 1709 | content: "\f212"; 1710 | } 1711 | .fa-sellsy:before { 1712 | content: "\f213"; 1713 | } 1714 | .fa-shirtsinbulk:before { 1715 | content: "\f214"; 1716 | } 1717 | .fa-simplybuilt:before { 1718 | content: "\f215"; 1719 | } 1720 | .fa-skyatlas:before { 1721 | content: "\f216"; 1722 | } 1723 | .fa-cart-plus:before { 1724 | content: "\f217"; 1725 | } 1726 | .fa-cart-arrow-down:before { 1727 | content: "\f218"; 1728 | } 1729 | .fa-diamond:before { 1730 | content: "\f219"; 1731 | } 1732 | .fa-ship:before { 1733 | content: "\f21a"; 1734 | } 1735 | .fa-user-secret:before { 1736 | content: "\f21b"; 1737 | } 1738 | .fa-motorcycle:before { 1739 | content: "\f21c"; 1740 | } 1741 | .fa-street-view:before { 1742 | content: "\f21d"; 1743 | } 1744 | .fa-heartbeat:before { 1745 | content: "\f21e"; 1746 | } 1747 | .fa-venus:before { 1748 | content: "\f221"; 1749 | } 1750 | .fa-mars:before { 1751 | content: "\f222"; 1752 | } 1753 | .fa-mercury:before { 1754 | content: "\f223"; 1755 | } 1756 | .fa-intersex:before, 1757 | .fa-transgender:before { 1758 | content: "\f224"; 1759 | } 1760 | .fa-transgender-alt:before { 1761 | content: "\f225"; 1762 | } 1763 | .fa-venus-double:before { 1764 | content: "\f226"; 1765 | } 1766 | .fa-mars-double:before { 1767 | content: "\f227"; 1768 | } 1769 | .fa-venus-mars:before { 1770 | content: "\f228"; 1771 | } 1772 | .fa-mars-stroke:before { 1773 | content: "\f229"; 1774 | } 1775 | .fa-mars-stroke-v:before { 1776 | content: "\f22a"; 1777 | } 1778 | .fa-mars-stroke-h:before { 1779 | content: "\f22b"; 1780 | } 1781 | .fa-neuter:before { 1782 | content: "\f22c"; 1783 | } 1784 | .fa-genderless:before { 1785 | content: "\f22d"; 1786 | } 1787 | .fa-facebook-official:before { 1788 | content: "\f230"; 1789 | } 1790 | .fa-pinterest-p:before { 1791 | content: "\f231"; 1792 | } 1793 | .fa-whatsapp:before { 1794 | content: "\f232"; 1795 | } 1796 | .fa-server:before { 1797 | content: "\f233"; 1798 | } 1799 | .fa-user-plus:before { 1800 | content: "\f234"; 1801 | } 1802 | .fa-user-times:before { 1803 | content: "\f235"; 1804 | } 1805 | .fa-hotel:before, 1806 | .fa-bed:before { 1807 | content: "\f236"; 1808 | } 1809 | .fa-viacoin:before { 1810 | content: "\f237"; 1811 | } 1812 | .fa-train:before { 1813 | content: "\f238"; 1814 | } 1815 | .fa-subway:before { 1816 | content: "\f239"; 1817 | } 1818 | .fa-medium:before { 1819 | content: "\f23a"; 1820 | } 1821 | .fa-yc:before, 1822 | .fa-y-combinator:before { 1823 | content: "\f23b"; 1824 | } 1825 | .fa-optin-monster:before { 1826 | content: "\f23c"; 1827 | } 1828 | .fa-opencart:before { 1829 | content: "\f23d"; 1830 | } 1831 | .fa-expeditedssl:before { 1832 | content: "\f23e"; 1833 | } 1834 | .fa-battery-4:before, 1835 | .fa-battery-full:before { 1836 | content: "\f240"; 1837 | } 1838 | .fa-battery-3:before, 1839 | .fa-battery-three-quarters:before { 1840 | content: "\f241"; 1841 | } 1842 | .fa-battery-2:before, 1843 | .fa-battery-half:before { 1844 | content: "\f242"; 1845 | } 1846 | .fa-battery-1:before, 1847 | .fa-battery-quarter:before { 1848 | content: "\f243"; 1849 | } 1850 | .fa-battery-0:before, 1851 | .fa-battery-empty:before { 1852 | content: "\f244"; 1853 | } 1854 | .fa-mouse-pointer:before { 1855 | content: "\f245"; 1856 | } 1857 | .fa-i-cursor:before { 1858 | content: "\f246"; 1859 | } 1860 | .fa-object-group:before { 1861 | content: "\f247"; 1862 | } 1863 | .fa-object-ungroup:before { 1864 | content: "\f248"; 1865 | } 1866 | .fa-sticky-note:before { 1867 | content: "\f249"; 1868 | } 1869 | .fa-sticky-note-o:before { 1870 | content: "\f24a"; 1871 | } 1872 | .fa-cc-jcb:before { 1873 | content: "\f24b"; 1874 | } 1875 | .fa-cc-diners-club:before { 1876 | content: "\f24c"; 1877 | } 1878 | .fa-clone:before { 1879 | content: "\f24d"; 1880 | } 1881 | .fa-balance-scale:before { 1882 | content: "\f24e"; 1883 | } 1884 | .fa-hourglass-o:before { 1885 | content: "\f250"; 1886 | } 1887 | .fa-hourglass-1:before, 1888 | .fa-hourglass-start:before { 1889 | content: "\f251"; 1890 | } 1891 | .fa-hourglass-2:before, 1892 | .fa-hourglass-half:before { 1893 | content: "\f252"; 1894 | } 1895 | .fa-hourglass-3:before, 1896 | .fa-hourglass-end:before { 1897 | content: "\f253"; 1898 | } 1899 | .fa-hourglass:before { 1900 | content: "\f254"; 1901 | } 1902 | .fa-hand-grab-o:before, 1903 | .fa-hand-rock-o:before { 1904 | content: "\f255"; 1905 | } 1906 | .fa-hand-stop-o:before, 1907 | .fa-hand-paper-o:before { 1908 | content: "\f256"; 1909 | } 1910 | .fa-hand-scissors-o:before { 1911 | content: "\f257"; 1912 | } 1913 | .fa-hand-lizard-o:before { 1914 | content: "\f258"; 1915 | } 1916 | .fa-hand-spock-o:before { 1917 | content: "\f259"; 1918 | } 1919 | .fa-hand-pointer-o:before { 1920 | content: "\f25a"; 1921 | } 1922 | .fa-hand-peace-o:before { 1923 | content: "\f25b"; 1924 | } 1925 | .fa-trademark:before { 1926 | content: "\f25c"; 1927 | } 1928 | .fa-registered:before { 1929 | content: "\f25d"; 1930 | } 1931 | .fa-creative-commons:before { 1932 | content: "\f25e"; 1933 | } 1934 | .fa-gg:before { 1935 | content: "\f260"; 1936 | } 1937 | .fa-gg-circle:before { 1938 | content: "\f261"; 1939 | } 1940 | .fa-tripadvisor:before { 1941 | content: "\f262"; 1942 | } 1943 | .fa-odnoklassniki:before { 1944 | content: "\f263"; 1945 | } 1946 | .fa-odnoklassniki-square:before { 1947 | content: "\f264"; 1948 | } 1949 | .fa-get-pocket:before { 1950 | content: "\f265"; 1951 | } 1952 | .fa-wikipedia-w:before { 1953 | content: "\f266"; 1954 | } 1955 | .fa-safari:before { 1956 | content: "\f267"; 1957 | } 1958 | .fa-chrome:before { 1959 | content: "\f268"; 1960 | } 1961 | .fa-firefox:before { 1962 | content: "\f269"; 1963 | } 1964 | .fa-opera:before { 1965 | content: "\f26a"; 1966 | } 1967 | .fa-internet-explorer:before { 1968 | content: "\f26b"; 1969 | } 1970 | .fa-tv:before, 1971 | .fa-television:before { 1972 | content: "\f26c"; 1973 | } 1974 | .fa-contao:before { 1975 | content: "\f26d"; 1976 | } 1977 | .fa-500px:before { 1978 | content: "\f26e"; 1979 | } 1980 | .fa-amazon:before { 1981 | content: "\f270"; 1982 | } 1983 | .fa-calendar-plus-o:before { 1984 | content: "\f271"; 1985 | } 1986 | .fa-calendar-minus-o:before { 1987 | content: "\f272"; 1988 | } 1989 | .fa-calendar-times-o:before { 1990 | content: "\f273"; 1991 | } 1992 | .fa-calendar-check-o:before { 1993 | content: "\f274"; 1994 | } 1995 | .fa-industry:before { 1996 | content: "\f275"; 1997 | } 1998 | .fa-map-pin:before { 1999 | content: "\f276"; 2000 | } 2001 | .fa-map-signs:before { 2002 | content: "\f277"; 2003 | } 2004 | .fa-map-o:before { 2005 | content: "\f278"; 2006 | } 2007 | .fa-map:before { 2008 | content: "\f279"; 2009 | } 2010 | .fa-commenting:before { 2011 | content: "\f27a"; 2012 | } 2013 | .fa-commenting-o:before { 2014 | content: "\f27b"; 2015 | } 2016 | .fa-houzz:before { 2017 | content: "\f27c"; 2018 | } 2019 | .fa-vimeo:before { 2020 | content: "\f27d"; 2021 | } 2022 | .fa-black-tie:before { 2023 | content: "\f27e"; 2024 | } 2025 | .fa-fonticons:before { 2026 | content: "\f280"; 2027 | } 2028 | .fa-reddit-alien:before { 2029 | content: "\f281"; 2030 | } 2031 | .fa-edge:before { 2032 | content: "\f282"; 2033 | } 2034 | .fa-credit-card-alt:before { 2035 | content: "\f283"; 2036 | } 2037 | .fa-codiepie:before { 2038 | content: "\f284"; 2039 | } 2040 | .fa-modx:before { 2041 | content: "\f285"; 2042 | } 2043 | .fa-fort-awesome:before { 2044 | content: "\f286"; 2045 | } 2046 | .fa-usb:before { 2047 | content: "\f287"; 2048 | } 2049 | .fa-product-hunt:before { 2050 | content: "\f288"; 2051 | } 2052 | .fa-mixcloud:before { 2053 | content: "\f289"; 2054 | } 2055 | .fa-scribd:before { 2056 | content: "\f28a"; 2057 | } 2058 | .fa-pause-circle:before { 2059 | content: "\f28b"; 2060 | } 2061 | .fa-pause-circle-o:before { 2062 | content: "\f28c"; 2063 | } 2064 | .fa-stop-circle:before { 2065 | content: "\f28d"; 2066 | } 2067 | .fa-stop-circle-o:before { 2068 | content: "\f28e"; 2069 | } 2070 | .fa-shopping-bag:before { 2071 | content: "\f290"; 2072 | } 2073 | .fa-shopping-basket:before { 2074 | content: "\f291"; 2075 | } 2076 | .fa-hashtag:before { 2077 | content: "\f292"; 2078 | } 2079 | .fa-bluetooth:before { 2080 | content: "\f293"; 2081 | } 2082 | .fa-bluetooth-b:before { 2083 | content: "\f294"; 2084 | } 2085 | .fa-percent:before { 2086 | content: "\f295"; 2087 | } 2088 | .fa-gitlab:before { 2089 | content: "\f296"; 2090 | } 2091 | .fa-wpbeginner:before { 2092 | content: "\f297"; 2093 | } 2094 | .fa-wpforms:before { 2095 | content: "\f298"; 2096 | } 2097 | .fa-envira:before { 2098 | content: "\f299"; 2099 | } 2100 | .fa-universal-access:before { 2101 | content: "\f29a"; 2102 | } 2103 | .fa-wheelchair-alt:before { 2104 | content: "\f29b"; 2105 | } 2106 | .fa-question-circle-o:before { 2107 | content: "\f29c"; 2108 | } 2109 | .fa-blind:before { 2110 | content: "\f29d"; 2111 | } 2112 | .fa-audio-description:before { 2113 | content: "\f29e"; 2114 | } 2115 | .fa-volume-control-phone:before { 2116 | content: "\f2a0"; 2117 | } 2118 | .fa-braille:before { 2119 | content: "\f2a1"; 2120 | } 2121 | .fa-assistive-listening-systems:before { 2122 | content: "\f2a2"; 2123 | } 2124 | .fa-asl-interpreting:before, 2125 | .fa-american-sign-language-interpreting:before { 2126 | content: "\f2a3"; 2127 | } 2128 | .fa-deafness:before, 2129 | .fa-hard-of-hearing:before, 2130 | .fa-deaf:before { 2131 | content: "\f2a4"; 2132 | } 2133 | .fa-glide:before { 2134 | content: "\f2a5"; 2135 | } 2136 | .fa-glide-g:before { 2137 | content: "\f2a6"; 2138 | } 2139 | .fa-signing:before, 2140 | .fa-sign-language:before { 2141 | content: "\f2a7"; 2142 | } 2143 | .fa-low-vision:before { 2144 | content: "\f2a8"; 2145 | } 2146 | .fa-viadeo:before { 2147 | content: "\f2a9"; 2148 | } 2149 | .fa-viadeo-square:before { 2150 | content: "\f2aa"; 2151 | } 2152 | .fa-snapchat:before { 2153 | content: "\f2ab"; 2154 | } 2155 | .fa-snapchat-ghost:before { 2156 | content: "\f2ac"; 2157 | } 2158 | .fa-snapchat-square:before { 2159 | content: "\f2ad"; 2160 | } 2161 | .fa-pied-piper:before { 2162 | content: "\f2ae"; 2163 | } 2164 | .fa-first-order:before { 2165 | content: "\f2b0"; 2166 | } 2167 | .fa-yoast:before { 2168 | content: "\f2b1"; 2169 | } 2170 | .fa-themeisle:before { 2171 | content: "\f2b2"; 2172 | } 2173 | .fa-google-plus-circle:before, 2174 | .fa-google-plus-official:before { 2175 | content: "\f2b3"; 2176 | } 2177 | .fa-fa:before, 2178 | .fa-font-awesome:before { 2179 | content: "\f2b4"; 2180 | } 2181 | .sr-only { 2182 | position: absolute; 2183 | width: 1px; 2184 | height: 1px; 2185 | padding: 0; 2186 | margin: -1px; 2187 | overflow: hidden; 2188 | clip: rect(0, 0, 0, 0); 2189 | border: 0; 2190 | } 2191 | .sr-only-focusable:active, 2192 | .sr-only-focusable:focus { 2193 | position: static; 2194 | width: auto; 2195 | height: auto; 2196 | margin: 0; 2197 | overflow: visible; 2198 | clip: auto; 2199 | } 2200 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Angular 2 Click To Edit 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | Loading... 23 | 24 | -------------------------------------------------------------------------------- /examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular2-quickstart", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", 6 | "lite": "lite-server", 7 | "postinstall": "typings install", 8 | "tsc": "tsc", 9 | "tsc:w": "tsc -w", 10 | "typings": "typings" 11 | }, 12 | "license": "ISC", 13 | "dependencies": { 14 | "@angular/common": "2.0.0-rc.3", 15 | "@angular/compiler": "2.0.0-rc.3", 16 | "@angular/core": "2.0.0-rc.3", 17 | "@angular/forms": "0.1.1", 18 | "@angular/http": "2.0.0-rc.3", 19 | "@angular/platform-browser": "2.0.0-rc.3", 20 | "@angular/platform-browser-dynamic": "2.0.0-rc.3", 21 | "@angular/router": "3.0.0-alpha.7", 22 | "@angular/router-deprecated": "2.0.0-rc.2", 23 | "@angular/upgrade": "2.0.0-rc.3", 24 | "systemjs": "0.19.27", 25 | "core-js": "^2.4.0", 26 | "reflect-metadata": "^0.1.3", 27 | "rxjs": "5.0.0-beta.6", 28 | "zone.js": "^0.6.12", 29 | "angular2-in-memory-web-api": "0.0.12", 30 | "bootstrap": "^3.3.6", 31 | "angular2-click-to-edit": "^1.0.11" 32 | }, 33 | "devDependencies": { 34 | "concurrently": "^2.0.0", 35 | "lite-server": "^2.2.0", 36 | "typescript": "^1.8.10", 37 | "typings":"^1.0.4" 38 | } 39 | } -------------------------------------------------------------------------------- /examples/systemjs.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * System configuration for Angular 2 samples 3 | * Adjust as necessary for your application needs. 4 | */ 5 | (function (global) { 6 | // map tells the System loader where to look for things 7 | var map = { 8 | 'app': 'app', // 'dist', 9 | '@angular': 'node_modules/@angular', 10 | 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api', 11 | 'rxjs': 'node_modules/rxjs', 12 | 'angular2-click-to-edit': 'node_modules/angular2-click-to-edit' 13 | }; 14 | // packages tells the System loader how to load when no filename and/or no extension 15 | var packages = { 16 | 'app': { main: 'main.js', defaultExtension: 'js' }, 17 | 'rxjs': { defaultExtension: 'js' }, 18 | 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' }, 19 | 'angular2-click-to-edit': { 20 | main: 'index' 21 | } 22 | }; 23 | var ngPackageNames = [ 24 | 'common', 25 | 'compiler', 26 | 'core', 27 | 'forms', 28 | 'http', 29 | 'platform-browser', 30 | 'platform-browser-dynamic', 31 | 'router', 32 | 'router-deprecated', 33 | 'upgrade', 34 | ]; 35 | // Individual files (~300 requests): 36 | function packIndex(pkgName) { 37 | packages['@angular/' + pkgName] = { main: 'index.js', defaultExtension: 'js' }; 38 | } 39 | // Bundled (~40 requests): 40 | function packUmd(pkgName) { 41 | packages['@angular/' + pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; 42 | } 43 | // Most environments should use UMD; some (Karma) need the individual index files 44 | var setPackageConfig = System.packageWithIndex ? packIndex : packUmd; 45 | // Add package entries for angular packages 46 | ngPackageNames.forEach(setPackageConfig); 47 | var config = { 48 | map: map, 49 | packages: packages 50 | }; 51 | System.config(config); 52 | })(this); -------------------------------------------------------------------------------- /examples/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "removeComments": false, 10 | "noImplicitAny": false 11 | } 12 | } -------------------------------------------------------------------------------- /examples/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDependencies": { 3 | "core-js": "registry:dt/core-js#0.0.0+20160602141332", 4 | "jasmine": "registry:dt/jasmine#2.2.0+20160621224255", 5 | "node": "registry:dt/node#6.0.0+20160621231320" 6 | } 7 | } -------------------------------------------------------------------------------- /examples/typings/globals/core-js/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/95e782233e8e203a0b9283c3a7031faee428a530/core-js/core-js.d.ts", 5 | "raw": "registry:dt/core-js#0.0.0+20160602141332", 6 | "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/95e782233e8e203a0b9283c3a7031faee428a530/core-js/core-js.d.ts" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/typings/globals/jasmine/index.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by typings 2 | // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c49913aa9ea419ea46c1c684e488cf2a10303b1a/jasmine/jasmine.d.ts 3 | declare function describe(description: string, specDefinitions: () => void): void; 4 | declare function fdescribe(description: string, specDefinitions: () => void): void; 5 | declare function xdescribe(description: string, specDefinitions: () => void): void; 6 | 7 | declare function it(expectation: string, assertion?: () => void, timeout?: number): void; 8 | declare function it(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; 9 | declare function fit(expectation: string, assertion?: () => void, timeout?: number): void; 10 | declare function fit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; 11 | declare function xit(expectation: string, assertion?: () => void, timeout?: number): void; 12 | declare function xit(expectation: string, assertion?: (done: DoneFn) => void, timeout?: number): void; 13 | 14 | /** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */ 15 | declare function pending(reason?: string): void; 16 | 17 | declare function beforeEach(action: () => void, timeout?: number): void; 18 | declare function beforeEach(action: (done: DoneFn) => void, timeout?: number): void; 19 | declare function afterEach(action: () => void, timeout?: number): void; 20 | declare function afterEach(action: (done: DoneFn) => void, timeout?: number): void; 21 | 22 | declare function beforeAll(action: () => void, timeout?: number): void; 23 | declare function beforeAll(action: (done: DoneFn) => void, timeout?: number): void; 24 | declare function afterAll(action: () => void, timeout?: number): void; 25 | declare function afterAll(action: (done: DoneFn) => void, timeout?: number): void; 26 | 27 | declare function expect(spy: Function): jasmine.Matchers; 28 | declare function expect(actual: any): jasmine.Matchers; 29 | 30 | declare function fail(e?: any): void; 31 | /** Action method that should be called when the async work is complete */ 32 | interface DoneFn extends Function { 33 | (): void; 34 | 35 | /** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */ 36 | fail: (message?: Error|string) => void; 37 | } 38 | 39 | declare function spyOn(object: any, method: string): jasmine.Spy; 40 | 41 | declare function runs(asyncMethod: Function): void; 42 | declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void; 43 | declare function waits(timeout?: number): void; 44 | 45 | declare namespace jasmine { 46 | 47 | var clock: () => Clock; 48 | 49 | function any(aclass: any): Any; 50 | function anything(): Any; 51 | function arrayContaining(sample: any[]): ArrayContaining; 52 | function objectContaining(sample: any): ObjectContaining; 53 | function createSpy(name: string, originalFn?: Function): Spy; 54 | function createSpyObj(baseName: string, methodNames: any[]): any; 55 | function createSpyObj(baseName: string, methodNames: any[]): T; 56 | function pp(value: any): string; 57 | function getEnv(): Env; 58 | function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; 59 | function addMatchers(matchers: CustomMatcherFactories): void; 60 | function stringMatching(str: string): Any; 61 | function stringMatching(str: RegExp): Any; 62 | 63 | interface Any { 64 | 65 | new (expectedClass: any): any; 66 | 67 | jasmineMatches(other: any): boolean; 68 | jasmineToString(): string; 69 | } 70 | 71 | // taken from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains() 72 | interface ArrayLike { 73 | length: number; 74 | [n: number]: T; 75 | } 76 | 77 | interface ArrayContaining { 78 | new (sample: any[]): any; 79 | 80 | asymmetricMatch(other: any): boolean; 81 | jasmineToString(): string; 82 | } 83 | 84 | interface ObjectContaining { 85 | new (sample: any): any; 86 | 87 | jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; 88 | jasmineToString(): string; 89 | } 90 | 91 | interface Block { 92 | 93 | new (env: Env, func: SpecFunction, spec: Spec): any; 94 | 95 | execute(onComplete: () => void): void; 96 | } 97 | 98 | interface WaitsBlock extends Block { 99 | new (env: Env, timeout: number, spec: Spec): any; 100 | } 101 | 102 | interface WaitsForBlock extends Block { 103 | new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any; 104 | } 105 | 106 | interface Clock { 107 | install(): void; 108 | uninstall(): void; 109 | /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */ 110 | tick(ms: number): void; 111 | mockDate(date?: Date): void; 112 | } 113 | 114 | interface CustomEqualityTester { 115 | (first: any, second: any): boolean; 116 | } 117 | 118 | interface CustomMatcher { 119 | compare(actual: T, expected: T): CustomMatcherResult; 120 | compare(actual: any, expected: any): CustomMatcherResult; 121 | } 122 | 123 | interface CustomMatcherFactory { 124 | (util: MatchersUtil, customEqualityTesters: Array): CustomMatcher; 125 | } 126 | 127 | interface CustomMatcherFactories { 128 | [index: string]: CustomMatcherFactory; 129 | } 130 | 131 | interface CustomMatcherResult { 132 | pass: boolean; 133 | message?: string; 134 | } 135 | 136 | interface MatchersUtil { 137 | equals(a: any, b: any, customTesters?: Array): boolean; 138 | contains(haystack: ArrayLike | string, needle: any, customTesters?: Array): boolean; 139 | buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array): string; 140 | } 141 | 142 | interface Env { 143 | setTimeout: any; 144 | clearTimeout: void; 145 | setInterval: any; 146 | clearInterval: void; 147 | updateInterval: number; 148 | 149 | currentSpec: Spec; 150 | 151 | matchersClass: Matchers; 152 | 153 | version(): any; 154 | versionString(): string; 155 | nextSpecId(): number; 156 | addReporter(reporter: Reporter): void; 157 | execute(): void; 158 | describe(description: string, specDefinitions: () => void): Suite; 159 | // ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these 160 | beforeEach(beforeEachFunction: () => void): void; 161 | beforeAll(beforeAllFunction: () => void): void; 162 | currentRunner(): Runner; 163 | afterEach(afterEachFunction: () => void): void; 164 | afterAll(afterAllFunction: () => void): void; 165 | xdescribe(desc: string, specDefinitions: () => void): XSuite; 166 | it(description: string, func: () => void): Spec; 167 | // iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these 168 | xit(desc: string, func: () => void): XSpec; 169 | compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean; 170 | compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean; 171 | equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean; 172 | contains_(haystack: any, needle: any): boolean; 173 | addCustomEqualityTester(equalityTester: CustomEqualityTester): void; 174 | addMatchers(matchers: CustomMatcherFactories): void; 175 | specFilter(spec: Spec): boolean; 176 | throwOnExpectationFailure(value: boolean): void; 177 | } 178 | 179 | interface FakeTimer { 180 | 181 | new (): any; 182 | 183 | reset(): void; 184 | tick(millis: number): void; 185 | runFunctionsWithinRange(oldMillis: number, nowMillis: number): void; 186 | scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void; 187 | } 188 | 189 | interface HtmlReporter { 190 | new (): any; 191 | } 192 | 193 | interface HtmlSpecFilter { 194 | new (): any; 195 | } 196 | 197 | interface Result { 198 | type: string; 199 | } 200 | 201 | interface NestedResults extends Result { 202 | description: string; 203 | 204 | totalCount: number; 205 | passedCount: number; 206 | failedCount: number; 207 | 208 | skipped: boolean; 209 | 210 | rollupCounts(result: NestedResults): void; 211 | log(values: any): void; 212 | getItems(): Result[]; 213 | addResult(result: Result): void; 214 | passed(): boolean; 215 | } 216 | 217 | interface MessageResult extends Result { 218 | values: any; 219 | trace: Trace; 220 | } 221 | 222 | interface ExpectationResult extends Result { 223 | matcherName: string; 224 | passed(): boolean; 225 | expected: any; 226 | actual: any; 227 | message: string; 228 | trace: Trace; 229 | } 230 | 231 | interface Trace { 232 | name: string; 233 | message: string; 234 | stack: any; 235 | } 236 | 237 | interface PrettyPrinter { 238 | 239 | new (): any; 240 | 241 | format(value: any): void; 242 | iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void; 243 | emitScalar(value: any): void; 244 | emitString(value: string): void; 245 | emitArray(array: any[]): void; 246 | emitObject(obj: any): void; 247 | append(value: any): void; 248 | } 249 | 250 | interface StringPrettyPrinter extends PrettyPrinter { 251 | } 252 | 253 | interface Queue { 254 | 255 | new (env: any): any; 256 | 257 | env: Env; 258 | ensured: boolean[]; 259 | blocks: Block[]; 260 | running: boolean; 261 | index: number; 262 | offset: number; 263 | abort: boolean; 264 | 265 | addBefore(block: Block, ensure?: boolean): void; 266 | add(block: any, ensure?: boolean): void; 267 | insertNext(block: any, ensure?: boolean): void; 268 | start(onComplete?: () => void): void; 269 | isRunning(): boolean; 270 | next_(): void; 271 | results(): NestedResults; 272 | } 273 | 274 | interface Matchers { 275 | 276 | new (env: Env, actual: any, spec: Env, isNot?: boolean): any; 277 | 278 | env: Env; 279 | actual: any; 280 | spec: Env; 281 | isNot?: boolean; 282 | message(): any; 283 | 284 | toBe(expected: any, expectationFailOutput?: any): boolean; 285 | toEqual(expected: any, expectationFailOutput?: any): boolean; 286 | toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean; 287 | toBeDefined(expectationFailOutput?: any): boolean; 288 | toBeUndefined(expectationFailOutput?: any): boolean; 289 | toBeNull(expectationFailOutput?: any): boolean; 290 | toBeNaN(): boolean; 291 | toBeTruthy(expectationFailOutput?: any): boolean; 292 | toBeFalsy(expectationFailOutput?: any): boolean; 293 | toHaveBeenCalled(): boolean; 294 | toHaveBeenCalledWith(...params: any[]): boolean; 295 | toHaveBeenCalledTimes(expected: number): boolean; 296 | toContain(expected: any, expectationFailOutput?: any): boolean; 297 | toBeLessThan(expected: number, expectationFailOutput?: any): boolean; 298 | toBeGreaterThan(expected: number, expectationFailOutput?: any): boolean; 299 | toBeCloseTo(expected: number, precision?: any, expectationFailOutput?: any): boolean; 300 | toThrow(expected?: any): boolean; 301 | toThrowError(message?: string | RegExp): boolean; 302 | toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean; 303 | not: Matchers; 304 | 305 | Any: Any; 306 | } 307 | 308 | interface Reporter { 309 | reportRunnerStarting(runner: Runner): void; 310 | reportRunnerResults(runner: Runner): void; 311 | reportSuiteResults(suite: Suite): void; 312 | reportSpecStarting(spec: Spec): void; 313 | reportSpecResults(spec: Spec): void; 314 | log(str: string): void; 315 | } 316 | 317 | interface MultiReporter extends Reporter { 318 | addReporter(reporter: Reporter): void; 319 | } 320 | 321 | interface Runner { 322 | 323 | new (env: Env): any; 324 | 325 | execute(): void; 326 | beforeEach(beforeEachFunction: SpecFunction): void; 327 | afterEach(afterEachFunction: SpecFunction): void; 328 | beforeAll(beforeAllFunction: SpecFunction): void; 329 | afterAll(afterAllFunction: SpecFunction): void; 330 | finishCallback(): void; 331 | addSuite(suite: Suite): void; 332 | add(block: Block): void; 333 | specs(): Spec[]; 334 | suites(): Suite[]; 335 | topLevelSuites(): Suite[]; 336 | results(): NestedResults; 337 | } 338 | 339 | interface SpecFunction { 340 | (spec?: Spec): void; 341 | } 342 | 343 | interface SuiteOrSpec { 344 | id: number; 345 | env: Env; 346 | description: string; 347 | queue: Queue; 348 | } 349 | 350 | interface Spec extends SuiteOrSpec { 351 | 352 | new (env: Env, suite: Suite, description: string): any; 353 | 354 | suite: Suite; 355 | 356 | afterCallbacks: SpecFunction[]; 357 | spies_: Spy[]; 358 | 359 | results_: NestedResults; 360 | matchersClass: Matchers; 361 | 362 | getFullName(): string; 363 | results(): NestedResults; 364 | log(arguments: any): any; 365 | runs(func: SpecFunction): Spec; 366 | addToQueue(block: Block): void; 367 | addMatcherResult(result: Result): void; 368 | expect(actual: any): any; 369 | waits(timeout: number): Spec; 370 | waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec; 371 | fail(e?: any): void; 372 | getMatchersClass_(): Matchers; 373 | addMatchers(matchersPrototype: CustomMatcherFactories): void; 374 | finishCallback(): void; 375 | finish(onComplete?: () => void): void; 376 | after(doAfter: SpecFunction): void; 377 | execute(onComplete?: () => void): any; 378 | addBeforesAndAftersToQueue(): void; 379 | explodes(): void; 380 | spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; 381 | removeAllSpies(): void; 382 | } 383 | 384 | interface XSpec { 385 | id: number; 386 | runs(): void; 387 | } 388 | 389 | interface Suite extends SuiteOrSpec { 390 | 391 | new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any; 392 | 393 | parentSuite: Suite; 394 | 395 | getFullName(): string; 396 | finish(onComplete?: () => void): void; 397 | beforeEach(beforeEachFunction: SpecFunction): void; 398 | afterEach(afterEachFunction: SpecFunction): void; 399 | beforeAll(beforeAllFunction: SpecFunction): void; 400 | afterAll(afterAllFunction: SpecFunction): void; 401 | results(): NestedResults; 402 | add(suiteOrSpec: SuiteOrSpec): void; 403 | specs(): Spec[]; 404 | suites(): Suite[]; 405 | children(): any[]; 406 | execute(onComplete?: () => void): void; 407 | } 408 | 409 | interface XSuite { 410 | execute(): void; 411 | } 412 | 413 | interface Spy { 414 | (...params: any[]): any; 415 | 416 | identity: string; 417 | and: SpyAnd; 418 | calls: Calls; 419 | mostRecentCall: { args: any[]; }; 420 | argsForCall: any[]; 421 | wasCalled: boolean; 422 | } 423 | 424 | interface SpyAnd { 425 | /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */ 426 | callThrough(): Spy; 427 | /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */ 428 | returnValue(val: any): Spy; 429 | /** By chaining the spy with and.returnValues, all calls to the function will return specific values in order until it reaches the end of the return values list. */ 430 | returnValues(...values: any[]): Spy; 431 | /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ 432 | callFake(fn: Function): Spy; 433 | /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ 434 | throwError(msg: string): Spy; 435 | /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ 436 | stub(): Spy; 437 | } 438 | 439 | interface Calls { 440 | /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/ 441 | any(): boolean; 442 | /** By chaining the spy with calls.count(), will return the number of times the spy was called **/ 443 | count(): number; 444 | /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/ 445 | argsFor(index: number): any[]; 446 | /** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/ 447 | allArgs(): any[]; 448 | /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/ 449 | all(): CallInfo[]; 450 | /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/ 451 | mostRecent(): CallInfo; 452 | /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/ 453 | first(): CallInfo; 454 | /** By chaining the spy with calls.reset(), will clears all tracking for a spy **/ 455 | reset(): void; 456 | } 457 | 458 | interface CallInfo { 459 | /** The context (the this) for the call */ 460 | object: any; 461 | /** All arguments passed to the call */ 462 | args: any[]; 463 | /** The return value of the call */ 464 | returnValue: any; 465 | } 466 | 467 | interface Util { 468 | inherit(childClass: Function, parentClass: Function): any; 469 | formatException(e: any): any; 470 | htmlEscape(str: string): string; 471 | argsToArray(args: any): any; 472 | extend(destination: any, source: any): any; 473 | } 474 | 475 | interface JsApiReporter extends Reporter { 476 | 477 | started: boolean; 478 | finished: boolean; 479 | result: any; 480 | messages: any; 481 | 482 | new (): any; 483 | 484 | suites(): Suite[]; 485 | summarize_(suiteOrSpec: SuiteOrSpec): any; 486 | results(): any; 487 | resultsForSpec(specId: any): any; 488 | log(str: any): any; 489 | resultsForSpecs(specIds: any): any; 490 | summarizeResult_(result: any): any; 491 | } 492 | 493 | interface Jasmine { 494 | Spec: Spec; 495 | clock: Clock; 496 | util: Util; 497 | } 498 | 499 | export var HtmlReporter: HtmlReporter; 500 | export var HtmlSpecFilter: HtmlSpecFilter; 501 | export var DEFAULT_TIMEOUT_INTERVAL: number; 502 | } -------------------------------------------------------------------------------- /examples/typings/globals/jasmine/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c49913aa9ea419ea46c1c684e488cf2a10303b1a/jasmine/jasmine.d.ts", 5 | "raw": "registry:dt/jasmine#2.2.0+20160621224255", 6 | "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c49913aa9ea419ea46c1c684e488cf2a10303b1a/jasmine/jasmine.d.ts" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/typings/globals/node/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/6a78438776c5719aefa02f96f1d7fa2dbc0edfce/node/node.d.ts", 5 | "raw": "registry:dt/node#6.0.0+20160621231320", 6 | "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/6a78438776c5719aefa02f96f1d7fa2dbc0edfce/node/node.d.ts" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular2-click-to-edit", 3 | "version": "1.0.52", 4 | "description": "wrap your data-binding to make it editable.", 5 | "main": "angular2-click-to-edit-example.js", 6 | "scripts": { 7 | "watch": "tsc -p src -w", 8 | "build": "rm -rf lib && tsc -p src", 9 | "prepublish": "tsc" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/nadavshemesh/angular2-click-to-edit.git" 14 | }, 15 | "keywords": [ 16 | "Angular", 17 | "2", 18 | "click", 19 | "edit" 20 | ], 21 | "author": "nadavshemesh2@gmail.com", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/nadavshemesh/angular2-click-to-edit/issues" 25 | }, 26 | "homepage": "https://github.com/nadavshemesh/angular2-click-to-edit#readme", 27 | "devDependencies": { 28 | "typescript": "^1.8.10" 29 | }, 30 | "dependencies": {}, 31 | "peerDependencies": { 32 | "@angular/common": "2.0.0-rc.1", 33 | "@angular/compiler": "2.0.0-rc.1", 34 | "@angular/core": "2.0.0-rc.1", 35 | "@angular/http": "2.0.0-rc.1", 36 | "@angular/platform-browser": "2.0.0-rc.1", 37 | "@angular/platform-browser-dynamic": "2.0.0-rc.1", 38 | "@angular/router": "2.0.0-rc.1", 39 | "@angular/router-deprecated": "2.0.0-rc.1", 40 | "@angular/upgrade": "2.0.0-rc.1", 41 | "angular2-in-memory-web-api": "0.0.11", 42 | "core-js": "^2.4.0", 43 | "reflect-metadata": "^0.1.3", 44 | "rxjs": "5.0.0-beta.6", 45 | "systemjs": "0.19.27", 46 | "zone.js": "^0.6.12" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nadavshemesh/angular2-click-to-edit/22813a5a66ec36caca253670014331c89f5cc383/preview.jpg -------------------------------------------------------------------------------- /src/ndv.edit.area.component.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var NdvEditAreaComponent = (function () { 13 | function NdvEditAreaComponent(el) { 14 | this.permission = true; 15 | this.show = false; 16 | this.save = new core_1.EventEmitter; 17 | this.el = el; 18 | } 19 | NdvEditAreaComponent.prototype.ngOnInit = function () { 20 | this.originalText = this.text; //Saves a copy of the original field info. 21 | }; 22 | NdvEditAreaComponent.prototype.makeEditable = function () { 23 | if (this.show == false) { 24 | this.show = true; 25 | } 26 | }; 27 | NdvEditAreaComponent.prototype.compareEvent = function (globalEvent) { 28 | if (this.tracker != globalEvent && this.show) { 29 | this.cancelEditable(); 30 | } 31 | }; 32 | NdvEditAreaComponent.prototype.trackEvent = function (newHostEvent) { 33 | this.tracker = newHostEvent; 34 | }; 35 | NdvEditAreaComponent.prototype.cancelEditable = function () { 36 | this.show = false; 37 | this.text = this.originalText; 38 | }; 39 | NdvEditAreaComponent.prototype.callSave = function () { 40 | var _this = this; 41 | var data = {}; //BUILD OBJ FOR EXPORT. 42 | data["" + this.fieldName] = this.text; 43 | var oldText = this.text; 44 | setTimeout(function () { _this.originalText = oldText; _this.text = oldText; }, 0); //Sets the field with the new text; 45 | this.save.emit(data); 46 | this.show = false; 47 | }; 48 | __decorate([ 49 | core_1.Input('placeholder'), 50 | __metadata('design:type', Object) 51 | ], NdvEditAreaComponent.prototype, "text"); 52 | __decorate([ 53 | core_1.Input('title'), 54 | __metadata('design:type', Object) 55 | ], NdvEditAreaComponent.prototype, "fieldName"); 56 | __decorate([ 57 | core_1.Input(), 58 | __metadata('design:type', Object) 59 | ], NdvEditAreaComponent.prototype, "permission"); 60 | NdvEditAreaComponent = __decorate([ 61 | core_1.Component({ 62 | selector: 'ndv-area', 63 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n .ndv-save {\n margin-right:3px;\n }\n .ndv-active {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n "], 64 | template: "{{text}}
\n \n \u270E\n {{text || '-Empty Field-'}}\n \n
\n \n \n
", 65 | host: { 66 | "(document: click)": "compareEvent($event)", 67 | "(click)": "trackEvent($event)" 68 | }, 69 | outputs: ['save : onSave'] 70 | }), 71 | __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object]) 72 | ], NdvEditAreaComponent); 73 | return NdvEditAreaComponent; 74 | var _a; 75 | }()); 76 | exports.NdvEditAreaComponent = NdvEditAreaComponent; 77 | -------------------------------------------------------------------------------- /src/ndv.edit.area.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-area', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | .ndv-save { 44 | margin-right:3px; 45 | } 46 | .ndv-active { 47 | background-color: #f0f0f0; 48 | border: 1px solid #d9d9d9; 49 | } 50 | `], 51 | template: `{{text}}
52 | 53 | 54 | {{text || '-Empty Field-'}} 55 | 56 |
57 | 58 | 59 |
`, 60 | host: { 61 | "(document: click)": "compareEvent($event)", 62 | "(click)": "trackEvent($event)" 63 | }, 64 | outputs: ['save : onSave'] 65 | }) 66 | 67 | export class NdvEditAreaComponent { 68 | @Input('placeholder') text; 69 | @Input('title') fieldName; 70 | @Input() permission = true; 71 | originalText; 72 | tracker; 73 | el: ElementRef; 74 | show = false; 75 | save = new EventEmitter; 76 | 77 | constructor(el: ElementRef) { 78 | this.el = el; 79 | } 80 | 81 | ngOnInit() { 82 | this.originalText = this.text; //Saves a copy of the original field info. 83 | } 84 | 85 | makeEditable() { 86 | if (this.show == false) { 87 | this.show = true; 88 | } 89 | } 90 | 91 | compareEvent(globalEvent) { 92 | if (this.tracker != globalEvent && this.show) { 93 | this.cancelEditable(); 94 | } 95 | } 96 | 97 | trackEvent(newHostEvent) { 98 | this.tracker = newHostEvent; 99 | } 100 | 101 | cancelEditable() { 102 | this.show = false; 103 | this.text = this.originalText; 104 | } 105 | 106 | callSave() { 107 | var data = {}; //BUILD OBJ FOR EXPORT. 108 | data["" + this.fieldName] = this.text; 109 | var oldText = this.text; 110 | setTimeout(() => { this.originalText = oldText; this.text = oldText }, 0); //Sets the field with the new text; 111 | this.save.emit(data); 112 | this.show = false; 113 | 114 | } 115 | } -------------------------------------------------------------------------------- /src/ndv.edit.component.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var core_1 = require('@angular/core'); 9 | var NdvEditComponent = (function () { 10 | function NdvEditComponent(el) { 11 | this.show = false; 12 | this.save = new core_1.EventEmitter; 13 | this.permission = false; 14 | this.m = 3; 15 | this.min = 0; 16 | this.max = 10000; 17 | this.invalid = false; 18 | this.el = el; 19 | } 20 | NdvEditComponent.prototype.ngOnInit = function () { 21 | this.originalText = this.text; //Saves a copy of the original field info. 22 | }; 23 | NdvEditComponent.prototype.validate = function (text) { 24 | if (this.regex) { 25 | var re = new RegExp('' + this.regex, "ig"); 26 | if (re.test(text)) { 27 | this.invalid = false; 28 | } 29 | else { 30 | this.invalid = true; 31 | } 32 | } 33 | else { 34 | if ((text.length <= this.max) && (text.length >= this.min)) { 35 | this.invalid = false; 36 | } 37 | else { 38 | this.invalid = true; 39 | } 40 | } 41 | //console.log(this.invalid); 42 | }; 43 | NdvEditComponent.prototype.makeEditable = function () { 44 | if (this.show == false) { 45 | this.show = true; 46 | } 47 | }; 48 | NdvEditComponent.prototype.compareEvent = function (globalEvent) { 49 | if (this.tracker != globalEvent && this.show) { 50 | this.cancelEditable(); 51 | } 52 | }; 53 | NdvEditComponent.prototype.trackEvent = function (newHostEvent) { 54 | this.tracker = newHostEvent; 55 | }; 56 | NdvEditComponent.prototype.cancelEditable = function () { 57 | this.show = false; 58 | this.text = this.originalText; 59 | }; 60 | NdvEditComponent.prototype.callSave = function () { 61 | var _this = this; 62 | var data = {}; //BUILD OBJ FOR EXPORT. 63 | data["" + this.fieldName] = this.text; 64 | var oldText = this.text; 65 | setTimeout(function () { _this.originalText = oldText; _this.text = oldText; }, 0); //Sets the field with the new text; 66 | this.save.emit(data); 67 | this.show = false; 68 | }; 69 | __decorate([ 70 | core_1.Input('placeholder') 71 | ], NdvEditComponent.prototype, "text"); 72 | __decorate([ 73 | core_1.Input('title') 74 | ], NdvEditComponent.prototype, "fieldName"); 75 | __decorate([ 76 | core_1.Input() 77 | ], NdvEditComponent.prototype, "permission"); 78 | __decorate([ 79 | core_1.Input() 80 | ], NdvEditComponent.prototype, "min"); 81 | __decorate([ 82 | core_1.Input() 83 | ], NdvEditComponent.prototype, "max"); 84 | __decorate([ 85 | core_1.Input() 86 | ], NdvEditComponent.prototype, "error"); 87 | __decorate([ 88 | core_1.Input() 89 | ], NdvEditComponent.prototype, "regex"); 90 | NdvEditComponent = __decorate([ 91 | core_1.Component({ 92 | selector: 'ndv-edit', 93 | styles: ["\n #ndv-ic {\n margin-left: 10px;\n color: #d9d9d9;\n }\n\n .ndv-comp {\n padding:6px;\n border-radius: 3px;\n }\n .active-ndv {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n input {\n border-radius: 5px;\n box-shadow: none;\n border: 1px solid #dedede;\n min-width: 5px;\n }\n .ndv-buttons {\n background-color: #f0f0f0;\n border: 1px solid #ccc;\n border-top: none;\n border-radius: 0 0 3px 3px;\n box-shadow: 0 3px 6px rgba(111,111,111,0.2);\n outline: none;\n padding: 3px;\n position: absolute;\n margin-left: 6px;\n z-index: 1;\n }\n .ndv-comp:hover {\n border: 1px solid grey;\n }\n .ndv-comp:hover > ndv-ic {\n display:block;\n }\n\n .ndv-save {\n margin-right:3px;\n }\n .ndv-active {\n background-color: #f0f0f0;\n border: 1px solid #d9d9d9;\n }\n .ng-invalid {\n background: #ffb8b8;\n }\n .err-bubble {\n position: absolute;\n margin: 16px 100px;\n border: 1px solid red;\n font-size: 14px;\n background: #ffb8b8;\n padding: 10px;\n border-radius: 7px;\n }\n\n "], 94 | template: "{{text}}\n \n
{{error || \"must contain \" + min + \"to -\" + max +\" chars.\"}}
\n \u270E\n {{text || '-Empty Field-'}}\n
\n
\n \n \n
", 95 | host: { 96 | "(document: click)": "compareEvent($event)", 97 | "(click)": "trackEvent($event)" 98 | }, 99 | outputs: ['save : onSave'] 100 | }) 101 | ], NdvEditComponent); 102 | return NdvEditComponent; 103 | }()); 104 | exports.NdvEditComponent = NdvEditComponent; 105 | -------------------------------------------------------------------------------- /src/ndv.edit.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"edit.button.component.js","sourceRoot":"","sources":["edit.button.component.ts"],"names":["EditButtonComponent","EditButtonComponent.constructor","EditButtonComponent.ngOnInit","EditButtonComponent.makeEditable","EditButtonComponent.compareEvent","EditButtonComponent.trackEvent","EditButtonComponent.cancelEditable","EditButtonComponent.callSave"],"mappings":";;;;;;;;;;;;;;;;;;YAGA;gBA4BIA,6BAAYA,EAAcA;oBAH1BC,SAAIA,GAAGA,KAAKA,CAACA;oBACbA,SAAIA,GAAGA,IAAIA,mBAAYA,CAACA;oBAGpBA,IAAIA,CAACA,EAAEA,GAAGA,EAAEA,CAACA;gBACjBA,CAACA;gBAEDD,sCAAQA,GAARA;oBACIE,IAAIA,CAACA,YAAYA,GAAGA,IAAIA,CAACA,IAAIA,CAACA;gBAClCA,CAACA;gBAEDF,0CAAYA,GAAZA;oBACIG,EAAEA,CAACA,CAACA,IAAIA,CAACA,IAAIA,IAAIA,KAAKA,CAACA,CAACA,CAACA;wBACrBA,IAAIA,CAACA,IAAIA,GAAGA,IAAIA,CAACA;oBACrBA,CAACA;gBACLA,CAACA;gBAEDH,0CAAYA,GAAZA,UAAaA,WAAWA;oBACpBI,EAAEA,CAACA,CAACA,IAAIA,CAACA,OAAOA,IAAIA,WAAWA,IAAIA,IAAIA,CAACA,IAAIA,CAACA,CAACA,CAACA;wBAC3CA,IAAIA,CAACA,cAAcA,EAAEA,CAACA;oBAC1BA,CAACA;gBACLA,CAACA;gBAEDJ,wCAAUA,GAAVA,UAAWA,YAAYA;oBACnBK,IAAIA,CAACA,OAAOA,GAAGA,YAAYA,CAACA;gBAChCA,CAACA;gBAEDL,4CAAcA,GAAdA;oBACIM,IAAIA,CAACA,IAAIA,GAAGA,KAAKA,CAACA;oBAClBA,IAAIA,CAACA,IAAIA,GAAGA,IAAIA,CAACA,YAAYA,CAACA;gBAClCA,CAACA;gBAEDN,sCAAQA,GAARA;oBAAAO,iBAQCA;oBAPGA,IAAIA,IAAIA,GAAGA,EAAEA,CAACA;oBACdA,IAAIA,CAACA,EAAEA,GAAGA,IAAIA,CAACA,SAASA,CAACA,GAAGA,IAAIA,CAACA,IAAIA,CAACA;oBACtCA,IAAIA,OAAOA,GAAGA,IAAIA,CAACA,IAAIA,CAACA;oBACxBA,UAAUA,CAACA,cAAQA,KAAIA,CAACA,YAAYA,GAAGA,OAAOA,CAACA,CAACA,KAAIA,CAACA,IAAIA,GAAGA,OAAOA,CAAAA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;oBAC1EA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA;oBACrBA,IAAIA,CAACA,IAAIA,GAAGA,KAAKA,CAACA;gBAEtBA,CAACA;gBA7CDP;oBAACA,YAAKA,CAACA,aAAaA,CAACA;;mBAACA,qCAAIA,UAACA;gBAC3BA;oBAACA,YAAKA,CAACA,OAAOA,CAACA;;mBAACA,0CAASA,UAACA;gBArB9BA;oBAACA,gBAASA,CAACA;wBACPA,QAAQA,EAAEA,WAAWA;wBACrBA,QAAQA,EAAEA,qoBAQSA;wBACnBA,UAAUA,EAAEA,EAAEA;wBACdA,IAAIA,EAAEA;4BACFA,mBAAmBA,EAAEA,sBAAsBA;4BAC3CA,SAASA,EAAEA,oBAAoBA;yBAClCA;wBACDA,OAAOA,EAAEA,CAACA,cAAcA,CAACA;qBAC5BA,CAACA;;wCAiDDA;gBAADA,0BAACA;YAADA,CAACA,AAlED,IAkEC;YAlED,qDAkEC,CAAA"} -------------------------------------------------------------------------------- /src/ndv.edit.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-edit', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | 12 | .ndv-comp { 13 | padding:6px; 14 | border-radius: 3px; 15 | } 16 | .active-ndv { 17 | background-color: #f0f0f0; 18 | border: 1px solid #d9d9d9; 19 | } 20 | input { 21 | border-radius: 5px; 22 | box-shadow: none; 23 | border: 1px solid #dedede; 24 | min-width: 5px; 25 | } 26 | .ndv-buttons { 27 | background-color: #f0f0f0; 28 | border: 1px solid #ccc; 29 | border-top: none; 30 | border-radius: 0 0 3px 3px; 31 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 32 | outline: none; 33 | padding: 3px; 34 | position: absolute; 35 | margin-left: 6px; 36 | z-index: 1; 37 | } 38 | .ndv-comp:hover { 39 | border: 1px solid grey; 40 | } 41 | .ndv-comp:hover > ndv-ic { 42 | display:block; 43 | } 44 | 45 | .ndv-save { 46 | margin-right:3px; 47 | } 48 | .ndv-active { 49 | background-color: #f0f0f0; 50 | border: 1px solid #d9d9d9; 51 | } 52 | .ng-invalid { 53 | background: #ffb8b8; 54 | } 55 | .err-bubble { 56 | position: absolute; 57 | margin: 16px 100px; 58 | border: 1px solid red; 59 | font-size: 14px; 60 | background: #ffb8b8; 61 | padding: 10px; 62 | border-radius: 7px; 63 | } 64 | 65 | `], 66 | template: `{{text}} 67 | 68 |
{{error || " must contain " + min + " to -" + max +" chars."}}
69 | 70 | {{text || '-Empty Field-'}} 71 |
72 |
73 | 74 | 75 |
`, 76 | host: { 77 | "(document: click)": "compareEvent($event)", 78 | "(click)": "trackEvent($event)" 79 | }, 80 | outputs: ['save : onSave'] 81 | }) 82 | 83 | export class NdvEditComponent { 84 | @Input('placeholder') text; 85 | @Input('title') fieldName; 86 | originalText; 87 | tracker; 88 | el: ElementRef; 89 | show = false; 90 | save = new EventEmitter; 91 | @Input() permission = false; 92 | m: Number = 3; 93 | @Input() min = 0; 94 | @Input() max = 10000; 95 | @Input() error; 96 | @Input() regex; 97 | invalid = false; 98 | 99 | constructor(el: ElementRef) { 100 | this.el = el; 101 | } 102 | 103 | ngOnInit() { 104 | this.originalText = this.text; //Saves a copy of the original field info. 105 | } 106 | 107 | validate(text) { 108 | if (this.regex) { 109 | var re = new RegExp('' + this.regex, "ig"); 110 | if (re.test(text)) { 111 | this.invalid = false; 112 | //console.log('valid'); 113 | } 114 | else { 115 | this.invalid = true; 116 | } 117 | } 118 | else { 119 | if ((text.length <= this.max) && (text.length >= this.min)) { 120 | this.invalid = false; 121 | } 122 | else { 123 | this.invalid = true; 124 | } 125 | } 126 | //console.log(this.invalid); 127 | } 128 | 129 | makeEditable() { 130 | if (this.show == false) { 131 | this.show = true; 132 | } 133 | } 134 | 135 | compareEvent(globalEvent) { 136 | if (this.tracker != globalEvent && this.show) { 137 | this.cancelEditable(); 138 | } 139 | } 140 | 141 | trackEvent(newHostEvent) { 142 | this.tracker = newHostEvent; 143 | } 144 | 145 | cancelEditable() { 146 | this.show = false; 147 | this.invalid = false; 148 | this.text = this.originalText; 149 | } 150 | 151 | callSave() { 152 | if (!this.invalid) { 153 | var data = {}; //BUILD OBJ FOR EXPORT. 154 | data["" + this.fieldName] = this.text; 155 | var oldText = this.text; 156 | setTimeout(() => { this.originalText = oldText; this.text = oldText }, 0); //Sets the field with the new text; 157 | this.save.emit(data); 158 | this.show = false; 159 | } 160 | 161 | } 162 | } -------------------------------------------------------------------------------- /src/ndv.edit.date.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-date', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | .ndv-active { 48 | background-color: #f0f0f0; 49 | border: 1px solid #d9d9d9; 50 | } 51 | `], 52 | template: `{{ddate}} 53 | 54 | 55 | {{ddate || '-Empty Field-'}} 56 | 57 |
58 | 59 | 60 |
`, 61 | host: { 62 | "(document: click)": "compareEvent($event)", 63 | "(click)": "trackEvent($event)" 64 | }, 65 | outputs: ['save : onSave'] 66 | }) 67 | 68 | export class NdvEditDateComponent { 69 | @Input('placeholder') holder; 70 | @Input('title') fieldName; 71 | @Input() permission = true; 72 | ddate 73 | originalddate; 74 | tracker; 75 | el: ElementRef; 76 | show = false; 77 | save = new EventEmitter; 78 | 79 | constructor(el: ElementRef) { 80 | this.el = el; 81 | } 82 | 83 | ngOnInit() { 84 | this.holder = new Date(this.holder); 85 | var dy = ("0" + this.holder.getDate()).slice(-2); 86 | var month = ("0" + this.holder.getMonth() + 1).slice(-2); 87 | var year = this.holder.getFullYear(); 88 | this.ddate = '' + year + '-' + month + '-' + dy; 89 | this.originalddate = this.ddate; //Saves a copy of the original field info. 90 | } 91 | 92 | makeEditable() { 93 | if (this.show == false) { 94 | this.show = true; 95 | } 96 | } 97 | 98 | compareEvent(globalEvent) { 99 | if (this.tracker != globalEvent && this.show) { 100 | this.cancelEditable(); 101 | } 102 | } 103 | 104 | trackEvent(newHostEvent) { 105 | this.tracker = newHostEvent; 106 | } 107 | 108 | cancelEditable() { 109 | this.show = false; 110 | this.ddate = this.originalddate; 111 | } 112 | 113 | callSave() { 114 | var data = {}; //BUILD OBJ FOR EXPORT. 115 | data["" + this.fieldName] = this.ddate; 116 | var oldddate = this.ddate; 117 | setTimeout(() => { this.originalddate = oldddate; this.ddate = oldddate }, 0); //Sets the field with the new ddate; 118 | this.save.emit(data); 119 | this.show = false; 120 | 121 | } 122 | } -------------------------------------------------------------------------------- /src/ndv.edit.select.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-select', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | .ndv-active { 44 | background-color: #f0f0f0; 45 | border: 1px solid #d9d9d9; 46 | } 47 | .ndv-save { 48 | margin-right:3px; 49 | } 50 | 51 | `], 52 | template: `{{option}} 53 | 56 | 57 | {{selectedOption || '-Empty Field-'}} 58 | 59 |
60 | 61 | 62 |
`, 63 | host: { 64 | "(document: click)": "compareEvent($event)", 65 | "(click)": "trackEvent($event)" 66 | }, 67 | outputs: ['save : onSave'] 68 | }) 69 | 70 | export class NdvEditSelectComponent { 71 | @Input('items') options; 72 | @Input('placeholder') selectedOption; 73 | @Input('title') fieldName; 74 | @Input() permission = true; 75 | selectedItem; 76 | originalOption; 77 | tracker; 78 | el: ElementRef; 79 | show = false; 80 | save = new EventEmitter; 81 | 82 | constructor(el: ElementRef) { 83 | this.el = el; 84 | } 85 | 86 | ngOnInit() { 87 | this.originalOption = this.selectedOption; //Saves a copy of the original field info. 88 | } 89 | 90 | makeEditable() { 91 | if (this.show == false) { 92 | this.show = true; 93 | } 94 | } 95 | 96 | compareEvent(globalEvent) { 97 | if (this.tracker != globalEvent && this.show) { 98 | this.cancelEditable(); 99 | } 100 | } 101 | 102 | trackEvent(newHostEvent) { 103 | this.tracker = newHostEvent; 104 | } 105 | 106 | cancelEditable() { 107 | this.show = false; 108 | this.selectedOption = this.originalOption; 109 | } 110 | 111 | callSave() { 112 | var data = {}; //BUILD OBJ FOR EXPORT. 113 | data["" + this.fieldName] = this.selectedOption; 114 | var oldoption = this.selectedOption; 115 | setTimeout(() => { this.originalOption = oldoption; this.selectedOption = oldoption }, 0); //Sets the field with the new option; 116 | this.save.emit(data); 117 | this.show = false; 118 | 119 | } 120 | } -------------------------------------------------------------------------------- /src/ndv.edit.time.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-time', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | 12 | .ndv-comp { 13 | padding:6px; 14 | border-radius: 3px; 15 | } 16 | .active-ndv { 17 | background-color: #f0f0f0; 18 | border: 1px solid #d9d9d9; 19 | } 20 | input { 21 | border-radius: 5px; 22 | box-shadow: none; 23 | border: 1px solid #dedede; 24 | min-width: 5px; 25 | } 26 | .ndv-buttons { 27 | background-color: #f0f0f0; 28 | border: 1px solid #ccc; 29 | border-top: none; 30 | border-radius: 0 0 3px 3px; 31 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 32 | outline: none; 33 | padding: 3px; 34 | position: absolute; 35 | margin-left: 6px; 36 | z-index: 1; 37 | } 38 | .ndv-comp:hover { 39 | border: 1px solid grey; 40 | } 41 | .ndv-comp:hover > ndv-ic { 42 | display:block; 43 | } 44 | 45 | .ndv-save { 46 | margin-right:3px; 47 | } 48 | .ndv-active { 49 | background-color: #f0f0f0; 50 | border: 1px solid #d9d9d9; 51 | } 52 | `], 53 | template: `{{time}} 54 | 55 | 56 | {{time || '-Empty Field-'}} 57 | 58 |
59 | 60 | 61 |
`, 62 | host: { 63 | "(document: click)": "compareEvent($event)", 64 | "(click)": "trackEvent($event)" 65 | }, 66 | outputs: ['save : onSave'] 67 | }) 68 | 69 | export class NdvEditTimeComponent { 70 | @Input('placeholder') time; 71 | @Input('title') fieldName; 72 | @Input() permission = true; 73 | originalTime; 74 | tracker; 75 | el: ElementRef; 76 | show = false; 77 | save = new EventEmitter; 78 | 79 | constructor(el: ElementRef) { 80 | this.el = el; 81 | } 82 | 83 | ngOnInit() { 84 | this.originalTime = this.time; //Saves a copy of the original field info. 85 | } 86 | 87 | makeEditable() { 88 | if (this.show == false) { 89 | this.show = true; 90 | } 91 | } 92 | 93 | compareEvent(globalEvent) { 94 | if (this.tracker != globalEvent && this.show) { 95 | this.cancelEditable(); 96 | } 97 | } 98 | 99 | trackEvent(newHostEvent) { 100 | this.tracker = newHostEvent; 101 | } 102 | 103 | cancelEditable() { 104 | this.show = false; 105 | this.time = this.originalTime; 106 | } 107 | 108 | callSave() { 109 | var data = {}; //BUILD OBJ FOR EXPORT. 110 | data["" + this.fieldName] = this.time; 111 | var oldtime = this.time; 112 | setTimeout(() => { this.originalTime = oldtime; this.time = oldtime }, 0); //Sets the field with the new time; 113 | this.save.emit(data); 114 | this.show = false; 115 | 116 | } 117 | } -------------------------------------------------------------------------------- /src/ndv.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nadavshemesh/angular2-click-to-edit/22813a5a66ec36caca253670014331c89f5cc383/src/ndv.ts -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "emitDecoratorMetadata": true, 4 | "experimentalDecorators": true, 5 | "target": "es5", 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "removeComments": true, 9 | "sourceMap": true, 10 | "outDir": "../lib", 11 | "declaration": true 12 | } 13 | } -------------------------------------------------------------------------------- /src/‏‏ndv.edit.drop.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-drop', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 53 | 54 | {{option || '-Empty Field-'}} 55 | 56 |
57 | 58 | 59 |
`, 60 | host: { 61 | "(document: click)": "compareEvent($event)", 62 | "(click)": "trackEvent($event)" 63 | }, 64 | outputs: ['save : onSave'] 65 | }) 66 | 67 | export class NdvEditDropComponent { 68 | @Input() options; 69 | @Input('selected') selectedOption = {}; 70 | @Input('title') fieldName; 71 | selectedItem; 72 | originalOption; 73 | tracker; 74 | el: ElementRef; 75 | show = false; 76 | save = new EventEmitter; 77 | 78 | constructor(el: ElementRef) { 79 | this.el = el; 80 | } 81 | 82 | ngOnInit() { 83 | this.originalOption = this.selectedOption; //Saves a copy of the original field info. 84 | } 85 | 86 | makeEditable() { 87 | if (this.show == false) { 88 | this.show = true; 89 | } 90 | } 91 | 92 | compareEvent(globalEvent) { 93 | if (this.tracker != globalEvent && this.show) { 94 | this.cancelEditable(); 95 | } 96 | } 97 | 98 | trackEvent(newHostEvent) { 99 | this.tracker = newHostEvent; 100 | } 101 | 102 | cancelEditable() { 103 | this.show = false; 104 | this.selectedOption = this.originalOption; 105 | } 106 | 107 | callSave() { 108 | var data = {}; //BUILD OBJ FOR EXPORT. 109 | data["" + this.fieldName] = this.selectedOption; 110 | var oldoption = this.selectedOption; 111 | setTimeout(() => { this.originalOption = oldoption; this.selectedOption = oldoption }, 0); //Sets the field with the new option; 112 | this.save.emit(data); 113 | this.show = false; 114 | 115 | } 116 | } -------------------------------------------------------------------------------- /src/‏‏ndv.edit.time.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, EventEmitter, ElementRef } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'ndv-time', 6 | styles: [` 7 | #ndv-ic { 8 | margin-left: 10px; 9 | color: #d9d9d9; 10 | } 11 | .ndv-comp { 12 | padding:6px; 13 | border-radius: 3px; 14 | } 15 | .active-ndv { 16 | background-color: #f0f0f0; 17 | border: 1px solid #d9d9d9; 18 | } 19 | input { 20 | border-radius: 5px; 21 | box-shadow: none; 22 | border: 1px solid #dedede; 23 | min-width: 5px; 24 | } 25 | .ndv-buttons { 26 | background-color: #f0f0f0; 27 | border: 1px solid #ccc; 28 | border-top: none; 29 | border-radius: 0 0 3px 3px; 30 | box-shadow: 0 3px 6px rgba(111,111,111,0.2); 31 | outline: none; 32 | padding: 3px; 33 | position: absolute; 34 | margin-left: 6px; 35 | z-index: 1; 36 | } 37 | .ndv-comp:hover { 38 | border: 1px solid grey; 39 | } 40 | .ndv-comp:hover > ndv-ic { 41 | display:block; 42 | } 43 | 44 | .ndv-save { 45 | margin-right:3px; 46 | } 47 | 48 | `], 49 | template: ` 50 | 51 | 52 | {{time || '-Empty Field-'}} 53 | 54 |
55 | 56 | 57 |
`, 58 | host: { 59 | "(document: click)": "compareEvent($event)", 60 | "(click)": "trackEvent($event)" 61 | }, 62 | outputs: ['save : onSave'] 63 | }) 64 | 65 | export class NdvEditTimeComponent { 66 | @Input('placeholder') time; 67 | @Input('title') fieldName; 68 | originalTime; 69 | tracker; 70 | el: ElementRef; 71 | show = false; 72 | save = new EventEmitter; 73 | 74 | constructor(el: ElementRef) { 75 | this.el = el; 76 | } 77 | 78 | ngOnInit() { 79 | this.originalTime = this.time; //Saves a copy of the original field info. 80 | } 81 | 82 | makeEditable() { 83 | if (this.show == false) { 84 | this.show = true; 85 | } 86 | } 87 | 88 | compareEvent(globalEvent) { 89 | if (this.tracker != globalEvent && this.show) { 90 | this.cancelEditable(); 91 | } 92 | } 93 | 94 | trackEvent(newHostEvent) { 95 | this.tracker = newHostEvent; 96 | } 97 | 98 | cancelEditable() { 99 | this.show = false; 100 | this.time = this.originalTime; 101 | } 102 | 103 | callSave() { 104 | var data = {}; //BUILD OBJ FOR EXPORT. 105 | data["" + this.fieldName] = this.time; 106 | var oldtime = this.time; 107 | setTimeout(() => { this.originalTime = oldtime; this.time = oldtime }, 0); //Sets the field with the new time; 108 | this.save.emit(data); 109 | this.show = false; 110 | 111 | } 112 | } --------------------------------------------------------------------------------