This commit is contained in:
2017-12-22 14:59:54 +01:00
parent 59e296acfa
commit 1175a4f8ff
16 changed files with 188 additions and 53 deletions
+6
View File
@@ -0,0 +1,6 @@
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 22/12/2017
* Time: 13:32
*/
+36
View File
@@ -0,0 +1,36 @@
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 22/12/2017
* Time: 12:13
*/
var dbo = {};
$(function(){
ko.bindingHandlers.stopBinding = {
init: function () {
return {controlsDescendantBindings: true};
}
};
ko.virtualElements.allowedBindings.stopBinding = true;
ko.bindingHandlers.fadeVisible = {
init : function ( element, valueAccessor ) {
// Initially set the element to be instantly visible/hidden depending on the value
var value = valueAccessor();
$( element ).toggle( ko.unwrap( value ) ); // Use "unwrapObservable" so we can handle values that may or may not be observable
},
update: function ( element, valueAccessor ) {
// Whenever the value subsequently changes, slowly fade the element in or out
var value = valueAccessor();
ko.unwrap( value ) ? $( element ).fadeIn( 500 ) : $( element ).fadeOut( 500 );
}
};
});
+24
View File
@@ -0,0 +1,24 @@
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 22/12/2017
* Time: 13:22
*/
$( function () {
dbo.menuModel = {
init : function(){
}
}
dbo.menuModel.init();
ko.applyBindings(dbo.menuModel, document.getElementById("dbois-app"));
} );
+13
View File
@@ -0,0 +1,13 @@
/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 22/12/2017
* Time: 13:32
*/
dbo.pageDataservice = {
$.getJSON('index.php/')
};