node player groups wip
This commit is contained in:
parent
86548dd4aa
commit
e64c899cfd
File diff suppressed because one or more lines are too long
@ -1,4 +1,5 @@
|
||||
let onPickedElement = function(element) {};
|
||||
let onPickedElement = function (element) {
|
||||
};
|
||||
|
||||
jQuery(function ($) {
|
||||
|
||||
@ -163,6 +164,14 @@ jQuery(function ($) {
|
||||
event.preventDefault();
|
||||
selectEpxlrLink($(this));
|
||||
});
|
||||
$(document).on('click', 'a.explr-pick-element', function (event) {
|
||||
event.preventDefault();
|
||||
const callback = $(this).attr('data-callback');
|
||||
|
||||
if (callback) {
|
||||
window[callback]($(this));
|
||||
}
|
||||
});
|
||||
$(document).on('dblclick', 'a.explr-link', function (event) {
|
||||
event.preventDefault();
|
||||
$(this).off('click');
|
||||
@ -191,7 +200,7 @@ jQuery(function ($) {
|
||||
});
|
||||
|
||||
$(document).on('click', '.modal-explr-picker .explr-pick-element', function () {
|
||||
onPickedElement(JSON.parse($(this).attr('data-json')));
|
||||
onPickedElement(JSON.parse($(this).parents('li:eq(0)').attr('data-entity-json')));
|
||||
hidePicker();
|
||||
});
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@ jQuery(document).ready(function ($) {
|
||||
|
||||
$(document).on('click', '.node-player-group-player-assign', function () {
|
||||
const route = $(this).attr('data-route');
|
||||
showPickers('modal-node-player-explr-picker', function(node_player) {
|
||||
if (!node_player.group_id || (node_player.group_id && confirm(l.js_fleet_node_player_assign_confirmation))) {
|
||||
document.location.href = route.replace('__id__', node_player.id);
|
||||
showPickers('modal-node-player-explr-picker', function(nodePlayer) {
|
||||
if (!nodePlayer.group_id || (nodePlayer.group_id && confirm(l.js_fleet_nodePlayer_assign_confirmation))) {
|
||||
document.location.href = route.replace('__id__', nodePlayer.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -4,13 +4,14 @@ jQuery(document).ready(function ($) {
|
||||
inputOperatingSystemUpdate();
|
||||
};
|
||||
|
||||
window.nodePlayerEdit = function ($this) {
|
||||
window.explrNodePlayerEdit = function ($this) {
|
||||
const nodePlayer = JSON.parse($this.parents('li:eq(0)').attr('data-entity-json'));
|
||||
showModal('modal-node-player-edit');
|
||||
$('.modal-node-player-edit input:visible:eq(0)').focus().select();
|
||||
$('#node-player-edit-name').val(nodePlayer.name);
|
||||
$('#node-player-edit-host').val(nodePlayer.host);
|
||||
$('#node-player-edit-id').val(nodePlayer.id);
|
||||
$('#node-player-edit-operating-system').val(nodePlayer.operating_system);
|
||||
$('#node-player-edit-group-label').val(nodePlayer.group_label);
|
||||
$('.group-edit-link').attr('href', 'javascript:void(0);');
|
||||
$('.form-group-for-group-id').addClass('hidden');
|
||||
|
||||
@ -1,65 +1,66 @@
|
||||
.breadcrumb-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
border-bottom: $layoutBorder;
|
||||
background: transparent;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-self: stretch;
|
||||
border-bottom: $layoutBorder;
|
||||
background: transparent;
|
||||
padding: 10px;
|
||||
|
||||
ul.breadcrumb {
|
||||
background: #222;
|
||||
padding: 6px 4px 5px 4px;
|
||||
box-shadow: 1px 1px .5px .5px inset rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid #222;
|
||||
border-radius: $baseRadius;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
overflow-x: auto;
|
||||
max-width: 65vw;
|
||||
white-space: nowrap;
|
||||
|
||||
ul.breadcrumb {
|
||||
background: #222;
|
||||
padding: 6px 4px 5px 4px;
|
||||
box-shadow: 1px 1px .5px .5px inset rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid #222;
|
||||
border-radius: $baseRadius;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
||||
li {
|
||||
&.divider {
|
||||
margin: 0 5px;
|
||||
&.divider {
|
||||
margin: 0 5px;
|
||||
|
||||
i {
|
||||
color: #AAA;
|
||||
}
|
||||
}
|
||||
i {
|
||||
color: #AAA;
|
||||
}
|
||||
}
|
||||
|
||||
span,
|
||||
a {
|
||||
border-radius: $baseRadius;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: $white;
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
span,
|
||||
a {
|
||||
border-radius: $baseRadius;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: $white;
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
a {
|
||||
color: #fff;
|
||||
background: $seaBlue;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
a {
|
||||
color: #fff;
|
||||
background: $seaBlue;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child a {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
&:last-child a {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,7 +137,6 @@ form {
|
||||
}
|
||||
|
||||
&.input-naked {
|
||||
padding-left: 0;
|
||||
color: #BBB;
|
||||
}
|
||||
|
||||
|
||||
@ -3,8 +3,7 @@
|
||||
{% set has_children = folder.children or node_player_children %}
|
||||
|
||||
<li class="icon-folder li-explr-folder li-explr-folder-{{ folder.id }}">
|
||||
<a href="{% if use_href %}{{ url_for('fleet_node_player_cd') }}?path=
|
||||
{{ folder.path }}{% else %}javascript:void(0);{% endif %}"
|
||||
<a href="{% if use_href %}{{ url_for('fleet_node_player_cd') }}?path={{ folder.path }}{% else %}javascript:void(0);{% endif %}"
|
||||
class="{% if folder.path == working_folder_path %}active{% endif %} {{ 'explr-pick-folder' if not use_href }}">
|
||||
{{ folder.name }}
|
||||
</a>
|
||||
@ -17,17 +16,16 @@
|
||||
{% for node_player in node_player_children %}
|
||||
{% set icon = enum_operating_system.get_fa_icon(node_player.operating_system) %}
|
||||
{% set color = enum_operating_system.get_color_icon(node_player.operating_system) %}
|
||||
<li class="explr-item">
|
||||
<li class="explr-item" data-entity-json="{{ json_dumps(node_player.to_dict()) }}">
|
||||
<i class="fa {{ icon }} {{ color }} main"></i>
|
||||
{% if node_player.group_id %}
|
||||
<sub>
|
||||
<i class="fa fa-layer-group"></i>
|
||||
</sub>
|
||||
{% endif %}
|
||||
<a href="
|
||||
{% if use_href %}{{ url_for('fleet_node_player_edit', node_player_id=node_player.id) }}{% else %}javascript:void(0);{% endif %}"
|
||||
class="{{ 'explr-pick-element' if not use_href }}"
|
||||
data-json="{{ json_dumps(node_player.to_dict()) }}">
|
||||
<a href="javascript:void(0);"
|
||||
class="explr-pick-element"
|
||||
{% if use_href %}data-callback="explrNodePlayerEdit"{% endif %}>
|
||||
{{ node_player.name }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -153,9 +153,9 @@
|
||||
{% set group_label = groups[node_player.group_id]|default(l.common_empty) %}
|
||||
<li class="draggable" data-path="{{ working_folder_path }}" data-id="{{ node_player.id }}"
|
||||
data-folder="0" data-entity-json="{{ node_player.to_json({"group_label": group_label}) }}">
|
||||
<a href="{{ url_for('fleet_node_player_edit', node_player_id=node_player.id) }}"
|
||||
<a href="javascript:void(0);"
|
||||
class="explr-link explr-item-selectable explr-item-actionable explr-item-entity"
|
||||
data-callback="nodePlayerEdit">
|
||||
data-callback="explrNodePlayerEdit">
|
||||
<i class="fa {{ icon }} {{ color }} main"></i>
|
||||
{% if node_player.group_id %}
|
||||
<sub>
|
||||
|
||||
@ -3,8 +3,7 @@
|
||||
{% set has_children = folder.children or content_children %}
|
||||
|
||||
<li class="icon-folder li-explr-folder li-explr-folder-{{ folder.id }}">
|
||||
<a href="{% if use_href %}{{ url_for('slideshow_content_cd') }}?path=
|
||||
{{ folder.path }}{% else %}javascript:void(0);{% endif %}"
|
||||
<a href="{% if use_href %}{{ url_for('slideshow_content_cd') }}?path={{ folder.path }}{% else %}javascript:void(0);{% endif %}"
|
||||
class="{% if folder.path == working_folder_path %}active{% endif %} {{ 'explr-pick-folder' if not use_href }}">
|
||||
{{ folder.name }}
|
||||
</a>
|
||||
@ -18,7 +17,7 @@
|
||||
{% set slides = slides_with_content[content.id]|default([]) %}
|
||||
{% set icon = enum_content_type.get_fa_icon(content.type) %}
|
||||
{% set color = enum_content_type.get_color_icon(content.type) %}
|
||||
<li class="explr-item">
|
||||
<li class="explr-item" data-entity-json="{{ json_dumps(content.to_dict()) }}">
|
||||
<i class="fa {{ icon }} {{ color }}"></i>
|
||||
{% if slides|length > 0 %}
|
||||
<sub>
|
||||
@ -27,8 +26,7 @@
|
||||
{% endif %}
|
||||
<a href="
|
||||
{% if use_href %}{{ url_for('slideshow_content_edit', content_id=content.id) }}{% else %}javascript:void(0);{% endif %}"
|
||||
class="{{ 'explr-pick-element' if not use_href }}"
|
||||
data-json="{{ json_dumps(content.to_dict()) }}">
|
||||
class="{{ 'explr-pick-element' if not use_href }}">
|
||||
{{ content.name }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user