-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from jr-k/develop
Release v2.5.2
- Loading branch information
Showing
79 changed files
with
3,032 additions
and
290 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
jQuery(document).ready(function ($) { | ||
|
||
const main = function () { | ||
inputOperatingSystemUpdate(); | ||
}; | ||
|
||
window.explrNodeStudioEdit = function ($this) { | ||
const nodeStudio = JSON.parse($this.parents('li:eq(0)').attr('data-entity-json')); | ||
showModal('modal-node-studio-edit'); | ||
$('.modal-node-studio-edit input:visible:eq(0)').focus().select(); | ||
$('#node-studio-edit-name').val(nodeStudio.name); | ||
$('#node-studio-edit-host').val(nodeStudio.host); | ||
$('#node-studio-edit-id').val(nodeStudio.id); | ||
$('#node-studio-edit-operating-system').val(nodeStudio.operating_system); | ||
$('#node-studio-edit-group-label').val(nodeStudio.group_label); | ||
$('.group-edit-link').attr('href', 'javascript:void(0);'); | ||
$('.form-group-for-group-id').addClass('hidden'); | ||
|
||
if (nodeStudio.group_id) { | ||
$('.form-group-for-group-id').removeClass('hidden'); | ||
$('.group-edit-link').attr('href', $('.group-edit-link').attr('data-route').replace('__id__', nodeStudio.group_id)); | ||
} | ||
|
||
inputOperatingSystemUpdate(); | ||
}; | ||
|
||
const inputOperatingSystemUpdate = function () { | ||
const $el = $('form:visible .operating-system-select'); | ||
if ($el.length === 0) return; | ||
const $form = $el.parents('form:eq(0)'); | ||
const value = $el.val(); | ||
const $selectedOption = $el.find('option[value='+value+']'); | ||
const optionAttributes = $selectedOption.get(0).attributes; | ||
const color = optionAttributes['data-color'].value; | ||
$('.operating-system-icon').attr('class', 'operating-system-icon fa ' + optionAttributes['data-icon'].value); | ||
$('.tab-select .widget').attr('class', 'widget ' + ('border-' + color) + ' ' + color); | ||
$form.find('button[type=submit]').attr('class', 'btn ' + ('btn-' + color)); | ||
}; | ||
|
||
$(document).on('change', '.operating-system-select', inputOperatingSystemUpdate); | ||
|
||
$(document).on('click', '.folder-add', function () { | ||
$('.dirview .new-folder').removeClass('hidden'); | ||
$('.page-content').animate({scrollTop: 0}, 0); | ||
$('.dirview input').focus(); | ||
}); | ||
|
||
$(document).on('click', '.node-studio-add', function () { | ||
showModal('modal-node-studio-add'); | ||
inputOperatingSystemUpdate(); | ||
$('.modal-node-studio-add input:eq(0)').focus().select(); | ||
}); | ||
|
||
$(document).on('submit', '.modal-node-studio-add form', function () { | ||
const $modal = $(this).parents('.modal:eq(0)'); | ||
$modal.find('button[type=submit]').addClass('hidden'); | ||
$modal.find('.btn-loading').removeClass('hidden'); | ||
}); | ||
|
||
main(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
jQuery(document).ready(function ($) { | ||
$('.active').removeClass('active'); | ||
|
||
$(document).on('click', '.explr-pick-element', function() { | ||
$('.active').removeClass('active'); | ||
const $item = $(this).parents('.explr-item:eq(0)'); | ||
const payload = $item.data('entity-json'); | ||
|
||
const $iframe = $('<iframe>', { | ||
src: payload.host, | ||
frameborder: 0 | ||
}); | ||
|
||
const $holder = $('.iframe-holder'); | ||
$holder.html($iframe); | ||
|
||
$(this).addClass('active'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.