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
SELECT emp.empno | |
, emp.ename | |
, emp.job | |
, NVL(TO_CHAR(emp.mgr),'-') mgr | |
, TO_CHAR(emp.hiredate, 'DD-MON-YYYY') hiredate | |
, emp.sal | |
, emp.comm | |
, emp.deptno | |
FROM emp | |
, dept |
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
SELECT * | |
FROM dept |
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
<!-- Folders --> | |
<section id="knockoutSection" class="col col-4"> | |
<nav> | |
<ul class="departments" data-bind="foreach: departments"> | |
<li class="" data-bind="text: $data, | |
css: { selected: $data == $root.chosenDeptId() }, | |
click: $root.goToDept"> | |
</li> | |
</ul> | |
</nav> |
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
section#knockoutSection{ | |
background:#f8f8f8; | |
} | |
nav{ | |
background:#e8e8e8; | |
padding:10px; | |
margin: 0px; | |
} | |
nav ul{ | |
margin: 0px; |
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
$.getJSON( "/pls/apex/vincentdeelen/hr/dept", function( data ) { | |
depts = $.map(data.items, function (el) { | |
return el.dname; | |
}); | |
ko.applyBindings(new EmpDeptViewModel()); | |
}); |
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
// Variables | |
var depts; | |
// Functions | |
function EmpDeptViewModel() { | |
// Data | |
var self = this; | |
self.departments = depts; | |
self.chosenDeptId = ko.observable(); | |
self.chosenDeptData = ko.observable(); |
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
// Create an array of of the empno's | |
var empArr = $v('P1_EMPNOS').split(':') | |
// Loop over the array | |
for ( var i = 0; i < empArr.length; i++ ){ | |
// Look for the employee and find the checkbox of that row. Then set the checkbox property to 'checked'. | |
$('td[headers="EMPNO"] input[value="'+empArr[i]+'"]').parent().parent().find('.row-selector').prop('checked', true) | |
} |
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
$('#report_dept10 .uReportStandard tBody tr:first()').hide() | |
$('#report_dept20 .uReportStandard tBody tr:first()').hide() |
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
$('#report_dept10 .uReportStandard tBody tr:not(:first)').each( | |
function(){ | |
$(this).addClass( "emp ui-widget-content" ); | |
var idVal = $(this).find('td[headers="EMPNO"]').html(); | |
$(this).first('td').attr("id",idVal); | |
} | |
) | |
$('#report_dept20 .uReportStandard tBody tr:not(:first)').each( | |
function(){ | |
$(this).addClass( "emp ui-widget-content" ); |
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
select empno | |
, ename | |
, job | |
, deptno | |
from( | |
select null as empno | |
, null as ename | |
, null as job | |
, null as deptno | |
from emp |
NewerOlder