code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function normalize(name, baseName) { var nameParts, nameSegment, mapValue, foundMap, lastIndex, foundI, foundStarMap, starI, i, j, part, normalizedBaseParts, baseParts = baseName && baseName.split("/"), map = config.map, starMap = (map && map['*']) || {}; ...
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
normalize
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function makeRequire(relName, forceSync) { return function () { //A version of a require function that passes a moduleName //value for items that may need to //look up paths relative to the moduleName var args = aps.call(arguments, 0); //If first arg ...
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
makeRequire
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function makeNormalize(relName) { return function (name) { return normalize(name, relName); }; }
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
makeNormalize
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function makeLoad(depName) { return function (value) { defined[depName] = value; }; }
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
makeLoad
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function callDep(name) { if (hasProp(waiting, name)) { var args = waiting[name]; delete waiting[name]; defining[name] = true; main.apply(undef, args); } if (!hasProp(defined, name) && !hasProp(defining, name)) { throw new Error('No ' +...
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
callDep
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function splitPrefix(name) { var prefix, index = name ? name.indexOf('!') : -1; if (index > -1) { prefix = name.substring(0, index); name = name.substring(index + 1, name.length); } return [prefix, name]; }
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
splitPrefix
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function makeRelParts(relName) { return relName ? splitPrefix(relName) : []; }
Given a relative module name, like ./something, normalize it to a real name that can be mapped to a path. @param {String} name the relative name @param {String} baseName a real name that the name arg is relative to. @returns {String} normalized name
makeRelParts
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function makeConfig(name) { return function () { return (config && config.config && config.config[name]) || {}; }; }
Makes a name map, normalizing the name, and using a plugin for normalization if necessary. Grabs a ref to plugin too, as an optimization.
makeConfig
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function BaseConstructor () { this.constructor = ChildClass; }
Expose module registry for debugging and tooling
BaseConstructor
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function getMethods (theClass) { var proto = theClass.prototype; var methods = []; for (var methodName in proto) { var m = proto[methodName]; if (typeof m !== 'function') { continue; } if (methodName === 'constructor') { continue; } methods.push(metho...
Expose module registry for debugging and tooling
getMethods
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function DecoratedClass () { var unshift = Array.prototype.unshift; var argCount = DecoratorClass.prototype.constructor.length; var calledConstructor = SuperClass.prototype.constructor; if (argCount > 0) { unshift.call(arguments, SuperClass.prototype.constructor); calledConst...
Expose module registry for debugging and tooling
DecoratedClass
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function ctr () { this.constructor = DecoratedClass; }
Expose module registry for debugging and tooling
ctr
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
calledMethod = function (methodName) { // Stub out the original method if it's not decorating an actual method var originalMethod = function () {}; if (methodName in DecoratedClass.prototype) { originalMethod = DecoratedClass.prototype[methodName]; } var decoratedMethod = Decorat...
Expose module registry for debugging and tooling
calledMethod
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
Observable = function () { this.listeners = {}; }
Expose module registry for debugging and tooling
Observable
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Results ($element, options, dataAdapter) { this.$element = $element; this.data = dataAdapter; this.options = options; Results.__super__.constructor.call(this); }
Expose module registry for debugging and tooling
Results
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function BaseSelection ($element, options) { this.$element = $element; this.options = options; BaseSelection.__super__.constructor.call(this); }
Expose module registry for debugging and tooling
BaseSelection
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function SingleSelection () { SingleSelection.__super__.constructor.apply(this, arguments); }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
SingleSelection
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function MultipleSelection ($element, options) { MultipleSelection.__super__.constructor.apply(this, arguments); }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
MultipleSelection
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Placeholder (decorated, $element, options) { this.placeholder = this.normalizePlaceholder(options.get('placeholder')); decorated.call(this, $element, options); }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
Placeholder
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Search (decorated, $element, options) { decorated.call(this, $element, options); }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
Search
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Translation (dict) { this.dict = dict || {}; }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Translation
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function SelectAdapter ($element, options) { this.$element = $element; this.options = options; SelectAdapter.__super__.constructor.call(this); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
SelectAdapter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function ArrayAdapter ($element, options) { this._dataToConvert = options.get('data') || []; ArrayAdapter.__super__.constructor.call(this, $element, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
ArrayAdapter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function onlyItem (item) { return function () { return $(this).val() == item.id; }; }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
onlyItem
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function AjaxAdapter ($element, options) { this.ajaxOptions = this._applyDefaults(options.get('ajax')); if (this.ajaxOptions.processResults != null) { this.processResults = this.ajaxOptions.processResults; } AjaxAdapter.__super__.constructor.call(this, $element, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
AjaxAdapter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function request () { var $request = options.transport(options, function (data) { var results = self.processResults(data, params); if (self.options.get('debug') && window.console && console.error) { // Check to make sure that the response included a `results` key. if (!results...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
request
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Tags (decorated, $element, options) { var tags = options.get('tags'); var createTag = options.get('createTag'); if (createTag !== undefined) { this.createTag = createTag; } var insertTag = options.get('insertTag'); if (insertTag !== undefined) { this.insertTag = insert...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Tags
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function wrapper (obj, child) { var data = obj.results; for (var i = 0; i < data.length; i++) { var option = data[i]; var checkChildren = ( option.children != null && !wrapper({ results: option.children }, true) ); var optionText =...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
wrapper
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Tokenizer (decorated, $element, options) { var tokenizer = options.get('tokenizer'); if (tokenizer !== undefined) { this.tokenizer = tokenizer; } decorated.call(this, $element, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Tokenizer
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function createAndSelect (data) { // Normalize the data object so we can use it for checks var item = self._normalizeItem(data); // Check if the data object already exists as a tag // Select it if it doesn't var $existingOptions = self.$element.find('option').filter(function () { ...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
createAndSelect
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function select (data) { self.trigger('select', { data: data }); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
select
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function MinimumInputLength (decorated, $e, options) { this.minimumInputLength = options.get('minimumInputLength'); decorated.call(this, $e, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
MinimumInputLength
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function MaximumInputLength (decorated, $e, options) { this.maximumInputLength = options.get('maximumInputLength'); decorated.call(this, $e, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
MaximumInputLength
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function MaximumSelectionLength (decorated, $e, options) { this.maximumSelectionLength = options.get('maximumSelectionLength'); decorated.call(this, $e, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
MaximumSelectionLength
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Dropdown ($element, options) { this.$element = $element; this.options = options; Dropdown.__super__.constructor.call(this); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Dropdown
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function HidePlaceholder (decorated, $element, options, dataAdapter) { this.placeholder = this.normalizePlaceholder(options.get('placeholder')); decorated.call(this, $element, options, dataAdapter); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
HidePlaceholder
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function InfiniteScroll (decorated, $element, options, dataAdapter) { this.lastParams = {}; decorated.call(this, $element, options, dataAdapter); this.$loadingMore = this.createLoadingMore(); this.loading = false; }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
InfiniteScroll
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function AttachBody (decorated, $element, options) { this.$dropdownParent = $(options.get('dropdownParent') || document.body); decorated.call(this, $element, options); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
AttachBody
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function countResults (data) { var count = 0; for (var d = 0; d < data.length; d++) { var item = data[d]; if (item.children) { count += countResults(item.children); } else { count++; } } return count; }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
countResults
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { this.minimumResultsForSearch = options.get('minimumResultsForSearch'); if (this.minimumResultsForSearch < 0) { this.minimumResultsForSearch = Infinity; } decorated.call(this, $element, options, dataAdapter); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
MinimumResultsForSearch
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function stripDiacritics (text) { // Used 'uni range + named function' from http://jsperf.com/diacritics/18 function match(a) { return DIACRITICS[a] || a; } return text.replace(/[^\u0000-\u007E]/g, match); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
stripDiacritics
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function match(a) { return DIACRITICS[a] || a; }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
match
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function matcher (params, data) { // Always return the object if there is nothing to compare if ($.trim(params.term) === '') { return data; } // Do a recursive check for options with children if (data.children && data.children.length > 0) { // Clone the data object if ther...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
matcher
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Options (options, $element) { this.options = options; if ($element != null) { this.fromElement($element); } if ($element != null) { this.options = Defaults.applyFromElement(this.options, $element); } this.options = Defaults.apply(this.options); if ($element && $eleme...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Options
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function upperCaseLetter(_, letter) { return letter.toUpperCase(); }
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
upperCaseLetter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
Select2 = function ($element, options) { if (Utils.GetData($element[0], 'select2') != null) { Utils.GetData($element[0], 'select2').destroy(); } this.$element = $element; this.id = this._generateId($element); options = options || {}; this.options = new Options(options, $element); ...
This method will transfer the tabindex attribute from the rendered selection to the search box. This allows for the search box to be used as the primary focus instead of the selection container. @private
Select2
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function syncCssClasses ($dest, $src, adapter) { var classes, replacements = [], adapted; classes = $.trim($dest.attr('class')); if (classes) { classes = '' + classes; // for IE which returns object $(classes.split(/\s+/)).each(function () { // Save all Select2 classes if (thi...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
syncCssClasses
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function _containerAdapter (clazz) { return null; }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
_containerAdapter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function _dropdownAdapter (clazz) { return null; }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
_dropdownAdapter
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function InitSelection (decorated, $element, options) { if (options.get('debug') && window.console && console.warn) { console.warn( 'Select2: The `initSelection` option has been deprecated in favor' + ' of a custom data adapter that overrides the `current` method. ' + 'This method is n...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
InitSelection
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function InputData (decorated, $element, options) { this._currentData = []; this._valueSeparator = options.get('valueSeparator') || ','; if ($element.prop('type') === 'hidden') { if (options.get('debug') && console && console.warn) { console.warn( 'Select2: Using a hidden input with...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
InputData
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function getSelected (data, selectedIds) { var selected = []; if (data.selected || $.inArray(data.id, selectedIds) !== -1) { data.selected = true; selected.push(data); } else { data.selected = false; } if (data.children) { selected.push.apply(selected, get...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
getSelected
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function oldMatcher (matcher) { function wrappedMatcher (params, data) { var match = $.extend(true, {}, data); if (params.term == null || $.trim(params.term) === '') { return match; } if (data.children) { for (var c = data.children.length - 1; c >= 0; c--) { var c...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
oldMatcher
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function wrappedMatcher (params, data) { var match = $.extend(true, {}, data); if (params.term == null || $.trim(params.term) === '') { return match; } if (data.children) { for (var c = data.children.length - 1; c >= 0; c--) { var child = data.children[c]; ...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
wrappedMatcher
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function Query (decorated, $element, options) { if (options.get('debug') && window.console && console.warn) { console.warn( 'Select2: The `query` option has been deprecated in favor of a ' + 'custom data adapter that overrides the `query` method. Support ' + 'will be removed for the `q...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
Query
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function AttachContainer (decorated, $element, options) { decorated.call(this, $element, options); }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
AttachContainer
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function handler(event) { var orgEvent = event || window.event, args = slice.call(arguments, 1), delta = 0, deltaX = 0, deltaY = 0, absDelta = 0, offsetX = 0, offsetY = 0; event = $.event.fix...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
handler
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function nullLowestDelta() { lowestDelta = null; }
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
nullLowestDelta
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function shouldAdjustOldDeltas(orgEvent, absDelta) { // If this is an older event and the delta is divisable by 120, // then we are assuming that the browser is treating this as an // older mouse wheel event and that we should divide the deltas // by 40 to try and get a more usable delta...
Helper method to abstract the "disabled" state of this object. @return {true} if the disabled option is true. @return {false} if the disabled option is false.
shouldAdjustOldDeltas
javascript
johanmodin/clifs
www/assets/admin/js/vendor/select2/select2.full.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/select2/select2.full.js
Apache-2.0
function deanchor(pattern) { // Allow any number of empty noncapturing groups before/after anchors, because regexes // built/generated by XRegExp sometimes include them var leadingAnchor = /^(?:\(\?:\))*\^/; var trailingAnchor = /\$(?:\(\?:\))*$/; if ( leadingAnchor....
Strips a leading `^` and trailing unescaped `$`, if both are present. @private @param {String} pattern Pattern to process. @returns {String} Pattern with edge anchors removed.
deanchor
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function asXRegExp(value, addFlagX) { var flags = addFlagX ? 'x' : ''; return XRegExp.isRegExp(value) ? (value[REGEX_DATA] && value[REGEX_DATA].captureNames ? // Don't recompile, to preserve capture names value : // Recompile as XRegExp ...
Converts the provided value to an XRegExp. Native RegExp flags are not preserved. @private @param {String|RegExp} value Value to convert. @param {Boolean} [addFlagX] Whether to apply the `x` flag in cases when `value` is not already a regex generated by XRegExp @returns {RegExp} XRegExp object with XRegExp syntax ap...
asXRegExp
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function row(name, value, start, end) { return { name: name, value: value, start: start, end: end }; }
Returns a match detail object composed of the provided values. @private
row
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function hasNativeFlag(flag) { // Can't check based on the presence of properties/getters since browsers might support such // properties even when they don't support the corresponding flag in regex construction (tested // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with f...
XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to make your client-side grepping simpler and more powerful, while freeing you from related cross-browser inconsistencies.
hasNativeFlag
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { var p; regex[REGEX_DATA] = { captureNames: captureNames }; if (isInternalOnly) { return regex; } // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value if (regex.__prot...
Attaches extended data and `XRegExp.prototype` properties to a regex object. @private @param {RegExp} regex Regex to augment. @param {Array} captureNames Array with capture names, or `null`. @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A. @param {String} xFlags XRegExp flags used to...
augment
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function clipDuplicates(str) { return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); }
Removes any duplicate characters from the provided string. @private @param {String} str String to remove duplicate characters from. @returns {String} String with any duplicate characters removed.
clipDuplicates
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function copyRegex(regex, options) { if (!XRegExp.isRegExp(regex)) { throw new TypeError('Type RegExp expected'); } var xData = regex[REGEX_DATA] || {}; var flags = getNativeFlags(regex); var flagsToAdd = ''; var flagsToRemove = ''; var xregexpSource = null; var xregexpFlags = n...
Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype` properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing flags g and y while copying the regex. @private @param {RegExp} regex Regex to copy. @param {Object} [options] Options object with...
copyRegex
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function dec(hex) { return parseInt(hex, 16); }
Converts hexadecimal to decimal. @private @param {String} hex @returns {Number}
dec
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function getContextualTokenSeparator(match, scope, flags) { if ( // No need to separate tokens if at the beginning or end of a group match.input.charAt(match.index - 1) === '(' || match.input.charAt(match.index + match[0].length) === ')' || // Avoid separating tokens when the followi...
Returns a pattern that can be used in a native RegExp in place of an ignorable token such as an inline comment or whitespace with flag x. This is used directly as a token handler function passed to `XRegExp.addToken`. @private @param {String} match Match arg of `XRegExp.addToken` handler @param {String} scope Scope ar...
getContextualTokenSeparator
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function getNativeFlags(regex) { return hasFlagsProp ? regex.flags : // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation // with an empty string) allows this to continue working predictably when // `XRegExp.proptotype.toString` is overridden ...
Returns native `RegExp` flags used by a regex object. @private @param {RegExp} regex Regex to check. @returns {String} Native flags in use.
getNativeFlags
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function hasNamedCapture(regex) { return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); }
Determines whether a regex has extended instance data used to track capture names. @private @param {RegExp} regex Regex to check. @returns {Boolean} Whether the regex uses named capture.
hasNamedCapture
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function hex(dec) { return parseInt(dec, 10).toString(16); }
Converts decimal to hexadecimal. @private @param {Number|String} dec @returns {String}
hex
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function indexOf(array, value) { var len = array.length; var i; for (i = 0; i < len; ++i) { if (array[i] === value) { return i; } } return -1; }
Returns the first index at which a given value can be found in an array. @private @param {Array} array Array to search. @param {*} value Value to locate in the array. @returns {Number} Zero-based index at which the item is found, or -1.
indexOf
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function isPatternNext(pattern, pos, flags, needlePattern) { var inlineCommentPattern = '\\(\\?#[^)]*\\)'; var lineCommentPattern = '#[^#\\n]*'; var patternsToIgnore = flags.indexOf('x') > -1 ? // Ignore any leading whitespace, line comments, and inline comments ['\\s', lineCommentPattern, i...
Checks whether the next nonignorable token after the specified position matches the `needlePattern` @private @param {String} pattern Pattern to search within. @param {Number} pos Index in `pattern` to search at. @param {String} flags Flags used by the pattern. @param {String} needlePattern Pattern to match the next to...
isPatternNext
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function isType(value, type) { return toString.call(value) === '[object ' + type + ']'; }
Determines whether a value is of the specified type, by resolving its internal [[Class]]. @private @param {*} value Object to check. @param {String} type Type to check for, in TitleCase. @returns {Boolean} Whether the object matches the type.
isType
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function pad4(str) { while (str.length < 4) { str = '0' + str; } return str; }
Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values. @private @param {String} str @returns {String}
pad4
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function prepareFlags(pattern, flags) { var i; // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags if (clipDuplicates(flags) !== flags) { throw new SyntaxError('Invalid duplicate regex flag ' + flags); } // Strip and apply a leading mode modifier with any...
Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads the flag preparation logic from the `XRegExp` constructor. @private @param {String} pattern Regex pattern, possibly with a leading mode modifier. @param {String} flags Any combination of flags. @returns {Object} Object with p...
prepareFlags
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function prepareOptions(value) { var options = {}; if (isType(value, 'String')) { XRegExp.forEach(value, /[^\s,]+/, function(match) { options[match] = true; }); return options; } return value; }
Prepares an options object from the given value. @private @param {String|Object} value Value to convert to an options object. @returns {Object} Options object.
prepareOptions
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function registerFlag(flag) { if (!/^[\w$]$/.test(flag)) { throw new Error('Flag must be a single character A-Za-z0-9_$'); } registeredFlags[flag] = true; }
Registers a flag so it doesn't throw an 'unknown flag' error. @private @param {String} flag Single-character flag to register.
registerFlag
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function runTokens(pattern, flags, pos, scope, context) { var i = tokens.length; var leadChar = pattern.charAt(pos); var result = null; var match; var t; // Run in reverse insertion order while (i--) { t = tokens[i]; if ( (t.leadChar && t.leadChar !== leadChar) |...
Runs built-in and custom regex syntax tokens in reverse insertion order at the specified position, until a match is found. @private @param {String} pattern Original pattern from which an XRegExp object is being built. @param {String} flags Flags being used to construct the regex. @param {Number} pos Position to search...
runTokens
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function setAstral(on) { features.astral = on; }
Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if the Unicode Base addon is not available, since flag A is registered by that addon. @private @param {Boolean} on `true` to enable...
setAstral
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function setNatives(on) { RegExp.prototype.exec = (on ? fixed : nativ).exec; RegExp.prototype.test = (on ? fixed : nativ).test; String.prototype.match = (on ? fixed : nativ).match; String.prototype.replace = (on ? fixed : nativ).replace; String.prototype.split = (on ? fixed : nativ).split; feat...
Enables or disables native method overrides. @private @param {Boolean} on `true` to enable; `false` to disable.
setNatives
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function toObject(value) { // null or undefined if (value == null) { throw new TypeError('Cannot convert null or undefined to object'); } return value; }
Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow the ES5 abstract operation `ToObject`. @private @param {*} value Object to check and return. @returns {*} The provided object.
toObject
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function XRegExp(pattern, flags) { if (XRegExp.isRegExp(pattern)) { if (flags !== undefined) { throw new TypeError('Cannot supply flags when copying a RegExp'); } return copyRegex(pattern); } // Copy the argument behavior of `RegExp` pattern = pattern === undefined ?...
Creates an extended regular expression object for matching text with a pattern. Differs from a native regular expression in that additional syntax and flags are supported. The returned object is in fact a native `RegExp` and works with all native methods. @class XRegExp @constructor @param {String|RegExp} pattern Rege...
XRegExp
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function addMatch(match) { if (item.backref) { // Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold the // `undefined`s for backreferences to nonparticipating capturing groups. In such // cases, a `hasOwnProperty` or `in` check on its ow...
Retrieves the matches from searching a string using a chain of regexes that successively search within previous matches. The provided `chain` array can contain regexes and or objects with `regex` and `backref` properties. When a backreference is specified, the named or numbered backreference is passed forward to the ne...
addMatch
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
function rewrite(match, paren, backref) { var name = captureNames[numCaptures - numPriorCaptures]; // Capturing group if (paren) { ++numCaptures; // If the current capture has a name, preserve the name if (name) { return '(?<' + name + '>'; ...
Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as regex objects or strings. Metacharacters are escaped in patterns provided as strings. Backreferences in provided regex objects are automatically renumbered to work correctly within the larger combined pattern. Native flags us...
rewrite
javascript
johanmodin/clifs
www/assets/admin/js/vendor/xregexp/xregexp.js
https://github.com/johanmodin/clifs/blob/master/www/assets/admin/js/vendor/xregexp/xregexp.js
Apache-2.0
check = function () { var now = that.getTime(); if (now - start >= timeoutValue) { reject(new Error('' + timeoutValue + 'ms timeout exceeded')); } else { that['context'].document.fonts.load(that.getStyle('"' + that['family'] + '"'), testString).then(funct...
@param {string=} text Optional test string to use for detecting if a font is available. @param {number=} timeout Optional timeout for giving up on font load detection and rejecting the promise (defaults to 3 seconds). @return {Promise.<fontface.Observer>}
check
javascript
bramstein/fontfaceobserver
src/observer.js
https://github.com/bramstein/fontfaceobserver/blob/master/src/observer.js
BSD-2-Clause
function check() { if ((widthA != -1 && widthB != -1) || (widthA != -1 && widthC != -1) || (widthB != -1 && widthC != -1)) { if (widthA == widthB || widthA == widthC || widthB == widthC) { // All values are the same, so the browser has most likely loaded the web font ...
@private If metric compatible fonts are detected, one of the widths will be -1. This is because a metric compatible font won't trigger a scroll event. We work around this by considering a font loaded if at least two of the widths are the same. Because we have three widths, this still prevents false positives. Cases: ...
check
javascript
bramstein/fontfaceobserver
src/observer.js
https://github.com/bramstein/fontfaceobserver/blob/master/src/observer.js
BSD-2-Clause
function checkForTimeout() { var now = that.getTime(); if (now - start >= timeoutValue) { removeContainer(); reject(new Error('' + timeoutValue + 'ms timeout exceeded')); } else { var hidden = that['context'].document['hidden']; ...
@private If metric compatible fonts are detected, one of the widths will be -1. This is because a metric compatible font won't trigger a scroll event. We work around this by considering a font loaded if at least two of the widths are the same. Because we have three widths, this still prevents false positives. Cases: ...
checkForTimeout
javascript
bramstein/fontfaceobserver
src/observer.js
https://github.com/bramstein/fontfaceobserver/blob/master/src/observer.js
BSD-2-Clause
function visitNode(path) { if (path in deps.written) { return; } // we have already visited this one. We can get here if we have cyclic // dependencies if (path in deps.visited) { if (!(path in seenScript)) { seenScript[path] = true; scripts.push(path);...
Resolves dependencies based on the dependencies added using addDependency and calls importScript_ in the correct order. @private
visitNode
javascript
bramstein/fontfaceobserver
vendor/google/base.js
https://github.com/bramstein/fontfaceobserver/blob/master/vendor/google/base.js
BSD-2-Clause
getMapping = function(cssName) { return goog.cssNameMapping_[cssName] || cssName; }
Handles strings that are intended to be used as CSS class names. This function works in tandem with @see goog.setCssNameMapping. Without any mapping set, the arguments are simple joined with a hyphen and passed through unaltered. When there is a mapping, there are two possible styles in which these mappings are used...
getMapping
javascript
bramstein/fontfaceobserver
vendor/google/base.js
https://github.com/bramstein/fontfaceobserver/blob/master/vendor/google/base.js
BSD-2-Clause
renameByParts = function(cssName) { // Remap all the parts individually. var parts = cssName.split('-'); var mapped = []; for (var i = 0; i < parts.length; i++) { mapped.push(getMapping(parts[i])); } return mapped.join('-'); }
Handles strings that are intended to be used as CSS class names. This function works in tandem with @see goog.setCssNameMapping. Without any mapping set, the arguments are simple joined with a hyphen and passed through unaltered. When there is a mapping, there are two possible styles in which these mappings are used...
renameByParts
javascript
bramstein/fontfaceobserver
vendor/google/base.js
https://github.com/bramstein/fontfaceobserver/blob/master/vendor/google/base.js
BSD-2-Clause
getTime = function () { var date, format; var time = Math.max(_start, _end); var diff = _start - _end; var offset_GMT = new Date().getTimezoneOffset(); var diff_format; if (isTime) { date = new Date(time)...
jquery.countdown.js 1.0 http://jquerywidget.com
getTime
javascript
mumuy/widget
code/jquery.countdown.js
https://github.com/mumuy/widget/blob/master/code/jquery.countdown.js
MIT
count = function () { if (_hander) { clearInterval(_hander); } options.countEach(getTime()); $this.addClass(options.disabledCls); var isReverse = _start > _end ? true : false; _hander = setInterval(functi...
jquery.countdown.js 1.0 http://jquerywidget.com
count
javascript
mumuy/widget
code/jquery.countdown.js
https://github.com/mumuy/widget/blob/master/code/jquery.countdown.js
MIT
function getTimestamp(str) { str = str.replace(/\-/g, '/'); return +new Date(str) || +new Date('1970/1/1 ' + str); }
jquery.countdown.js 1.0 http://jquerywidget.com
getTimestamp
javascript
mumuy/widget
code/jquery.countdown.js
https://github.com/mumuy/widget/blob/master/code/jquery.countdown.js
MIT
closeLayer = function(){ if($trigger){ $trigger.removeClass(options.activeCls); } $layer.hide(); $trigger = null; $textarea = null; options.onHide(); }
jquery.emoticons.js 1.0 http://jquerywidget.com
closeLayer
javascript
mumuy/widget
code/jquery.emoticons.js
https://github.com/mumuy/widget/blob/master/code/jquery.emoticons.js
MIT
getCursortPosition = function (textDom) { var cursorPos = 0; if (document.selection) { // IE Support textDom.focus (); var selectRange = document.selection.createRange(); selectRange.moveStart ('character', -textDom.value.length); ...
jquery.emoticons.js 1.0 http://jquerywidget.com
getCursortPosition
javascript
mumuy/widget
code/jquery.emoticons.js
https://github.com/mumuy/widget/blob/master/code/jquery.emoticons.js
MIT
function insertText(obj,str) { if(document.all && obj.createTextRange && obj.caretPos){ var caretPos=obj.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length-1) == '' ? str+'' : str; }else if (typeof obj.selectionStart === 'number' && typeof obj.sel...
jquery.emoticons.js 1.0 http://jquerywidget.com
insertText
javascript
mumuy/widget
code/jquery.emoticons.js
https://github.com/mumuy/widget/blob/master/code/jquery.emoticons.js
MIT
resize = function(){ options.onResize(_api); _window_width = $document.width(); $outer.attr('style',''); _width = $outer.width(); $fixed.css({ 'width':_window_width==_width?'100%':_width }); ...
jquery.headroom.js 1.0 http://jquerywidget.com
resize
javascript
mumuy/widget
code/jquery.headroom.js
https://github.com/mumuy/widget/blob/master/code/jquery.headroom.js
MIT
heightAuto = function(){ _height = $this.outerHeight(); $outer.css({ 'height':_height }); }
jquery.headroom.js 1.0 http://jquerywidget.com
heightAuto
javascript
mumuy/widget
code/jquery.headroom.js
https://github.com/mumuy/widget/blob/master/code/jquery.headroom.js
MIT
imageDownLoad = function(url,callback){ callback = callback || function(){}; var image = new Image(); image.src = url; image.onload = callback(image); }
jquery.magiczoom.js 1.0 http://jquerywidget.com
imageDownLoad
javascript
mumuy/widget
code/jquery.magiczoom.js
https://github.com/mumuy/widget/blob/master/code/jquery.magiczoom.js
MIT