d10e30eea5585fe18a96c592682c77a22e95e59e
[motion-next.git] /
1 <div id="agent-general" layout="column">
2   <div layout="row" layout-align="start center" class="md-primary-bg">
3     <md-button
4       class="md-raised no-margin width-50"
5       style="border-radius: 0px"
6       ng-class="{'md-primary': !vm.isActiveTab(0)}"
7       ng-click="vm.onClickTab(0)"
8       aria-label="home"
9     >
10       <md-tooltip md-direction="bottom" md-delay="500">Home</md-tooltip>
11       <md-icon md-font-icon="icon-home" class="icon"></md-icon>
12     </md-button>
13
14     <ms-tab-scroll style="overflow: hidden">
15       <div
16         layout="column"
17         ng-repeat="(key, tab) in vm.tabs"
18         ng-click="vm.onClickTab(tab.id)"
19         ng-class="{'grey-50-bg': vm.isActiveTab(tab.id)}"
20       >
21         <div
22           style="height: 34px"
23           layout="row"
24           layout-align="space-between center"
25         >
26           <md-icon
27             md-font-icon="{{tab.icon}}"
28             class="icon s16 margin-horizontal-5"
29             ng-class="tab.color + '-fg'"
30           >
31           </md-icon>
32           <span
33             class="text-truncate font-size-12"
34             ng-class="vm.isActiveTab(tab.id) ? 'black-fg' : 'grey-300-fg'"
35           >
36             {{tab.title}}
37             <span ng-if="tab.badges" class="badge md-white-fg md-red-bg"
38               >{{tab.badges}}</span
39             ></span
40           >
41           <md-button
42             class="md-icon-button md-mini no-margin"
43             ng-class="vm.isActiveTab(tab.id) ? 'md-primary' : 'grey-300-fg'"
44             aria-label="close"
45             ng-click="vm.closeTab(tab)"
46           >
47             <md-icon
48               md-font-icon="icon-close-circle-outline"
49               class="icon s16"
50             ></md-icon>
51           </md-button>
52         </div>
53         <div
54           style="height: 2px"
55           ng-class="vm.isActiveTab(tab.id) ? tab.color + '-bg' : ''"
56         ></div>
57       </div>
58     </ms-tab-scroll>
59   </div>
60   <div
61     layout="row"
62     class="agent-content"
63     ng-if="vm.isActiveTab(0)"
64     ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
65     ng-include="'app/main/apps/dashboards/views/general/agent/home/agent.general.home.html'"
66     ng-controller="AgentGeneralHomeController as vm_home"
67     ng-init="vm_home.init(vm.license, vm.setting)"
68   ></div>
69   <div
70     ng-if="!vm.isActiveTab(0)"
71     ng-repeat="(key, tab) in vm.tabs"
72     ng-switch="tab.type"
73   >
74     <div ng-switch-when="contact">
75       <div
76         class="agent-content"
77         ms-scroll
78         ng-if="vm.isActiveTab(tab.id)"
79         ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
80         ng-include="'app/main/apps/dashboards/views/general/agent/contact/agent.general.contact.html'"
81         ng-controller="AgentGeneralContactController as vm"
82         ng-init="vm.init(tab,$parent.vm.license)"
83       ></div>
84     </div>
85     <div ng-switch-when="popup">
86       <div
87         ng-if="vm.isActiveTab(tab.id)"
88         ms-scroll
89         ng-include="'app/main/apps/dashboards/views/general/agent/popup/agent.general.popup.html'"
90         ng-controller="AgentGeneralPopupController as vm"
91         ng-init="vm.init(tab)"
92       ></div>
93     </div>
94     <div ng-switch-when="jscripty">
95       <div
96         class="agent-content"
97         ms-scroll
98         ng-if="vm.isActiveTab(tab.id)"
99         ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
100         ng-include="'app/main/apps/dashboards/views/general/agent/jscripty/agent.general.jscripty.html'"
101         ng-controller="AgentGeneralJscriptyController as vm"
102         ng-init="vm.init(tab)"
103       ></div>
104     </div>
105     <div ng-switch-when="bot">
106       <div
107         id="interaction-app"
108         ng-if="vm.isActiveTab(tab.id)"
109         class="agent-content"
110         ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
111         ng-include="'app/main/apps/dashboards/views/general/agent/bot/agent.general.bot.html'"
112         ng-controller="AgentGeneralBotController as vm"
113         ng-init="vm.init(tab, $parent.vm.setting)"
114       ></div>
115     </div>
116     <div ng-switch-when="interaction">
117       <div
118         id="interaction-app"
119         ng-if="vm.isActiveTab(tab.id)"
120         class="agent-content"
121         ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
122         ng-include="'app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html'"
123         ng-controller="AgentGeneralInteractionController as vm"
124         ng-init="vm.init(tab, $parent.vm.setting)"
125       ></div>
126     </div>
127     <div ng-switch-when="iframe">
128       <div
129         id="iframe"
130         ng-if="vm.isActiveTab(tab.id)"
131         class="agent-content"
132         ng-style="{'top': vm.detectBrowser.browser == 'safari' ? '100px' : '36px'}"
133         ng-include="'app/main/apps/dashboards/views/general/agent/iframe/agent.general.iframe.html'"
134         ng-controller="AgentGeneralIframeController as vm"
135         ng-init="vm.init(tab, $parent.vm.setting)"
136       ></div>
137     </div>
138   </div>
139 </div>