first commit

This commit is contained in:
2025-04-09 21:43:00 +02:00
commit af5be2794d
39 changed files with 1947 additions and 0 deletions

View File

@@ -0,0 +1,174 @@
var tblmeta, nodeid, nodeselect, tree, table;
var w = {
autoclose: false,
type: 'danger',
top: false,
rc0: {
top: false,
slide: true
}
};
var g = {
autoclose: false,
top: false,
rc0: {
top: false,
slide: true
}
};
var option = '';
function init() {
listtree();
// JQuery Tooltips aktivieren
$('[data-toggle="tooltip"]').tooltip({
delay: {
show: 1000,
hide: 100
}
});
}
function listtree() {
$("#tree").jstree("destroy");
$.get($('#base_url').val() + '/api/jstreedata/', function (res) {
//if ($.popyrc1(res, w)) return;
$('#tree')
.on('changed.jstree', function (e, data) {
// klick auf einen Node und holen der Mitglieder
if (data.node !== undefined) {
nodeselect = data.node;
treecklick(data);
}
})
.jstree({
'core': {
"check_callback": function (operation, node, node_parent, node_position, more) {
// unterbinden des droppen wenn man nicht owner ist und wenn externe sachen gedropt werden
if (more && more.dnd && operation == 'move_node') {
if (treelock || ogsidstochange[node_parent.id] == undefined) {
return false;
}
return true;
}
},
"keyboard": false,
"cache": false,
'data': res.data
},
"plugins": [
"wholerow", "sort", "html_data"
],
}).on('ready.jstree', function (d) {
$('.baum').show();
});
$('.treedetail').css('height', 'calc(100vh - 130px)');
});
}
function treecklick(data) {
$('.words').hide();
if (data.node.parent != '#') {
$('.words').show();
gettabledata(data.node.id);
}
}
function gettabledata() {
table = $('#tbl-worlds').DataTable({
ajax: {
"type": "GET",
"url": $('#base_url').val() + '/api/datatablesdata',
dataSrc: function (json) {
return json.data;
}
},
// fixedHeader: {
// header: true,
// },
// responsive: {
// details: false
// },
// scrollCollapse: true,
searching: true,
destroy: true,
deferRender: true,
// createdRow: function (row, data, index) {
// if (data.hidden == 1) {
// $(row).css('opacity', 0.2)
// }
// },
fixedColumns: {
left: 1,
right: 1
},
select: true,
// "stateSave": true,
// "stateLoadParams": function (settings, data) {
// console.log(settings)
// for (var i in data.columns) {
// data.columns[i].regex = false;
// data.columns[i].search = '';
// }
// },
columns: [
{
data: 'col1',
},
{
data: 'col2',
},
{
data: 'col3',
},
{
data: 'col4',
},
{
data: 'col5',
},
{
data: 'col6',
},
{
data: 'col7',
},
{
data: 'col8',
},
{
data: 'col9',
}
],
info: true,
scrollX: true,
// bLengthChange: false,
scroller: true,
scrollY: 'calc(100vh - 320px)', // Höhe der Tabelle
"sDom": 'Bfrti',
language: {
sLoadingRecords: "Lade Wörter...",
sInfo: '_START_ bis _END_ von _TOTAL_ Wörter',
sInfoEmpty: '',
infoFiltered: '(gefiltert von _MAX_ Wörter)',
searchPlaceholder: 'Suche',
sZeroRecords: 'Keine Wörter vorhanden.',
sSearch: '',
oPaginate: {
sFirst: 'Erste',
sPrevious: '<',
sNext: '>',
sLast: 'Letzte'
}
}
});
}
$(document).ready(function () {
init();
});

View File

@@ -0,0 +1 @@
function init(){listtree(),$('[data-toggle="tooltip"]').tooltip({delay:{show:1e3,hide:100}})}function listtree(){$("#tree").jstree("destroy"),$.get($("#base_url").val()+"/api/jstreedata/",function(e){$("#tree").on("changed.jstree",function(e,t){void 0!==t.node&&(nodeselect=t.node,treecklick(t))}).jstree({core:{check_callback:function(e,t,a,o,r){if(r&&r.dnd&&"move_node"==e)return!treelock&&null!=ogsidstochange[a.id]},keyboard:!1,cache:!1,data:e.data},plugins:["wholerow","sort","html_data"]}).on("ready.jstree",function(e){$(".baum").show()}),$(".treedetail").css("height","calc(100vh - 130px)")})}function treecklick(e){$(".words").hide(),"#"!=e.node.parent&&($(".words").show(),gettabledata(e.node.id))}function gettabledata(){table=$("#tbl-worlds").DataTable({ajax:{type:"GET",url:$("#base_url").val()+"/api/datatablesdata",dataSrc:function(e){return e.data}},searching:!0,destroy:!0,deferRender:!0,fixedColumns:{left:1,right:1},select:!0,columns:[{data:"col1"},{data:"col2"},{data:"col3"},{data:"col4"},{data:"col5"},{data:"col6"},{data:"col7"},{data:"col8"},{data:"col9"}],info:!0,scrollX:!0,scroller:!0,scrollY:"calc(100vh - 320px)",sDom:"Bfrti",language:{sLoadingRecords:"Lade Wörter...",sInfo:"_START_ bis _END_ von _TOTAL_ Wörter",sInfoEmpty:"",infoFiltered:"(gefiltert von _MAX_ Wörter)",searchPlaceholder:"Suche",sZeroRecords:"Keine Wörter vorhanden.",sSearch:"",oPaginate:{sFirst:"Erste",sPrevious:"<",sNext:">",sLast:"Letzte"}}})}var tblmeta,nodeid,nodeselect,tree,table,w={autoclose:!1,type:"danger",top:!1,rc0:{top:!1,slide:!0}},g={autoclose:!1,top:!1,rc0:{top:!1,slide:!0}},option="";$(document).ready(function(){init()});

7
xxx/app/public/js/xxx.js Normal file
View File

@@ -0,0 +1,7 @@
function xxx() {
}
$(document).ready(function () {
new xxx();
});