mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-23 01:16:43 +00:00
左侧菜单选中效果
This commit is contained in:
parent
3e23067a35
commit
7fb230bd1d
@ -1,7 +1,7 @@
|
||||
Creator.Objects.customers =
|
||||
name: "customers"
|
||||
label: "Customers"
|
||||
icon: "ion-ios-people-outline"
|
||||
icon: "ion-ios-world-outline"
|
||||
schema:
|
||||
name:
|
||||
label: "Name",
|
||||
|
@ -1,3 +1,3 @@
|
||||
Template.recordLayout.helpers
|
||||
Template.creatorLayout.helpers
|
||||
subsReady: ->
|
||||
return Steedos.subsBootstrap.ready()
|
||||
|
@ -1,4 +1,4 @@
|
||||
<template name="recordLayout">
|
||||
<template name="creatorLayout">
|
||||
{{#if subsReady}}
|
||||
<div class="steedos app-wrapper steedos-calendar skin-blue-light">
|
||||
{{# AdminLTE skin="blue" sidebarMini="true" }}
|
||||
|
@ -2,8 +2,9 @@ Template.creatorSidebar.helpers
|
||||
app_objects: ()->
|
||||
return Session.get("app_objects")
|
||||
|
||||
is_current_object: ()->
|
||||
return this == FlowRouter.getParam("object_name")
|
||||
object_i: ()->
|
||||
return Creator.Objects[this]
|
||||
|
||||
object: ()->
|
||||
return Creator.Objects[this]
|
||||
object_class_name: (obj)->
|
||||
if (obj == FlowRouter.getParam("object_name"))
|
||||
return "active"
|
||||
|
@ -6,10 +6,10 @@
|
||||
Creator
|
||||
</li>
|
||||
{{#each app_objects}}
|
||||
<li class="inbox {{#if is_current_object}}active{{/if}}">
|
||||
<li class="{{object_class_name this}}">
|
||||
<a href="/creator/crm/{{this}}/list">
|
||||
<i class="ion {{object.icon}}"></i>
|
||||
<span>{{object.label}}</span>
|
||||
<i class="ion {{object_i.icon}}"></i>
|
||||
<span>{{object_i.label}}</span>
|
||||
<!-- <span class="pull-right-container">
|
||||
<span class="label pull-right bg-red">10</span>
|
||||
</span> -->
|
||||
|
@ -11,8 +11,5 @@ FlowRouter.route '/creator',
|
||||
FlowRouter.route '/creator/:app_id/:object_name/list',
|
||||
triggersEnter: [ checkUserSigned ],
|
||||
action: (params, queryParams)->
|
||||
Meteor.call "creator_object_init", params.object_name, (error, object)->
|
||||
if object
|
||||
Creator.objectClientInit(params.object_name, object);
|
||||
BlazeLayout.render 'recordLayout',
|
||||
main: "creator_list"
|
||||
BlazeLayout.render 'creatorLayout',
|
||||
main: "creator_list"
|
||||
|
@ -51,7 +51,6 @@ Creator.baseSchema =
|
||||
|
||||
Meteor.startup ->
|
||||
_.each Creator.Objects, (obj, object_name)->
|
||||
console.log ("init " + object_name)
|
||||
if !Creator.Collections[object_name]
|
||||
schema = Creator.getObjectSchema(obj)
|
||||
_simpleSchema = new SimpleSchema(schema)
|
||||
|
Loading…
Reference in New Issue
Block a user