/usr/share/games/flightgear/Phi/3rdparty/knockout-jqueryui/utils.js is in flightgear-phi 2016.4.2+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /*global define*/
define(
[
'jquery',
'knockout',
'jquery-ui/core'
],
function ($, ko) {
'use strict';
var match, uiVersion, descendantControllingBindings, createObject, register;
/*jslint regexp:true*/
match = ($.ui.version || '').match(/^(\d)\.(\d+)/);
/*jslint regexp:false*/
if (!match) {
uiVersion = null;
} else {
uiVersion = {
major: parseInt(match[1], 10),
minor: parseInt(match[2], 10)
};
}
descendantControllingBindings = ['foreach', 'if', 'ifnot', 'with', 'html', 'text',
'options'];
createObject = Object.create || function (prototype) {
/// <summary>Simple (incomplete) shim for Object.create().</summary>
/// <param name='prototype' type='Object' mayBeNull='true'></param>
/// <returns type='Object'></returns>
function Type() { }
Type.prototype = prototype;
return new Type();
};
register = function (Constructor) {
/// <summary>Registers a binding.</summary>
/// <param name='Constructor' type='BindingHandler'>The binding handler's
/// constructor function.</param>
var handler = new Constructor();
ko.bindingHandlers[handler.widgetName] = {
after: ko.utils.arrayGetDistinctValues(
descendantControllingBindings.concat(handler.after || [])
),
init: handler.init.bind(handler),
update: handler.update.bind(handler)
};
};
return {
uiVersion: uiVersion,
descendantControllingBindings: descendantControllingBindings,
createObject: createObject,
register: register
};
}
);
|