Movidos los componentes comunes a app

Arreglado problems material design ui-router
This commit is contained in:
nelo 2016-11-30 14:12:48 +01:00
parent f9f6e9c507
commit 1de495e155
23 changed files with 54 additions and 48 deletions

View File

@ -1,6 +1,9 @@
import {module} from './module';
import {bootstrap} from './bootstrap';
import * as spliting from './spliting';
import * as routes from './configroutes';
import * as run from './run';
import * as components from './components';
import title from './styles/title.css'
import padding from './styles/layout.css'

View File

@ -1,5 +1,5 @@
import {ng} from 'vendor';
import {NAME} from 'core';
import {NAME as SALIX} from './module';
export const bootstrap = () => {
const selector = 'selector'
@ -13,5 +13,6 @@ export const bootstrap = () => {
if (!_element) {
throw new Error("element is not defined");
}
ng.bootstrap(_element, [NAME]);
ng.bootstrap(_element, [SALIX]);
};

View File

@ -0,0 +1,6 @@
export {NAME as VN_MAINMENU, COMPONENT as VN_MAINMENU_COMPONENT} from './components/main-menu/main-menu';
export {NAME as ACTIONS, COMPONENT as ACTIONS_COMPONENT} from './components/left-menu/actions';
export {NAME as DESCRIPTOR, COMPONENT as DESCRIPTOR_COMPONENT} from './components/left-menu/descriptor';
export {NAME as LEFT_MENU, COMPONENT as LEFTMENU_COMPONENT} from './components/left-menu/left-menu';
export {NAME as MENU_ITEM, COMPONENT as MENU_ITEM_COMPONENT} from './components/left-menu/menu-item';
export {NAME as CLIENT_TOPBAR, COMPONENT as CLIENT_TOPBAR_COMPONENT} from './components/topbar/topbar';

View File

@ -1,9 +1,7 @@
import template from './actions.html';
import {module} from '../module';
import * as util from '../util';
import {module} from '../../module';
const _NAME = 'actions';
export const NAME = util.getName(_NAME);
export const NAME = 'vnActions';
export const COMPONENT = {
template: template,
bindings: {

View File

@ -1,9 +1,7 @@
import template from './descriptor.html';
import {module} from '../module';
import * as util from '../util';
import {module} from '../../module';
const _NAME = 'descriptor';
export const NAME = util.getName(_NAME);
export const NAME = 'vnDescriptor';
export const COMPONENT = {
template: template,
bindings: {

View File

@ -1,10 +1,8 @@
import template from './left-menu.html';
import style from './style.css';
import {module} from '../module';
import * as util from '../util';
import {module} from '../../module';
const _NAME = 'leftMenu';
export const NAME = util.getName(_NAME);
export const NAME = "vnLeftMenu";
export const COMPONENT = {
template: template,
bindings: {

View File

@ -1,9 +1,7 @@
import template from './menu-item.html';
import {module} from '../module';
import * as util from '../util';
import {module} from '../../module';
const _NAME = 'menuItem';
export const NAME = util.getName(_NAME);
export const NAME = 'vnMenuItem';
export const COMPONENT = {
template: template,
bindings: {

View File

@ -0,0 +1,8 @@
import template from './main-menu.html';
import {module} from '../../module';
export const NAME = "vnMainmenu";
export const COMPONENT = {
template: template
};
module.component(NAME, COMPONENT);

View File

@ -0,0 +1,8 @@
import template from './topbar.html';
import {module} from '../../module';
export const NAME = "vnTopbar";
export const COMPONENT = {
template: template
};
module.component(NAME, COMPONENT);

View File

@ -26,8 +26,7 @@ function config($stateProvider, $urlRouterProvider) {
template: route.template,
resolve: {
loader: loader(route)
}
}
})
});
}

6
@salix/app/src/module.js Normal file
View File

@ -0,0 +1,6 @@
import * as vendors from 'vendor';
import * as core from 'core';
import {NAME as CORE} from 'core';
export const NAME = 'salix';
export const module = vendors.ng.module(NAME,[CORE]);

10
@salix/app/src/run.js Normal file
View File

@ -0,0 +1,10 @@
import {ng} from 'vendor';
import {module} from './module';
export const run = function($rootScope){
$rootScope.$on('$viewContentLoaded',()=>{
componentHandler.upgradeAllRegistered();
})
}
run.$inject=['$rootScope'];
module.run(run);

View File

@ -43,11 +43,6 @@ export {NAME as COMBO_MT, factory as comboMt} from './combo/combo.mt'
export {NAME as DATE_PICKER, directive as DatePickerDirective} from './date-picker/date-picker'
export {NAME as DATE_PICKER_MT, factory as datePickerMt} from './date-picker/date-picker.mt'
export {NAME as VN_MAINMENU, COMPONENT as VN_MAINMENU_COMPONENT} from './main-menu/main-menu';
export {NAME as ACTIONS, COMPONENT as ACTIONS_COMPONENT} from './left-menu/actions';
export {NAME as DESCRIPTOR, COMPONENT as DESCRIPTOR_COMPONENT} from './left-menu/descriptor';
export {NAME as LEFT_MENU, COMPONENT as LEFTMENU_COMPONENT} from './left-menu/left-menu';
export {NAME as MENU_ITEM, COMPONENT as MENU_ITEM_COMPONENT} from './left-menu/menu-item';
export {NAME as CLIENT_TOPBAR, COMPONENT as CLIENT_TOPBAR_COMPONENT} from './topbar/topbar';

View File

@ -1,10 +0,0 @@
import template from './main-menu.html';
import {module} from '../module';
import * as util from '../util';
const _NAME = 'mainmenu';
export const NAME = util.getName(_NAME);
export const COMPONENT = {
template: template
};
module.component(NAME, COMPONENT);

View File

@ -1,10 +0,0 @@
import template from './topbar.html';
import {module} from '../module';
import * as util from '../util';
const _NAME = 'topbar';
export const NAME = util.getName(_NAME);
export const COMPONENT = {
template: template
};
module.component(NAME, COMPONENT);

View File

@ -1,8 +1,6 @@
import template from './index.html';
import {module} from '../../module';
const _NAME = 'clientIndex';
//export const NAME = module.core.util.getName(_NAME);
export const NAME = "vnClientIndex";
export const COMPONENT = {
template: template,