Просмотр исходного кода

menu item with icons now

tags/2.037
Patrick Sun 5 лет назад
Родитель
Сommit
44726183e4
6 измененных файлов: 86 добавлений и 43 удалений
  1. +2
    -2
      package.json
  2. +25
    -1
      src/app/app.component.html
  3. +2
    -4
      src/app/app.module.ts
  4. +4
    -2
      src/app/dist/app.module.js
  5. +27
    -17
      src/app/dist/main-menu-items.js
  6. +26
    -17
      src/app/main-menu-items.ts

+ 2
- 2
package.json Просмотреть файл

"@progress/kendo-angular-l10n": "^2.0.0", "@progress/kendo-angular-l10n": "^2.0.0",
"@progress/kendo-angular-menu": "^2.0.4", "@progress/kendo-angular-menu": "^2.0.4",
"@progress/kendo-angular-popup": "^3.0.0", "@progress/kendo-angular-popup": "^3.0.0",
"@progress/kendo-svg-icons": "^0.0.3",
"@progress/kendo-theme-default": "latest", "@progress/kendo-theme-default": "latest",
"rxjs": "~6.6.0", "rxjs": "~6.6.0",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"zone.js": "~0.10.2",
"@progress/kendo-svg-icons": "^0.0.3"
"zone.js": "~0.10.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.1002.0", "@angular-devkit/build-angular": "~0.1002.0",

+ 25
- 1
src/app/app.component.html Просмотреть файл

<kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu>
<div class=topMenuBar > <div class=topMenuBar >
<kendo-icon [name]="'photo-camera'" [size]="'medium'"></kendo-icon> <kendo-icon [name]="'photo-camera'" [size]="'medium'"></kendo-icon>
<kendo-menu [items]="items"> </kendo-menu> <kendo-menu [items]="items"> </kendo-menu>
<div #target class="target"> <div #target class="target">
<p class="placeholder">Right-click to open Context menu</p> <p class="placeholder">Right-click to open Context menu</p>
</div> </div>
<kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu>

<hr>

<kendo-menu>
<kendo-menu-item text="My Web Site" icon="folder">
<kendo-menu-item text="images" icon="folder">
<kendo-menu-item text="logo.png" icon="image"></kendo-menu-item>
<kendo-menu-item text="body-back.png" icon="image"></kendo-menu-item>
<kendo-menu-item text="my-photo.png" icon="image"></kendo-menu-item>
</kendo-menu-item>
<kendo-menu-item text="resources" icon="folder">
<kendo-menu-item text="pdf" icon="folder">
<kendo-menu-item text="prices.pdf" icon="pdf"></kendo-menu-item>
<kendo-menu-item text="brochure.pdf" icon="pdf"></kendo-menu-item>
</kendo-menu-item>
<kendo-menu-item text="zip" icon="folder"></kendo-menu-item>
</kendo-menu-item>
<kendo-menu-item text="about.html" icon="file"></kendo-menu-item>
<kendo-menu-item text="contacts.html" icon="file"></kendo-menu-item>
<kendo-menu-item text="index.html" icon="file"></kendo-menu-item>
<kendo-menu-item text="portfolio.html" icon="file"></kendo-menu-item>
</kendo-menu-item>
</kendo-menu>

+ 2
- 4
src/app/app.module.ts Просмотреть файл

import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
//Kendo //Kendo
import { MenuModule, ContextMenuModule } from '@progress/kendo-angular-menu'; import { MenuModule, ContextMenuModule } from '@progress/kendo-angular-menu';
import { IconsModule } from '@progress/kendo-angular-icons';
//App //App
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { DashboardComponent } from './dashboard/dashboard.component'; import { DashboardComponent } from './dashboard/dashboard.component';
import { IconsModule } from '@progress/kendo-angular-icons';




@NgModule({ @NgModule({
declarations: [ declarations: [
MenuModule, MenuModule,
ContextMenuModule, ContextMenuModule,
BrowserAnimationsModule, BrowserAnimationsModule,
IconsModule
//IconsModule
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]

+ 4
- 2
src/app/dist/app.module.js Просмотреть файл

//App //App
var app_component_1 = require("./app.component"); var app_component_1 = require("./app.component");
var app_routing_module_1 = require("./app-routing.module"); var app_routing_module_1 = require("./app-routing.module");
var dashboard_component_1 = require("./dashboard/dashboard.component");
var AppModule = /** @class */ (function () { var AppModule = /** @class */ (function () {
function AppModule() { function AppModule() {
} }
AppModule = __decorate([ AppModule = __decorate([
core_1.NgModule({ core_1.NgModule({
declarations: [ declarations: [
app_component_1.AppComponent
app_component_1.AppComponent,
dashboard_component_1.DashboardComponent
], ],
imports: [ imports: [
platform_browser_1.BrowserModule, platform_browser_1.BrowserModule,
app_routing_module_1.AppRoutingModule, app_routing_module_1.AppRoutingModule,
kendo_angular_menu_1.MenuModule, kendo_angular_menu_1.MenuModule,
kendo_angular_menu_1.ContextMenuModule, kendo_angular_menu_1.ContextMenuModule,
animations_1.BrowserAnimationsModule
animations_1.BrowserAnimationsModule,
], ],
providers: [], providers: [],
bootstrap: [app_component_1.AppComponent] bootstrap: [app_component_1.AppComponent]

+ 27
- 17
src/app/dist/main-menu-items.js Просмотреть файл

exports.mainMenuItems = void 0; exports.mainMenuItems = void 0;
exports.mainMenuItems = [ exports.mainMenuItems = [
{ {
text: 'I'
text: '',
icon: 'menu'
}, },
{ {
text: 'SFM', text: 'SFM',
items: [{ text: 'Summary', url: '/dashboard' }, { text: 'Logout', url: '/login' }]
icon: 'more-vertical',
items: [
{ text: 'Summary', icon: 'calculator', url: '/dashboard' },
{ text: '--', separator: "true" },
{ text: 'Logout', icon: 'logout', url: '/login' }
]
}, },
{ {
text: 'Loans', text: 'Loans',
icon: 'dollar',
items: [ items: [
{ text: 'Add', url: 'https://google.com.au' },
{ text: 'List All', url: 'https://google.com.au' },
{ text: 'Add', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table', url: 'https://google.com.au' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Export All Loans' },
{ text: 'Export All Loans', icon: "excel" },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' }
{ text: 'Search', icon: 'search' }
] ]
}, },
{ {
text: 'Trails', text: 'Trails',
icon: 'percent',
items: [ items: [
{ text: 'List All', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table', url: 'https://google.com.au' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Import From ...' }
{ text: 'Import From ...', icon: 'upload' }
] ]
}, },
{ {
text: 'Clients', text: 'Clients',
icon: 'document-manager',
items: [ items: [
{ text: 'Add ', url: 'https://google.com.au' },
{ text: 'List All' },
{ text: 'Add ', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' },
{ text: 'Search', icon: 'search' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Broadcast' },
{ text: 'Broadcast', icon: 'email' },
] ]
}, },
{ {
text: 'Brokers', text: 'Brokers',
icon: 'dictionary-add',
items: [ items: [
{ text: 'Add ', url: 'https://google.com.au' },
{ text: 'List All' },
{ text: 'Add ', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' },
{ text: 'Search', icon: 'search' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Broadcast' },
{ text: 'Broadcast', icon: 'email' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'UnPaid' },
{ text: 'UnPaid', icon: 'dollar' },
] ]
} }
]; ];

+ 26
- 17
src/app/main-menu-items.ts Просмотреть файл

export const mainMenuItems: any[] = [ export const mainMenuItems: any[] = [
{ {
text: 'I'
text: '',
icon: 'menu'
}, },
{ {
text: 'SFM', text: 'SFM',
items: [{ text: 'Summary', url: '/dashboard'}, { text: 'Logout', url: '/login'}]
icon: 'more-vertical',
items: [
{ text: 'Summary', icon: 'calculator', url: '/dashboard'},
{ text: '--', separator: "true" },
{ text: 'Logout', icon: 'logout', url: '/login'}]
}, },
{ {
text: 'Loans', text: 'Loans',
icon: 'dollar',
items: [ items: [
{ text: 'Add', url: 'https://google.com.au' },
{ text: 'List All', url: 'https://google.com.au' },
{ text: 'Add', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table' ,url: 'https://google.com.au' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Export All Loans' },
{ text: 'Export All Loans' , icon: "excel"},
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' }
{ text: 'Search', icon: 'search' }
] ]
}, },
{ {
text: 'Trails', text: 'Trails',
icon: 'percent',
items: [ items: [
{ text: 'List All', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table', url: 'https://google.com.au' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Import From ...'}
{ text: 'Import From ...', icon : 'upload'}
] ]
}, },
{ {
text: 'Clients', text: 'Clients',
icon: 'document-manager',
items: [ items: [
{ text: 'Add ', url: 'https://google.com.au' },
{ text: 'List All' },
{ text: 'Add ', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon: 'table' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' },
{ text: 'Search' ,icon: 'search'},
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Broadcast' },
{ text: 'Broadcast', icon:'email' },
] ]
}, },


{ {
text: 'Brokers', text: 'Brokers',
icon: 'dictionary-add',
items: [ items: [
{ text: 'Add ', url: 'https://google.com.au' },
{ text: 'List All' },
{ text: 'Add ', icon: 'plus', url: 'https://google.com.au' },
{ text: 'List All', icon : 'table' },
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Search' },
{ text: 'Search' , icon: 'search'},
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'Broadcast' },
{ text: 'Broadcast' , icon : 'email'},
{ text: '--', separator: "true" }, { text: '--', separator: "true" },
{ text: 'UnPaid' },
{ text: 'UnPaid', icon : 'dollar' },
] ]
} }
]; ];

Загрузка…
Отмена
Сохранить