2015-04-15 23:41:05 +02:00
|
|
|
<h4>{{ _('Control') }}</h4>
|
|
|
|
|
2015-06-04 18:41:39 +02:00
|
|
|
<div style="min-height:15px; margin: 16px 16px; border:1px solid #00e500" id="base" data-bind="contextMenu: { menuSelector: '#controlContextMenu', menuSelected: $root.controlContextMenu }">
|
2015-04-15 23:41:05 +02:00
|
|
|
</div>
|
2015-04-22 09:30:04 +02:00
|
|
|
|
|
|
|
<!-- "width: 588px" to be the same as teh real Control tab-->
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="innerSortable" style="width: 588px; clear: both; display: none;" id="customControls" data-bind="visible: loginState.isUser, template: { name: $root.displayMode, foreach: controls }"></div>
|
2015-04-15 23:41:05 +02:00
|
|
|
|
|
|
|
<ul id="controlContextMenu" class="dropdown-menu" role="menu" style="display:block;position:fixed !important;margin-bottom:5px;">
|
|
|
|
<li>
|
2015-04-19 21:19:54 +02:00
|
|
|
<a href="#" cmd="createContainer">{{ _('Create Container') }}</a>
|
2015-04-15 23:41:05 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul id="commandContextMenu" class="dropdown-menu" role="menu" style="display:block;position:fixed !important;margin-bottom:5px;">
|
2015-04-19 21:19:54 +02:00
|
|
|
<li><a href="#" cmd="editElement">{{ _('Edit') }}</a></li>
|
|
|
|
<li><a href="#" cmd="deleteElement">{{ _('Delete') }}</a></li>
|
2015-04-15 23:41:05 +02:00
|
|
|
<li class="divider"></li>
|
|
|
|
<li class="dropdown-submenu">
|
|
|
|
<a href="#">Style</a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li>
|
|
|
|
<a href="#" cmd="editStyle">Normal</a>
|
|
|
|
</li>
|
|
|
|
<li class="btn-primary">
|
|
|
|
<a href="#" cmd="editStyle">Primary</a>
|
|
|
|
</li>
|
|
|
|
<li class="btn-danger">
|
|
|
|
<a href="#" cmd="editStyle">Danger</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul id="containerContextMenu" class="dropdown-menu" role="menu" style="display:block;position:fixed !important;margin-bottom:5px;">
|
|
|
|
<li class="dropdown-submenu">
|
|
|
|
<a href="#">Create Command</a>
|
|
|
|
<ul class="dropdown-menu">
|
2015-04-19 21:19:54 +02:00
|
|
|
<li><a href="#" cmd="createContainer">{{ _('Container') }}</a></li>
|
|
|
|
<li><a href="#" cmd="createCommand">{{ _('Command') }}</a></li>
|
2015-04-24 14:49:17 +02:00
|
|
|
<li><a href="#" cmd="createScript">{{ _('Script Command') }}</a></li>
|
2015-04-19 21:19:54 +02:00
|
|
|
<li><a href="#" cmd="createOutput">{{ _('Output') }}</a></li>
|
2015-04-15 23:41:05 +02:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="divider"></li>
|
2015-04-19 21:19:54 +02:00
|
|
|
<li><a href="#" cmd="editElement">{{ _('Edit') }}</a></li>
|
|
|
|
<li><a href="#" cmd="deleteElement">{{ _('Delete') }}</a></li>
|
2015-04-15 23:41:05 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Templates for custom controls -->
|
2015-06-04 18:41:39 +02:00
|
|
|
<script type="text/html" id="settingsCustomControls_containerTemplate_nameless">
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="custom_section sortable" data-bind="contextMenu: { menuSelector: '#containerContextMenu', menuSelected: $root.controlContextMenu }, css: { 'custom_section_vertical_section': name() == '' }, attr: { 'id': id }">
|
2015-06-04 18:41:39 +02:00
|
|
|
<!-- ko template: { name: 'settingsCustomControls_containerTemplate', data: $data } --><!-- /ko -->
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="settingsCustomControls_containerTemplate_collapsable">
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="custom_section sortable" data-bind="contextMenu: { menuSelector: '#containerContextMenu', menuSelected: $root.controlContextMenu }, attr: { 'id': id }">
|
2015-06-04 18:41:39 +02:00
|
|
|
<h1 onclick="$(this).children().first().toggleClass('icon-caret-down icon-caret-right').parent().next().slideToggle('fast')"><i data-bind="css: {'icon-caret-down': !collapsed(), 'icon-caret-right': collapsed()}"></i> <span data-bind="text: name"></span></h1>
|
|
|
|
<!-- ko template: { name: 'settingsCustomControls_containerTemplate', data: $data } --><!-- /ko -->
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
<script type="text/html" id="settingsCustomControls_containerTemplate">
|
|
|
|
<!-- ko if: layout() == 'vertical' -->
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="custom_section_vertical innerSortable" data-bind="template: { name: $root.displayMode, foreach: children }, css: {hide: collapsed() && name() != '' }"></div>
|
2015-06-04 18:41:39 +02:00
|
|
|
<!-- /ko -->
|
|
|
|
|
|
|
|
<!-- ko if: layout() == 'horizontal' -->
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="custom_section_horizontal innerSortable" data-bind="template: { name: $root.displayMode, foreach: children }, css: {hide: collapsed() && name() != '' }"></div>
|
2015-06-04 18:41:39 +02:00
|
|
|
<!-- /ko -->
|
|
|
|
|
|
|
|
<!-- ko if: layout() == 'horizontal_grid' -->
|
2015-08-31 09:01:25 +02:00
|
|
|
<div class="row-fluid custom_section_horizontal_grid innerSortable" data-bind="css: {hide: collapsed() && name() != ''}">
|
2015-06-04 18:41:39 +02:00
|
|
|
<!-- ko foreach: children -->
|
|
|
|
<div data-bind="template: { name: $root.displayMode }, css: $root.rowCss($data)"></div>
|
|
|
|
<!-- /ko -->
|
|
|
|
</div>
|
|
|
|
<!-- /ko -->
|
2015-04-15 23:41:05 +02:00
|
|
|
</script>
|
|
|
|
<script type="text/html" id="settingsCustomControls_controlTemplate">
|
2015-08-31 09:01:25 +02:00
|
|
|
<form class="form-inline custom_control" style="min-height:15px; border:1px dotted #000000" data-bind="contextMenu: { menuSelector: '#commandContextMenu', menuSelected: $root.controlContextMenu }, css: { 'sortable': $parent.layout() != 'horizontal_grid' }, attr: { 'id': id }">
|
2015-04-19 21:46:14 +02:00
|
|
|
<!-- ko template: { name: 'settingsCustomControls_controlTemplate_input', data: $data, if: $data.hasOwnProperty('input') } --><!-- /ko -->
|
|
|
|
<!-- ko template: { name: 'settingsCustomControls_controlTemplate_command', data: $data, if: $data.hasOwnProperty('command') || $data.hasOwnProperty('commands') || $data.hasOwnProperty('script') || $data.hasOwnProperty('javascript') } --><!-- /ko -->
|
2015-04-30 10:06:03 +02:00
|
|
|
<!-- ko template: { name: 'settingsCustomControls_controlTemplate_output', data: $data, if: $data.hasOwnProperty('value') } --><!-- /ko -->
|
2015-04-15 23:41:05 +02:00
|
|
|
</form>
|
|
|
|
</script>
|
2015-04-19 21:46:14 +02:00
|
|
|
<script type="text/html" id="settingsCustomControls_controlTemplate_input">
|
2015-04-15 23:41:05 +02:00
|
|
|
<!-- ko foreach: input -->
|
2015-04-19 21:46:14 +02:00
|
|
|
<label style="cursor: default" data-bind="text: name"></label>
|
2015-04-15 23:41:05 +02:00
|
|
|
<!-- ko if: slider -->
|
2015-04-26 22:42:43 +02:00
|
|
|
<input type="number" style="width: 100px" data-bind="slider: {value: value, min: slider.min(), max: slider.max(), step: slider.step(), enabled: false }">
|
2015-04-15 23:41:05 +02:00
|
|
|
<!-- /ko -->
|
|
|
|
<!-- ko ifnot: slider -->
|
2015-04-30 09:00:32 +02:00
|
|
|
<input type="text" class="input-small" data-bind="attr: {placeholder: name}, value: value, disable: true">
|
2015-04-15 23:41:05 +02:00
|
|
|
<!-- /ko -->
|
|
|
|
<!-- /ko -->
|
|
|
|
</script>
|
2015-04-19 21:46:14 +02:00
|
|
|
<script type="text/html" id="settingsCustomControls_controlTemplate_output">
|
2015-04-30 09:00:32 +02:00
|
|
|
<label style="cursor: default" data-bind="text: value"></label>
|
2015-04-15 23:41:05 +02:00
|
|
|
</script>
|
2015-04-19 21:46:14 +02:00
|
|
|
<script type="text/html" id="settingsCustomControls_controlTemplate_command">
|
2015-04-24 14:49:17 +02:00
|
|
|
<button class="btn" data-bind="text: name" onclick="event.preventDefault()"></button>
|
2015-04-15 23:41:05 +02:00
|
|
|
</script>
|
|
|
|
<!-- End of templates for custom controls -->
|