d17d45a3e15409efab0c091eaaa4e909c4cfc968
[motion-next.git] /
1 <div gridster="vm.config">
2   <ul>
3     <li gridster-item="widget" ng-repeat="widget in vm.config.widgets">
4       <md-card layout-fill>
5         <md-toolbar
6           class="height-40"
7           ng-style="{'background-color': widget.background, 'color': widget.foreground }"
8         >
9           <div
10             class="md-toolbar-tools height-40 no-margin"
11             layout="row"
12             layout-align="start center"
13           >
14             <a
15               ng-href="{{widget.link ? widget.link : 'javascript:void(0)'}}"
16               ng-style="{'color': widget.foreground}"
17               class="text-truncate"
18               flex
19             >
20               {{ widget.title || 'No Title' }}
21             </a>
22             <md-button
23               ng-if="!vm.config.preview"
24               class="draggable md-icon-button width-30 no-margin no-padding"
25               aria-label="Move"
26             >
27               <md-tooltip
28                 ><span translate="TOOLS.MOVE_WIDGET">Move</span></md-tooltip
29               >
30               <md-icon
31                 md-font-icon="icon-cursor-move"
32                 class="s20"
33                 ng-style="{'color': widget.foreground}"
34               ></md-icon>
35             </md-button>
36             <md-menu ng-if="!vm.config.preview">
37               <md-button
38                 ng-click="$mdMenu.open($event)"
39                 class="md-icon-button width-30 no-margin no-padding"
40                 aria-label="More"
41               >
42                 <md-icon
43                   md-font-icon="icon-dots-vertical"
44                   class="s20"
45                   ng-style="{'color': widget.foreground}"
46                 ></md-icon>
47               </md-button>
48               <md-menu-content>
49                 <md-menu-item>
50                   <md-button
51                     ng-click="vm.onEdit({widget: widget})"
52                     translate="TOOLS.EDIT_WIDGET"
53                     >Edit</md-button
54                   >
55                 </md-menu-item>
56                 <md-menu-item>
57                   <md-button
58                     ng-click="vm.onDelete({widget: widget})"
59                     translate="TOOLS.DELETE_WIDGET"
60                     >Delete</md-button
61                   >
62                 </md-menu-item>
63               </md-menu-content>
64             </md-menu>
65           </div>
66         </md-toolbar>
67         <md-card-content
68           class="resizable"
69           layout="column"
70           layout-align="center center"
71           flex
72           ng-style="{'background-color': widget.background, 'color': widget.foreground}"
73         >
74           <div ng-switch="widget.type" layout-fill>
75             <iframe
76               ng-switch-when="iframe|custom"
77               ng-switch-when-separator="|"
78               ng-src="{{vm.getTrustedURL(widget.attrs[0].value)}}"
79               frameborder="0"
80               style="border: 0px; width: 100%; height: 100%"
81             ></iframe>
82             <ds-widget-clock
83               ng-class="'font-size-' + (widget.attrs[2].value || 12)"
84               ng-switch-when="clock"
85               digital-format="widget.attrs[0].value"
86               gmt-offset="widget.attrs[1].value"
87               data-show-digital
88               show-gmt-info
89             ></ds-widget-clock>
90             <div ng-switch-default layout-fill>
91               <div ng-include="widget.templateUrl" layout-fill></div>
92             </div>
93           </div>
94         </md-card-content>
95       </md-card>
96     </li>
97   </ul>
98 </div>