diversen
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Created by Pensare Software.
|
||||
* User: Theo Weijmer
|
||||
* Date: 22/12/2017
|
||||
* Time: 13:32
|
||||
*/
|
||||
@@ -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 );
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
@@ -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"));
|
||||
|
||||
} );
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Created by Pensare Software.
|
||||
* User: Theo Weijmer
|
||||
* Date: 22/12/2017
|
||||
* Time: 13:32
|
||||
*/
|
||||
|
||||
dbo.pageDataservice = {
|
||||
|
||||
$.getJSON('index.php/')
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user