update
This commit is contained in:
@@ -388,3 +388,11 @@ class PluginManager:
|
||||
except Exception as exception:
|
||||
F.logger.error('Exception:%s', exception)
|
||||
F.logger.error(traceback.format_exc())
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_plugin_instance(cls, package_name):
|
||||
try:
|
||||
return cls.all_package_list[package_name]['P']
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -110,8 +110,9 @@ function showModal(data='EMPTY', title='JSON', json=true) {
|
||||
document.getElementById("modal_title").innerHTML = title;
|
||||
if (json) {
|
||||
data = JSON.stringify(data, null, 2);
|
||||
}
|
||||
document.getElementById("modal_body").innerHTML = "<pre>"+ data + "</pre>";;
|
||||
}
|
||||
document.getElementById("modal_body").innerHTML = '<pre style="white-space: pre-wrap;">' +data + '</pre>';
|
||||
|
||||
$("#large_modal").modal();
|
||||
}
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@ function globalSendCommand(command, arg1, arg2, arg3, modal_title, callback) {
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.msg != null) notify(ret.msg, ret.ret);
|
||||
if (ret.modal != null) m_modal(ret.modal, modal_title, false);
|
||||
if (ret.json != null) m_modal(ret.json, modal_title, true);
|
||||
if (ret.modal != null) showModal(ret.modal, modal_title, false);
|
||||
if (ret.json != null) showModal(ret.json, modal_title, true);
|
||||
if (callback != null) callback(ret);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
<div class="d-inline-block"></div>
|
||||
|
||||
*/
|
||||
function j_button_group(h) {
|
||||
var str = '<div class="btn-group btn-group-sm flex-wrap mr-2" role="group">';
|
||||
str += h
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_head2(name, title, active) %}
|
||||
{% macro m_tab_head(name, title, active) %}
|
||||
{% if active %}
|
||||
<a class="nav-item nav-link active" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{title}}</a>
|
||||
{% else %}
|
||||
@@ -176,21 +176,26 @@
|
||||
{% macro setting_input_textarea_and_buttons(id, left, buttons, value='', col='9', row='3', desc='', disabled=False) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<textarea id="{{id}}" name="{{id}}" class="col-md-12" rows="{{row}}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-primary"
|
||||
{% if b|length > 2 %}
|
||||
{% for d in b[2] %}
|
||||
data-{{d[0]}}="{{d[1]}}""
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<textarea id="{{id}}" name="{{id}}" class="col-md-12" rows="{{row}}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
</div>
|
||||
<div class="row" style="padding:5px;"></div>
|
||||
<div class="row">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-primary"
|
||||
{% if b|length > 2 %}
|
||||
{% for d in b[2] %}
|
||||
data-{{d[0]}}="{{d[1]}}""
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
@@ -370,13 +375,6 @@ option을 script로 넣을 때 사용
|
||||
|
||||
|
||||
<!-- 삭제해야함 --------------------------------------------------------->
|
||||
{% macro m_tab_head(name, active) %}
|
||||
{% if active %}
|
||||
<a class="nav-item nav-link active" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{name}}</a>
|
||||
{% else %}
|
||||
<a class="nav-item nav-link" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{name}}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_radio(id, title, radios, value=None, desc=None, disabled=False) %}
|
||||
{{ setting_top(title) }}
|
||||
|
||||
@@ -20,22 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="normal_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="normal_modal_title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="normal_modal_body" style="word-break:break-all;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="confirm_modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
@@ -92,27 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 예고편 Player Modal: START -->
|
||||
<div class="modal fade" id="video_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="video_modal_title" style="word-break:break-all;">예고편 재생: </h4>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_body" style="word-break:break-all;">
|
||||
<span id="video_player_body"></span>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" id='video_close_btn' class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 예고편 Player Modal: END -->
|
||||
|
||||
|
||||
<!--command modal-->
|
||||
{{ macros.m_modal_start('command_modal', '', 'modal-lg') }}
|
||||
<div>
|
||||
|
||||
@@ -38,20 +38,6 @@ class Util(object):
|
||||
F.logger.debug('Exception:%s', exception)
|
||||
F.logger.debug(traceback.format_exc())
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def save_from_dict_to_json(d, filename):
|
||||
from tool_base import ToolUtil
|
||||
ToolUtil.save_dict(d, filename)
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def change_text_for_use_filename(text):
|
||||
from tool_base import ToolBaseFile
|
||||
return ToolBaseFile.text_for_filename(text)
|
||||
|
||||
|
||||
# 토렌트 인포에서 최대 크기 파일과 폴더명을 리턴한다
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user