mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Studienordnung Seitenmenues Resizeable
Icons bei aufgeklappten Eintraegen korrigiert Wenn Spalten des Trees vergroessert werden, dann wird ein Scrollbalken angezeigt anstatt die Überschriften umzubrechen
This commit is contained in:
Vendored
+2
File diff suppressed because one or more lines are too long
@@ -31,7 +31,7 @@
|
||||
// need to use a selector in jquery 1.4.4+
|
||||
depth = a.parentsUntil(tree.get_container().get(0).tagName + ".jstree").filter("li").length;
|
||||
width = width - depth * 18;
|
||||
a.css({width: width, "vertical-align": "top", "overflow": "hidden", "float": "left"});
|
||||
a.css({width: width, "vertical-align": "top", "overflow": "hidden"}); //float_left
|
||||
};
|
||||
renderATitle = function(node, t, tree) {
|
||||
var a = node.get(0).tagName.toLowerCase() === "a" ? node : node.children("a"), title, col = tree.data.grid.columns[0];
|
||||
@@ -57,7 +57,7 @@
|
||||
this.data.grid.columns = s.columns || [];
|
||||
this.data.grid.treeClass = "jstree-grid-col-0";
|
||||
this.data.grid.columnWidth = s.width;
|
||||
this.data.grid.defaultConf = {display: "inline-block", "*display": "inline", "*+display": "inline", "float": "left"};
|
||||
this.data.grid.defaultConf = {display: "inline-block", "*display": "inline", "*+display": "inline"};
|
||||
this.data.grid.isThemeroller = !!this.data.themeroller;
|
||||
this.data.grid.treeWidthDiff = 0;
|
||||
this.data.grid.resizable = s.resizable;
|
||||
@@ -76,10 +76,11 @@
|
||||
styled = true;
|
||||
styles = [
|
||||
'.jstree-grid-cell {padding-left: 4px; vertical-align: top; overflow:hidden;}',
|
||||
'.jstree-grid-separator {display: inline-block; border-width: 0 2px 0 0; *display:inline; *+display:inline; margin-right:0px;float:left;}',
|
||||
'.jstree-grid-header-cell {float: left;}',
|
||||
'.jstree-grid-separator {display: inline-block; border-width: 0 2px 0 0; *display:inline; *+display:inline; margin-right:0px;}',
|
||||
'.jstree-grid-wrapper {}',
|
||||
'.jstree-grid-header-cell {}',
|
||||
'.jstree-grid-header-themeroller {border: 0; padding: 1px 3px;}',
|
||||
'.jstree-grid-header-regular {background-color: #EBF3FD;}',
|
||||
'.jstree-grid-header-regular {background-color: #EBF3FD; white-space:nowrap}',
|
||||
'.jstree-grid-resizable-separator {cursor: col-resize;}',
|
||||
'.jstree-grid-separator-regular {border-color: #d0d0d0; border-style: solid;}',
|
||||
'.jstree-grid-cell-themeroller {border: none !important; background: transparent !important;}'
|
||||
@@ -105,7 +106,6 @@
|
||||
node.find("li > a").each($.proxy(function(i, elm) {
|
||||
renderAWidth($(elm), this);
|
||||
}, this));
|
||||
|
||||
}, this));
|
||||
if (this.data.grid.isThemeroller) {
|
||||
this.get_container()
|
||||
@@ -230,7 +230,7 @@
|
||||
isAlreadyGrid = a.hasClass(c);
|
||||
|
||||
if (a.length === 1) {
|
||||
a.prev().css("float", "left");
|
||||
// a.prev().css("float", "left");
|
||||
a.addClass(c);
|
||||
renderAWidth(a, _this);
|
||||
renderATitle(a, t, _this);
|
||||
|
||||
@@ -35,6 +35,7 @@ var isLVFilterLoaded=false;
|
||||
/**
|
||||
* Error-Behandlung bei Ajax Requests
|
||||
*/
|
||||
|
||||
function loadError(xhr, textStatus, errorThrown)
|
||||
{
|
||||
if(xhr.status==200)
|
||||
@@ -133,7 +134,7 @@ function drawStudienordnungen(data)
|
||||
{
|
||||
if(data[i].studienordnung_id !== null)
|
||||
{
|
||||
obj=obj+'<li><a href="#Load'+data[i].studienordnung_id+'" onclick="loadStudienplanSTO('+data[i].studienordnung_id+',\''+data[i].bezeichnung+'\');return false;">'+data[i].bezeichnung+'</a>'
|
||||
obj=obj+'<li><a style="white-space:nowrap" href="#Load'+data[i].studienordnung_id+'" onclick="loadStudienplanSTO('+data[i].studienordnung_id+',\''+data[i].bezeichnung+'\');return false;">'+data[i].bezeichnung+'</a>'
|
||||
+' <a href="#Edit'+data[i].studienordnung_id+'" onclick="editStudienordnung('+data[i].studienordnung_id+');return false;"><img title="Bearbeiten" src="../../skin/images/edit.png"></a>'
|
||||
+' <a href="#Copy'+data[i].studienordnung_id+'" onclick="copyStudienordnung('+data[i].studienordnung_id+');return false;"><img title="Studienordnung kopieren" src="../../skin/images/copy.png"></a> '
|
||||
+' <a href="../../content/pdfExport.php?xml=studienordnung.rdf.php&xsl=Studienordnung&studienordnung_id='+data[i].studienordnung_id+'&stg_kz=0&output=doc"><img style="cursor:pointer; height: 16px;" title="Studienordnung als Word-Dokument exportieren" src="../../skin/images/doc_icon.png"></a>'
|
||||
@@ -309,9 +310,10 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
|
||||
treeData.push(obj);
|
||||
}
|
||||
|
||||
|
||||
// DIV fuer den Tree neu anlegen damit der alte Tree vollstaendig entfernt wird
|
||||
$("#data").html("<div id='treeData'></div>");
|
||||
|
||||
|
||||
function searchChildren(element, matchingId, original)
|
||||
{
|
||||
var found = false;
|
||||
@@ -482,9 +484,11 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
|
||||
|
||||
// Studienplan_lehrveranstaltung_id ermitteln
|
||||
var studienplan_lehrveranstaltung_id='';
|
||||
if(data.rslt.o[0].attributes.studienplan_lehrveranstaltung_id)
|
||||
if(data.rslt.o[0].attributes.studienplan_lehrveranstaltung_id){
|
||||
studienplan_lehrveranstaltung_id=data.rslt.o[0].attributes.studienplan_lehrveranstaltung_id.value;
|
||||
|
||||
$("#treeData").jstree.refresh();
|
||||
}
|
||||
|
||||
// Aenderung speichern
|
||||
saveJsondataFromTree(data.rslt.o[0].id, studienplan_id, studienplan_lehrveranstaltung_id);
|
||||
|
||||
@@ -626,6 +630,8 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
|
||||
}
|
||||
});
|
||||
$( "#tabs" ).show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -877,6 +883,7 @@ function showLVTree(data)
|
||||
"select_limit": 1,
|
||||
"select_multiple_modifier": "ctrl"
|
||||
},
|
||||
|
||||
json_data: {
|
||||
data: TreeData,
|
||||
progressive_render : true
|
||||
@@ -922,6 +929,8 @@ function showLVTree(data)
|
||||
{
|
||||
$("#loadingGif").remove();
|
||||
$("h3:contains('Daten werden geladen...')").remove();
|
||||
$("#filteredLVs").height("auto");
|
||||
$("#menueRechts").height("auto");
|
||||
//hideAllTreeColumns();
|
||||
}).bind("select_node.jstree", function(event, data)
|
||||
{
|
||||
@@ -938,6 +947,21 @@ function showLVTree(data)
|
||||
if(lvid!==undefined)
|
||||
loadLVKompatibilitaet(lvid);
|
||||
|
||||
}).bind("move_node.jstree", function(event, data)
|
||||
{
|
||||
var studienplan_lehrveranstaltung_id='';
|
||||
if(data.rslt.o[0].attributes.studienplan_lehrveranstaltung_id){
|
||||
studienplan_lehrveranstaltung_id=data.rslt.o[0].attributes.studienplan_lehrveranstaltung_id.value;
|
||||
$("#treeData").jstree.refresh();
|
||||
}
|
||||
|
||||
// Aenderung speichern
|
||||
saveJsondataFromTree(data.rslt.o[0].id, studienplan_id, studienplan_lehrveranstaltung_id);
|
||||
|
||||
// ECTS Summen neu berechnen
|
||||
|
||||
hideAllTreeColumns();
|
||||
writeOverallSum(nodes);
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -950,6 +974,9 @@ function showLVTree(data)
|
||||
$("h3:contains('')").remove();
|
||||
$("#filteredLVs").append("<div id='lvListe'>Keine Einträge gefunden!</div>");
|
||||
}
|
||||
/*$("#filteredLVs").css(
|
||||
max-width, $("#divLVuebersicht").width()
|
||||
);*/
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1538,4 +1565,4 @@ function copyStudienordnung(studienordnung_id)
|
||||
loadStudienordnung();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,8 @@ echo '<!DOCTYPE html>
|
||||
|
||||
<script type="text/javascript" src="../../include/js/treeGrid/jstreegrid.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../include/js/colResizable-1.5.min.js"></script>
|
||||
|
||||
<script src="studienordnung_lvregel.js" type="text/javascript"></script>
|
||||
<script src="studienordnung.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
@@ -63,6 +65,12 @@ echo '<!DOCTYPE html>
|
||||
//width: auto;
|
||||
}
|
||||
|
||||
.col_lehrform {
|
||||
width: auto !important;
|
||||
align:center;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.header_ects {
|
||||
//width: auto !important;
|
||||
}
|
||||
@@ -81,11 +89,11 @@ echo '<!DOCTYPE html>
|
||||
.find('h3')
|
||||
.addClass('ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom')
|
||||
.hover(function() { $(this).toggleClass('ui-state-hover'); })
|
||||
.prepend('<span class=\"ui-icon ui-icon-triangle-1-e\"></span>')
|
||||
.prepend('<span class=\"ui-icon ui-icon-triangle-1-s\"></span>')
|
||||
.click(function() {
|
||||
$(this)
|
||||
.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom')
|
||||
.find('> .ui-icon').toggleClass('ui-icon-triangle-1-e ui-icon-triangle-1-s').end()
|
||||
.find('> .ui-icon').toggleClass('ui-icon-triangle-1-s ui-icon-triangle-1-e').end()
|
||||
.next().toggleClass('ui-accordion-content-active').slideToggle();
|
||||
return false;
|
||||
})
|
||||
@@ -93,16 +101,17 @@ echo '<!DOCTYPE html>
|
||||
.addClass('ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom');
|
||||
|
||||
";
|
||||
echo "$(\"#layoutTable\").colResizable({liveDrag:true});";
|
||||
echo "
|
||||
jqUi('#menueRechts').addClass('ui-accordion ui-accordion-icons ui-widget ui-helper-reset')
|
||||
.find('h2')
|
||||
.addClass('ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom')
|
||||
.hover(function() { $(this).toggleClass('ui-state-hover'); })
|
||||
.prepend('<span class=\"ui-icon ui-icon-triangle-1-e\"></span>')
|
||||
.prepend('<span class=\"ui-icon ui-icon-triangle-1-s\"></span>')
|
||||
.click(function() {
|
||||
$(this)
|
||||
.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom')
|
||||
.find('> .ui-icon').toggleClass('ui-icon-triangle-1-e ui-icon-triangle-1-s').end()
|
||||
.find('> .ui-icon').toggleClass('ui-icon-triangle-1-s ui-icon-triangle-1-e').end()
|
||||
.next().toggleClass('ui-accordion-content-active').slideToggle();
|
||||
return false;
|
||||
})
|
||||
@@ -122,11 +131,18 @@ echo "
|
||||
{
|
||||
background-color: #F99F9F;
|
||||
}
|
||||
.ui-icon
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
||||
#filteredLVs > div.jstree-grid-wrapper
|
||||
{
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>";
|
||||
@@ -137,7 +153,7 @@ $studiengang = new studiengang();
|
||||
$studiengang->loadArray($stg_arr,'typ,kurzbz');
|
||||
|
||||
echo '
|
||||
<table style="width:100%">
|
||||
<table id="layoutTable" width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="20%">
|
||||
<div id="menueLinks">
|
||||
@@ -176,12 +192,12 @@ echo '
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<td valign="top" style="max-width:900px">
|
||||
<div id="header">
|
||||
|
||||
</div>
|
||||
<div id="treeWrapper">
|
||||
<div id="data" style="min-height: 10px; min-width: 800px;">
|
||||
<div id="treeWrapper" style="overflow:auto">
|
||||
<div id="data" style="min-height: 10px; min-width: 700px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,6 +210,7 @@ echo '
|
||||
jqUi( "#tabs" ).tabs();
|
||||
$( "#tabs" ).hide();
|
||||
});
|
||||
|
||||
</script>
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
@@ -217,18 +234,34 @@ echo '
|
||||
</div>
|
||||
<!-- Tabs ende -->
|
||||
</td>
|
||||
<td valign="top" width="20%">
|
||||
<div id="menueRechts" style="width: 420px;">
|
||||
<td valign="top" width="20%" >
|
||||
<!--script> colResizable plugin used instead
|
||||
$(function()
|
||||
{
|
||||
jqUi("#menueRechts").resizable({
|
||||
handles: "w",
|
||||
minWidth: 400,
|
||||
maxWidth: 1000,
|
||||
resize: function(event, ui) { jqUi("#menueRechts").css("left",0);}
|
||||
});
|
||||
jqUi("#menueLinks").resizable({
|
||||
handles: "e",
|
||||
minWidth: 200,
|
||||
maxWidth: 1000,
|
||||
});
|
||||
});
|
||||
</script-->
|
||||
<div id="menueRechts" style="width: auto; height:auto; minHeight:20px; maxHeigth: 700px; margin:0px;">
|
||||
<h2><a href=#>Filter</a></h2>
|
||||
<div style="margin:0px;padding:5px;">
|
||||
<div id = "divFilter" style="margin:0px;padding:5px;">
|
||||
<div id="lehrveranstaltung" style="margin:0;padding:0; width: 400px;">
|
||||
Bitte wählen Sie zuerst einen Studienplan aus!';
|
||||
echo'
|
||||
</div>
|
||||
</div>
|
||||
<h2>Lehrveranstaltungen</h2>
|
||||
<div style="margin:0px;padding:5px;max-width:400px;">
|
||||
<div id="filteredLVs" style="width:400px; max-height:500px; overflow:auto;">
|
||||
<div id="divLVuebersicht" style="margin:0px;padding:5px;">
|
||||
<div id="filteredLVs" style="width:auto; max-height:500px;">
|
||||
<div id="lvListe">
|
||||
Keine Einträge gefunden!
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user