tussenopslag
This commit is contained in:
@@ -138,4 +138,13 @@ class Beheer extends MY_Controller{
|
|||||||
"gewicht" => $this->clean_input("gewicht"));
|
"gewicht" => $this->clean_input("gewicht"));
|
||||||
$this->Indicatoren_model->update_record($data, $indicatorid);
|
$this->Indicatoren_model->update_record($data, $indicatorid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableijkpunt(){
|
||||||
|
if (!$this->userid ) die;
|
||||||
|
$ijkpuntid = $this->clean_input("id");
|
||||||
|
$disabled = $this->clean_input("disabled");
|
||||||
|
$this->Ijkpunten_model->update_record(['disabled' => $disabled ], $ijkpuntid);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**Scorekleuren_model november 2031 */
|
||||||
|
|
||||||
|
class Scorekleuren_model extends MY_Model{
|
||||||
|
|
||||||
|
protected $tablename = 'tb_scorekleuren';
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('');
|
||||||
|
$this->load->model($models);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getGemiddeldeKleur($scoretype, $gemiddelde){
|
||||||
|
$this->sql="SELECT kleurcode, nummer, ondergrens, bovengrens
|
||||||
|
FROM tb_scorekleuren
|
||||||
|
WHERE scoretype = {$scoretype}
|
||||||
|
AND bovengrens > {$gemiddelde}
|
||||||
|
AND ondergrens <= {$gemiddelde}
|
||||||
|
AND disabled = 'F' ";
|
||||||
|
|
||||||
|
return $this->get_query_row();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,148 +1,199 @@
|
|||||||
<div class="col-sm-12 mainpagina" id ="pagmonitor">
|
<div class="col-sm-12 mainpagina" id ="pagmonitor">
|
||||||
<div data-bind="visible: soort() !=4">
|
<div data-bind="visible: soort() !=4">
|
||||||
Invullen kan alleen op schoolniveau
|
Invullen kan alleen op schoolniveau
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: erzijnperiodes()== false && soort() ==4">
|
<div data-bind="visible: erzijnperiodes()== false && soort() ==4">
|
||||||
Er zijn geen periodes voor uw organisatie. Neem contact op met de helpdesk.
|
Er zijn geen periodes voor uw organisatie. Neem contact op met de helpdesk.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-bind="visible: erzijnperiodes() && soort() == 4">
|
<div data-bind="visible: erzijnperiodes() && soort() == 4">
|
||||||
<h4>Selecteer een periode
|
<h4>Selecteer een periode
|
||||||
<select data-bind=" options : orgversions,
|
<select data-bind=" options : orgversions,
|
||||||
optionsText : 'info',
|
optionsText : 'info',
|
||||||
value : selectedOrgversion,
|
value : selectedOrgversion,
|
||||||
event : {change: fChangeVersion}">
|
event : {change: fChangeVersion}">
|
||||||
</select>
|
</select>
|
||||||
<!-- <span style="display: inline-block; float:right"-->
|
<span style="display: inline-block; float:right"
|
||||||
<!-- class="glyphicon glyphicon-print"-->
|
class="glyphicon glyphicon-print"
|
||||||
<!-- data-bind="click: fPrint">-->
|
data-bind="click: fPrint">
|
||||||
<!-- </span>-->
|
</span>
|
||||||
|
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<p>De lijst wordt automatisch opgeslagen.
|
<p>De lijst wordt automatisch opgeslagen.
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-bottom: 20px;">Klik op een donkerrode balk van een ijkpunt voor inhoudelijke toelichting.
|
<p style="margin-bottom: 20px;">Klik op een donkerrode balk van een ijkpunt voor inhoudelijke toelichting.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id ="invultabel">
|
<div id ="invultabel">
|
||||||
<table>
|
<table>
|
||||||
|
|
||||||
<tbody data-bind="foreach:listitems">
|
<tbody data-bind="foreach:listitems">
|
||||||
<tr class="clickable" data-bind="click: $parent.fToonToelichting">
|
<tr class="clickable" data-bind="click: $parent.fToonToelichting">
|
||||||
<td style="width:30px; background-color:#6f0b3d; color:#ffffff" data-bind="text:nummer"> </td>
|
<td style="width:30px; "
|
||||||
<td style="background-color:#6f0b3d; color:#ffffff" data-bind="text: omschrijving"> </td>
|
data-bind= "text:nummer,
|
||||||
</tr>
|
style: {color: disabled()? '#262626' : '#ffffff' ,
|
||||||
<tr>
|
backgroundColor: disabled()? '#d9d9d9' : '#6f0b3d' }" >
|
||||||
<td colspan = 2>
|
</td>
|
||||||
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
|
<td data-bind= "text: disabled() ? omschrijving + ' (uitgezet)' : omschrijving,
|
||||||
<table style="width:100%">
|
style: {color: disabled()? '#262626' : '#ffffff',
|
||||||
<thead>
|
backgroundColor: disabled() ? '#d9d9d9' : '#6f0b3d' }">
|
||||||
<tr>
|
</td>
|
||||||
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
|
</tr>
|
||||||
<th class="header2" style="width: 60%;padding-left: 2px">indicator</th>
|
<tr>
|
||||||
<th class="header2" style="width: 30%;padding-left: 2px;text-align:left"> score</th>
|
<td colspan = 2>
|
||||||
</tr>
|
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
|
||||||
</thead>
|
<table style="width:100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"
|
||||||
|
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> nr
|
||||||
|
</th>
|
||||||
|
<th class="header2" style="width: 60%;padding-left: 2px"
|
||||||
|
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}">indicator
|
||||||
|
</th>
|
||||||
|
<th class="header2" style="width: 30%;padding-left: 2px;text-align:left"
|
||||||
|
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> score
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody data-bind="foreach: indicatorscores">
|
<tbody data-bind="foreach: indicatorscores">
|
||||||
<tr style="border-bottom: 1px solid #ebebeb">
|
<tr style="border-bottom: 1px solid #ebebeb">
|
||||||
<td style="text-align:right;vertical-align:top" data-bind="text: nummer">
|
<td style="text-align:right;vertical-align:top" data-bind="text: nummer,
|
||||||
</td>
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }">
|
||||||
<td data-bind="text: omschrijving" style="vertical-align:top">
|
</td>
|
||||||
</td>
|
<td data-bind="text: omschrijving,
|
||||||
<td>
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<span data-bind="visible: scoretype==1">
|
<span data-bind="visible: scoretype==1">
|
||||||
<input class="rapport"
|
<input class="rapport"
|
||||||
data-bind="textInput: score,
|
data-bind="textInput: score,
|
||||||
event:{input: $root.fUpdateScoretype12},
|
event:{input: $root.fUpdateScoretype12},
|
||||||
enable: $root.editok(),
|
enable: $root.editok() && $parent.disabled() == false,
|
||||||
attr:{'id' : $index}" />
|
attr:{'id' : $index}" />
|
||||||
</span>
|
</span>
|
||||||
<span data-bind="visible: scoretype == 2">
|
<span data-bind="visible: scoretype == 2">
|
||||||
<input class="integer"
|
<input class="integer"
|
||||||
data-bind="textInput: score,
|
data-bind="textInput: score,
|
||||||
event:{input: $root.fUpdateScoretype12},
|
event:{input: $root.fUpdateScoretype12},
|
||||||
visible: scoretype==2,
|
visible: scoretype==2,
|
||||||
enable: $root.editok()" /> %
|
enable: $root.editok() && $parent.disabled() == false" /> %
|
||||||
</span>
|
</span>
|
||||||
<div data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
|
<div data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
|
||||||
<!-- ko foreach: $root.scoreopties -->
|
<!-- ko if: $parent.disabled() == false -->
|
||||||
<!-- ko if: $parent.scoretype == type -->
|
<!-- ko foreach: $root.scoreopties -->
|
||||||
<input type='radio'
|
<!-- ko if: $parent.scoretype == type -->
|
||||||
data-bind="checked: $parent.score(), event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)}, attr: {'name': $parent.id , 'value': value}, enable: $root.editok()" />
|
<input type='radio'
|
||||||
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
|
data-bind="checked: $parent.score(),
|
||||||
<!-- /ko -->
|
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
|
||||||
<!-- /ko -->
|
attr: {'name': $parent.id , 'value': value},
|
||||||
</td>
|
enable: $root.editok() " />
|
||||||
</tr>
|
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
|
||||||
</tbody>
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- ko if: $parent.disabled() == true -->
|
||||||
|
<!-- ko foreach: $root.scoreopties -->
|
||||||
|
<!-- ko if: $parent.scoretype == type -->
|
||||||
|
<input type='radio'
|
||||||
|
data-bind="checked: $parent.score(),
|
||||||
|
enable: false " />
|
||||||
|
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== true -->
|
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== true -->
|
||||||
<table style="width:100%">
|
<table style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
|
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"> nr </th>
|
||||||
<th class="header2" data-bind="attr: {'colspan': $parent.optieslengte()}" style="width: 97%;padding-left: 2px">indicator</th>
|
<th class="header2" data-bind="attr: {'colspan': $parent.optieslengte()}" style="width: 97%;padding-left: 2px">indicator</th>
|
||||||
<!-- <th class="header2" style="width: 7%;padding-left: 2px;">insp.</th>-->
|
<!-- <th class="header2" style="width: 7%;padding-left: 2px;">insp.</th>-->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody data-bind="foreach: indicatorscores">
|
<tbody data-bind="foreach: indicatorscores">
|
||||||
<tr style="border-bottom: 1px solid #ebebeb">
|
<tr style="border-bottom: 1px solid #ebebeb">
|
||||||
<td style="text-align:right;vertical-align:top; border-left: 1px solid #ebebeb;"
|
<td style="text-align:right;vertical-align:top; border-left: 1px solid #ebebeb;"
|
||||||
data-bind="text: nummer">
|
data-bind="text: nummer,
|
||||||
</td>
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' } ">
|
||||||
<td data-bind="text: omschrijving, attr: {'colspan': $root.optieslengte()}" style="vertical-align:top; border-right: 1px solid #ebebeb;">
|
</td>
|
||||||
</td>
|
<td data-bind="text: omschrijving,
|
||||||
</tr>
|
attr: {'colspan': $root.optieslengte()},
|
||||||
<tr style="border-bottom: 1px solid #ebebeb">
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top; border-right: 1px solid #ebebeb;">
|
||||||
<td style="border-left: 1px solid #ebebeb;">
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
|
<tr style="border-bottom: 1px solid #ebebeb">
|
||||||
|
<td style="border-left: 1px solid #ebebeb;">
|
||||||
|
</td>
|
||||||
|
<!-- ko if: $parent.disabled() == false -->
|
||||||
|
<!-- ko foreach: $root.scoreopties -->
|
||||||
|
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
|
||||||
|
<input style="vertical-align:top; padding-left: 5px;" type='radio'
|
||||||
|
data-bind="checked: $parent.score(),
|
||||||
|
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
|
||||||
|
attr: {'name': $parent.id , 'value': value},
|
||||||
|
enable: $root.editok()" />
|
||||||
|
<p style="vertical-align:top; padding-left: 5px;"
|
||||||
|
data-bind="text: scoretekst">
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- ko if: $parent.disabled() == true -->
|
||||||
|
<!-- ko foreach: $root.scoreopties -->
|
||||||
|
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
|
||||||
|
<input style="vertical-align:top; padding-left: 5px;" type='radio'
|
||||||
|
data-bind="checked: $parent.score(),
|
||||||
|
enable: false" />
|
||||||
|
<p style="vertical-align:top; padding-left: 5px;"
|
||||||
|
data-bind="text: scoretekst">
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<!-- /ko -->
|
||||||
|
<!-- /ko -->
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
<!-- ko foreach: $root.scoreopties -->
|
</table>
|
||||||
<td style="border-right: 1px solid #ebebeb;vertical-align:top">
|
<!-- /ko -->
|
||||||
<input style="vertical-align:top; padding-left: 5px;" type='radio'
|
</td>
|
||||||
data-bind="checked: $parent.score(), event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)}, attr: {'name': $parent.id , 'value': value}, enable: $root.editok()" />
|
</tr>
|
||||||
<p style="vertical-align:top; padding-left: 5px;" data-bind="text: scoretekst"> </p>
|
</tbody>
|
||||||
</td>
|
|
||||||
<!-- /ko -->
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<!-- /ko -->
|
</div>
|
||||||
</td>
|
<div>
|
||||||
</tr>
|
<p>Notitie</p>
|
||||||
</tbody>
|
<textarea style="width: 100%; min-height: 70px"
|
||||||
|
data-bind="textInput: notitie, event:{'input' : fUpdateNotitie}"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div style="background-color: #e7e2e5; padding:10px;">
|
||||||
|
<p>
|
||||||
|
<span class="glyphicon glyphicon-unchecked" data-bind="visible: !meetellen(), click: fTelMee"></span>
|
||||||
|
<span class="glyphicon glyphicon-check" style="margin-right: 5px;" data-bind="visible: meetellen(), click: fTelMee"></span>
|
||||||
|
Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.<sup>*</sup>
|
||||||
|
</p>
|
||||||
|
|
||||||
</table>
|
</div>
|
||||||
</div>
|
<p style="font-size: small"><sup>*</sup>Vul de gehele lijst in voordat u deze zichtbaar maakt. Niet ingevulde indicatoren worden ook meegenomen bij de berekening van het gemiddelde.</p>
|
||||||
<div>
|
</div>
|
||||||
<p>Notitie</p>
|
</div>
|
||||||
<textarea style="width: 100%; min-height: 70px"
|
|
||||||
data-bind="textInput: notitie, event:{'input' : fUpdateNotitie}"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<div style="background-color: #e7e2e5; padding:10px;">
|
|
||||||
<p>
|
|
||||||
<span class="glyphicon glyphicon-unchecked" data-bind="visible: !meetellen(), click: fTelMee"></span>
|
|
||||||
<span class="glyphicon glyphicon-check" style="margin-right: 5px;" data-bind="visible: meetellen(), click: fTelMee"></span>
|
|
||||||
Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.<sup>*</sup>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<p style="font-size: small"><sup>*</sup>Vul de gehele lijst in voordat u deze zichtbaar maakt. Niet ingevulde indicatoren worden ook meegenomen bij de berekening van het gemiddelde.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- regelen visibility -->
|
</div> <!-- regelen visibility -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,231 +1,248 @@
|
|||||||
<div class="col-sm-12 mainpagina submenupage" id ="pagVersies">
|
<div class="col-sm-12 mainpagina submenupage" id ="pagVersies">
|
||||||
|
<div class='row'>
|
||||||
|
|
||||||
<div class='row'>
|
<div class="col-sm-12 col-md-3" style="border:1px solid #f2f2f2">
|
||||||
|
<h3>Instrument</h3>
|
||||||
<div class="col-sm-12 col-md-3" style="border:1px solid #f2f2f2">
|
<select style="font-size:1em; max-width: 250px;"
|
||||||
<h3>Instrument</h3>
|
data-bind=" options : modules,
|
||||||
<select style="font-size:1em"
|
|
||||||
data-bind=" options : modules,
|
|
||||||
optionsText : 'naam',
|
optionsText : 'naam',
|
||||||
value : selectedModule,
|
value : selectedModule,
|
||||||
event : {change: fChangeModule}">
|
event : {change: fChangeModule}">
|
||||||
</select>
|
</select>
|
||||||
<button data-bind="click: fMaakNieuweVersie" style="margin-left: 0px; margin-top:20px">nieuwe versie </button>
|
<button data-bind="click: fMaakNieuweVersie" style="margin-left: 0px; margin-top:20px">nieuwe versie </button>
|
||||||
|
|
||||||
<div data-bind= "visible: versies().length > 0">
|
<div data-bind= "visible: versies().length > 0">
|
||||||
<p> of </p>
|
<p> of </p>
|
||||||
<p>Selecteer een versie </p>
|
<p>Selecteer een versie </p>
|
||||||
<select data-bind=" options : versies,
|
<select data-bind=" options : versies,
|
||||||
optionsText : 'naam',
|
optionsText : 'naam',
|
||||||
value : selectedVersie,
|
value : selectedVersie,
|
||||||
event : {change: fChangeVersie}">
|
event : {change: fChangeVersie}">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div data-bind="with: selectedVersie">
|
<div data-bind="with: selectedVersie">
|
||||||
<h4>Versie-kenmerken</h4>
|
<h4>Versie-kenmerken</h4>
|
||||||
<table>
|
<table>
|
||||||
<tr> <td>naam</td></tr>
|
<tr> <td>naam</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input data-bind="textInput: naam, event: {input: $parent.fUpdateVersie}" style="width:80%"/>
|
<td><input data-bind="textInput: naam, event: {input: $parent.fUpdateVersie}" style="width:80%"/>
|
||||||
<button class="delete klikbaar"
|
<button class="delete klikbaar"
|
||||||
data-bind="click: $parent.fDeleteVersie, visible: deleteok()"></button> </td>
|
data-bind="click: $parent.fDeleteVersie, visible: deleteok()"></button> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr> <td>ingangsdatum</td> </tr>
|
<tr> <td>ingangsdatum</td> </tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <input class="datum"
|
<td> <input class="datum"
|
||||||
data-bind="datepicker{}, value: ingang, event: {change: $parent.fUpdateVersie}"/> </td>
|
data-bind="datepicker{}, value: ingang, event: {change: $parent.fUpdateVersie}"/> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr> <td>streefwaarde</td> </tr>
|
<tr> <td>streefwaarde</td> </tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input class="decimal" data-bind="textInput: systemnorm, event: {input: $parent.fUpdateVersie}"/>%</td>
|
<td><input class="decimal" data-bind="textInput: systemnorm, event: {input: $parent.fUpdateVersie}"/>%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- column left -->
|
</div> <!-- column left -->
|
||||||
|
|
||||||
<div class="col-sm-12 col-md-9">
|
<div class="col-sm-12 col-md-9">
|
||||||
<button data-bind="click: fNieuwIJkpunt" style="float:right ; margin-top:10px;margin-bottom: 10px">nieuw ijkpunt </button>
|
<button data-bind="click: fNieuwIJkpunt" style="float:right ; margin-top:10px;margin-bottom: 10px">nieuw ijkpunt </button>
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:5%;padding-left:3px">i</th>
|
<th style="width:5%;padding-left:3px">i</th>
|
||||||
<th style="width:5%"> nr </th>
|
<th style="width:5%"> nr </th>
|
||||||
<th style="width:40%"> omschrijving</th>
|
<th style="width:25%"> omschrijving</th>
|
||||||
<th style="width: 40%">toelichting</th>
|
<th style="width: 35%">toelichting</th>
|
||||||
<th style="width: 5%"> del</th>
|
<th style="width: 4%"> del</th>
|
||||||
<th style="widht: 5%">add</th>
|
<th style="width: 6%"> disable</th>
|
||||||
</tr>
|
<th style="width: 5%"> add</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody data-bind="foreach: ijkpunten">
|
</thead>
|
||||||
<tr>
|
<tbody data-bind="foreach: ijkpunten">
|
||||||
<td style="vertical-align: top">
|
<tr>
|
||||||
<button class= " noshow"
|
<td style="vertical-align: top">
|
||||||
data-bind="click: $parent.fToggleIndicatoren, css:{ 'closebutton' : toonindics(), 'openbutton': !toonindics()}"></button>
|
<button class= " noshow"
|
||||||
</td>
|
data-bind="click: $parent.fToggleIndicatoren, css:{ 'closebutton' : toonindics(), 'openbutton': !toonindics()}"></button>
|
||||||
<td style="vertical-align: top">
|
</td>
|
||||||
<input class= 'integer' data-bind="textInput:nummer, event:{input:$parent.fUpdateIJkpunt}"/>
|
<td style="vertical-align: top">
|
||||||
</td>
|
<input class= 'integer' data-bind="textInput:nummer,
|
||||||
<td><textarea style="width:99%" data-bind="textInput:omschrijving, event:{input: $parent.fUpdateIJkpunt}" ></textarea>
|
event:{input:$parent.fUpdateIJkpunt},
|
||||||
</td>
|
style: {color: disabled()? '#d9d9d9' : '#262626' }"/>
|
||||||
<td><textarea style="width:99%" data-bind="textInput:toelichting, event:{input: $parent.fUpdateIJkpunt}" ></textarea>
|
</td>
|
||||||
</td>
|
<td><textarea style="width:99%" data-bind="textInput: omschrijving,
|
||||||
<td style="vertical-align: top">
|
event:{input: $parent.fUpdateIJkpunt},
|
||||||
<button class="delete noshow" data-bind="click: $parent.fDeleteIJkpunt, visible: indicatoren().length == 0"></button>
|
style: {color: disabled()? '#d9d9d9' : '#262626' }" ></textarea>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align: top" data-bind="click: $parent.fNieuweIndicator">
|
<td><textarea style="width:99%" data-bind="textInput:toelichting,
|
||||||
<button class="plus noshow"></button>
|
event:{input: $parent.fUpdateIJkpunt},
|
||||||
</td>
|
style: {color: disabled()? '#d9d9d9' : '#262626' }" ></textarea>
|
||||||
</tr>
|
</td>
|
||||||
<tr data-bind="visible: toonindics() && indicatoren().length > 0">
|
<td style="vertical-align: top">
|
||||||
<td></td>
|
<button class="delete noshow" data-bind="click: $parent.fDeleteIJkpunt, visible: indicatoren().length == 0"></button>
|
||||||
<td colspan=4>
|
</td>
|
||||||
<table style="width: 100%">
|
<td style="vertical-align: top" data-bind="click: $parent.fDisableIJkpunt">
|
||||||
<thead>
|
<button class="fa fa-ban noshow" data-bind="style: {color: disabled() ? 'red' : 'black' }"></button>
|
||||||
<tr>
|
</td>
|
||||||
<th class="header2" style="width4%;padding-left: 2px;text-align:center"> nr </th>
|
<td style="vertical-align: top" data-bind="click: $parent.fNieuweIndicator ">
|
||||||
<!-- <th class="header2" style="width:7%;padding-left: 2px;text-align:center">insp.</th>-->
|
<button class=" noshow fa fa-plus " data-bind=" style: {color: disabled()? '#d9d9d9' : '#262626' }" ></button>
|
||||||
<th class="header2" style="width:6%;padding-left: 2px;text-align:center">w.</th>
|
</td>
|
||||||
<th class="header2" style="width:40%;padding-left: 2px"> schoolvorm</th>
|
</tr>
|
||||||
<th class="header2" style="width:40%;padding-left: 2px"> ik-vorm</th>
|
<tr data-bind="visible: toonindics() && indicatoren().length > 0">
|
||||||
<th class="header2" style="width: 3%;padding-left: 2px;text-align:center"> del</th>
|
<td></td>
|
||||||
</tr>
|
<td colspan=5>
|
||||||
</thead>
|
<table style="width: 100%">
|
||||||
<tbody data-bind="foreach: indicatoren">
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top">
|
<th class="header2" style="width4%;padding-left: 2px;text-align:center"> nr </th>
|
||||||
<input class= 'integer'
|
<!-- <th class="header2" style="width:7%;padding-left: 2px;text-align:center">insp.</th>-->
|
||||||
style="width: 100%"
|
<th class="header2" style="width:6%;padding-left: 2px;text-align:center">w.</th>
|
||||||
data-bind="textInput: nummer, event:{input: $root.fUpdateIndicator}" /></td>
|
<th class="header2" style="width:40%;padding-left: 2px"> schoolvorm</th>
|
||||||
<!-- <td style="vertical-align: top">-->
|
<th class="header2" style="width:40%;padding-left: 2px"> ik-vorm</th>
|
||||||
<!-- <input style="width: 100%"-->
|
<th class="header2" style="width: 3%;padding-left: 2px;text-align:center"> del</th>
|
||||||
<!-- data-bind="textInput: inspectie, event:{input: $root.fUpdateIndicator}" /></td>-->
|
</tr>
|
||||||
<td style="vertical-align: top">
|
</thead>
|
||||||
<input class= 'decimal'
|
<tbody data-bind="foreach: indicatoren">
|
||||||
style="width: 100%"
|
<tr>
|
||||||
data-bind="textInput: gewicht, event:{input: $root.fUpdateIndicator}" /></td>
|
<td style="vertical-align: top">
|
||||||
<td><textarea data-bind="textInput: omschrijving1, event:{input: $root.fUpdateIndicator}"
|
<input class= 'integer'
|
||||||
style="width:99%">
|
style="width: 100%"
|
||||||
|
data-bind="textInput: nummer,
|
||||||
|
event:{input: $root.fUpdateIndicator},
|
||||||
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" /></td>
|
||||||
|
<!-- <td style="vertical-align: top">-->
|
||||||
|
<!-- <input style="width: 100%"-->
|
||||||
|
<!-- data-bind="textInput: inspectie, event:{input: $root.fUpdateIndicator}" /></td>-->
|
||||||
|
<td style="vertical-align: top">
|
||||||
|
<input class= 'decimal'
|
||||||
|
style="width: 100%"
|
||||||
|
data-bind="textInput : gewicht,
|
||||||
|
event :{input: $root.fUpdateIndicator},
|
||||||
|
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }" /></td>
|
||||||
|
<td><textarea data-bind="textInput: omschrijving1,
|
||||||
|
event : {input: $root.fUpdateIndicator},
|
||||||
|
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }"
|
||||||
|
style="width:99%">
|
||||||
</textarea>
|
</textarea>
|
||||||
</td>
|
</td>
|
||||||
<td><textarea data-bind="textInput: omschrijving2, event:{input: $root.fUpdateIndicator}"
|
<td><textarea data-bind="textInput : omschrijving2,
|
||||||
style="width: 99% ">
|
event :{input: $root.fUpdateIndicator},
|
||||||
|
style : {color: $parent.disabled()? '#d9d9d9' : '#262626' }"
|
||||||
|
style="width: 99% ">
|
||||||
</textarea>
|
</textarea>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align: top">
|
<td style="vertical-align: top">
|
||||||
<button class="delete" data-bind="click: $root.fDeleteIndicator.bind($data,$parents[0]), visible: deleteok== true "></button></td>
|
<button class="delete" data-bind="click: $root.fDeleteIndicator.bind($data,$parents[0]), visible: deleteok== true "></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=6> <hr></td>
|
<td colspan=6> <hr></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td> <!-- td voor de tabel met indicatoren -->
|
</td> <!-- td voor de tabel met indicatoren -->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- column right -->
|
</div> <!-- column right -->
|
||||||
|
|
||||||
</div><!-- row -->
|
</div><!-- row -->
|
||||||
<!-- ******************** popups ************************** -->
|
<!-- ******************** popups ************************** -->
|
||||||
<div class="modal fade" id="modNieuweVersie" role="dialog" >
|
<div class="modal fade" id="modNieuweVersie" role="dialog" >
|
||||||
<div class="modal-dialog ">
|
<div class="modal-dialog ">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 data-bind="with: selectedModule()">Nieuwe versie <span data-bind="text: naam"></span></h4>
|
<h4 data-bind="with: selectedModule()">Nieuwe versie <span data-bind="text: naam"></span></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table class="lstable" style="width: 100%" >
|
<table class="lstable" style="width: 100%" >
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%"> naam </td>
|
<td style="width:20%"> naam </td>
|
||||||
<td > <input style="width: 100%" data-bind="textInput: newVersieNaam"></td>
|
<td > <input style="width: 100%" data-bind="textInput: newVersieNaam"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveVersie, visible: newVersieNaam().length > 3">opslaan</button>
|
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveVersie, visible: newVersieNaam().length > 3">opslaan</button>
|
||||||
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- popup-->
|
</div> <!-- popup-->
|
||||||
|
|
||||||
<!-- ******************** popup nieuw ijkpunt ************************** -->
|
<!-- ******************** popup nieuw ijkpunt ************************** -->
|
||||||
<div class="modal fade" id="modNieuwIJkpunt" role="dialog" >
|
<div class="modal fade" id="modNieuwIJkpunt" role="dialog" >
|
||||||
<div class="modal-dialog ">
|
<div class="modal-dialog ">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4>Nieuw ijkpunt</h4>
|
<h4>Nieuw ijkpunt</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table class="lstable" style="width: 100%" >
|
<table class="lstable" style="width: 100%" >
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%"> nummer</td>
|
<td style="width:20%"> nummer</td>
|
||||||
<td > <input class="integer" data-bind="textInput: newIJkpunt().nummer"></td>
|
<td > <input class="integer" data-bind="textInput: newIJkpunt().nummer"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%"> omschrijving </td>
|
<td style="width:20%"> omschrijving </td>
|
||||||
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().naam"></textarea></td>
|
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().naam"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%"> toelichting </td>
|
<td style="width:20%"> toelichting </td>
|
||||||
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().toelichting"></textarea></td>
|
<td > <textarea style="width: 99%; height:50px;" data-bind="textInput: newIJkpunt().toelichting"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIJkpunt, visible: newIJkpunt().naam().length > 3">opslaan</button>
|
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIJkpunt, visible: newIJkpunt().naam().length > 3">opslaan</button>
|
||||||
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ************ pop nieuw indicator -->
|
<!-- ************ pop nieuw indicator -->
|
||||||
<div class="modal fade" id="modNieuwIndicator" role="dialog" >
|
<div class="modal fade" id="modNieuwIndicator" role="dialog" >
|
||||||
<div class="modal-dialog modal-lg ">
|
<div class="modal-dialog modal-lg ">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4>Nieuwe indicator</h4>
|
<h4>Nieuwe indicator</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table class="lstable" style="width: 100%" >
|
<table class="lstable" style="width: 100%" >
|
||||||
<tbody data-bind="with: newIndicator">
|
<tbody data-bind="with: newIndicator">
|
||||||
<tr >
|
<tr >
|
||||||
<td style="width:20%"> volgnummer </td>
|
<td style="width:20%"> volgnummer </td>
|
||||||
<td > <input class="integer" data-bind="textInput: nummer" /></td>
|
<td > <input class="integer" data-bind="textInput: nummer" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td style="width:20%"> gewicht</td>
|
<td style="width:20%"> gewicht</td>
|
||||||
<td > <input class="decimal" data-bind="textInput: gewicht" /></td>
|
<td > <input class="decimal" data-bind="textInput: gewicht" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr >-->
|
<!-- <tr >-->
|
||||||
<!-- <td style="width:20%">inspectie indicator (nummer)</td>-->
|
<!-- <td style="width:20%">inspectie indicator (nummer)</td>-->
|
||||||
<!-- <td > <input data-bind="textInput: inspectie" /></td>-->
|
<!-- <td > <input data-bind="textInput: inspectie" /></td>-->
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%">school omschrijving </td>
|
<td style="width:20%">school omschrijving </td>
|
||||||
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving1"></textarea></td>
|
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving1"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:20%">ik-vorm omschrijving </td>
|
<td style="width:20%">ik-vorm omschrijving </td>
|
||||||
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving2"></textarea></td>
|
<td > <textarea style="width: 100%" data-bind="textInput: omschrijving2"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIndicator">opslaan</button>
|
<button style="width: 80px;" data-dismiss="modal" data-bind="click: fSaveIndicator">opslaan</button>
|
||||||
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
<button style="width: 80px;" data-dismiss="modal" >annuleren</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1,243 +1,246 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
ls.initMonitorModel = function(){
|
ls.initMonitorModel = function(){
|
||||||
var timer;
|
var timer;
|
||||||
|
|
||||||
function fAddOrgversion(p){
|
function fAddOrgversion(p){
|
||||||
|
|
||||||
var dit = this;
|
var dit = this;
|
||||||
this.id = p.id; //orgversion id
|
this.id = p.id; //orgversion id
|
||||||
this.periodenummer = p.periodenummer;
|
this.periodenummer = p.periodenummer;
|
||||||
this.versie_id = p.versie_id;
|
this.versie_id = p.versie_id;
|
||||||
this.vorm = p.vorm;
|
this.vorm = p.vorm;
|
||||||
this.scoretype = p.scoretype;
|
this.scoretype = p.scoretype;
|
||||||
this.toonOmschrijving = ko.observable(false);
|
this.toonOmschrijving = ko.observable(false);
|
||||||
if(p.score_omschrijving == 'T') this.toonOmschrijving(true);
|
if(p.score_omschrijving == 'T') this.toonOmschrijving(true);
|
||||||
this.naam = p.naam;
|
this.naam = p.naam;
|
||||||
// this.meetellen = ko.observable(false);
|
// this.meetellen = ko.observable(false);
|
||||||
// if(p.meetellen == 1){
|
// if(p.meetellen == 1){
|
||||||
// dit.meetellen(true);
|
// dit.meetellen(true);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.geldigvanaf = p.geldigvanaf;
|
this.geldigvanaf = p.geldigvanaf;
|
||||||
this.geldigtm = p.geldigtm;
|
this.geldigtm = p.geldigtm;
|
||||||
this.invullentm = p.invullentm;
|
this.invullentm = p.invullentm;
|
||||||
this.info = ko.computed(function(){
|
this.info = ko.computed(function(){
|
||||||
var infostr=this.naam + " - periode " + this.periodenummer ;
|
var infostr=this.naam + " - periode " + this.periodenummer ;
|
||||||
infostr += " van " + this.geldigvanaf + " t/m " + this.geldigtm;
|
infostr += " van " + this.geldigvanaf + " t/m " + this.geldigtm;
|
||||||
return infostr;
|
return infostr;
|
||||||
},this);
|
},this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fAddListitem(p){
|
function fAddListitem(p){
|
||||||
|
|
||||||
var dit = this;
|
var dit = this;
|
||||||
this.id = p.id
|
this.id = p.id
|
||||||
this.nummer = p.nummer
|
this.nummer = p.nummer
|
||||||
this.omschrijving = p.omschrijving;
|
this.omschrijving = p.omschrijving;
|
||||||
this.toelichting = p.toelichting;
|
this.toelichting = p.toelichting;
|
||||||
this.indicatorscores = ko.observableArray([]);
|
this.disabled = ko.observable(false);
|
||||||
$.each(p.indicatorscores, function(j,k){
|
if(p.disabled == 'T')dit.disabled(true);
|
||||||
dit.indicatorscores.push(new fAddIndicatorscore(k));
|
this.indicatorscores = ko.observableArray([]);
|
||||||
});
|
$.each(p.indicatorscores, function(j,k){
|
||||||
|
dit.indicatorscores.push(new fAddIndicatorscore(k));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fAddIndicatorscore(k){
|
function fAddIndicatorscore(k){
|
||||||
var dit = this;
|
var dit = this;
|
||||||
this.id = k.id
|
this.id = k.id
|
||||||
this.nummer = k.nummer
|
this.nummer = k.nummer
|
||||||
this.omschrijving = k.omschrijving
|
this.omschrijving = k.omschrijving
|
||||||
this.inspectie = k.inspectie
|
this.inspectie = k.inspectie
|
||||||
this.score = ko.observable(k.score)
|
this.score = ko.observable(k.score)
|
||||||
this.scoretype = k.scoretype;
|
this.scoretype = k.scoretype;
|
||||||
|
|
||||||
// this.jatext = ko.computed(function(){
|
// this.jatext = ko.computed(function(){
|
||||||
// switch (parseFloat(dit.scoretype)){
|
// switch (parseFloat(dit.scoretype)){
|
||||||
// case 3:
|
// case 3:
|
||||||
// case 4:
|
// case 4:
|
||||||
// case 5: return 'ja'; break;
|
// case 5: return 'ja'; break;
|
||||||
// case 6: return "onvol."; break;
|
// case 6: return "onvol."; break;
|
||||||
// case 7: return "included"; break;
|
// case 7: return "included"; break;
|
||||||
// default: return 'ja';
|
// default: return 'ja';
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// this.neetext = ko.computed(function(){
|
// this.neetext = ko.computed(function(){
|
||||||
// switch (parseFloat(dit.scoretype)){
|
// switch (parseFloat(dit.scoretype)){
|
||||||
// case 3:
|
// case 3:
|
||||||
// case 4:
|
// case 4:
|
||||||
// case 5: return 'nee'; break;
|
// case 5: return 'nee'; break;
|
||||||
// case 6: return "vol."; break;
|
// case 6: return "vol."; break;
|
||||||
// case 7: return "involved"; break;
|
// case 7: return "involved"; break;
|
||||||
// default: return 'nee';
|
// default: return 'nee';
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// this.thirdoptiontext = ko.computed(function(){
|
// this.thirdoptiontext = ko.computed(function(){
|
||||||
// switch (parseFloat(dit.scoretype)){
|
// switch (parseFloat(dit.scoretype)){
|
||||||
// case 3: return "bezig"; break;
|
// case 3: return "bezig"; break;
|
||||||
// case 4: return "nvt"; break;
|
// case 4: return "nvt"; break;
|
||||||
// case 5: return "i.o."; break;
|
// case 5: return "i.o."; break;
|
||||||
// case 6: return "goed"; break;
|
// case 6: return "goed"; break;
|
||||||
// case 7: return "present"; break;
|
// case 7: return "present"; break;
|
||||||
// default: return "";
|
// default: return "";
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// this.fourthoptiontext = ko.computed(function(){
|
// this.fourthoptiontext = ko.computed(function(){
|
||||||
// return 'absent'
|
// return 'absent'
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function fAddScoreoptie(o){
|
function fAddScoreoptie(o){
|
||||||
this.scoreID = o.id;
|
this.scoreID = o.id;
|
||||||
this.type = o.type_nr;
|
this.type = o.type_nr;
|
||||||
this.optie = o.optie;
|
this.optie = o.optie;
|
||||||
this.value = parseInt(o.score_value);
|
this.value = parseInt(o.score_value);
|
||||||
this.scoretekst = o.omschrijving;
|
this.scoretekst = o.omschrijving;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ls.MonitorModel !== undefined){
|
if (ls.MonitorModel !== undefined){
|
||||||
ls.MonitorModel.initModel();
|
ls.MonitorModel.initModel();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ls.MonitorModel = {
|
ls.MonitorModel = {
|
||||||
orgversions : ko.observableArray([]),
|
orgversions : ko.observableArray([]),
|
||||||
selectedOrgversion : ko.observable(''),
|
selectedOrgversion : ko.observable(''),
|
||||||
listitems : ko.observableArray([]),
|
listitems : ko.observableArray([]),
|
||||||
scoreopties : ko.observableArray(),
|
scoreopties : ko.observableArray(),
|
||||||
editok : ko.observable(false),
|
editok : ko.observable(false),
|
||||||
soort : ko.observable(4),
|
soort : ko.observable(4),
|
||||||
erzijnperiodes : ko.observable(false),
|
erzijnperiodes : ko.observable(false),
|
||||||
notitie : ko.observable(''),
|
notitie : ko.observable(''),
|
||||||
fvid : ko.observable(null),
|
fvid : ko.observable(null),
|
||||||
bezig : ko.observable(false),
|
bezig : ko.observable(false),
|
||||||
meetellen : ko.observable(false),
|
meetellen : ko.observable(false),
|
||||||
optieslengte : ko.observable(0),
|
optieslengte : ko.observable(0),
|
||||||
|
|
||||||
initBindings :function(){
|
initBindings :function(){
|
||||||
var self = ls.MonitorModel;
|
var self = ls.MonitorModel;
|
||||||
if (!ko.dataFor(document.getElementById('pagmonitor')) ) {
|
if (!ko.dataFor(document.getElementById('pagmonitor')) ) {
|
||||||
ko.applyBindings(ls.MonitorModel, document.getElementById("pagmonitor"));
|
ko.applyBindings(ls.MonitorModel, document.getElementById("pagmonitor"));
|
||||||
}
|
}
|
||||||
self.initModel();
|
self.initModel();
|
||||||
},
|
},
|
||||||
initModel: function(){
|
initModel: function(){
|
||||||
var self=ls.MonitorModel;
|
var self=ls.MonitorModel;
|
||||||
|
|
||||||
self.orgversions.removeAll();
|
|
||||||
self.listitems.removeAll();
|
|
||||||
showAjaxLoader();
|
|
||||||
$.post("index.php/monpas/monitor/getperiodesperschool", function(data){
|
|
||||||
// get de reeds ingevulde versies of start een nieuwe versie voor de laatste periode
|
|
||||||
self.orgversions.removeAll();
|
self.orgversions.removeAll();
|
||||||
|
self.listitems.removeAll();
|
||||||
|
showAjaxLoader();
|
||||||
|
$.post("index.php/monpas/monitor/getperiodesperschool", function(data){
|
||||||
|
// get de reeds ingevulde versies of start een nieuwe versie voor de laatste periode
|
||||||
|
self.orgversions.removeAll();
|
||||||
|
|
||||||
if (data.versies){
|
if (data.versies){
|
||||||
$.each(data.versies, function(i,p){
|
$.each(data.versies, function(i,p){
|
||||||
self.orgversions.push(new fAddOrgversion(p));
|
self.orgversions.push(new fAddOrgversion(p));
|
||||||
});//each
|
});//each
|
||||||
self.selectedOrgversion(self.orgversions()[0]);
|
self.selectedOrgversion(self.orgversions()[0]);
|
||||||
self.erzijnperiodes(true);
|
self.erzijnperiodes(true);
|
||||||
|
|
||||||
}; // if
|
}; // if
|
||||||
self.soort(data.soort);
|
self.soort(data.soort);
|
||||||
hideAjaxLoader();
|
hideAjaxLoader();
|
||||||
},'json');
|
},'json');
|
||||||
},
|
},
|
||||||
|
|
||||||
fChangeVersion: function(){
|
fChangeVersion: function(){
|
||||||
var self = ls.MonitorModel;
|
var self = ls.MonitorModel;
|
||||||
self.listitems.removeAll();
|
self.listitems.removeAll();
|
||||||
self.scoreopties.removeAll();
|
self.scoreopties.removeAll();
|
||||||
self.editok(false)
|
self.editok(false)
|
||||||
if (self.selectedOrgversion() == undefined) return;
|
if (self.selectedOrgversion() == undefined) return;
|
||||||
|
|
||||||
var tm = self.selectedOrgversion().invullentm;
|
var tm = self.selectedOrgversion().invullentm;
|
||||||
var Dtm = new Date(tm.substring(6,10), parseInt(tm.substring(3,5)) -1, tm.substring(0,2),23,59,59,99);
|
var Dtm = new Date(tm.substring(6,10), parseInt(tm.substring(3,5)) -1, tm.substring(0,2),23,59,59,99);
|
||||||
var heden= new Date()
|
var heden= new Date()
|
||||||
if (heden.getTime() <= Dtm.getTime() ) self.editok(true);
|
if (heden.getTime() <= Dtm.getTime() ) self.editok(true);
|
||||||
$.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){
|
$.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){
|
||||||
if (data.ijkpunten){
|
if (data.ijkpunten){
|
||||||
$.each(data.ijkpunten,function(i,p){
|
$.each(data.ijkpunten,function(i,p){
|
||||||
self.listitems.push(new fAddListitem(p));
|
self.listitems.push(new fAddListitem(p));
|
||||||
});// each
|
});// each
|
||||||
}; //if
|
}; //if
|
||||||
|
|
||||||
if(data.scoreopties){
|
if(data.scoreopties){
|
||||||
$.each(data.scoreopties,function(x,o){
|
$.each(data.scoreopties,function(x,o){
|
||||||
self.scoreopties.push(new fAddScoreoptie(o));
|
self.scoreopties.push(new fAddScoreoptie(o));
|
||||||
});// each
|
});// each
|
||||||
self.optieslengte(self.scoreopties().length);
|
self.optieslengte(self.scoreopties().length);
|
||||||
|
}
|
||||||
|
|
||||||
|
self.notitie(data.notitie);
|
||||||
|
if(data.meetellen && data.meetellen == 1) {
|
||||||
|
self.meetellen(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
self.meetellen(false);
|
||||||
|
}
|
||||||
|
self.fvid(data.fvid);
|
||||||
|
|
||||||
|
// als de versie een schoolversie is, dan mag alleen het management invullen
|
||||||
|
// maar ook het management mag niet invullen voorbij de invuldatum
|
||||||
|
if (self.editok() && self.selectedOrgversion().vorm==1) {self.editok(data.writer)}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
|
||||||
|
fUpdateScoretype12: function(){
|
||||||
|
var self= ls.MonitorModel
|
||||||
|
|
||||||
|
|
||||||
|
if (this.scoretype == 1 && (parseFloat(this.score().replace(',','.') ) > 10 ||
|
||||||
|
parseFloat(this.score().replace(',','.')) < 0)){
|
||||||
|
ls.MsgAutoFade("U moet een rapportcijfer tussen 0 en 10 invullen.",1000);
|
||||||
|
this.score(0);
|
||||||
|
};
|
||||||
|
if (this.scoretype ==2 && (parseInt(this.score())> 100 || parseInt(this.score()) < 0)){
|
||||||
|
ls.MsgAutoFade("U moet hier een percentage tussen 0 en 100 invullen.",1000);
|
||||||
|
this.score(0);
|
||||||
}
|
}
|
||||||
|
var submitData = {indicatorscoreid : this.id,
|
||||||
|
score : this.score()}
|
||||||
|
$.post("index.php/monpas/monitor/updatescore", submitData);
|
||||||
|
return true ; // nodig voor de eventuele radioset
|
||||||
|
},
|
||||||
|
|
||||||
self.notitie(data.notitie);
|
fUpdateScoretypeVanaf3: function(data){
|
||||||
if(data.meetellen && data.meetellen == 1) {
|
var self= ls.MonitorModel
|
||||||
self.meetellen(true);
|
var indicatorscoreID = data;
|
||||||
|
console.log(this, "this")
|
||||||
|
|
||||||
|
var submitData = {
|
||||||
|
indicatorscoreid : indicatorscoreID,
|
||||||
|
score : this.value }
|
||||||
|
|
||||||
|
$.post("index.php/monpas/monitor/updatescore", submitData);
|
||||||
|
return true ; // nodig voor de eventuele radioset
|
||||||
|
},
|
||||||
|
|
||||||
|
fToonToelichting: function(){
|
||||||
|
var self = ls.MonitorModel;
|
||||||
|
var dit = this;
|
||||||
|
var toelichting = '';
|
||||||
|
if (dit.toelichting != undefined) toelichting = dit.toelichting;
|
||||||
|
apprise(dit.nummer + '. ' + dit.omschrijving + '<br/>Toelichting: ' + toelichting);
|
||||||
|
},
|
||||||
|
|
||||||
|
fUpdateNotitie: function(){
|
||||||
|
var self = ls.MonitorModel;
|
||||||
|
if (timer){
|
||||||
|
clearTimeout(timer);
|
||||||
|
timeout = null;
|
||||||
}
|
}
|
||||||
else{
|
timer = setTimeout(function(){
|
||||||
self.meetellen(false);
|
var submitData= {notitie : self.notitie(),
|
||||||
}
|
fvID : self.fvid()}
|
||||||
self.fvid(data.fvid);
|
$.post('index.php/monpas/monitor/savenotitie', submitData);
|
||||||
|
}, 600);
|
||||||
// als de versie een schoolversie is, dan mag alleen het management invullen
|
},
|
||||||
// maar ook het management mag niet invullen voorbij de invuldatum
|
|
||||||
if (self.editok() && self.selectedOrgversion().vorm==1) {self.editok(data.writer)}
|
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
|
|
||||||
fUpdateScoretype12: function(){
|
|
||||||
var self= ls.MonitorModel
|
|
||||||
|
|
||||||
|
|
||||||
if (this.scoretype == 1 && (parseFloat(this.score().replace(',','.') ) > 10 ||
|
|
||||||
parseFloat(this.score().replace(',','.')) < 0)){
|
|
||||||
ls.MsgAutoFade("U moet een rapportcijfer tussen 0 en 10 invullen.",1000);
|
|
||||||
this.score(0);
|
|
||||||
};
|
|
||||||
if (this.scoretype ==2 && (parseInt(this.score())> 100 || parseInt(this.score()) < 0)){
|
|
||||||
ls.MsgAutoFade("U moet hier een percentage tussen 0 en 100 invullen.",1000);
|
|
||||||
this.score(0);
|
|
||||||
}
|
|
||||||
var submitData = {indicatorscoreid : this.id,
|
|
||||||
score : this.score()}
|
|
||||||
$.post("index.php/monpas/monitor/updatescore", submitData);
|
|
||||||
return true ; // nodig voor de eventuele radioset
|
|
||||||
},
|
|
||||||
|
|
||||||
fUpdateScoretypeVanaf3: function(data){
|
|
||||||
var self= ls.MonitorModel
|
|
||||||
var indicatorscoreID = data;
|
|
||||||
|
|
||||||
var submitData = {
|
|
||||||
indicatorscoreid : indicatorscoreID,
|
|
||||||
score : this.value }
|
|
||||||
|
|
||||||
$.post("index.php/monpas/monitor/updatescore", submitData);
|
|
||||||
return true ; // nodig voor de eventuele radioset
|
|
||||||
},
|
|
||||||
|
|
||||||
fToonToelichting: function(){
|
|
||||||
var self = ls.MonitorModel;
|
|
||||||
var dit = this;
|
|
||||||
var toelichting = '';
|
|
||||||
if (dit.toelichting != undefined) toelichting = dit.toelichting;
|
|
||||||
apprise(dit.nummer + '. ' + dit.omschrijving + '<br/>Toelichting: ' + toelichting);
|
|
||||||
},
|
|
||||||
|
|
||||||
fUpdateNotitie: function(){
|
|
||||||
var self = ls.MonitorModel;
|
|
||||||
if (timer){
|
|
||||||
clearTimeout(timer);
|
|
||||||
timeout = null;
|
|
||||||
}
|
|
||||||
timer = setTimeout(function(){
|
|
||||||
var submitData= {notitie : self.notitie(),
|
|
||||||
fvID : self.fvid()}
|
|
||||||
$.post('index.php/monpas/monitor/savenotitie', submitData);
|
|
||||||
}, 600);
|
|
||||||
},
|
|
||||||
|
|
||||||
fTelMee: function(){
|
fTelMee: function(){
|
||||||
var self = ls.MonitorModel;
|
var self = ls.MonitorModel;
|
||||||
@@ -248,30 +251,30 @@ ls.initMonitorModel = function(){
|
|||||||
meetellen = 0;
|
meetellen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var submitData = {
|
var submitData = {
|
||||||
meetellen: meetellen,
|
meetellen: meetellen,
|
||||||
fvID: self.fvid(),
|
fvID: self.fvid(),
|
||||||
}
|
}
|
||||||
$.post("index.php/monpas/monitor/lijstmeetellen", submitData);
|
$.post("index.php/monpas/monitor/lijstmeetellen", submitData);
|
||||||
},
|
},
|
||||||
|
|
||||||
fPrint:function(){
|
fPrint:function(){
|
||||||
var self =ls.MonitorModel;
|
var self =ls.MonitorModel;
|
||||||
if (self.bezig()) return;
|
if (self.bezig()) return;
|
||||||
self.bezig(true);
|
self.bezig(true);
|
||||||
var items = ko.toJSON(self.listitems());
|
var items = ko.toJSON(self.listitems());
|
||||||
var data ={ 'orgversie' : self.selectedOrgversion().info(),
|
var data ={ 'orgversie' : self.selectedOrgversion().info(),
|
||||||
'tabelinfo' : items,
|
'tabelinfo' : items,
|
||||||
'notitie' : self.notitie()}
|
'notitie' : self.notitie()}
|
||||||
data=JSON.stringify(data);
|
data=JSON.stringify(data);
|
||||||
|
|
||||||
var $form = $("<form method='post' action='index.php/monpas/monitor/printlijst' target='_blank'>").append($('<input type = "hidden" name="data" id ="data">').val(data) );
|
var $form = $("<form method='post' action='index.php/monpas/monitor/printlijst' target='_blank'>").append($('<input type = "hidden" name="data" id ="data">').val(data) );
|
||||||
$form.appendTo("body").submit();
|
$form.appendTo("body").submit();
|
||||||
self.bezig(false);
|
self.bezig(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
} ; // definition van model
|
} ; // definition van model
|
||||||
ls.MonitorModel.initBindings();
|
ls.MonitorModel.initBindings();
|
||||||
}; // else
|
}; // else
|
||||||
}// function initMonitorModel
|
}// function initMonitorModel
|
||||||
});
|
});
|
||||||
@@ -1,315 +1,340 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
ls.initVersiesModel = function(){
|
ls.initVersiesModel = function(){
|
||||||
var timeout;
|
var timeout;
|
||||||
|
|
||||||
function fAddModule(p){
|
function fAddModule(p){
|
||||||
this.sysnr = p.sysnr;
|
this.sysnr = p.sysnr;
|
||||||
this.naam = p.naam;
|
this.naam = p.naam;
|
||||||
}
|
}
|
||||||
function fAddVersie(p){
|
function fAddVersie(p){
|
||||||
this.id = p.id;
|
this.id = p.id;
|
||||||
this.naam = ko.observable(p.naam);
|
this.naam = ko.observable(p.naam);
|
||||||
this.ingang = ko.observable(p.ingangsdatum);
|
this.ingang = ko.observable(p.ingangsdatum);
|
||||||
this.systemnorm = ko.observable(p.systemnorm);
|
this.systemnorm = ko.observable(p.systemnorm);
|
||||||
this.deleteok = ko.observable(p.deleteok);
|
this.deleteok = ko.observable(p.deleteok);
|
||||||
}
|
}
|
||||||
function fAddIJkpunt(p){
|
function fAddIJkpunt(p){
|
||||||
var dit = this;
|
var dit = this;
|
||||||
this.id = p.id;
|
this.id = p.id;
|
||||||
this.nummer = ko.observable(p.nummer);
|
this.nummer = ko.observable(p.nummer);
|
||||||
this.omschrijving = ko.observable(p.omschrijving);
|
this.omschrijving = ko.observable(p.omschrijving);
|
||||||
this.toelichting = ko.observable(p.toelichting);
|
this.toelichting = ko.observable(p.toelichting);
|
||||||
this.indicatoren = ko.observableArray([]);
|
this.indicatoren = ko.observableArray([]);
|
||||||
if (p.indicatoren){
|
if (p.indicatoren){
|
||||||
$.each(p.indicatoren, function(j,k){
|
$.each(p.indicatoren, function(j,k){
|
||||||
dit.indicatoren.push(new fAddIndicator(k));
|
dit.indicatoren.push(new fAddIndicator(k));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
this.toonindics = ko.observable(false);
|
||||||
|
this.disabled = ko.observable(false)
|
||||||
|
if(p.disabled == 'T') this.disabled(true);
|
||||||
|
}
|
||||||
|
function fAddIndicator(k){
|
||||||
|
this.id = k.id;
|
||||||
|
this.nummer = ko.observable(k.nummer);
|
||||||
|
this.gewicht = ko.observable(k.gewicht);
|
||||||
|
this.omschrijving1 = ko.observable(k.omschrijving1);
|
||||||
|
this.omschrijving2 = ko.observable(k.omschrijving2);
|
||||||
|
this.inspectie = ko.observable(k.inspectie);
|
||||||
|
this.deleteok = k.deleteok;
|
||||||
}
|
}
|
||||||
this.toonindics = ko.observable(false);
|
|
||||||
}
|
|
||||||
function fAddIndicator(k){
|
|
||||||
this.id = k.id;
|
|
||||||
this.nummer = ko.observable(k.nummer);
|
|
||||||
this.gewicht = ko.observable(k.gewicht);
|
|
||||||
this.omschrijving1 = ko.observable(k.omschrijving1);
|
|
||||||
this.omschrijving2 = ko.observable(k.omschrijving2);
|
|
||||||
this.inspectie = ko.observable(k.inspectie);
|
|
||||||
this.deleteok = k.deleteok;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ls.VersiesModel !== undefined){
|
if (ls.VersiesModel !== undefined){
|
||||||
ls.VersiesModel.initModel();
|
ls.VersiesModel.initModel();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ls.VersiesModel = {
|
ls.VersiesModel = {
|
||||||
|
|
||||||
autonivo : ko.observable(0),
|
autonivo : ko.observable(0),
|
||||||
|
|
||||||
versies : ko.observableArray([]),
|
versies : ko.observableArray([]),
|
||||||
selectedVersie : ko.observable(''),
|
selectedVersie : ko.observable(''),
|
||||||
newVersieNaam : ko.observable(''),
|
newVersieNaam : ko.observable(''),
|
||||||
ijkpunten : ko.observableArray([]),
|
ijkpunten : ko.observableArray([]),
|
||||||
newIJkpunt : ko.observable({nummer: ko.observable(0), naam:ko.observable(''), toelichting: ko.observable('')}),
|
newIJkpunt : ko.observable({nummer: ko.observable(0), naam:ko.observable(''), toelichting: ko.observable('')}),
|
||||||
selectedIJkpunt : ko.observable(''),
|
selectedIJkpunt : ko.observable(''),
|
||||||
newIndicator : ko.observable({id : null,
|
newIndicator : ko.observable({id : null,
|
||||||
ijkpunt_id : null,
|
ijkpunt_id : null,
|
||||||
nummer : ko.observable(0),
|
nummer : ko.observable(0),
|
||||||
gewicht : ko.observable(1),
|
gewicht : ko.observable(1),
|
||||||
omschrijving1 : ko.observable(),
|
omschrijving1 : ko.observable(),
|
||||||
omschrijving2 : ko.observable(),
|
omschrijving2 : ko.observable(),
|
||||||
inspectie : ko.observable(),
|
inspectie : ko.observable(),
|
||||||
deleteok : ko.observable(true) }),
|
deleteok : ko.observable(true) }),
|
||||||
modules : ko.observableArray([]),
|
modules : ko.observableArray([]),
|
||||||
selectedModule : ko.observable(''),
|
selectedModule : ko.observable(''),
|
||||||
|
|
||||||
initBindings :function(){
|
initBindings :function(){
|
||||||
var self = ls.VersiesModel;
|
var self = ls.VersiesModel;
|
||||||
|
|
||||||
if (!ko.dataFor(document.getElementById('pagVersies')) ) {
|
if (!ko.dataFor(document.getElementById('pagVersies')) ) {
|
||||||
ko.applyBindings(ls.VersiesModel, document.getElementById("pagVersies"));
|
ko.applyBindings(ls.VersiesModel, document.getElementById("pagVersies"));
|
||||||
}
|
|
||||||
|
|
||||||
$.post("index.php/monpas/beheer/getmodules", function(result){
|
|
||||||
self.modules.removeAll();
|
|
||||||
|
|
||||||
if (result){
|
|
||||||
$.each(result, function(i,p){
|
|
||||||
self.modules.push(new fAddModule(p));
|
|
||||||
});
|
|
||||||
self.selectedModule(self.modules[0]);
|
|
||||||
}; // if rsult
|
|
||||||
self.initModel();
|
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
initModel: function(){
|
|
||||||
var self = ls.VersiesModel;
|
|
||||||
$.post("index.php/shared/autorisatienivos/getautorisatie", function(result){
|
|
||||||
self.autonivo(result)
|
|
||||||
// self.fGetVersies();
|
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
|
|
||||||
fGetVersies : function(){
|
|
||||||
var self =ls.VersiesModel;
|
|
||||||
$.post("index.php/monpas/beheer/getversies/" + self.selectedModule().sysnr, function(data){
|
|
||||||
self.versies.removeAll();
|
|
||||||
self.ijkpunten.removeAll();
|
|
||||||
if (data) {
|
|
||||||
$.each(data,function(i,p){
|
|
||||||
self.versies.push(new fAddVersie(p));
|
|
||||||
});
|
|
||||||
self.selectedVersie(self.versies()[0] );
|
|
||||||
}
|
}
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
fChangeModule: function(){
|
|
||||||
var self =ls.VersiesModel;
|
|
||||||
self.fGetVersies();
|
|
||||||
},
|
|
||||||
fMaakNieuweVersie: function(){
|
|
||||||
var self = ls.VersiesModel;
|
|
||||||
self.newVersieNaam('');
|
|
||||||
$("#modNieuweVersie").modal('show');
|
|
||||||
},
|
|
||||||
fUpdateVersie: function(){
|
|
||||||
var self = ls.VersiesModel;
|
|
||||||
var dit = this;
|
|
||||||
if (timeout){
|
|
||||||
clearTimeout(timeout)
|
|
||||||
timeout ==null;
|
|
||||||
}
|
|
||||||
timeout=setTimeout(function(){
|
|
||||||
var submitData = { id : dit.id,
|
|
||||||
naam : dit.naam(),
|
|
||||||
ingangsdatum : dit.ingang(),
|
|
||||||
systemnorm : dit.systemnorm()}
|
|
||||||
$.post("index.php/monpas/beheer/updateversie",submitData, function(){})
|
|
||||||
},700);
|
|
||||||
|
|
||||||
},
|
$.post("index.php/monpas/beheer/getmodules", function(result){
|
||||||
fSaveVersie: function(){
|
self.modules.removeAll();
|
||||||
var self = ls.VersiesModel;
|
|
||||||
if (!self.selectedModule()) {
|
if (result){
|
||||||
apprise("Er is geen instrument geselecteerd. De lijst kan niet worden aangemaakt.");
|
$.each(result, function(i,p){
|
||||||
return;
|
self.modules.push(new fAddModule(p));
|
||||||
}
|
});
|
||||||
var submitData= {nieuwnaam : self.newVersieNaam(),
|
self.selectedModule(self.modules[0]);
|
||||||
module : self.selectedModule().sysnr}
|
}; // if rsult
|
||||||
$.post("index.php/monpas/beheer/insertversie/" ,submitData, function(result){
|
self.initModel();
|
||||||
if (result) {
|
},'json');
|
||||||
self.versies.push(new fAddVersie(result));
|
},
|
||||||
$.each(self.versies(), function(i,p){
|
initModel: function(){
|
||||||
if (p.id == result.id){self.selectedVersie(p); return false;}
|
var self = ls.VersiesModel;
|
||||||
})
|
$.post("index.php/shared/autorisatienivos/getautorisatie", function(result){
|
||||||
} ; // if result
|
self.autonivo(result)
|
||||||
|
// self.fGetVersies();
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
|
||||||
|
fGetVersies : function(){
|
||||||
|
var self =ls.VersiesModel;
|
||||||
|
$.post("index.php/monpas/beheer/getversies/" + self.selectedModule().sysnr, function(data){
|
||||||
|
self.versies.removeAll();
|
||||||
|
self.ijkpunten.removeAll();
|
||||||
|
if (data) {
|
||||||
|
$.each(data,function(i,p){
|
||||||
|
self.versies.push(new fAddVersie(p));
|
||||||
|
});
|
||||||
|
self.selectedVersie(self.versies()[0] );
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
fChangeModule: function(){
|
||||||
|
var self =ls.VersiesModel;
|
||||||
|
self.fGetVersies();
|
||||||
|
},
|
||||||
|
fMaakNieuweVersie: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
self.newVersieNaam('');
|
||||||
|
$("#modNieuweVersie").modal('show');
|
||||||
|
},
|
||||||
|
fUpdateVersie: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
var dit = this;
|
||||||
|
if (timeout){
|
||||||
|
clearTimeout(timeout)
|
||||||
|
timeout ==null;
|
||||||
|
}
|
||||||
|
timeout=setTimeout(function(){
|
||||||
|
var submitData = { id : dit.id,
|
||||||
|
naam : dit.naam(),
|
||||||
|
ingangsdatum : dit.ingang(),
|
||||||
|
systemnorm : dit.systemnorm()}
|
||||||
|
$.post("index.php/monpas/beheer/updateversie",submitData, function(){})
|
||||||
|
},700);
|
||||||
|
|
||||||
|
},
|
||||||
|
fSaveVersie: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
if (!self.selectedModule()) {
|
||||||
|
apprise("Er is geen instrument geselecteerd. De lijst kan niet worden aangemaakt.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var submitData= {nieuwnaam : self.newVersieNaam(),
|
||||||
|
module : self.selectedModule().sysnr}
|
||||||
|
$.post("index.php/monpas/beheer/insertversie/" ,submitData, function(result){
|
||||||
|
if (result) {
|
||||||
|
self.versies.push(new fAddVersie(result));
|
||||||
|
$.each(self.versies(), function(i,p){
|
||||||
|
if (p.id == result.id){self.selectedVersie(p); return false;}
|
||||||
|
})
|
||||||
|
} ; // if result
|
||||||
|
self.ijkpunten.removeAll();
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
fDeleteVersie: function(){
|
||||||
|
var self=ls.VersiesModel;
|
||||||
|
$.post("index.php/monpas/beheer/deleteversie/" + self.selectedVersie().id, function(result){
|
||||||
|
if (result.length > 0){
|
||||||
|
apprise(resulterrortekst);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
self.versies.remove(self.selectedVersie());
|
||||||
|
}
|
||||||
|
},'json')
|
||||||
|
},
|
||||||
|
fChangeVersie: function(){
|
||||||
|
var self=ls.VersiesModel;
|
||||||
self.ijkpunten.removeAll();
|
self.ijkpunten.removeAll();
|
||||||
},'json');
|
if (self.selectedVersie() == undefined) return;
|
||||||
},
|
$.post("index.php/monpas/beheer/getijkpunten/"+ self.selectedVersie().id, function(data){
|
||||||
fDeleteVersie: function(){
|
self.ijkpunten.removeAll();
|
||||||
var self=ls.VersiesModel;
|
if (data){
|
||||||
$.post("index.php/monpas/beheer/deleteversie/" + self.selectedVersie().id, function(result){
|
$.each(data, function(i,p){
|
||||||
if (result.length > 0){
|
self.ijkpunten.push(new fAddIJkpunt(p));
|
||||||
apprise(resulterrortekst);
|
});
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
fNieuwIJkpunt: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
var num = 0;
|
||||||
|
var i=self.ijkpunten().length;
|
||||||
|
var i = parseInt(i) - 1;
|
||||||
|
if (i >= 0) {
|
||||||
|
num = self.ijkpunten()[i].nummer();
|
||||||
|
};
|
||||||
|
self.newIJkpunt().nummer(parseInt(num)+ 1);
|
||||||
|
self.newIJkpunt().naam('');
|
||||||
|
self.newIJkpunt().toelichting('');
|
||||||
|
$("#modNieuwIJkpunt").modal('show');
|
||||||
|
},
|
||||||
|
fSaveIJkpunt: function(){
|
||||||
|
var self=ls.VersiesModel;
|
||||||
|
|
||||||
|
var submitData={versie_id : self.selectedVersie().id,
|
||||||
|
nummer : self.newIJkpunt().nummer(),
|
||||||
|
omschrijving : self.newIJkpunt().naam(),
|
||||||
|
toelichting : self.newIJkpunt().toelichting()};
|
||||||
|
$.post("index.php/monpas/beheer/insertijkpunt", submitData, function(data){
|
||||||
|
if (data){
|
||||||
|
self.ijkpunten.push(new fAddIJkpunt(data));
|
||||||
|
$.each(self.ijkpunten(), function(i,p){
|
||||||
|
if (p.id == data.id){
|
||||||
|
self.selectedIJkpunt(p);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else { apprise("Er is een fout opgetreden bij opslaan."); };
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
|
||||||
|
fToggleIndicatoren: function(){
|
||||||
|
var self= ls.VersiesModel;
|
||||||
|
self.selectedIJkpunt(null);
|
||||||
|
self.selectedIJkpunt(this);
|
||||||
|
this.toonindics(!this.toonindics());
|
||||||
|
},
|
||||||
|
fUpdateIJkpunt: function(){
|
||||||
|
var self= ls.VersiesModel;
|
||||||
|
var dit = this;
|
||||||
|
if(dit.disabled()) return;
|
||||||
|
if (timeout){
|
||||||
|
clearTimeout(timeout)
|
||||||
|
timeout ==null;
|
||||||
|
}
|
||||||
|
timeout=setTimeout(function(){
|
||||||
|
|
||||||
|
var submitData={id : dit.id,
|
||||||
|
nummer : dit.nummer(),
|
||||||
|
versie_id : self.selectedVersie().id,
|
||||||
|
omschrijving : dit.omschrijving(),
|
||||||
|
toelichting : dit.toelichting()}
|
||||||
|
|
||||||
|
$.post("index.php/monpas/beheer/updateijkpunt",submitData, function(){})
|
||||||
|
},800);
|
||||||
|
},
|
||||||
|
|
||||||
|
fDisableIJkpunt: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
var dit = this;
|
||||||
|
|
||||||
|
dit.disabled(! dit.disabled())
|
||||||
|
var disabled = 'F';
|
||||||
|
if(dit.disabled()) disabled = 'T';
|
||||||
|
var submitData = {
|
||||||
|
'id' : dit.id,
|
||||||
|
'disabled' : disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post("index.php/monpas/beheer/disableijkpunt", submitData, function(){
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
fDeleteIJkpunt:function(){
|
||||||
|
var self =ls.VersiesModel;
|
||||||
|
var id = this.id;
|
||||||
|
var dit = this;
|
||||||
|
if ( self.ijkpunten().indicatoren !== undefined && self.ijkpunten().indicatoren().length > 0) {
|
||||||
|
apprise('Er zijn nog indicatoren. IJkpunt mag niet verwijderd worden');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
self.versies.remove(self.selectedVersie());
|
apprise("Weet u zeker dat u " + this.omschrijving() + " wilt verwijderen? " ,
|
||||||
}
|
|
||||||
},'json')
|
|
||||||
},
|
|
||||||
fChangeVersie: function(){
|
|
||||||
var self=ls.VersiesModel;
|
|
||||||
self.ijkpunten.removeAll();
|
|
||||||
if (self.selectedVersie() == undefined) return;
|
|
||||||
$.post("index.php/monpas/beheer/getijkpunten/"+ self.selectedVersie().id, function(data){
|
|
||||||
self.ijkpunten.removeAll();
|
|
||||||
if (data){
|
|
||||||
$.each(data, function(i,p){
|
|
||||||
self.ijkpunten.push(new fAddIJkpunt(p));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
fNieuwIJkpunt: function(){
|
|
||||||
var self = ls.VersiesModel;
|
|
||||||
var num = 0;
|
|
||||||
var i=self.ijkpunten().length;
|
|
||||||
var i = parseInt(i) - 1;
|
|
||||||
if (i >= 0) {
|
|
||||||
num = self.ijkpunten()[i].nummer();
|
|
||||||
};
|
|
||||||
self.newIJkpunt().nummer(parseInt(num)+ 1);
|
|
||||||
self.newIJkpunt().naam('');
|
|
||||||
self.newIJkpunt().toelichting('');
|
|
||||||
$("#modNieuwIJkpunt").modal('show');
|
|
||||||
},
|
|
||||||
fSaveIJkpunt: function(){
|
|
||||||
var self=ls.VersiesModel;
|
|
||||||
|
|
||||||
var submitData={versie_id : self.selectedVersie().id,
|
|
||||||
nummer : self.newIJkpunt().nummer(),
|
|
||||||
omschrijving : self.newIJkpunt().naam(),
|
|
||||||
toelichting : self.newIJkpunt().toelichting()};
|
|
||||||
$.post("index.php/monpas/beheer/insertijkpunt", submitData, function(data){
|
|
||||||
if (data){
|
|
||||||
self.ijkpunten.push(new fAddIJkpunt(data));
|
|
||||||
$.each(self.ijkpunten(), function(i,p){
|
|
||||||
if (p.id == data.id){
|
|
||||||
self.selectedIJkpunt(p);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else { apprise("Er is een fout opgetreden bij opslaan."); };
|
|
||||||
},'json');
|
|
||||||
},
|
|
||||||
fToggleIndicatoren: function(){
|
|
||||||
var self= ls.VersiesModel;
|
|
||||||
self.selectedIJkpunt(null);
|
|
||||||
self.selectedIJkpunt(this);
|
|
||||||
this.toonindics(!this.toonindics());
|
|
||||||
},
|
|
||||||
fUpdateIJkpunt: function(){
|
|
||||||
var self= ls.VersiesModel;
|
|
||||||
var dit = this;
|
|
||||||
if (timeout){
|
|
||||||
clearTimeout(timeout)
|
|
||||||
timeout ==null;
|
|
||||||
}
|
|
||||||
timeout=setTimeout(function(){
|
|
||||||
|
|
||||||
var submitData={id : dit.id,
|
|
||||||
nummer : dit.nummer(),
|
|
||||||
versie_id : self.selectedVersie().id,
|
|
||||||
omschrijving : dit.omschrijving(),
|
|
||||||
toelichting : dit.toelichting()}
|
|
||||||
|
|
||||||
$.post("index.php/monpas/beheer/updateijkpunt",submitData, function(){})
|
|
||||||
},800);
|
|
||||||
},
|
|
||||||
fDeleteIJkpunt:function(){
|
|
||||||
var self =ls.VersiesModel;
|
|
||||||
var id = this.id;
|
|
||||||
var dit = this;
|
|
||||||
if ( self.ijkpunten().indicatoren !== undefined && self.ijkpunten().indicatoren().length > 0) {
|
|
||||||
apprise('Er zijn nog indicatoren. IJkpunt mag niet verwijderd worden');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
apprise("Weet u zeker dat u " + this.omschrijving() + " wilt verwijderen? " ,
|
|
||||||
{verify: true, textYes: 'ja', textNo: 'nee'}, function(ans){
|
{verify: true, textYes: 'ja', textNo: 'nee'}, function(ans){
|
||||||
if (ans){
|
if (ans){
|
||||||
$.post("index.php/monpas/beheer/deleteijkpunt/" + id);
|
$.post("index.php/monpas/beheer/deleteijkpunt/" + id);
|
||||||
self.ijkpunten.remove(dit);
|
self.ijkpunten.remove(dit);
|
||||||
}
|
}
|
||||||
}); // apprise
|
}); // apprise
|
||||||
}
|
|
||||||
},
|
|
||||||
fNieuweIndicator: function(){
|
|
||||||
var self = ls.VersiesModel;
|
|
||||||
var num =0
|
|
||||||
self.selectedIJkpunt(this);
|
|
||||||
$.each(self.selectedIJkpunt().indicatoren(), function(j,k){
|
|
||||||
num=k.nummer();
|
|
||||||
})
|
|
||||||
self.newIndicator().nummer(parseInt(num) + 1);
|
|
||||||
self.newIndicator().gewicht(1);
|
|
||||||
self.newIndicator().ijkpunt_id= self.selectedIJkpunt().id;
|
|
||||||
self.newIndicator().omschrijving1('');
|
|
||||||
self.newIndicator().omschrijving2('');
|
|
||||||
self.newIndicator().inspectie('');
|
|
||||||
self.newIndicator().deleteok(true);
|
|
||||||
$("#modNieuwIndicator").modal('show');
|
|
||||||
},
|
|
||||||
fSaveIndicator: function(){
|
|
||||||
var self=ls.VersiesModel;
|
|
||||||
|
|
||||||
var submitData={ ijkpunt_id : self.newIndicator().ijkpunt_id,
|
|
||||||
nummer : self.newIndicator().nummer(),
|
|
||||||
omschrijving1 : self.newIndicator().omschrijving1(),
|
|
||||||
omschrijving2 : self.newIndicator().omschrijving2(),
|
|
||||||
inspectie : self.newIndicator().inspectie(),
|
|
||||||
gewicht : self.newIndicator().gewicht};
|
|
||||||
$.post("index.php/monpas/beheer/insertindicator", submitData, function(data){
|
|
||||||
if (data){
|
|
||||||
self.selectedIJkpunt().indicatoren.push(new fAddIndicator(data));
|
|
||||||
}
|
}
|
||||||
else { apprise("Er is een fout opgetreden bij opslaan."); };
|
},
|
||||||
},'json');
|
fNieuweIndicator: function(){
|
||||||
},
|
var self = ls.VersiesModel;
|
||||||
fUpdateIndicator: function(){
|
var num =0
|
||||||
var self = ls.VersiesModel;
|
var dit = this;
|
||||||
var dit =this;
|
if(dit.disabled()) return;
|
||||||
if (timeout){
|
self.selectedIJkpunt(this);
|
||||||
clearTimeout(timeout);
|
$.each(self.selectedIJkpunt().indicatoren(), function(j,k){
|
||||||
timeout = null;
|
num=k.nummer();
|
||||||
}
|
})
|
||||||
timeout = setTimeout(function(){
|
self.newIndicator().nummer(parseInt(num) + 1);
|
||||||
var submitData ={ id : dit.id,
|
self.newIndicator().gewicht(1);
|
||||||
nummer : dit.nummer(),
|
self.newIndicator().ijkpunt_id= self.selectedIJkpunt().id;
|
||||||
omschrijving1 : dit.omschrijving1(),
|
self.newIndicator().omschrijving1('');
|
||||||
omschrijving2 : dit.omschrijving2(),
|
self.newIndicator().omschrijving2('');
|
||||||
inspectie : dit.inspectie(),
|
self.newIndicator().inspectie('');
|
||||||
gewicht : dit.gewicht()}
|
self.newIndicator().deleteok(true);
|
||||||
$.post("index.php/monpas/beheer/updateindicator", submitData);
|
$("#modNieuwIndicator").modal('show');
|
||||||
},700);
|
},
|
||||||
},
|
fSaveIndicator: function(){
|
||||||
fDeleteIndicator: function($parent, $data){
|
var self=ls.VersiesModel;
|
||||||
var self = ls.VersiesModel;
|
|
||||||
var dit = $data;
|
|
||||||
|
|
||||||
apprise ("Weet u zeker dat u <i>" + dit.omschrijving1() + "</i> wilt verwijderen?",
|
var submitData={ ijkpunt_id : self.newIndicator().ijkpunt_id,
|
||||||
|
nummer : self.newIndicator().nummer(),
|
||||||
|
omschrijving1 : self.newIndicator().omschrijving1(),
|
||||||
|
omschrijving2 : self.newIndicator().omschrijving2(),
|
||||||
|
inspectie : self.newIndicator().inspectie(),
|
||||||
|
gewicht : self.newIndicator().gewicht};
|
||||||
|
$.post("index.php/monpas/beheer/insertindicator", submitData, function(data){
|
||||||
|
if (data){
|
||||||
|
self.selectedIJkpunt().indicatoren.push(new fAddIndicator(data));
|
||||||
|
}
|
||||||
|
else { apprise("Er is een fout opgetreden bij opslaan."); };
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
fUpdateIndicator: function(){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
var dit =this;
|
||||||
|
if (timeout){
|
||||||
|
clearTimeout(timeout);
|
||||||
|
timeout = null;
|
||||||
|
}
|
||||||
|
timeout = setTimeout(function(){
|
||||||
|
var submitData ={ id : dit.id,
|
||||||
|
nummer : dit.nummer(),
|
||||||
|
omschrijving1 : dit.omschrijving1(),
|
||||||
|
omschrijving2 : dit.omschrijving2(),
|
||||||
|
inspectie : dit.inspectie(),
|
||||||
|
gewicht : dit.gewicht()}
|
||||||
|
$.post("index.php/monpas/beheer/updateindicator", submitData);
|
||||||
|
},700);
|
||||||
|
},
|
||||||
|
fDeleteIndicator: function($parent, $data){
|
||||||
|
var self = ls.VersiesModel;
|
||||||
|
var dit = $data;
|
||||||
|
|
||||||
|
apprise ("Weet u zeker dat u <i>" + dit.omschrijving1() + "</i> wilt verwijderen?",
|
||||||
{verify:true, textYes:'ja',textNo:'nee'}, function(ans){
|
{verify:true, textYes:'ja',textNo:'nee'}, function(ans){
|
||||||
if (ans){
|
if (ans){
|
||||||
$.post('index.php/monpas/beheer/deleteindicator/' + dit.id,function(result){
|
$.post('index.php/monpas/beheer/deleteindicator/' + dit.id,function(result){
|
||||||
$parent.indicatoren.remove(dit);
|
$parent.indicatoren.remove(dit);
|
||||||
},'json');
|
},'json');
|
||||||
}
|
}
|
||||||
}); // apprise
|
}); // apprise
|
||||||
}
|
}
|
||||||
|
|
||||||
} ; // definition van model
|
} ; // definition van model
|
||||||
ls.VersiesModel.initBindings();
|
ls.VersiesModel.initBindings();
|
||||||
}; // else
|
}; // else
|
||||||
}// function initVersiesModel
|
}// function initVersiesModel
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user