-
Notifications
You must be signed in to change notification settings - Fork 297
/
dashboard.html
70 lines (66 loc) · 4.7 KB
/
dashboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<div>
<div class="btn-toolbar" ng-if="!options.hideToolbar">
<div class="btn-group" ng-if="!options.widgetButtons">
<span class="dropdown" on-toggle="toggled(open)">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
Button dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li ng-repeat="widget in widgetDefs">
<a href="#" ng-click="addWidgetInternal($event, widget);" class="dropdown-toggle"><span class="label label-primary">{{widget.name}}</span></a>
</li>
</ul>
</span>
</div>
<div class="btn-group" ng-if="options.widgetButtons">
<button ng-repeat="widget in widgetDefs"
ng-click="addWidgetInternal($event, widget);" type="button" class="btn btn-primary">
{{widget.name}}
</button>
</div>
<button class="btn btn-warning" ng-click="resetWidgetsToDefault()">Default Widgets</button>
<button ng-if="options.storage && options.explicitSave" ng-click="options.saveDashboard()" class="btn btn-success" ng-disabled="!options.unsavedChangeCount">{{ !options.unsavedChangeCount ? "all saved" : "save changes (" + options.unsavedChangeCount + ")" }}</button>
<button ng-click="clear();" type="button" class="btn btn-info">Clear</button>
</div>
<div ui-sortable="sortableOptions" ng-model="widgets" class="dashboard-widget-area">
<div ng-repeat="widget in widgets" ng-style="widget.containerStyle" class="widget-container" widget>
<div class="widget panel panel-default">
<div class="widget-header panel-heading">
<h3 class="panel-title">
<span class="widget-title" ng-dblclick="editTitle(widget)" ng-hide="widget.editingTitle">{{widget.title}}</span>
<form action="" class="widget-title" ng-show="widget.editingTitle" ng-submit="saveTitleEdit(widget, $event)">
<input type="text" ng-model="widget.title" ng-blur="titleLostFocus(widget, $event)" class="form-control">
</form>
<span class="label label-primary" ng-if="!options.hideWidgetName">{{widget.name}}</span>
</h3>
<div class="buttons">
<span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove" ng-if="!options.hideWidgetClose"></span>
<span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog" ng-if="!options.hideWidgetSettings"></span>
<span ng-click="widget.contentStyle.display = widget.contentStyle.display === 'none' ? 'block' : 'none'" class="glyphicon" ng-class="{'glyphicon-plus': widget.contentStyle.display === 'none', 'glyphicon-minus': widget.contentStyle.display !== 'none' }"></span>
</div>
</div>
<div class="panel-body widget-content" ng-style="widget.contentStyle"></div>
<div class="widget-w-resizer">
<div ng-if="widget.enableVerticalResize" class="nw-resizer" ng-mousedown="grabResizer($event, 'nw')"></div>
<div class="w-resizer" ng-mousedown="grabResizer($event, 'w')"></div>
<div ng-if="widget.enableVerticalResize" class="sw-resizer" ng-mousedown="grabResizer($event, 'sw')"></div>
</div>
<div class="widget-e-resizer">
<div ng-if="widget.enableVerticalResize" class="ne-resizer" ng-mousedown="grabResizer($event, 'ne')"></div>
<div class="e-resizer" ng-mousedown="grabResizer($event, 'e')"></div>
<div ng-if="widget.enableVerticalResize" class="se-resizer" ng-mousedown="grabResizer($event, 'se')"></div>
</div>
<div ng-if="widget.enableVerticalResize" class="widget-n-resizer">
<div class="nw-resizer" ng-mousedown="grabResizer($event, 'nw')"></div>
<div class="n-resizer" ng-mousedown="grabResizer($event, 'n')"></div>
<div class="ne-resizer" ng-mousedown="grabResizer($event, 'ne')"></div>
</div>
<div ng-if="widget.enableVerticalResize" class="widget-s-resizer">
<div class="sw-resizer" ng-mousedown="grabResizer($event, 'sw')"></div>
<div class="s-resizer" ng-mousedown="grabResizer($event, 's')"></div>
<div class="se-resizer" ng-mousedown="grabResizer($event, 'se')"></div>
</div>
</div>
</div>
</div>
</div>