id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
46,800
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name) { if (!(name in this._modules)) { var config = Lava.schema.modules[name], className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS, constructor = Lava.ClassManager.getConstructor(className, 'Lava.data'); // construction is split into two phases, cause initFields() may reference other modules // - this will result in recursive call to getModule(). // In case of circular dependency, the first module must be already constructed. this._modules[name] = new constructor(this, config, name); this._modules[name].initFields(); } return this._modules[name]; }
javascript
function(name) { if (!(name in this._modules)) { var config = Lava.schema.modules[name], className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS, constructor = Lava.ClassManager.getConstructor(className, 'Lava.data'); // construction is split into two phases, cause initFields() may reference other modules // - this will result in recursive call to getModule(). // In case of circular dependency, the first module must be already constructed. this._modules[name] = new constructor(this, config, name); this._modules[name].initFields(); } return this._modules[name]; }
[ "function", "(", "name", ")", "{", "if", "(", "!", "(", "name", "in", "this", ".", "_modules", ")", ")", "{", "var", "config", "=", "Lava", ".", "schema", ".", "modules", "[", "name", "]", ",", "className", "=", "config", ".", "type", "||", "Lava...
Get a global named module instance @param {string} name Module name @returns {Lava.data.Module}
[ "Get", "a", "global", "named", "module", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4464-L4482
46,801
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(schema, raw_tag, parent_title) { var widget_config = Lava.parsers.Common.createDefaultWidgetConfig(), tags, name, x = raw_tag.x; widget_config['extends'] = parent_title; if (raw_tag.content) { // Lava.isVoidTag is a workaround for <x:attach_directives> // It's highly discouraged to make sugar from void tags if (Lava.isVoidTag(raw_tag.name) || !schema.content_schema) { tags = Lava.parsers.Common.asBlocks(raw_tag.content); tags = this._applyTopDirectives(tags, widget_config); if (Lava.schema.DEBUG && tags.length) Lava.t("Widget is not allowed to have any content: " + raw_tag.name); } else { if (Lava.schema.DEBUG && !(schema.content_schema.type in this._root_map)) Lava.t("Unknown type of content in sugar: " + schema.content_schema.type); this[this._root_map[schema.content_schema.type]](schema.content_schema, raw_tag, widget_config, schema.content_schema.name); } } if (raw_tag.attributes) { this._parseRootAttributes(schema, raw_tag, widget_config); } if (x) { if (Lava.schema.DEBUG && x) { for (name in x) { if (['label', 'roles', 'resource_id', 'controller'].indexOf(name) == -1) Lava.t("Control attribute is not allowed on sugar: " + name); } } if ('label' in x) this.setViewConfigLabel(widget_config, x.label); if ('roles' in x) widget_config.roles = Lava.parsers.Common.parseTargets(x.roles); if ('resource_id' in x) widget_config.resource_id = Lava.parsers.Common.parseResourceId(x.resource_id); if ('controller' in x) widget_config.real_class = x.controller; } return widget_config; }
javascript
function(schema, raw_tag, parent_title) { var widget_config = Lava.parsers.Common.createDefaultWidgetConfig(), tags, name, x = raw_tag.x; widget_config['extends'] = parent_title; if (raw_tag.content) { // Lava.isVoidTag is a workaround for <x:attach_directives> // It's highly discouraged to make sugar from void tags if (Lava.isVoidTag(raw_tag.name) || !schema.content_schema) { tags = Lava.parsers.Common.asBlocks(raw_tag.content); tags = this._applyTopDirectives(tags, widget_config); if (Lava.schema.DEBUG && tags.length) Lava.t("Widget is not allowed to have any content: " + raw_tag.name); } else { if (Lava.schema.DEBUG && !(schema.content_schema.type in this._root_map)) Lava.t("Unknown type of content in sugar: " + schema.content_schema.type); this[this._root_map[schema.content_schema.type]](schema.content_schema, raw_tag, widget_config, schema.content_schema.name); } } if (raw_tag.attributes) { this._parseRootAttributes(schema, raw_tag, widget_config); } if (x) { if (Lava.schema.DEBUG && x) { for (name in x) { if (['label', 'roles', 'resource_id', 'controller'].indexOf(name) == -1) Lava.t("Control attribute is not allowed on sugar: " + name); } } if ('label' in x) this.setViewConfigLabel(widget_config, x.label); if ('roles' in x) widget_config.roles = Lava.parsers.Common.parseTargets(x.roles); if ('resource_id' in x) widget_config.resource_id = Lava.parsers.Common.parseResourceId(x.resource_id); if ('controller' in x) widget_config.real_class = x.controller; } return widget_config; }
[ "function", "(", "schema", ",", "raw_tag", ",", "parent_title", ")", "{", "var", "widget_config", "=", "Lava", ".", "parsers", ".", "Common", ".", "createDefaultWidgetConfig", "(", ")", ",", "tags", ",", "name", ",", "x", "=", "raw_tag", ".", "x", ";", ...
Parse raw tag as a widget @param {_cSugar} schema @param {_cRawTag} raw_tag @param {string} parent_title
[ "Parse", "raw", "tag", "as", "a", "widget" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4556-L4607
46,802
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(raw_blocks, widget_config) { var i = 0, count = raw_blocks.length, result = []; for (; i < count; i++) { if (raw_blocks[i].type == 'directive') { if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_blocks[i].name); } else { result = raw_blocks.slice(i); break; } } return result; }
javascript
function(raw_blocks, widget_config) { var i = 0, count = raw_blocks.length, result = []; for (; i < count; i++) { if (raw_blocks[i].type == 'directive') { if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_blocks[i].name); } else { result = raw_blocks.slice(i); break; } } return result; }
[ "function", "(", "raw_blocks", ",", "widget_config", ")", "{", "var", "i", "=", "0", ",", "count", "=", "raw_blocks", ".", "length", ",", "result", "=", "[", "]", ";", "for", "(", ";", "i", "<", "count", ";", "i", "++", ")", "{", "if", "(", "ra...
Inside sugar tag there may be directives at the top. Apply them to widget config and cut away @param {_tRawTemplate} raw_blocks The content inside widget's sugar tag @param {_cWidget} widget_config The config of the widget being parsed @returns {_tRawTemplate} New content without directives
[ "Inside", "sugar", "tag", "there", "may", "be", "directives", "at", "the", "top", ".", "Apply", "them", "to", "widget", "config", "and", "cut", "away" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4615-L4634
46,803
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(content_schema, raw_tag, widget_config) { var tags = Lava.parsers.Common.asBlocks(raw_tag.content), i = 0, count, tag_roles_map = content_schema.tag_roles, tag_schema, storage_tags = []; tags = this._applyTopDirectives(tags, widget_config); count = tags.length; for (; i < count; i++) { if (tags[i].name in tag_roles_map) { tag_schema = tag_roles_map[tags[i].name]; this[this._union_handlers[tag_schema.type]](tag_schema, tags[i], widget_config, tag_schema.name || tags[i].name); } else { storage_tags.push(tags[i]); } } if (storage_tags.length) { Lava.parsers.Storage.parse(widget_config, storage_tags); } }
javascript
function(content_schema, raw_tag, widget_config) { var tags = Lava.parsers.Common.asBlocks(raw_tag.content), i = 0, count, tag_roles_map = content_schema.tag_roles, tag_schema, storage_tags = []; tags = this._applyTopDirectives(tags, widget_config); count = tags.length; for (; i < count; i++) { if (tags[i].name in tag_roles_map) { tag_schema = tag_roles_map[tags[i].name]; this[this._union_handlers[tag_schema.type]](tag_schema, tags[i], widget_config, tag_schema.name || tags[i].name); } else { storage_tags.push(tags[i]); } } if (storage_tags.length) { Lava.parsers.Storage.parse(widget_config, storage_tags); } }
[ "function", "(", "content_schema", ",", "raw_tag", ",", "widget_config", ")", "{", "var", "tags", "=", "Lava", ".", "parsers", ".", "Common", ".", "asBlocks", "(", "raw_tag", ".", "content", ")", ",", "i", "=", "0", ",", "count", ",", "tag_roles_map", ...
The content of `raw_tag` is storage tags, mixed with includes @param {_cSugarContent} content_schema @param {_cRawTag} raw_tag @param {_cWidget} widget_config
[ "The", "content", "of", "raw_tag", "is", "storage", "tags", "mixed", "with", "includes" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4680-L4713
46,804
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(widget_config, unknown_attributes, resource_name) { var value = { type: 'container_stack', value: [] }, operations_stack = value.value; if (!widget_config.resources) { widget_config.resources = {}; } if (!widget_config.resources['default']) { widget_config.resources['default'] = {}; } if ('class' in unknown_attributes) { operations_stack.push({ name: 'add_classes', value: unknown_attributes['class'].trim().split(/\s+/) }); delete unknown_attributes['class']; } if ('style' in unknown_attributes) { operations_stack.push({ name: 'add_styles', value: Lava.parsers.Common.parseStyleAttribute(unknown_attributes.style) }); delete unknown_attributes.style; } if (!Firestorm.Object.isEmpty(unknown_attributes)) { operations_stack.push({ name: 'add_properties', value: Firestorm.Object.copy(unknown_attributes) // copying to reduce possible slowdowns (object may contain deleted values) }); } Lava.resources.putResourceValue(widget_config.resources['default'], resource_name, value); }
javascript
function(widget_config, unknown_attributes, resource_name) { var value = { type: 'container_stack', value: [] }, operations_stack = value.value; if (!widget_config.resources) { widget_config.resources = {}; } if (!widget_config.resources['default']) { widget_config.resources['default'] = {}; } if ('class' in unknown_attributes) { operations_stack.push({ name: 'add_classes', value: unknown_attributes['class'].trim().split(/\s+/) }); delete unknown_attributes['class']; } if ('style' in unknown_attributes) { operations_stack.push({ name: 'add_styles', value: Lava.parsers.Common.parseStyleAttribute(unknown_attributes.style) }); delete unknown_attributes.style; } if (!Firestorm.Object.isEmpty(unknown_attributes)) { operations_stack.push({ name: 'add_properties', value: Firestorm.Object.copy(unknown_attributes) // copying to reduce possible slowdowns (object may contain deleted values) }); } Lava.resources.putResourceValue(widget_config.resources['default'], resource_name, value); }
[ "function", "(", "widget_config", ",", "unknown_attributes", ",", "resource_name", ")", "{", "var", "value", "=", "{", "type", ":", "'container_stack'", ",", "value", ":", "[", "]", "}", ",", "operations_stack", "=", "value", ".", "value", ";", "if", "(", ...
Store root attributes that are not described in Sugar config as 'container_stack' resource @param {_cWidget} widget_config @param {Object} unknown_attributes @param {string} resource_name
[ "Store", "root", "attributes", "that", "are", "not", "described", "in", "Sugar", "config", "as", "container_stack", "resource" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4779-L4830
46,805
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(widget_config, attribute_value, descriptor, name) { Lava.store( widget_config, 'options', name, Lava.ExpressionParser.parse(attribute_value, Lava.ExpressionParser.SEPARATORS.SEMICOLON) ); }
javascript
function(widget_config, attribute_value, descriptor, name) { Lava.store( widget_config, 'options', name, Lava.ExpressionParser.parse(attribute_value, Lava.ExpressionParser.SEPARATORS.SEMICOLON) ); }
[ "function", "(", "widget_config", ",", "attribute_value", ",", "descriptor", ",", "name", ")", "{", "Lava", ".", "store", "(", "widget_config", ",", "'options'", ",", "name", ",", "Lava", ".", "ExpressionParser", ".", "parse", "(", "attribute_value", ",", "L...
Parse attribute value as expression and store it as an option @param {_cWidget} widget_config @param {string} attribute_value @param {_cSugarRootAttribute} descriptor @param {string} name
[ "Parse", "attribute", "value", "as", "expression", "and", "store", "it", "as", "an", "option" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4906-L4915
46,806
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { if (!this._mouseover_stack_changed_listener) { Lava.view_manager.lendEvent('mouse_events'); this._mouseover_stack_changed_listener = Lava.view_manager.on('mouseover_stack_changed', this._onMouseoverStackChanged, this); if (!this._tooltip) this._tooltip = Lava.createWidget(this.DEFAULT_TOOLTIP_WIDGET); this._tooltip.inject(document.body, 'Bottom'); } }
javascript
function() { if (!this._mouseover_stack_changed_listener) { Lava.view_manager.lendEvent('mouse_events'); this._mouseover_stack_changed_listener = Lava.view_manager.on('mouseover_stack_changed', this._onMouseoverStackChanged, this); if (!this._tooltip) this._tooltip = Lava.createWidget(this.DEFAULT_TOOLTIP_WIDGET); this._tooltip.inject(document.body, 'Bottom'); } }
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_mouseover_stack_changed_listener", ")", "{", "Lava", ".", "view_manager", ".", "lendEvent", "(", "'mouse_events'", ")", ";", "this", ".", "_mouseover_stack_changed_listener", "=", "Lava", ".", "view_manag...
Create tooltip widget instance and start listening to mouse events
[ "Create", "tooltip", "widget", "instance", "and", "start", "listening", "to", "mouse", "events" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4970-L4979
46,807
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { if (this._mouseover_stack_changed_listener) { Lava.view_manager.releaseEvent('mouse_events'); Lava.view_manager.removeListener(this._mouseover_stack_changed_listener); this._mouseover_stack_changed_listener = null; if (this._mousemove_listener) { Lava.Core.removeGlobalHandler(this._mousemove_listener); this._mousemove_listener = null; } this._tooltip.set('is_visible', false); this._tooltip.remove(); } }
javascript
function() { if (this._mouseover_stack_changed_listener) { Lava.view_manager.releaseEvent('mouse_events'); Lava.view_manager.removeListener(this._mouseover_stack_changed_listener); this._mouseover_stack_changed_listener = null; if (this._mousemove_listener) { Lava.Core.removeGlobalHandler(this._mousemove_listener); this._mousemove_listener = null; } this._tooltip.set('is_visible', false); this._tooltip.remove(); } }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_mouseover_stack_changed_listener", ")", "{", "Lava", ".", "view_manager", ".", "releaseEvent", "(", "'mouse_events'", ")", ";", "Lava", ".", "view_manager", ".", "removeListener", "(", "this", ".", "_mouseov...
Remove tooltip widget from DOM and stop responding to events
[ "Remove", "tooltip", "widget", "from", "DOM", "and", "stop", "responding", "to", "events" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4984-L4998
46,808
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(view_manager, stack) { var new_tooltip_target = null, html; for (var i = 0, count = stack.length; i < count; i++) { if (Firestorm.Element.hasAttribute(stack[i], this._attribute_name)) { new_tooltip_target = stack[i]; break; } } if (new_tooltip_target != this._tooltip_target) { if (!this._tooltip_target) { // if there was no tooltip if (Lava.schema.DEBUG && this._mousemove_listener) Lava.t(); this._mousemove_listener = Lava.Core.addGlobalHandler('mousemove', this._onMouseMove, this); this._tooltip.set('is_visible', true); } else if (!new_tooltip_target) { // if there was a tooltip, and now it should be hidden Lava.Core.removeGlobalHandler(this._mousemove_listener); this._mousemove_listener = null; this._tooltip.set('is_visible', false); } if (new_tooltip_target) { html = Firestorm.Element.getAttribute(new_tooltip_target, this._attribute_name).replace(/\r?\n/g, '<br/>'); this._tooltip.set('html', html); this._tooltip.set('is_visible', !!(html || !Lava.schema.popover_manager.HIDE_EMPTY_TOOLTIPS)); } this._tooltip_target = new_tooltip_target; } }
javascript
function(view_manager, stack) { var new_tooltip_target = null, html; for (var i = 0, count = stack.length; i < count; i++) { if (Firestorm.Element.hasAttribute(stack[i], this._attribute_name)) { new_tooltip_target = stack[i]; break; } } if (new_tooltip_target != this._tooltip_target) { if (!this._tooltip_target) { // if there was no tooltip if (Lava.schema.DEBUG && this._mousemove_listener) Lava.t(); this._mousemove_listener = Lava.Core.addGlobalHandler('mousemove', this._onMouseMove, this); this._tooltip.set('is_visible', true); } else if (!new_tooltip_target) { // if there was a tooltip, and now it should be hidden Lava.Core.removeGlobalHandler(this._mousemove_listener); this._mousemove_listener = null; this._tooltip.set('is_visible', false); } if (new_tooltip_target) { html = Firestorm.Element.getAttribute(new_tooltip_target, this._attribute_name).replace(/\r?\n/g, '<br/>'); this._tooltip.set('html', html); this._tooltip.set('is_visible', !!(html || !Lava.schema.popover_manager.HIDE_EMPTY_TOOLTIPS)); } this._tooltip_target = new_tooltip_target; } }
[ "function", "(", "view_manager", ",", "stack", ")", "{", "var", "new_tooltip_target", "=", "null", ",", "html", ";", "for", "(", "var", "i", "=", "0", ",", "count", "=", "stack", ".", "length", ";", "i", "<", "count", ";", "i", "++", ")", "{", "i...
Mouse has crossed an element boundary. Find new element with tooltip and show new content @param {Lava.system.ViewManager} view_manager @param {Array.<HTMLElement>} stack
[ "Mouse", "has", "crossed", "an", "element", "boundary", ".", "Find", "new", "element", "with", "tooltip", "and", "show", "new", "content" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5015-L5059
46,809
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(event_name, event_object) { this._tooltip.set('x', event_object.page.x); // left this._tooltip.set('y', event_object.page.y); // top }
javascript
function(event_name, event_object) { this._tooltip.set('x', event_object.page.x); // left this._tooltip.set('y', event_object.page.y); // top }
[ "function", "(", "event_name", ",", "event_object", ")", "{", "this", ".", "_tooltip", ".", "set", "(", "'x'", ",", "event_object", ".", "page", ".", "x", ")", ";", "// left", "this", ".", "_tooltip", ".", "set", "(", "'y'", ",", "event_object", ".", ...
Mouse has changed position. Move tooltip accordingly @param {string} event_name @param {Object} event_object
[ "Mouse", "has", "changed", "position", ".", "Move", "tooltip", "accordingly" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5066-L5071
46,810
kogarashisan/LiquidLava
lib/packages/core-classes.js
function () { if (!this._focus_acquired_listener) { this._focus_acquired_listener = Lava.app.on('focus_acquired', this._onFocusTargetAcquired, this); this._focus_lost_listener = Lava.app.on('focus_lost', this.clearFocusedTarget, this); this._focus_listener = Lava.Core.addGlobalHandler('blur', this._onElementBlurred, this); this._blur_listener = Lava.Core.addGlobalHandler('focus', this._onElementFocused, this); } }
javascript
function () { if (!this._focus_acquired_listener) { this._focus_acquired_listener = Lava.app.on('focus_acquired', this._onFocusTargetAcquired, this); this._focus_lost_listener = Lava.app.on('focus_lost', this.clearFocusedTarget, this); this._focus_listener = Lava.Core.addGlobalHandler('blur', this._onElementBlurred, this); this._blur_listener = Lava.Core.addGlobalHandler('focus', this._onElementFocused, this); } }
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_focus_acquired_listener", ")", "{", "this", ".", "_focus_acquired_listener", "=", "Lava", ".", "app", ".", "on", "(", "'focus_acquired'", ",", "this", ".", "_onFocusTargetAcquired", ",", "this", ")", ...
Start listening to global focus-related events
[ "Start", "listening", "to", "global", "focus", "-", "related", "events" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5137-L5146
46,811
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { if (this._focus_acquired_listener) { Lava.app.removeListener(this._focus_acquired_listener); Lava.app.removeListener(this._focus_lost_listener); Lava.Core.removeGlobalHandler(this._focus_listener); Lava.Core.removeGlobalHandler(this._blur_listener); this._focus_acquired_listener = this._focused_element = this._focus_target = null; } }
javascript
function() { if (this._focus_acquired_listener) { Lava.app.removeListener(this._focus_acquired_listener); Lava.app.removeListener(this._focus_lost_listener); Lava.Core.removeGlobalHandler(this._focus_listener); Lava.Core.removeGlobalHandler(this._blur_listener); this._focus_acquired_listener = this._focused_element = this._focus_target = null; } }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_focus_acquired_listener", ")", "{", "Lava", ".", "app", ".", "removeListener", "(", "this", ".", "_focus_acquired_listener", ")", ";", "Lava", ".", "app", ".", "removeListener", "(", "this", ".", "_focus...
Stop listening to all focus-related events
[ "Stop", "listening", "to", "all", "focus", "-", "related", "events" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5151-L5164
46,812
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(event_name, event_object) { if (this._focused_element != event_object.target) { this._setTarget(null); this._focused_element = event_object.target; } }
javascript
function(event_name, event_object) { if (this._focused_element != event_object.target) { this._setTarget(null); this._focused_element = event_object.target; } }
[ "function", "(", "event_name", ",", "event_object", ")", "{", "if", "(", "this", ".", "_focused_element", "!=", "event_object", ".", "target", ")", "{", "this", ".", "_setTarget", "(", "null", ")", ";", "this", ".", "_focused_element", "=", "event_object", ...
Clear old virtual focus target and set new `_focused_element`. @param event_name @param event_object
[ "Clear", "old", "virtual", "focus", "target", "and", "set", "new", "_focused_element", "." ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5229-L5236
46,813
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(module, name, config, module_storage) { this._module = module; this._name = name; this._config = config; this._properties_by_guid = module_storage; if ('is_nullable' in config) this._is_nullable = config.is_nullable; }
javascript
function(module, name, config, module_storage) { this._module = module; this._name = name; this._config = config; this._properties_by_guid = module_storage; if ('is_nullable' in config) this._is_nullable = config.is_nullable; }
[ "function", "(", "module", ",", "name", ",", "config", ",", "module_storage", ")", "{", "this", ".", "_module", "=", "module", ";", "this", ".", "_name", "=", "name", ";", "this", ".", "_config", "=", "config", ";", "this", ".", "_properties_by_guid", ...
Create the instance of a field @param {Lava.data.Module} module @param {string} name Field name @param {_cField} config @param {object} module_storage Reference to object from module with properties of all records
[ "Create", "the", "instance", "of", "a", "field" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5335-L5343
46,814
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(properties, raw_properties) { if (Lava.schema.data.VALIDATE_IMPORT_DATA && !this.isValidValue(raw_properties[this._name])) Lava.t('Invalid value in import data (' + this._name + '): ' + raw_properties[this._name]); return raw_properties[this._name]; }
javascript
function(properties, raw_properties) { if (Lava.schema.data.VALIDATE_IMPORT_DATA && !this.isValidValue(raw_properties[this._name])) Lava.t('Invalid value in import data (' + this._name + '): ' + raw_properties[this._name]); return raw_properties[this._name]; }
[ "function", "(", "properties", ",", "raw_properties", ")", "{", "if", "(", "Lava", ".", "schema", ".", "data", ".", "VALIDATE_IMPORT_DATA", "&&", "!", "this", ".", "isValidValue", "(", "raw_properties", "[", "this", ".", "_name", "]", ")", ")", "Lava", "...
Helper method for importing values from server-side data. Performs validation @param {Object} properties @param {Object} raw_properties @returns {*}
[ "Helper", "method", "for", "importing", "values", "from", "server", "-", "side", "data", ".", "Performs", "validation" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5456-L5463
46,815
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(record_a, record_b) { return this._properties_by_guid[record_a.guid][this._name] < this._properties_by_guid[record_b.guid][this._name]; }
javascript
function(record_a, record_b) { return this._properties_by_guid[record_a.guid][this._name] < this._properties_by_guid[record_b.guid][this._name]; }
[ "function", "(", "record_a", ",", "record_b", ")", "{", "return", "this", ".", "_properties_by_guid", "[", "record_a", ".", "guid", "]", "[", "this", ".", "_name", "]", "<", "this", ".", "_properties_by_guid", "[", "record_b", ".", "guid", "]", "[", "thi...
Compare values of this field in two records @param {Lava.data.Record} record_a @param {Lava.data.Record} record_b @returns {boolean} True, in case the value of this field in `record_a` is less than value in `record_b`
[ "Compare", "values", "of", "this", "field", "in", "two", "records" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5471-L5475
46,816
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(field, event_args) { var local_record = event_args.collection_owner; if (local_record.guid in this._collections_by_record_guid) { Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].removed); this._collections_by_record_guid[local_record.guid].removeValue(event_args.child); Lava.resumeListener(this._collection_listeners_by_guid[local_record.guid].removed); } }
javascript
function(field, event_args) { var local_record = event_args.collection_owner; if (local_record.guid in this._collections_by_record_guid) { Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].removed); this._collections_by_record_guid[local_record.guid].removeValue(event_args.child); Lava.resumeListener(this._collection_listeners_by_guid[local_record.guid].removed); } }
[ "function", "(", "field", ",", "event_args", ")", "{", "var", "local_record", "=", "event_args", ".", "collection_owner", ";", "if", "(", "local_record", ".", "guid", "in", "this", ".", "_collections_by_record_guid", ")", "{", "Lava", ".", "suspendListener", "...
Record was removed from collection by setting it's related Record field. Update local collection @param {Lava.data.field.Record} field @param {Lava.data.field.Record#event:removed_child} event_args
[ "Record", "was", "removed", "from", "collection", "by", "setting", "it", "s", "related", "Record", "field", ".", "Update", "local", "collection" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5682-L5691
46,817
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(field, event_args) { var local_record = event_args.collection_owner; if (local_record.guid in this._collections_by_record_guid) { Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added); this._collections_by_record_guid[local_record.guid].includeValue(event_args.child); Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added); } }
javascript
function(field, event_args) { var local_record = event_args.collection_owner; if (local_record.guid in this._collections_by_record_guid) { Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added); this._collections_by_record_guid[local_record.guid].includeValue(event_args.child); Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added); } }
[ "function", "(", "field", ",", "event_args", ")", "{", "var", "local_record", "=", "event_args", ".", "collection_owner", ";", "if", "(", "local_record", ".", "guid", "in", "this", ".", "_collections_by_record_guid", ")", "{", "Lava", ".", "suspendListener", "...
Record was added to collection by setting it's related Record field. Update local collection @param {Lava.data.field.Record} field @param {Lava.data.field.Record#event:removed_child} event_args
[ "Record", "was", "added", "to", "collection", "by", "setting", "it", "s", "related", "Record", "field", ".", "Update", "local", "collection" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5698-L5707
46,818
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(record, foreign_key) { if (foreign_key in this._collections_by_foreign_id) { this._collections_by_foreign_id[foreign_key].push(record); } else { this._collections_by_foreign_id[foreign_key] = [record]; } }
javascript
function(record, foreign_key) { if (foreign_key in this._collections_by_foreign_id) { this._collections_by_foreign_id[foreign_key].push(record); } else { this._collections_by_foreign_id[foreign_key] = [record]; } }
[ "function", "(", "record", ",", "foreign_key", ")", "{", "if", "(", "foreign_key", "in", "this", ".", "_collections_by_foreign_id", ")", "{", "this", ".", "_collections_by_foreign_id", "[", "foreign_key", "]", ".", "push", "(", "record", ")", ";", "}", "else...
Add record to local collection of records, grouped by this field @param {Lava.data.Record} record @param {string} foreign_key
[ "Add", "record", "to", "local", "collection", "of", "records", "grouped", "by", "this", "field" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6069-L6081
46,819
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(foreign_module_id_field, event_args) { var referenced_record = event_args.record, // record belongs to foreign module new_referenced_id = referenced_record.get('id'), collection, i = 0, count; if (referenced_record.guid in this._collections_by_foreign_guid) { collection = this._collections_by_foreign_guid[referenced_record.guid]; // Set the value of foreign ID field in all local records that reference this foreign record. // Situation: there is a new record, which was created in the browser, and some records that reference it // (either new or loaded from database). It's new, so there are no records on server that reference it. if (this._foreign_key_field) { Lava.suspendListener(this._foreign_key_changed_listener); for (count = collection.length; i < count; i++) { collection[i].set(this._foreign_key_field_name, new_referenced_id); } Lava.resumeListener(this._foreign_key_changed_listener); } } }
javascript
function(foreign_module_id_field, event_args) { var referenced_record = event_args.record, // record belongs to foreign module new_referenced_id = referenced_record.get('id'), collection, i = 0, count; if (referenced_record.guid in this._collections_by_foreign_guid) { collection = this._collections_by_foreign_guid[referenced_record.guid]; // Set the value of foreign ID field in all local records that reference this foreign record. // Situation: there is a new record, which was created in the browser, and some records that reference it // (either new or loaded from database). It's new, so there are no records on server that reference it. if (this._foreign_key_field) { Lava.suspendListener(this._foreign_key_changed_listener); for (count = collection.length; i < count; i++) { collection[i].set(this._foreign_key_field_name, new_referenced_id); } Lava.resumeListener(this._foreign_key_changed_listener); } } }
[ "function", "(", "foreign_module_id_field", ",", "event_args", ")", "{", "var", "referenced_record", "=", "event_args", ".", "record", ",", "// record belongs to foreign module", "new_referenced_id", "=", "referenced_record", ".", "get", "(", "'id'", ")", ",", "collec...
A record was saved to the database and assigned an id. Need to assign foreign keys for local records @param {Lava.data.field.Id} foreign_module_id_field @param {Lava.data.field.Abstract#event:changed} event_args
[ "A", "record", "was", "saved", "to", "the", "database", "and", "assigned", "an", "id", ".", "Need", "to", "assign", "foreign", "keys", "for", "local", "records" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6273-L6304
46,820
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(record, properties, referenced_record_id) { properties[this._name] = this._referenced_module.getRecordById(referenced_record_id) || null; if (properties[this._name]) { this._registerRecord(record, properties[this._name]); } }
javascript
function(record, properties, referenced_record_id) { properties[this._name] = this._referenced_module.getRecordById(referenced_record_id) || null; if (properties[this._name]) { this._registerRecord(record, properties[this._name]); } }
[ "function", "(", "record", ",", "properties", ",", "referenced_record_id", ")", "{", "properties", "[", "this", ".", "_name", "]", "=", "this", ".", "_referenced_module", ".", "getRecordById", "(", "referenced_record_id", ")", "||", "null", ";", "if", "(", "...
Update value of this field in local `record` and add the record to field's internal collections @param {Lava.data.Record} record The local record @param {Object} properties The properties of local record @param {string} referenced_record_id The id of foreign record, which it belongs to
[ "Update", "value", "of", "this", "field", "in", "local", "record", "and", "add", "the", "record", "to", "field", "s", "internal", "collections" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6406-L6416
46,821
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(local_record, referenced_record) { if (!Firestorm.Array.exclude(this._collections_by_foreign_guid[referenced_record.guid], local_record)) Lava.t(); this._fire('removed_child', { collection_owner: referenced_record, child: local_record }); }
javascript
function(local_record, referenced_record) { if (!Firestorm.Array.exclude(this._collections_by_foreign_guid[referenced_record.guid], local_record)) Lava.t(); this._fire('removed_child', { collection_owner: referenced_record, child: local_record }); }
[ "function", "(", "local_record", ",", "referenced_record", ")", "{", "if", "(", "!", "Firestorm", ".", "Array", ".", "exclude", "(", "this", ".", "_collections_by_foreign_guid", "[", "referenced_record", ".", "guid", "]", ",", "local_record", ")", ")", "Lava",...
Remove `local_record` from field's internal collection referenced by `referenced_record` @param {Lava.data.Record} local_record @param {Lava.data.Record} referenced_record
[ "Remove", "local_record", "from", "field", "s", "internal", "collection", "referenced", "by", "referenced_record" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6475-L6483
46,822
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(local_record, referenced_record) { var referenced_guid = referenced_record.guid; if (referenced_guid in this._collections_by_foreign_guid) { if (Lava.schema.DEBUG && this._collections_by_foreign_guid[referenced_guid].indexOf(local_record) != -1) Lava.t("Duplicate record"); this._collections_by_foreign_guid[referenced_guid].push(local_record); } else { this._collections_by_foreign_guid[referenced_guid] = [local_record]; } this._fire('added_child', { collection_owner: referenced_record, child: local_record }); }
javascript
function(local_record, referenced_record) { var referenced_guid = referenced_record.guid; if (referenced_guid in this._collections_by_foreign_guid) { if (Lava.schema.DEBUG && this._collections_by_foreign_guid[referenced_guid].indexOf(local_record) != -1) Lava.t("Duplicate record"); this._collections_by_foreign_guid[referenced_guid].push(local_record); } else { this._collections_by_foreign_guid[referenced_guid] = [local_record]; } this._fire('added_child', { collection_owner: referenced_record, child: local_record }); }
[ "function", "(", "local_record", ",", "referenced_record", ")", "{", "var", "referenced_guid", "=", "referenced_record", ".", "guid", ";", "if", "(", "referenced_guid", "in", "this", ".", "_collections_by_foreign_guid", ")", "{", "if", "(", "Lava", ".", "schema"...
Add `local_record` to field's internal collection of records from local module, referenced by `referenced_record` @param {Lava.data.Record} local_record @param {Lava.data.Record} referenced_record The collection owner
[ "Add", "local_record", "to", "field", "s", "internal", "collection", "of", "records", "from", "local", "module", "referenced", "by", "referenced_record" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6490-L6511
46,823
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(record) { if (Lava.schema.DEBUG && !(record.guid in this._properties_by_guid)) Lava.t("isLess: record does not belong to this module"); var ref_record_a = this._properties_by_guid[record.guid][this._name]; // must return undefined, cause comparison against nulls behaves differently return ref_record_a ? ref_record_a.get('id') : void 0; }
javascript
function(record) { if (Lava.schema.DEBUG && !(record.guid in this._properties_by_guid)) Lava.t("isLess: record does not belong to this module"); var ref_record_a = this._properties_by_guid[record.guid][this._name]; // must return undefined, cause comparison against nulls behaves differently return ref_record_a ? ref_record_a.get('id') : void 0; }
[ "function", "(", "record", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "(", "record", ".", "guid", "in", "this", ".", "_properties_by_guid", ")", ")", "Lava", ".", "t", "(", "\"isLess: record does not belong to this module\"", ")", ...
Get field's value equivalent for comparison @param {Lava.data.Record} record @returns {string}
[ "Get", "field", "s", "value", "equivalent", "for", "comparison" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6553-L6560
46,824
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(config) { var field_name, type, constructor; for (field_name in config.fields) { type = config.fields[field_name].type || Lava.schema.data.DEFAULT_FIELD_TYPE; constructor = Lava.ClassManager.getConstructor(type, 'Lava.data.field'); this._fields[field_name] = new constructor( this, field_name, config.fields[field_name], this._properties_by_guid ); } }
javascript
function(config) { var field_name, type, constructor; for (field_name in config.fields) { type = config.fields[field_name].type || Lava.schema.data.DEFAULT_FIELD_TYPE; constructor = Lava.ClassManager.getConstructor(type, 'Lava.data.field'); this._fields[field_name] = new constructor( this, field_name, config.fields[field_name], this._properties_by_guid ); } }
[ "function", "(", "config", ")", "{", "var", "field_name", ",", "type", ",", "constructor", ";", "for", "(", "field_name", "in", "config", ".", "fields", ")", "{", "type", "=", "config", ".", "fields", "[", "field_name", "]", ".", "type", "||", "Lava", ...
Create field instances and return the default record properties object @param {(_cModule|_cMetaStorage)} config @returns {Object} Default record properties object with initial values for each field
[ "Create", "field", "instances", "and", "return", "the", "default", "record", "properties", "object" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6723-L6742
46,825
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var default_properties = {}, field_name; for (field_name in this._fields) { this._fields[field_name].onModuleFieldsCreated(default_properties); } this._createRecordProperties = new Function( "return " + Lava.serializer.serialize(default_properties) ); }
javascript
function() { var default_properties = {}, field_name; for (field_name in this._fields) { this._fields[field_name].onModuleFieldsCreated(default_properties); } this._createRecordProperties = new Function( "return " + Lava.serializer.serialize(default_properties) ); }
[ "function", "(", ")", "{", "var", "default_properties", "=", "{", "}", ",", "field_name", ";", "for", "(", "field_name", "in", "this", ".", "_fields", ")", "{", "this", ".", "_fields", "[", "field_name", "]", ".", "onModuleFieldsCreated", "(", "default_pro...
Called by App instance. Do not call this function directly.
[ "Called", "by", "App", "instance", ".", "Do", "not", "call", "this", "function", "directly", "." ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6747-L6762
46,826
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(lava_app, config, name) { this._app = lava_app; this._config = config; this._name = name; this._createFields(config); this._record_constructor = Lava.ClassManager.getConstructor( config.record_class || Lava.schema.data.DEFAULT_RECORD_CLASS, 'Lava.data' ); if ('id' in this._fields) { this._has_id = true; this._fields['id'].on('changed', this._onRecordIdChanged, this); } }
javascript
function(lava_app, config, name) { this._app = lava_app; this._config = config; this._name = name; this._createFields(config); this._record_constructor = Lava.ClassManager.getConstructor( config.record_class || Lava.schema.data.DEFAULT_RECORD_CLASS, 'Lava.data' ); if ('id' in this._fields) { this._has_id = true; this._fields['id'].on('changed', this._onRecordIdChanged, this); } }
[ "function", "(", "lava_app", ",", "config", ",", "name", ")", "{", "this", ".", "_app", "=", "lava_app", ";", "this", ".", "_config", "=", "config", ";", "this", ".", "_name", "=", "name", ";", "this", ".", "_createFields", "(", "config", ")", ";", ...
Create a Module instance, init fields, generate the method that returns initial record properties @param {Lava.system.App} lava_app Application instance @param {_cModule} config @param {string} name Module's name
[ "Create", "a", "Module", "instance", "init", "fields", "generate", "the", "method", "that", "returns", "initial", "record", "properties" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6876-L6896
46,827
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(raw_properties) { var result; if (Lava.schema.DEBUG && !raw_properties.id) Lava.t('safeLoadRecord: import data must have an id'); if (raw_properties.id in this._records_by_id) { result = this._records_by_id[raw_properties.id]; } else { result = this.loadRecord(raw_properties); } return result; }
javascript
function(raw_properties) { var result; if (Lava.schema.DEBUG && !raw_properties.id) Lava.t('safeLoadRecord: import data must have an id'); if (raw_properties.id in this._records_by_id) { result = this._records_by_id[raw_properties.id]; } else { result = this.loadRecord(raw_properties); } return result; }
[ "function", "(", "raw_properties", ")", "{", "var", "result", ";", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "raw_properties", ".", "id", ")", "Lava", ".", "t", "(", "'safeLoadRecord: import data must have an id'", ")", ";", "if", "(", "ra...
Load record only if it has not been already loaded. `raw_properties` must have an ID @param {Object} raw_properties Serialized record fields from server @returns {Lava.data.Record} Newly loaded record instance, or the old one
[ "Load", "record", "only", "if", "it", "has", "not", "been", "already", "loaded", ".", "raw_properties", "must", "have", "an", "ID" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6970-L6988
46,828
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(raw_records_array) { var i = 0, count = raw_records_array.length, records = []; for (; i < count; i++) { records.push(this._createRecordInstance(raw_records_array[i])); } this._fire('records_loaded', {records: records}); return records; }
javascript
function(raw_records_array) { var i = 0, count = raw_records_array.length, records = []; for (; i < count; i++) { records.push(this._createRecordInstance(raw_records_array[i])); } this._fire('records_loaded', {records: records}); return records; }
[ "function", "(", "raw_records_array", ")", "{", "var", "i", "=", "0", ",", "count", "=", "raw_records_array", ".", "length", ",", "records", "=", "[", "]", ";", "for", "(", ";", "i", "<", "count", ";", "i", "++", ")", "{", "records", ".", "push", ...
Initialize module records from server-side data @param {Array.<Object>} raw_records_array Server-side data for the records @returns {Array.<Lava.data.Record>} Loaded record instances
[ "Initialize", "module", "records", "from", "server", "-", "side", "data" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7044-L7060
46,829
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(module, fields, properties_ref, raw_properties) { this.guid = Lava.guid++; this._module = module; this._fields = fields; this._properties = properties_ref; var field; if (typeof(raw_properties) != 'undefined') { for (field in fields) { fields[field]['import'](this, properties_ref, raw_properties); } } else { for (field in fields) { fields[field].initNewRecord(this, properties_ref); } } }
javascript
function(module, fields, properties_ref, raw_properties) { this.guid = Lava.guid++; this._module = module; this._fields = fields; this._properties = properties_ref; var field; if (typeof(raw_properties) != 'undefined') { for (field in fields) { fields[field]['import'](this, properties_ref, raw_properties); } } else { for (field in fields) { fields[field].initNewRecord(this, properties_ref); } } }
[ "function", "(", "module", ",", "fields", ",", "properties_ref", ",", "raw_properties", ")", "{", "this", ".", "guid", "=", "Lava", ".", "guid", "++", ";", "this", ".", "_module", "=", "module", ";", "this", ".", "_fields", "=", "fields", ";", "this", ...
Create record instance @param {Lava.data.ModuleAbstract} module Records module @param {Object.<string, Lava.data.field.Abstract>} fields Object with module's fields @param {Object} properties_ref Reference to an object with record's properties @param {Object} raw_properties Object with record field values from server
[ "Create", "record", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7117-L7144
46,830
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(config) { if ('id' in config.fields) Lava.t("Id field in MetaStorage is not permitted"); this._config = config; this._createFields(config); this.initFields(); // MetaStorage is constructed directly, not via App class var field; if (Lava.schema.DEBUG) { for (field in this._fields) { if (this._fields[field].isCollectionField || this._fields[field].isRecordField) Lava.t("Standard Collection and Record fields will not work inside the MetaStorage"); } } this._record_constructor = Lava.ClassManager.getConstructor('MetaRecord', 'Lava.data'); }
javascript
function(config) { if ('id' in config.fields) Lava.t("Id field in MetaStorage is not permitted"); this._config = config; this._createFields(config); this.initFields(); // MetaStorage is constructed directly, not via App class var field; if (Lava.schema.DEBUG) { for (field in this._fields) { if (this._fields[field].isCollectionField || this._fields[field].isRecordField) Lava.t("Standard Collection and Record fields will not work inside the MetaStorage"); } } this._record_constructor = Lava.ClassManager.getConstructor('MetaRecord', 'Lava.data'); }
[ "function", "(", "config", ")", "{", "if", "(", "'id'", "in", "config", ".", "fields", ")", "Lava", ".", "t", "(", "\"Id field in MetaStorage is not permitted\"", ")", ";", "this", ".", "_config", "=", "config", ";", "this", ".", "_createFields", "(", "con...
Create an instance of MetaStorage @param {_cMetaStorage} config
[ "Create", "an", "instance", "of", "MetaStorage" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7268-L7287
46,831
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(ext_guid, raw_properties, original_record) { if (ext_guid in this._properties) Lava.t("MetaRecord already exists"); var properties = this._createRecordProperties(), record = new this._record_constructor(this, this._fields, properties, raw_properties, original_record); record.ext_guid = ext_guid; this._records.push(record); this._properties_by_guid[record.guid] = properties; this._records_by_guid[record.guid] = record; this._properties[ext_guid] = record; this.firePropertyChangedEvents(ext_guid); return record; }
javascript
function(ext_guid, raw_properties, original_record) { if (ext_guid in this._properties) Lava.t("MetaRecord already exists"); var properties = this._createRecordProperties(), record = new this._record_constructor(this, this._fields, properties, raw_properties, original_record); record.ext_guid = ext_guid; this._records.push(record); this._properties_by_guid[record.guid] = properties; this._records_by_guid[record.guid] = record; this._properties[ext_guid] = record; this.firePropertyChangedEvents(ext_guid); return record; }
[ "function", "(", "ext_guid", ",", "raw_properties", ",", "original_record", ")", "{", "if", "(", "ext_guid", "in", "this", ".", "_properties", ")", "Lava", ".", "t", "(", "\"MetaRecord already exists\"", ")", ";", "var", "properties", "=", "this", ".", "_cre...
Create a new MetaRecord instance @param {_tGUID} ext_guid GUID of the external record, to which this MetaRecord will be attached @param {Object} raw_properties Initial field values @param {Object} [original_record] Original record, which will be saved in MetaRecord instance @returns {Lava.data.MetaRecord}
[ "Create", "a", "new", "MetaRecord", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7317-L7334
46,832
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(property_name) { if (!(property_name in this._data_bindings_by_property)) { this._data_bindings_by_property[property_name] = new Lava.scope.DataBinding(this, property_name); } return this._data_bindings_by_property[property_name]; }
javascript
function(property_name) { if (!(property_name in this._data_bindings_by_property)) { this._data_bindings_by_property[property_name] = new Lava.scope.DataBinding(this, property_name); } return this._data_bindings_by_property[property_name]; }
[ "function", "(", "property_name", ")", "{", "if", "(", "!", "(", "property_name", "in", "this", ".", "_data_bindings_by_property", ")", ")", "{", "this", ".", "_data_bindings_by_property", "[", "property_name", "]", "=", "new", "Lava", ".", "scope", ".", "Da...
Get a scope, which is bound to property of the value of this container @param {string} property_name @returns {Lava.scope.DataBinding}
[ "Get", "a", "scope", "which", "is", "bound", "to", "property", "of", "the", "value", "of", "this", "container" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7373-L7383
46,833
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(path_config) { var widget = this._widget.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !widget.isWidget) Lava.t("Tried to call a modifier from non-widget view"); return /** @type {Lava.widget.Standard} */ widget; }
javascript
function(path_config) { var widget = this._widget.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !widget.isWidget) Lava.t("Tried to call a modifier from non-widget view"); return /** @type {Lava.widget.Standard} */ widget; }
[ "function", "(", "path_config", ")", "{", "var", "widget", "=", "this", ".", "_widget", ".", "locateViewByPathConfig", "(", "path_config", ")", ";", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "widget", ".", "isWidget", ")", "Lava", ".", ...
Get widget, that will be used to call a modifier @param {_cKnownViewLocator} path_config Route to the widget @returns {Lava.widget.Standard}
[ "Get", "widget", "that", "will", "be", "used", "to", "call", "a", "modifier" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7584-L7591
46,834
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var result = null; // in production - wrap evaluation into try/catch block if (Lava.schema.DEBUG) { result = this._evaluator(); } else { try { result = this._evaluator(); } catch (e) { Lava.logException(e); } } return result; }
javascript
function() { var result = null; // in production - wrap evaluation into try/catch block if (Lava.schema.DEBUG) { result = this._evaluator(); } else { try { result = this._evaluator(); } catch (e) { Lava.logException(e); } } return result; }
[ "function", "(", ")", "{", "var", "result", "=", "null", ";", "// in production - wrap evaluation into try/catch block", "if", "(", "Lava", ".", "schema", ".", "DEBUG", ")", "{", "result", "=", "this", ".", "_evaluator", "(", ")", ";", "}", "else", "{", "t...
Execute `_evaluator` and return @returns {*} The Argument's result
[ "Execute", "_evaluator", "and", "return" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7606-L7631
46,835
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(index, arguments_array) { return this._modifier_descriptors[index].widget.callModifier(this._modifier_descriptors[index].callback_name, arguments_array); }
javascript
function(index, arguments_array) { return this._modifier_descriptors[index].widget.callModifier(this._modifier_descriptors[index].callback_name, arguments_array); }
[ "function", "(", "index", ",", "arguments_array", ")", "{", "return", "this", ".", "_modifier_descriptors", "[", "index", "]", ".", "widget", ".", "callModifier", "(", "this", ".", "_modifier_descriptors", "[", "index", "]", ".", "callback_name", ",", "argumen...
Call a modifier from widget @param {number} index @param {?Array.<*>} arguments_array @returns {*}
[ "Call", "a", "modifier", "from", "widget" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7668-L7672
46,836
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(config, widget) { this._widget = widget; this._property_name = config.property_name; this._scope = widget.getScopeByPathConfig(config.path_config); if (config.from_widget) { this._scope.setValue(this._widget.get(this._property_name)); } else { this._widget.set(this._property_name, this._scope.getValue()); this._scope_changed_listener = this._scope.on('changed', this.onScopeChanged, this); } if (!this._scope.isSetValue) Lava.t("Binding: bound scope does not implement setValue"); this._widget_property_changed_listener = widget.onPropertyChanged(this._property_name, this.onWidgetPropertyChanged, this); }
javascript
function(config, widget) { this._widget = widget; this._property_name = config.property_name; this._scope = widget.getScopeByPathConfig(config.path_config); if (config.from_widget) { this._scope.setValue(this._widget.get(this._property_name)); } else { this._widget.set(this._property_name, this._scope.getValue()); this._scope_changed_listener = this._scope.on('changed', this.onScopeChanged, this); } if (!this._scope.isSetValue) Lava.t("Binding: bound scope does not implement setValue"); this._widget_property_changed_listener = widget.onPropertyChanged(this._property_name, this.onWidgetPropertyChanged, this); }
[ "function", "(", "config", ",", "widget", ")", "{", "this", ".", "_widget", "=", "widget", ";", "this", ".", "_property_name", "=", "config", ".", "property_name", ";", "this", ".", "_scope", "=", "widget", ".", "getScopeByPathConfig", "(", "config", ".", ...
Create Binding instance. Refresh widget's property value @param {_cBinding} config @param {Lava.widget.Standard} widget
[ "Create", "Binding", "instance", ".", "Refresh", "widget", "s", "property", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7754-L7774
46,837
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { // avoid setting nulls to non-nullable fields. if (this._scope.isConnected()) { // turning off both of them to avoid infinite loop. From architect's point of view, better solution would be // to hang up developer's browser, but if it happens in production - it may have disastrous consequences. Lava.suspendListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener); this._widget.set(this._property_name, this._scope.getValue()); Lava.resumeListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener); } }
javascript
function() { // avoid setting nulls to non-nullable fields. if (this._scope.isConnected()) { // turning off both of them to avoid infinite loop. From architect's point of view, better solution would be // to hang up developer's browser, but if it happens in production - it may have disastrous consequences. Lava.suspendListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener); this._widget.set(this._property_name, this._scope.getValue()); Lava.resumeListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener); } }
[ "function", "(", ")", "{", "// avoid setting nulls to non-nullable fields.", "if", "(", "this", ".", "_scope", ".", "isConnected", "(", ")", ")", "{", "// turning off both of them to avoid infinite loop. From architect's point of view, better solution would be", "// to hang up deve...
Scope, which is bound to widget property, has changed. Refresh widget property value
[ "Scope", "which", "is", "bound", "to", "widget", "property", "has", "changed", ".", "Refresh", "widget", "property", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7779-L7794
46,838
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { Lava.suspendListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener); this._scope.setValue(this._widget.get(this._property_name)); Lava.resumeListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener); }
javascript
function() { Lava.suspendListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener); this._scope.setValue(this._widget.get(this._property_name)); Lava.resumeListener(this._widget_property_changed_listener); this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener); }
[ "function", "(", ")", "{", "Lava", ".", "suspendListener", "(", "this", ".", "_widget_property_changed_listener", ")", ";", "this", ".", "_scope_changed_listener", "&&", "Lava", ".", "suspendListener", "(", "this", ".", "_scope_changed_listener", ")", ";", "this",...
Widget property has changed. Refresh bound scope value
[ "Widget", "property", "has", "changed", ".", "Refresh", "bound", "scope", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7799-L7807
46,839
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(value_container, property_name) { this.guid = Lava.guid++; this._value_container = value_container; this._property_name = property_name; this.level = value_container.level + 1; this._container_changed_listener = value_container.on('changed', this.onParentDataSourceChanged, this); this._refreshValue(); Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
javascript
function(value_container, property_name) { this.guid = Lava.guid++; this._value_container = value_container; this._property_name = property_name; this.level = value_container.level + 1; this._container_changed_listener = value_container.on('changed', this.onParentDataSourceChanged, this); this._refreshValue(); Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
[ "function", "(", "value_container", ",", "property_name", ")", "{", "this", ".", "guid", "=", "Lava", ".", "guid", "++", ";", "this", ".", "_value_container", "=", "value_container", ";", "this", ".", "_property_name", "=", "property_name", ";", "this", ".",...
Create DataBinding instance @param {_iValueContainer} value_container The scope, which provides the data source for this instance @param {string} property_name
[ "Create", "DataBinding", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7893-L7904
46,840
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var property_container = this._value_container.getValue(), value = null, is_connected = false; if (property_container != null) { // Collection implements Properties, so if _property_name is not a number - then `get` will be called if (property_container.isCollection && /^\d+$/.test(this._property_name)) { if (this._enumerable_changed_listener == null) { this._enumerable_changed_listener = property_container.on('collection_changed', this.onValueChanged, this); this._property_container = property_container; } value = property_container.getValueAt(+this._property_name); } else if (property_container.isProperties) { if (this._property_changed_listener == null) { this._property_changed_listener = property_container.onPropertyChanged(this._property_name, this.onValueChanged, this); this._property_container = property_container; } value = property_container.get(this._property_name); } else { value = property_container[this._property_name]; } is_connected = true; } if (value !== this._value || this._is_connected != is_connected) { this._value = value; this._is_connected = is_connected; this._fire('changed'); } }
javascript
function() { var property_container = this._value_container.getValue(), value = null, is_connected = false; if (property_container != null) { // Collection implements Properties, so if _property_name is not a number - then `get` will be called if (property_container.isCollection && /^\d+$/.test(this._property_name)) { if (this._enumerable_changed_listener == null) { this._enumerable_changed_listener = property_container.on('collection_changed', this.onValueChanged, this); this._property_container = property_container; } value = property_container.getValueAt(+this._property_name); } else if (property_container.isProperties) { if (this._property_changed_listener == null) { this._property_changed_listener = property_container.onPropertyChanged(this._property_name, this.onValueChanged, this); this._property_container = property_container; } value = property_container.get(this._property_name); } else { value = property_container[this._property_name]; } is_connected = true; } if (value !== this._value || this._is_connected != is_connected) { this._value = value; this._is_connected = is_connected; this._fire('changed'); } }
[ "function", "(", ")", "{", "var", "property_container", "=", "this", ".", "_value_container", ".", "getValue", "(", ")", ",", "value", "=", "null", ",", "is_connected", "=", "false", ";", "if", "(", "property_container", "!=", "null", ")", "{", "// Collect...
Get `_property_container` from `_value_container`, and get `_property_name` from `_property_container`
[ "Get", "_property_container", "from", "_value_container", "and", "get", "_property_name", "from", "_property_container" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7909-L7959
46,841
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) { // currently listening to the parent's old data source this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener); this._enumerable_changed_listener && this._property_container.removeListener(this._enumerable_changed_listener); this._property_changed_listener = null; this._enumerable_changed_listener = null; this._property_container = null; } this._queueForRefresh(); }
javascript
function() { if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) { // currently listening to the parent's old data source this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener); this._enumerable_changed_listener && this._property_container.removeListener(this._enumerable_changed_listener); this._property_changed_listener = null; this._enumerable_changed_listener = null; this._property_container = null; } this._queueForRefresh(); }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_property_changed_listener", "&&", "(", "this", ".", "_value_container", ".", "getValue", "(", ")", "!=", "this", ".", "_property_container", ")", ")", "{", "// currently listening to the parent's old data source",...
Data source for this instance has changed. Remove listeners to old data source and schedule refresh
[ "Data", "source", "for", "this", "instance", "has", "changed", ".", "Remove", "listeners", "to", "old", "data", "source", "and", "schedule", "refresh" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7974-L7989
46,842
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(value) { var property_container = this._value_container.getValue(); if (property_container) { if (this._property_changed_listener) { Lava.suspendListener(this._property_changed_listener); property_container.set(this._property_name, value); Lava.resumeListener(this._property_changed_listener); } else if (this._enumerable_changed_listener) { Lava.suspendListener(this._enumerable_changed_listener); property_container.replaceAt(+this._property_name, value); Lava.resumeListener(this._enumerable_changed_listener); } else if (property_container.isProperties) { property_container.set(this._property_name, value); } else { property_container[this._property_name] = value; } this._queueForRefresh(); } }
javascript
function(value) { var property_container = this._value_container.getValue(); if (property_container) { if (this._property_changed_listener) { Lava.suspendListener(this._property_changed_listener); property_container.set(this._property_name, value); Lava.resumeListener(this._property_changed_listener); } else if (this._enumerable_changed_listener) { Lava.suspendListener(this._enumerable_changed_listener); property_container.replaceAt(+this._property_name, value); Lava.resumeListener(this._enumerable_changed_listener); } else if (property_container.isProperties) { property_container.set(this._property_name, value); } else { property_container[this._property_name] = value; } this._queueForRefresh(); } }
[ "function", "(", "value", ")", "{", "var", "property_container", "=", "this", ".", "_value_container", ".", "getValue", "(", ")", ";", "if", "(", "property_container", ")", "{", "if", "(", "this", ".", "_property_changed_listener", ")", "{", "Lava", ".", "...
If this instance is bound to existing object - set object's property value @param {*} value
[ "If", "this", "instance", "is", "bound", "to", "existing", "object", "-", "set", "object", "s", "property", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8010-L8042
46,843
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(argument, view, widget, config) { var i = 0, count, depends, bind; this.guid = Lava.guid++; this._argument = argument; this._view = view; this._widget = widget; this.level = argument.level + 1; if (config) { if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_enumerable_mode']) == -1) Lava.t('Unknown value in own_enumerable_mode option: ' + config['own_enumerable_mode']); if (config['own_enumerable_mode'] == "DataView") { this._refreshDataSource = this._refreshDataSource_DataView; this._value = new Lava.system.DataView(); } else { this._refreshDataSource = this._refreshDataSource_Enumerable; this._value = new Lava.system.Enumerable(); } this._own_collection = true; if (config['depends']) { depends = config['depends']; this._binds = []; this._bind_changed_listeners = []; for (count = depends.length; i < count; i++) { if (depends[i].isDynamic) { bind = view.locateViewByPathConfig(depends[i]).getDynamicScope(view, depends[i]); } else { bind = view.getScopeByPathConfig(depends[i]); } this._binds.push(bind); this._bind_changed_listeners.push(bind.on('changed', this._onDependencyChanged, this)); } } } this._argument_changed_listener = this._argument.on('changed', this.onDataSourceChanged, this); this.refreshDataSource(); }
javascript
function(argument, view, widget, config) { var i = 0, count, depends, bind; this.guid = Lava.guid++; this._argument = argument; this._view = view; this._widget = widget; this.level = argument.level + 1; if (config) { if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_enumerable_mode']) == -1) Lava.t('Unknown value in own_enumerable_mode option: ' + config['own_enumerable_mode']); if (config['own_enumerable_mode'] == "DataView") { this._refreshDataSource = this._refreshDataSource_DataView; this._value = new Lava.system.DataView(); } else { this._refreshDataSource = this._refreshDataSource_Enumerable; this._value = new Lava.system.Enumerable(); } this._own_collection = true; if (config['depends']) { depends = config['depends']; this._binds = []; this._bind_changed_listeners = []; for (count = depends.length; i < count; i++) { if (depends[i].isDynamic) { bind = view.locateViewByPathConfig(depends[i]).getDynamicScope(view, depends[i]); } else { bind = view.getScopeByPathConfig(depends[i]); } this._binds.push(bind); this._bind_changed_listeners.push(bind.on('changed', this._onDependencyChanged, this)); } } } this._argument_changed_listener = this._argument.on('changed', this.onDataSourceChanged, this); this.refreshDataSource(); }
[ "function", "(", "argument", ",", "view", ",", "widget", ",", "config", ")", "{", "var", "i", "=", "0", ",", "count", ",", "depends", ",", "bind", ";", "this", ".", "guid", "=", "Lava", ".", "guid", "++", ";", "this", ".", "_argument", "=", "argu...
Create an instance of the Foreach scope. Refresh value @param {Lava.scope.Argument} argument @param {Lava.view.Foreach} view @param {Lava.widget.Standard} widget @param {?_cScopeForeach} config
[ "Create", "an", "instance", "of", "the", "Foreach", "scope", ".", "Refresh", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8167-L8224
46,844
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var argument_value = this._argument.getValue(); if (argument_value) { this._refreshDataSource(argument_value); if (this._observable_listener == null) { if (argument_value.isCollection) { this._observable_listener = argument_value.on('collection_changed', this._onObservableChanged, this); this._observable = argument_value; } else if (argument_value.isProperties) { this._observable_listener = argument_value.on('property_changed', this._onObservableChanged, this); this._observable = argument_value; } } } else if (this._own_collection) { this._value.removeAll(); } else { // will be called only when "own_enumerable_mode" is off, cause otherwise this._own_collection is always true this._createCollection(null); } this._fire('after_refresh'); this._fire('changed'); }
javascript
function() { var argument_value = this._argument.getValue(); if (argument_value) { this._refreshDataSource(argument_value); if (this._observable_listener == null) { if (argument_value.isCollection) { this._observable_listener = argument_value.on('collection_changed', this._onObservableChanged, this); this._observable = argument_value; } else if (argument_value.isProperties) { this._observable_listener = argument_value.on('property_changed', this._onObservableChanged, this); this._observable = argument_value; } } } else if (this._own_collection) { this._value.removeAll(); } else { // will be called only when "own_enumerable_mode" is off, cause otherwise this._own_collection is always true this._createCollection(null); } this._fire('after_refresh'); this._fire('changed'); }
[ "function", "(", ")", "{", "var", "argument_value", "=", "this", ".", "_argument", ".", "getValue", "(", ")", ";", "if", "(", "argument_value", ")", "{", "this", ".", "_refreshDataSource", "(", "argument_value", ")", ";", "if", "(", "this", ".", "_observ...
Get new value from the `_argument`, and create a new instance of local Enumerable, or update the content of the old one
[ "Get", "new", "value", "from", "the", "_argument", "and", "create", "a", "new", "instance", "of", "local", "Enumerable", "or", "update", "the", "content", "of", "the", "old", "one" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8292-L8330
46,845
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(view, property_name, assign_config) { this.guid = Lava.guid++; this._view = view; this._property_name = property_name; if (assign_config) { this._assign_argument = new Lava.scope.Argument(assign_config, view, view.getWidget()); this._assign_argument.on('changed', this.onAssignChanged, this); this._value = this._assign_argument.getValue(); view.set(this._property_name, this._value); this.level = this._assign_argument.level + 1; } else { // this is needed to order implicit inheritance // (in custom widget property setters logic and in view.Foreach, while refreshing children). // Zero was added to simplify examples from site documentation - it's not needed by framework this.level = view.depth || 0; this._value = view.get(this._property_name); this._property_changed_listener = view.onPropertyChanged(property_name, this.onContainerPropertyChanged, this); } Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
javascript
function(view, property_name, assign_config) { this.guid = Lava.guid++; this._view = view; this._property_name = property_name; if (assign_config) { this._assign_argument = new Lava.scope.Argument(assign_config, view, view.getWidget()); this._assign_argument.on('changed', this.onAssignChanged, this); this._value = this._assign_argument.getValue(); view.set(this._property_name, this._value); this.level = this._assign_argument.level + 1; } else { // this is needed to order implicit inheritance // (in custom widget property setters logic and in view.Foreach, while refreshing children). // Zero was added to simplify examples from site documentation - it's not needed by framework this.level = view.depth || 0; this._value = view.get(this._property_name); this._property_changed_listener = view.onPropertyChanged(property_name, this.onContainerPropertyChanged, this); } Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
[ "function", "(", "view", ",", "property_name", ",", "assign_config", ")", "{", "this", ".", "guid", "=", "Lava", ".", "guid", "++", ";", "this", ".", "_view", "=", "view", ";", "this", ".", "_property_name", "=", "property_name", ";", "if", "(", "assig...
Create the PropertyBinding instance. Refresh value from view's property or set value from assign @param {Lava.view.Abstract} view Scope's owner view, to which it's bound @param {string} property_name @param {_cAssign} assign_config Config for the Argument, in case this scope is created in "assign" mode
[ "Create", "the", "PropertyBinding", "instance", ".", "Refresh", "value", "from", "view", "s", "property", "or", "set", "value", "from", "assign" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8486-L8514
46,846
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(value) { Lava.suspendListener(this._property_changed_listener); this._view.set(this._property_name, value); Lava.resumeListener(this._property_changed_listener); this._queueForRefresh(); }
javascript
function(value) { Lava.suspendListener(this._property_changed_listener); this._view.set(this._property_name, value); Lava.resumeListener(this._property_changed_listener); this._queueForRefresh(); }
[ "function", "(", "value", ")", "{", "Lava", ".", "suspendListener", "(", "this", ".", "_property_changed_listener", ")", ";", "this", ".", "_view", ".", "set", "(", "this", ".", "_property_name", ",", "value", ")", ";", "Lava", ".", "resumeListener", "(", ...
Set property value to the bound view @param {*} value
[ "Set", "property", "value", "to", "the", "bound", "view" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8559-L8567
46,847
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(container, name_source_container) { if (Lava.schema.DEBUG && !name_source_container.isValueContainer) Lava.t(); if (Lava.schema.DEBUG && !name_source_container.guid) Lava.t("Name source for segments must be either PropertyBinding or DataBinding"); this._container = container; this._property_name = name_source_container.getValue(); this._refreshDataBinding(); if (container.isRefreshable) { this.level = container.level; } this.level = this.level > name_source_container.level ? this.level : name_source_container.level; this.level++; this._name_source_container = name_source_container; this._name_source_changed_listener = name_source_container.on('changed', this.onPropertyNameChanged, this); this._value = this._data_binding.getValue(); Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
javascript
function(container, name_source_container) { if (Lava.schema.DEBUG && !name_source_container.isValueContainer) Lava.t(); if (Lava.schema.DEBUG && !name_source_container.guid) Lava.t("Name source for segments must be either PropertyBinding or DataBinding"); this._container = container; this._property_name = name_source_container.getValue(); this._refreshDataBinding(); if (container.isRefreshable) { this.level = container.level; } this.level = this.level > name_source_container.level ? this.level : name_source_container.level; this.level++; this._name_source_container = name_source_container; this._name_source_changed_listener = name_source_container.on('changed', this.onPropertyNameChanged, this); this._value = this._data_binding.getValue(); Lava.schema.DEBUG && Lava.ScopeManager.debugTrackScope(this); }
[ "function", "(", "container", ",", "name_source_container", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "name_source_container", ".", "isValueContainer", ")", "Lava", ".", "t", "(", ")", ";", "if", "(", "Lava", ".", "schema", "."...
Create Segment instance. Refresh `_property_name`, `_data_binding` and get value @param {(Lava.view.Abstract|Lava.scope.Abstract)} container @param {(Lava.scope.PropertyBinding|Lava.scope.DataBinding)} name_source_container
[ "Create", "Segment", "instance", ".", "Refresh", "_property_name", "_data_binding", "and", "get", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8664-L8685
46,848
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(view, config, widget) { // About IOS bugfixes: // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html // http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html var needs_shim = Firestorm.Environment.platform == "ios"; Lava.ClassManager.patch(this, "Element", "addEventTarget", needs_shim ? "addEventTarget_IOS" : "addEventTarget_Normal"); Lava.ClassManager.patch(this, "Element", "informInDOM", needs_shim ? "informInDOM_IOS" : "informInDOM_Normal"); this.init_Normal(view, config, widget); Lava.ClassManager.patch(this, "Element", "init", "init_Normal"); }
javascript
function(view, config, widget) { // About IOS bugfixes: // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html // http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html var needs_shim = Firestorm.Environment.platform == "ios"; Lava.ClassManager.patch(this, "Element", "addEventTarget", needs_shim ? "addEventTarget_IOS" : "addEventTarget_Normal"); Lava.ClassManager.patch(this, "Element", "informInDOM", needs_shim ? "informInDOM_IOS" : "informInDOM_Normal"); this.init_Normal(view, config, widget); Lava.ClassManager.patch(this, "Element", "init", "init_Normal"); }
[ "function", "(", "view", ",", "config", ",", "widget", ")", "{", "// About IOS bugfixes:", "// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html", "// http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html", "var", "needs_shim", "=", "Firestorm", "....
One-time static constructor, which modifies container's prototype and replaces itself with correct version @param {Lava.view.Abstract} view @param {_cElementContainer} config @param {Lava.widget.Standard} widget
[ "One", "-", "time", "static", "constructor", "which", "modifies", "container", "s", "prototype", "and", "replaces", "itself", "with", "correct", "version" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8909-L8922
46,849
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(event_name, target) { if (this._is_inDOM && event_name == 'click' && !(event_name in this._events)) { this.getDOMElement().onclick = Lava.noop; } this.addEventTarget_Normal(event_name, target) }
javascript
function(event_name, target) { if (this._is_inDOM && event_name == 'click' && !(event_name in this._events)) { this.getDOMElement().onclick = Lava.noop; } this.addEventTarget_Normal(event_name, target) }
[ "function", "(", "event_name", ",", "target", ")", "{", "if", "(", "this", ".", "_is_inDOM", "&&", "event_name", "==", "'click'", "&&", "!", "(", "event_name", "in", "this", ".", "_events", ")", ")", "{", "this", ".", "getDOMElement", "(", ")", ".", ...
Add a route for DOM event - IOS bugfix version @param {string} event_name @param {_cTarget} target
[ "Add", "a", "route", "for", "DOM", "event", "-", "IOS", "bugfix", "version" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9027-L9034
46,850
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(event_name, target) { if (!(event_name in this._events)) { this._events[event_name] = [target]; } else { this._events[event_name].push(target); } }
javascript
function(event_name, target) { if (!(event_name in this._events)) { this._events[event_name] = [target]; } else { this._events[event_name].push(target); } }
[ "function", "(", "event_name", ",", "target", ")", "{", "if", "(", "!", "(", "event_name", "in", "this", ".", "_events", ")", ")", "{", "this", ".", "_events", "[", "event_name", "]", "=", "[", "target", "]", ";", "}", "else", "{", "this", ".", "...
Add a route for DOM event - normal version @param {string} event_name @param {_cTarget} target
[ "Add", "a", "route", "for", "DOM", "event", "-", "normal", "version" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9041-L9053
46,851
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name, value) { if (Lava.schema.DEBUG && name == 'id') Lava.t(); if (Lava.schema.DEBUG && (name in this._property_bindings)) Lava.t("Property is bound to an argument and cannot be set directly: " + name); this._static_properties[name] = value; }
javascript
function(name, value) { if (Lava.schema.DEBUG && name == 'id') Lava.t(); if (Lava.schema.DEBUG && (name in this._property_bindings)) Lava.t("Property is bound to an argument and cannot be set directly: " + name); this._static_properties[name] = value; }
[ "function", "(", "name", ",", "value", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "name", "==", "'id'", ")", "Lava", ".", "t", "(", ")", ";", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "(", "name", "in", "this", ...
Set static property to the container, but do not synchronize it with DOM element @param {string} name @param {string} value
[ "Set", "static", "property", "to", "the", "container", "but", "do", "not", "synchronize", "it", "with", "DOM", "element" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9072-L9079
46,852
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(class_name, cancel_sync) { if (Lava.schema.DEBUG && (!class_name || class_name.indexOf(' ') != -1)) Lava.t("addClass: expected one class name, got: " + class_name); if (Firestorm.Array.include(this._static_classes, class_name)) { if (this._is_inDOM && !cancel_sync) Firestorm.Element.addClass(this.getDOMElement(), class_name); } }
javascript
function(class_name, cancel_sync) { if (Lava.schema.DEBUG && (!class_name || class_name.indexOf(' ') != -1)) Lava.t("addClass: expected one class name, got: " + class_name); if (Firestorm.Array.include(this._static_classes, class_name)) { if (this._is_inDOM && !cancel_sync) Firestorm.Element.addClass(this.getDOMElement(), class_name); } }
[ "function", "(", "class_name", ",", "cancel_sync", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "(", "!", "class_name", "||", "class_name", ".", "indexOf", "(", "' '", ")", "!=", "-", "1", ")", ")", "Lava", ".", "t", "(", "\"addC...
Add static CSS class @param {string} class_name @param {boolean} cancel_sync If <kw>true</kw> - do not add that class to DOM element, just to local `_static_classes` array
[ "Add", "static", "CSS", "class" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9107-L9117
46,853
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(class_name, cancel_sync) { if (Firestorm.Array.exclude(this._static_classes, class_name)) { if (this._is_inDOM && !cancel_sync) Firestorm.Element.removeClass(this.getDOMElement(), class_name); } }
javascript
function(class_name, cancel_sync) { if (Firestorm.Array.exclude(this._static_classes, class_name)) { if (this._is_inDOM && !cancel_sync) Firestorm.Element.removeClass(this.getDOMElement(), class_name); } }
[ "function", "(", "class_name", ",", "cancel_sync", ")", "{", "if", "(", "Firestorm", ".", "Array", ".", "exclude", "(", "this", ".", "_static_classes", ",", "class_name", ")", ")", "{", "if", "(", "this", ".", "_is_inDOM", "&&", "!", "cancel_sync", ")", ...
Remove a static CSS class @param {string} class_name @param {boolean} cancel_sync If <kw>true</kw> - do not remove the class from DOM element, just from local `_static_classes` array
[ "Remove", "a", "static", "CSS", "class" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9124-L9132
46,854
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(class_names, cancel_sync) { if (Lava.schema.DEBUG && typeof(class_names) == 'string') Lava.t(); for (var i = 0, count = class_names.length; i < count; i++) { this.addClass(class_names[i], cancel_sync); } }
javascript
function(class_names, cancel_sync) { if (Lava.schema.DEBUG && typeof(class_names) == 'string') Lava.t(); for (var i = 0, count = class_names.length; i < count; i++) { this.addClass(class_names[i], cancel_sync); } }
[ "function", "(", "class_names", ",", "cancel_sync", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "typeof", "(", "class_names", ")", "==", "'string'", ")", "Lava", ".", "t", "(", ")", ";", "for", "(", "var", "i", "=", "0", ",", ...
Add a list of static classes to the instance @param {Array.<string>} class_names @param {boolean} cancel_sync If <kw>true</kw> - do not add that classes to DOM element, just to local `_static_classes` array
[ "Add", "a", "list", "of", "static", "classes", "to", "the", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9139-L9149
46,855
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name, value, cancel_sync) { if (value == null) { this.removeStyle(name, cancel_sync); } else { this._static_styles[name] = value; if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, value); } }
javascript
function(name, value, cancel_sync) { if (value == null) { this.removeStyle(name, cancel_sync); } else { this._static_styles[name] = value; if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, value); } }
[ "function", "(", "name", ",", "value", ",", "cancel_sync", ")", "{", "if", "(", "value", "==", "null", ")", "{", "this", ".", "removeStyle", "(", "name", ",", "cancel_sync", ")", ";", "}", "else", "{", "this", ".", "_static_styles", "[", "name", "]",...
Set static style value @param {string} name CSS property name @param {string} value CSS property value @param cancel_sync If <kw>true</kw> - do not add that style to DOM element, just to local `_static_styles` object
[ "Set", "static", "style", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9177-L9190
46,856
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name, cancel_sync) { if (name in this._static_styles) { delete this._static_styles[name]; if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, null); } }
javascript
function(name, cancel_sync) { if (name in this._static_styles) { delete this._static_styles[name]; if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, null); } }
[ "function", "(", "name", ",", "cancel_sync", ")", "{", "if", "(", "name", "in", "this", ".", "_static_styles", ")", "{", "delete", "this", ".", "_static_styles", "[", "name", "]", ";", "if", "(", "this", ".", "_is_inDOM", "&&", "!", "cancel_sync", ")",...
Remove static CSS style @param {string} name CSS style name @param {boolean} cancel_sync If <kw>true</kw> - do not remove that style from DOM element, just from local `_static_styles` object
[ "Remove", "static", "CSS", "style" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9197-L9204
46,857
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(configs, view, fn) { var result = {}, argument; for (var name in configs) { argument = new Lava.scope.Argument(configs[name], view, this._widget); result[name] = argument; argument.on('changed', fn, this, {name: name}) } return result; }
javascript
function(configs, view, fn) { var result = {}, argument; for (var name in configs) { argument = new Lava.scope.Argument(configs[name], view, this._widget); result[name] = argument; argument.on('changed', fn, this, {name: name}) } return result; }
[ "function", "(", "configs", ",", "view", ",", "fn", ")", "{", "var", "result", "=", "{", "}", ",", "argument", ";", "for", "(", "var", "name", "in", "configs", ")", "{", "argument", "=", "new", "Lava", ".", "scope", ".", "Argument", "(", "configs",...
Helper method to create style, class and property bindings @param {?Object.<string, _cArgument>} configs @param {Lava.view.Abstract} view @param {!function} fn @returns {!Object.<string, Lava.scope.Argument>}
[ "Helper", "method", "to", "create", "style", "class", "and", "property", "bindings" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9233-L9248
46,858
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(argument, event_args, listener_args) { if (this._is_inDOM) { // note: escape will be handled by framework var value = argument.getValue(); if (value != null && value !== false) { if (value === true) { value = listener_args.name; } Firestorm.Element.setProperty(this.getDOMElement(), listener_args.name, value); } else { Firestorm.Element.removeProperty(this.getDOMElement(), listener_args.name); } } }
javascript
function(argument, event_args, listener_args) { if (this._is_inDOM) { // note: escape will be handled by framework var value = argument.getValue(); if (value != null && value !== false) { if (value === true) { value = listener_args.name; } Firestorm.Element.setProperty(this.getDOMElement(), listener_args.name, value); } else { Firestorm.Element.removeProperty(this.getDOMElement(), listener_args.name); } } }
[ "function", "(", "argument", ",", "event_args", ",", "listener_args", ")", "{", "if", "(", "this", ".", "_is_inDOM", ")", "{", "// note: escape will be handled by framework", "var", "value", "=", "argument", ".", "getValue", "(", ")", ";", "if", "(", "value", ...
Argument value for property binding has changed. If container's element is in DOM - update it's property value @param {Lava.scope.Argument} argument @param event_args @param listener_args
[ "Argument", "value", "for", "property", "binding", "has", "changed", ".", "If", "container", "s", "element", "is", "in", "DOM", "-", "update", "it", "s", "property", "value" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9256-L9279
46,859
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(argument, event_args, listener_args) { var value = this._style_bindings[listener_args.name].getValue() || ''; if (this._is_inDOM) Firestorm.Element.setStyle(this.getDOMElement(), listener_args.name, value.toString().trim()); }
javascript
function(argument, event_args, listener_args) { var value = this._style_bindings[listener_args.name].getValue() || ''; if (this._is_inDOM) Firestorm.Element.setStyle(this.getDOMElement(), listener_args.name, value.toString().trim()); }
[ "function", "(", "argument", ",", "event_args", ",", "listener_args", ")", "{", "var", "value", "=", "this", ".", "_style_bindings", "[", "listener_args", ".", "name", "]", ".", "getValue", "(", ")", "||", "''", ";", "if", "(", "this", ".", "_is_inDOM", ...
Argument value for style binding has changed. If container's element is in DOM - update it's style @param {Lava.scope.Argument} argument @param event_args @param listener_args
[ "Argument", "value", "for", "style", "binding", "has", "changed", ".", "If", "container", "s", "element", "is", "in", "DOM", "-", "update", "it", "s", "style" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9287-L9292
46,860
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(classes_string) { var classes = []; if (Lava.schema.view.VALIDATE_CLASS_NAMES) { this.assertClassStringValid(classes_string); } if (classes_string != '') { classes = classes_string.split(/\s+/); } return classes; }
javascript
function(classes_string) { var classes = []; if (Lava.schema.view.VALIDATE_CLASS_NAMES) { this.assertClassStringValid(classes_string); } if (classes_string != '') { classes = classes_string.split(/\s+/); } return classes; }
[ "function", "(", "classes_string", ")", "{", "var", "classes", "=", "[", "]", ";", "if", "(", "Lava", ".", "schema", ".", "view", ".", "VALIDATE_CLASS_NAMES", ")", "{", "this", ".", "assertClassStringValid", "(", "classes_string", ")", ";", "}", "if", "(...
Split a string into array of class names @param {string} classes_string @returns {Array}
[ "Split", "a", "string", "into", "array", "of", "class", "names" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9299-L9315
46,861
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(argument, event_args, listener_args) { var new_classes = this._toClassNames(argument.getValue().toString().trim()); if (this._is_inDOM) { Firestorm.Element.removeClasses(this.getDOMElement(), this._class_bindings_values[listener_args.name]); Firestorm.Element.addClasses(this.getDOMElement(), new_classes); } this._class_bindings_values[listener_args.name] = new_classes; }
javascript
function(argument, event_args, listener_args) { var new_classes = this._toClassNames(argument.getValue().toString().trim()); if (this._is_inDOM) { Firestorm.Element.removeClasses(this.getDOMElement(), this._class_bindings_values[listener_args.name]); Firestorm.Element.addClasses(this.getDOMElement(), new_classes); } this._class_bindings_values[listener_args.name] = new_classes; }
[ "function", "(", "argument", ",", "event_args", ",", "listener_args", ")", "{", "var", "new_classes", "=", "this", ".", "_toClassNames", "(", "argument", ".", "getValue", "(", ")", ".", "toString", "(", ")", ".", "trim", "(", ")", ")", ";", "if", "(", ...
Class binding argument has changed it's value. Refresh internal class values and element's classes @param {Lava.scope.Argument} argument @param event_args @param listener_args
[ "Class", "binding", "argument", "has", "changed", "it", "s", "value", ".", "Refresh", "internal", "class", "values", "and", "element", "s", "classes" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9323-L9336
46,862
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var resultClasses = this._static_classes.clone(), name, value; for (name in this._class_bindings) { // do not need to check or convert, cause join() will convert everything to string, and nulls to empty string resultClasses.push( this._class_bindings[name].getValue() ); } value = resultClasses.join(' '); if (Lava.schema.view.VALIDATE_CLASS_NAMES) { this.assertClassStringValid(value); } return value; }
javascript
function() { var resultClasses = this._static_classes.clone(), name, value; for (name in this._class_bindings) { // do not need to check or convert, cause join() will convert everything to string, and nulls to empty string resultClasses.push( this._class_bindings[name].getValue() ); } value = resultClasses.join(' '); if (Lava.schema.view.VALIDATE_CLASS_NAMES) { this.assertClassStringValid(value); } return value; }
[ "function", "(", ")", "{", "var", "resultClasses", "=", "this", ".", "_static_classes", ".", "clone", "(", ")", ",", "name", ",", "value", ";", "for", "(", "name", "in", "this", ".", "_class_bindings", ")", "{", "// do not need to check or convert, cause join(...
Render value of the "class" attribute, including bound classes @returns {string}
[ "Render", "value", "of", "the", "class", "attribute", "including", "bound", "classes" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9361-L9384
46,863
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var result_styles = [], name, value; for (name in this._static_styles) { result_styles.push(name + ':' + this._static_styles[name]); } for (name in this._style_bindings) { value = this._style_bindings[name].getValue(); if (value != null) { result_styles.push(name + ':' + value.toString().trim()); } } value = result_styles.join(';'); if (Lava.schema.view.VALIDATE_STYLES) { this.assertStyleValid(value); } return value; }
javascript
function() { var result_styles = [], name, value; for (name in this._static_styles) { result_styles.push(name + ':' + this._static_styles[name]); } for (name in this._style_bindings) { value = this._style_bindings[name].getValue(); if (value != null) { result_styles.push(name + ':' + value.toString().trim()); } } value = result_styles.join(';'); if (Lava.schema.view.VALIDATE_STYLES) { this.assertStyleValid(value); } return value; }
[ "function", "(", ")", "{", "var", "result_styles", "=", "[", "]", ",", "name", ",", "value", ";", "for", "(", "name", "in", "this", ".", "_static_styles", ")", "{", "result_styles", ".", "push", "(", "name", "+", "':'", "+", "this", ".", "_static_sty...
Render content of the "style" attribute, including bound styles @returns {string}
[ "Render", "content", "of", "the", "style", "attribute", "including", "bound", "styles" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9390-L9419
46,864
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name, value) { var result = ''; if (value === true) { result = ' ' + name + '="' + name + '"'; } else if (value != null && value !== false) { result = ' ' + name + '="' + this.escapeAttributeValue(value + '') + '"'; } return result; }
javascript
function(name, value) { var result = ''; if (value === true) { result = ' ' + name + '="' + name + '"'; } else if (value != null && value !== false) { result = ' ' + name + '="' + this.escapeAttributeValue(value + '') + '"'; } return result; }
[ "function", "(", "name", ",", "value", ")", "{", "var", "result", "=", "''", ";", "if", "(", "value", "===", "true", ")", "{", "result", "=", "' '", "+", "name", "+", "'=\"'", "+", "name", "+", "'\"'", ";", "}", "else", "if", "(", "value", "!="...
Render one attribute @param {string} name @param {boolean|null|string} value @returns {string}
[ "Render", "one", "attribute" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9427-L9443
46,865
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var classes = this._renderClasses(), style = this._renderStyles(), properties_string = '', name; // see informInDOM_Normal // this._element = null; for (name in this._static_properties) { properties_string += this._renderAttribute(name, this._static_properties[name]); } for (name in this._property_bindings) { properties_string += this._renderAttribute(name, this._property_bindings[name].getValue()); } if (classes) { properties_string += ' class="' + classes + '"'; } if (style) { properties_string += ' style="' + style + '"'; } return "<" + this._tag_name + " id=\"" + this._id + "\" " // + this._writeEvents() + properties_string; //+ ">" }
javascript
function() { var classes = this._renderClasses(), style = this._renderStyles(), properties_string = '', name; // see informInDOM_Normal // this._element = null; for (name in this._static_properties) { properties_string += this._renderAttribute(name, this._static_properties[name]); } for (name in this._property_bindings) { properties_string += this._renderAttribute(name, this._property_bindings[name].getValue()); } if (classes) { properties_string += ' class="' + classes + '"'; } if (style) { properties_string += ' style="' + style + '"'; } return "<" + this._tag_name + " id=\"" + this._id + "\" " // + this._writeEvents() + properties_string; //+ ">" }
[ "function", "(", ")", "{", "var", "classes", "=", "this", ".", "_renderClasses", "(", ")", ",", "style", "=", "this", ".", "_renderStyles", "(", ")", ",", "properties_string", "=", "''", ",", "name", ";", "// see informInDOM_Normal", "// this._element = null;"...
Render the opening HTML tag, including all attributes @returns {string}
[ "Render", "the", "opening", "HTML", "tag", "including", "all", "attributes" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9449-L9487
46,866
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(html) { if (Lava.schema.DEBUG && this._is_void) Lava.t('Trying to wrap content in void tag'); // _element is cleared in _renderOpeningTag return this._renderOpeningTag() + ">" + html + "</" + this._tag_name + ">"; }
javascript
function(html) { if (Lava.schema.DEBUG && this._is_void) Lava.t('Trying to wrap content in void tag'); // _element is cleared in _renderOpeningTag return this._renderOpeningTag() + ">" + html + "</" + this._tag_name + ">"; }
[ "function", "(", "html", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "this", ".", "_is_void", ")", "Lava", ".", "t", "(", "'Trying to wrap content in void tag'", ")", ";", "// _element is cleared in _renderOpeningTag", "return", "this", ".", ...
Render tag and wrap given HTML code inside it @param {string} html @returns {string}
[ "Render", "tag", "and", "wrap", "given", "HTML", "code", "inside", "it" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9494-L9500
46,867
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(html) { if (!this._is_inDOM) Lava.t("setHTML: element is not in DOM"); if (this._is_void) Lava.t('setHTML on void tag'); Firestorm.Element.setProperty(this.getDOMElement(), 'html', html); }
javascript
function(html) { if (!this._is_inDOM) Lava.t("setHTML: element is not in DOM"); if (this._is_void) Lava.t('setHTML on void tag'); Firestorm.Element.setProperty(this.getDOMElement(), 'html', html); }
[ "function", "(", "html", ")", "{", "if", "(", "!", "this", ".", "_is_inDOM", ")", "Lava", ".", "t", "(", "\"setHTML: element is not in DOM\"", ")", ";", "if", "(", "this", ".", "_is_void", ")", "Lava", ".", "t", "(", "'setHTML on void tag'", ")", ";", ...
Set innerHTML of container's element. Container must be in DOM @param {string} html
[ "Set", "innerHTML", "of", "container", "s", "element", ".", "Container", "must", "be", "in", "DOM" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9518-L9525
46,868
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(callback_name, callback_argument) { var name; for (name in this._property_bindings) this._property_bindings[name][callback_name](callback_argument); for (name in this._style_bindings) this._style_bindings[name][callback_name](callback_argument); for (name in this._class_bindings) this._class_bindings[name][callback_name](callback_argument); }
javascript
function(callback_name, callback_argument) { var name; for (name in this._property_bindings) this._property_bindings[name][callback_name](callback_argument); for (name in this._style_bindings) this._style_bindings[name][callback_name](callback_argument); for (name in this._class_bindings) this._class_bindings[name][callback_name](callback_argument); }
[ "function", "(", "callback_name", ",", "callback_argument", ")", "{", "var", "name", ";", "for", "(", "name", "in", "this", ".", "_property_bindings", ")", "this", ".", "_property_bindings", "[", "name", "]", "[", "callback_name", "]", "(", "callback_argument"...
Call a method of all binding arguments @param {string} callback_name Method to call @param {*} callback_argument Argument for the method
[ "Call", "a", "method", "of", "all", "binding", "arguments" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9680-L9690
46,869
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(element) { var Element = Firestorm.Element, name; if (this._is_inDOM) Lava.t("Can not set duplicate id attribute on elements"); // there must not be ID attribute if (Element.getProperty(element, 'id')) Lava.t("Target element already has an ID, and could be owned by another container"); if (Element.getProperty(element, 'tag').toLowerCase() != this._tag_name) Lava.t("Captured tag name differs from the container's tag name"); Element.setProperty(element, 'id', this._id); this._is_inDOM = true; this._element = element; for (name in this._static_properties) { // note: escaping must be handled by framework Element.setProperty(element, name, this._static_properties[name]); } for (name in this._property_bindings) { Element.setProperty(element, name, this._property_bindings[name].getValue()); } this.syncClasses(); this.syncStyles(); this._is_element_owner = false; }
javascript
function(element) { var Element = Firestorm.Element, name; if (this._is_inDOM) Lava.t("Can not set duplicate id attribute on elements"); // there must not be ID attribute if (Element.getProperty(element, 'id')) Lava.t("Target element already has an ID, and could be owned by another container"); if (Element.getProperty(element, 'tag').toLowerCase() != this._tag_name) Lava.t("Captured tag name differs from the container's tag name"); Element.setProperty(element, 'id', this._id); this._is_inDOM = true; this._element = element; for (name in this._static_properties) { // note: escaping must be handled by framework Element.setProperty(element, name, this._static_properties[name]); } for (name in this._property_bindings) { Element.setProperty(element, name, this._property_bindings[name].getValue()); } this.syncClasses(); this.syncStyles(); this._is_element_owner = false; }
[ "function", "(", "element", ")", "{", "var", "Element", "=", "Firestorm", ".", "Element", ",", "name", ";", "if", "(", "this", ".", "_is_inDOM", ")", "Lava", ".", "t", "(", "\"Can not set duplicate id attribute on elements\"", ")", ";", "// there must not be ID ...
Bind container to existing DOM element. Apply new styles, classes and properties @param {HTMLElement} element
[ "Bind", "container", "to", "existing", "DOM", "element", ".", "Apply", "new", "styles", "classes", "and", "properties" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9696-L9728
46,870
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var input_element = this.getDOMElement(); Firestorm.Element.removeListener(input_element, "onpropertychange", this._OldIE_property_change_callback); Firestorm.Element.removeListener(input_element, "selectionchange", this._OldIE_refresh_callback); Firestorm.Element.removeListener(input_element, "keyup", this._OldIE_refresh_callback); Firestorm.Element.removeListener(input_element, "keydown", this._OldIE_refresh_callback); this.Element$informRemove(); }
javascript
function() { var input_element = this.getDOMElement(); Firestorm.Element.removeListener(input_element, "onpropertychange", this._OldIE_property_change_callback); Firestorm.Element.removeListener(input_element, "selectionchange", this._OldIE_refresh_callback); Firestorm.Element.removeListener(input_element, "keyup", this._OldIE_refresh_callback); Firestorm.Element.removeListener(input_element, "keydown", this._OldIE_refresh_callback); this.Element$informRemove(); }
[ "function", "(", ")", "{", "var", "input_element", "=", "this", ".", "getDOMElement", "(", ")", ";", "Firestorm", ".", "Element", ".", "removeListener", "(", "input_element", ",", "\"onpropertychange\"", ",", "this", ".", "_OldIE_property_change_callback", ")", ...
Removes IE listeners
[ "Removes", "IE", "listeners" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9997-L10007
46,871
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(view, config, widget) { this._view = view; //this._config = config; this._widget = widget; this._start_script_id = 'c' + view.guid + 's'; this._end_script_id = 'c' + view.guid + 'e'; }
javascript
function(view, config, widget) { this._view = view; //this._config = config; this._widget = widget; this._start_script_id = 'c' + view.guid + 's'; this._end_script_id = 'c' + view.guid + 'e'; }
[ "function", "(", "view", ",", "config", ",", "widget", ")", "{", "this", ".", "_view", "=", "view", ";", "//this._config = config;", "this", ".", "_widget", "=", "widget", ";", "this", ".", "_start_script_id", "=", "'c'", "+", "view", ".", "guid", "+", ...
Create Morph container instance @param {Lava.view.Abstract} view @param {Object} config @param {Lava.widget.Standard} widget
[ "Create", "Morph", "container", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10091-L10100
46,872
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var start_element = document.getElementById(this._start_script_id), end_element = document.getElementById(this._end_script_id); /** * In some cases, Internet Explorer can create an anonymous node in * the hierarchy with no tagName. You can create this scenario via: * * div = document.createElement("div"); * div.innerHTML = "<table>&shy<script></script><tr><td>hi</td></tr></table>"; * div.firstChild.firstChild.tagName //=> "" * * If our script markers are inside such a node, we need to find that * node and use *it* as the marker. **/ while (start_element.parentNode.tagName === "") { start_element = start_element.parentNode; } /** * When automatically adding a tbody, Internet Explorer inserts the * tbody immediately before the first <tr>. Other browsers create it * before the first node, no matter what. * * This means the the following code: * * div = document.createElement("div"); * div.innerHTML = "<table><script id='first'></script><tr><td>hi</td></tr><script id='last'></script></table> * * Generates the following DOM in IE: * * + div * + table * - script id='first' * + tbody * + tr * + td * - "hi" * - script id='last' * * Which means that the two script tags, even though they were * inserted at the same point in the hierarchy in the original * HTML, now have different parents. * * This code reparents the first script tag by making it the tbody's * first child. **/ if (start_element.parentNode !== end_element.parentNode) { end_element.parentNode.insertBefore(start_element, end_element.parentNode.firstChild); } this._start_element = start_element; this._end_element = end_element; }
javascript
function() { var start_element = document.getElementById(this._start_script_id), end_element = document.getElementById(this._end_script_id); /** * In some cases, Internet Explorer can create an anonymous node in * the hierarchy with no tagName. You can create this scenario via: * * div = document.createElement("div"); * div.innerHTML = "<table>&shy<script></script><tr><td>hi</td></tr></table>"; * div.firstChild.firstChild.tagName //=> "" * * If our script markers are inside such a node, we need to find that * node and use *it* as the marker. **/ while (start_element.parentNode.tagName === "") { start_element = start_element.parentNode; } /** * When automatically adding a tbody, Internet Explorer inserts the * tbody immediately before the first <tr>. Other browsers create it * before the first node, no matter what. * * This means the the following code: * * div = document.createElement("div"); * div.innerHTML = "<table><script id='first'></script><tr><td>hi</td></tr><script id='last'></script></table> * * Generates the following DOM in IE: * * + div * + table * - script id='first' * + tbody * + tr * + td * - "hi" * - script id='last' * * Which means that the two script tags, even though they were * inserted at the same point in the hierarchy in the original * HTML, now have different parents. * * This code reparents the first script tag by making it the tbody's * first child. **/ if (start_element.parentNode !== end_element.parentNode) { end_element.parentNode.insertBefore(start_element, end_element.parentNode.firstChild); } this._start_element = start_element; this._end_element = end_element; }
[ "function", "(", ")", "{", "var", "start_element", "=", "document", ".", "getElementById", "(", "this", ".", "_start_script_id", ")", ",", "end_element", "=", "document", ".", "getElementById", "(", "this", ".", "_end_script_id", ")", ";", "/**\n\t\t * In some c...
Retrieve both &lt;script&gt; tags from DOM into local references, at the same time applying fixes for old browsers
[ "Retrieve", "both", "&lt", ";", "script&gt", ";", "tags", "from", "DOM", "into", "local", "references", "at", "the", "same", "time", "applying", "fixes", "for", "old", "browsers" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10106-L10165
46,873
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(html) { if (!this._is_inDOM) Lava.t("setHTML: container is not in DOM"); Firestorm.DOM.clearInnerRange(this.getStartElement(), this.getEndElement()); Firestorm.DOM.insertHTMLBefore(this.getEndElement(), html); }
javascript
function(html) { if (!this._is_inDOM) Lava.t("setHTML: container is not in DOM"); Firestorm.DOM.clearInnerRange(this.getStartElement(), this.getEndElement()); Firestorm.DOM.insertHTMLBefore(this.getEndElement(), html); }
[ "function", "(", "html", ")", "{", "if", "(", "!", "this", ".", "_is_inDOM", ")", "Lava", ".", "t", "(", "\"setHTML: container is not in DOM\"", ")", ";", "Firestorm", ".", "DOM", ".", "clearInnerRange", "(", "this", ".", "getStartElement", "(", ")", ",", ...
Replace the content between container's tags. Requires container to be in DOM @param {string} html
[ "Replace", "the", "content", "between", "container", "s", "tags", ".", "Requires", "container", "to", "be", "in", "DOM" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10219-L10226
46,874
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(view, config, widget) { this._view = view; //this._config = config; this._widget = widget; if (('options' in config)) { if ('appender' in config.options) { if (Lava.schema.DEBUG && !this['_append' + config.options.appender]) Lava.t('[Emulated container] wrong appender: ' + config.options.appender); this.appendHTML = this['_append' + config.options.appender] } if ('prepender' in config.options) { if (Lava.schema.DEBUG && !this['_append' + config.options.prepender]) Lava.t('[Emulated container] wrong prepender: ' + config.options.prepender); this.prependHTML = this['_append' + config.options.prepender] } } }
javascript
function(view, config, widget) { this._view = view; //this._config = config; this._widget = widget; if (('options' in config)) { if ('appender' in config.options) { if (Lava.schema.DEBUG && !this['_append' + config.options.appender]) Lava.t('[Emulated container] wrong appender: ' + config.options.appender); this.appendHTML = this['_append' + config.options.appender] } if ('prepender' in config.options) { if (Lava.schema.DEBUG && !this['_append' + config.options.prepender]) Lava.t('[Emulated container] wrong prepender: ' + config.options.prepender); this.prependHTML = this['_append' + config.options.prepender] } } }
[ "function", "(", "view", ",", "config", ",", "widget", ")", "{", "this", ".", "_view", "=", "view", ";", "//this._config = config;", "this", ".", "_widget", "=", "widget", ";", "if", "(", "(", "'options'", "in", "config", ")", ")", "{", "if", "(", "'...
Create Emulated container instance @param {Lava.view.Abstract} view @param {_cEmulatedContainer} config @param {Lava.widget.Standard} widget
[ "Create", "Emulated", "container", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10371-L10391
46,875
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(config, view, container) { this._config = config; this._view = view; this._container = container; if (config.get_start_element_callback) { this._getStartElement = config.get_start_element_callback; } if (config.get_end_element_callback) { this._getEndElement = config.get_end_element_callback; } }
javascript
function(config, view, container) { this._config = config; this._view = view; this._container = container; if (config.get_start_element_callback) { this._getStartElement = config.get_start_element_callback; } if (config.get_end_element_callback) { this._getEndElement = config.get_end_element_callback; } }
[ "function", "(", "config", ",", "view", ",", "container", ")", "{", "this", ".", "_config", "=", "config", ";", "this", ".", "_view", "=", "view", ";", "this", ".", "_container", "=", "container", ";", "if", "(", "config", ".", "get_start_element_callbac...
Create refresher instance @param {_cRefresher} config @param {Lava.view.Abstract} view @param {_iContainer} container
[ "Create", "refresher", "instance" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10601-L10619
46,876
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(templates) { for (var i = 0, count = templates.length; i < count; i++) { this._remove_queue[templates[i].guid] = templates[i]; } }
javascript
function(templates) { for (var i = 0, count = templates.length; i < count; i++) { this._remove_queue[templates[i].guid] = templates[i]; } }
[ "function", "(", "templates", ")", "{", "for", "(", "var", "i", "=", "0", ",", "count", "=", "templates", ".", "length", ";", "i", "<", "count", ";", "i", "++", ")", "{", "this", ".", "_remove_queue", "[", "templates", "[", "i", "]", ".", "guid",...
Queue templates for removal @param {Array.<Lava.system.Template>} templates
[ "Queue", "templates", "for", "removal" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10625-L10633
46,877
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(current_templates) { var i = 1, count = current_templates.length, guid, previous_template = current_templates[0]; if (previous_template) { // if list is not empty delete this._remove_queue[previous_template.guid]; // handle first template separately from others if (!previous_template.isInDOM()) { this._insertFirstTemplate(previous_template); this._fire('insertion_complete', previous_template); } for (; i < count; i++) { delete this._remove_queue[current_templates[i].guid]; if (current_templates[i].isInDOM()) { this._moveTemplate(current_templates[i], previous_template, current_templates); } else { this._insertTemplate(current_templates[i], previous_template, i); this._fire('insertion_complete', current_templates[i]); } previous_template = current_templates[i]; } } for (guid in this._remove_queue) { if (this._remove_queue[guid].isInDOM()) { this._removeTemplate(this._remove_queue[guid]); this._fire('removal_complete', this._remove_queue[guid]); } } this._remove_queue = {}; }
javascript
function(current_templates) { var i = 1, count = current_templates.length, guid, previous_template = current_templates[0]; if (previous_template) { // if list is not empty delete this._remove_queue[previous_template.guid]; // handle first template separately from others if (!previous_template.isInDOM()) { this._insertFirstTemplate(previous_template); this._fire('insertion_complete', previous_template); } for (; i < count; i++) { delete this._remove_queue[current_templates[i].guid]; if (current_templates[i].isInDOM()) { this._moveTemplate(current_templates[i], previous_template, current_templates); } else { this._insertTemplate(current_templates[i], previous_template, i); this._fire('insertion_complete', current_templates[i]); } previous_template = current_templates[i]; } } for (guid in this._remove_queue) { if (this._remove_queue[guid].isInDOM()) { this._removeTemplate(this._remove_queue[guid]); this._fire('removal_complete', this._remove_queue[guid]); } } this._remove_queue = {}; }
[ "function", "(", "current_templates", ")", "{", "var", "i", "=", "1", ",", "count", "=", "current_templates", ".", "length", ",", "guid", ",", "previous_template", "=", "current_templates", "[", "0", "]", ";", "if", "(", "previous_template", ")", "{", "// ...
Insert new templates into DOM and remove those, which are queued for removal. Reorder existing templates @param {Array.<Lava.system.Template>} current_templates Templates, that refresher must render and insert into DOM. Some of them can be already in DOM.
[ "Insert", "new", "templates", "into", "DOM", "and", "remove", "those", "which", "are", "queued", "for", "removal", ".", "Reorder", "existing", "templates" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10640-L10693
46,878
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(template) { this._view.getContainer().prependHTML(template.render()); template.broadcastInDOM(); this._current_templates.unshift(template); }
javascript
function(template) { this._view.getContainer().prependHTML(template.render()); template.broadcastInDOM(); this._current_templates.unshift(template); }
[ "function", "(", "template", ")", "{", "this", ".", "_view", ".", "getContainer", "(", ")", ".", "prependHTML", "(", "template", ".", "render", "(", ")", ")", ";", "template", ".", "broadcastInDOM", "(", ")", ";", "this", ".", "_current_templates", ".", ...
Insert template at the top of view's container @param {Lava.system.Template} template
[ "Insert", "template", "at", "the", "top", "of", "view", "s", "container" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10699-L10705
46,879
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(current_templates) { var i = 0, count = current_templates.length, guid; // from templates, which are prepared for removal, filter out those, which should be in DOM for (; i < count; i++) { delete this._remove_queue[current_templates[i].guid]; } for (guid in this._remove_queue) { if (this._remove_queue[guid].isInDOM()) { this._remove_queue[guid].broadcastRemove(); this._fire('removal_complete', this._remove_queue[guid]); } } this._current_templates = current_templates; this._remove_queue = {}; return this._render(); }
javascript
function(current_templates) { var i = 0, count = current_templates.length, guid; // from templates, which are prepared for removal, filter out those, which should be in DOM for (; i < count; i++) { delete this._remove_queue[current_templates[i].guid]; } for (guid in this._remove_queue) { if (this._remove_queue[guid].isInDOM()) { this._remove_queue[guid].broadcastRemove(); this._fire('removal_complete', this._remove_queue[guid]); } } this._current_templates = current_templates; this._remove_queue = {}; return this._render(); }
[ "function", "(", "current_templates", ")", "{", "var", "i", "=", "0", ",", "count", "=", "current_templates", ".", "length", ",", "guid", ";", "// from templates, which are prepared for removal, filter out those, which should be in DOM", "for", "(", ";", "i", "<", "co...
View's render callback @param {Array.<Lava.system.Template>} current_templates Templates that must be in DOM
[ "View", "s", "render", "callback" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10774-L10803
46,880
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var buffer = '', i = 0, count = this._current_templates.length; for (; i < count; i++) { buffer += this._current_templates[i].render(); } return buffer; }
javascript
function() { var buffer = '', i = 0, count = this._current_templates.length; for (; i < count; i++) { buffer += this._current_templates[i].render(); } return buffer; }
[ "function", "(", ")", "{", "var", "buffer", "=", "''", ",", "i", "=", "0", ",", "count", "=", "this", ".", "_current_templates", ".", "length", ";", "for", "(", ";", "i", "<", "count", ";", "i", "++", ")", "{", "buffer", "+=", "this", ".", "_cu...
Render current templates @returns {string}
[ "Render", "current", "templates" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10809-L10823
46,881
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(template, previous_template, index) { Firestorm.DOM.insertHTMLAfter(this._getEndElement(previous_template), template.render()); template.broadcastInDOM(); var previous_index = this._current_templates.indexOf(previous_template); if (Lava.schema.DEBUG && previous_index == -1) Lava.t(); this._current_templates.splice(previous_index + 1, 0, template); }
javascript
function(template, previous_template, index) { Firestorm.DOM.insertHTMLAfter(this._getEndElement(previous_template), template.render()); template.broadcastInDOM(); var previous_index = this._current_templates.indexOf(previous_template); if (Lava.schema.DEBUG && previous_index == -1) Lava.t(); this._current_templates.splice(previous_index + 1, 0, template); }
[ "function", "(", "template", ",", "previous_template", ",", "index", ")", "{", "Firestorm", ".", "DOM", ".", "insertHTMLAfter", "(", "this", ".", "_getEndElement", "(", "previous_template", ")", ",", "template", ".", "render", "(", ")", ")", ";", "template",...
Insert template into DOM @param {Lava.system.Template} template @param {Lava.system.Template} previous_template @param {number} index Index of this template in list of all active templates
[ "Insert", "template", "into", "DOM" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10831-L10840
46,882
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(template) { // save, cause we can not retrieve container's DOM elements after broadcastRemove var start_element = this._getStartElement(template), end_element = this._getEndElement(template); // first, we must inform the template, that it's going to be removed: to allow it's child views to interact // with nodes while they are still in DOM template.broadcastRemove(); if (start_element == end_element) { Firestorm.Element.destroy(start_element); } else { // remove everything between tags and tags themselves Firestorm.DOM.clearOuterRange(start_element, end_element); } Firestorm.Array.exclude(this._current_templates, template); }
javascript
function(template) { // save, cause we can not retrieve container's DOM elements after broadcastRemove var start_element = this._getStartElement(template), end_element = this._getEndElement(template); // first, we must inform the template, that it's going to be removed: to allow it's child views to interact // with nodes while they are still in DOM template.broadcastRemove(); if (start_element == end_element) { Firestorm.Element.destroy(start_element); } else { // remove everything between tags and tags themselves Firestorm.DOM.clearOuterRange(start_element, end_element); } Firestorm.Array.exclude(this._current_templates, template); }
[ "function", "(", "template", ")", "{", "// save, cause we can not retrieve container's DOM elements after broadcastRemove", "var", "start_element", "=", "this", ".", "_getStartElement", "(", "template", ")", ",", "end_element", "=", "this", ".", "_getEndElement", "(", "te...
Remove template from DOM @param {Lava.system.Template} template
[ "Remove", "template", "from", "DOM" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10846-L10869
46,883
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(function_name) { for (var i = 0, count = this._current_templates.length; i < count; i++) { this._current_templates[i][function_name](); } }
javascript
function(function_name) { for (var i = 0, count = this._current_templates.length; i < count; i++) { this._current_templates[i][function_name](); } }
[ "function", "(", "function_name", ")", "{", "for", "(", "var", "i", "=", "0", ",", "count", "=", "this", ".", "_current_templates", ".", "length", ";", "i", "<", "count", ";", "i", "++", ")", "{", "this", ".", "_current_templates", "[", "i", "]", "...
Broadcast callback to children @param {string} function_name
[ "Broadcast", "callback", "to", "children" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L10913-L10921
46,884
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(template, previous_template, index, current_templates) { var animation = this._animations_by_template_guid[template.guid]; if (Lava.schema.DEBUG && animation && !template.isInDOM()) Lava.t(); if (template.isInDOM()) { // first template does not require moving previous_template && this._moveTemplate(template, previous_template, current_templates); } else { if (previous_template) { this._insertTemplate(template, previous_template, index); } else { this._insertFirstTemplate(template); } animation = this._createAnimation(template, index); } if (animation) { animation.resetDirection(); animation.safeStart(); } }
javascript
function(template, previous_template, index, current_templates) { var animation = this._animations_by_template_guid[template.guid]; if (Lava.schema.DEBUG && animation && !template.isInDOM()) Lava.t(); if (template.isInDOM()) { // first template does not require moving previous_template && this._moveTemplate(template, previous_template, current_templates); } else { if (previous_template) { this._insertTemplate(template, previous_template, index); } else { this._insertFirstTemplate(template); } animation = this._createAnimation(template, index); } if (animation) { animation.resetDirection(); animation.safeStart(); } }
[ "function", "(", "template", ",", "previous_template", ",", "index", ",", "current_templates", ")", "{", "var", "animation", "=", "this", ".", "_animations_by_template_guid", "[", "template", ".", "guid", "]", ";", "if", "(", "Lava", ".", "schema", ".", "DEB...
Insert the template into DOM and apply corresponding animation @param {Lava.system.Template} template @param {Lava.system.Template} previous_template @param {number} index Index of this template in list of all active templates @param {Array.<Lava.system.Template>} current_templates
[ "Insert", "the", "template", "into", "DOM", "and", "apply", "corresponding", "animation" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11074-L11108
46,885
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(template) { var animation = this._animations_by_template_guid[template.guid]; if (!animation && template.isInDOM()) { animation = this._createAnimation(template); } if (animation) { animation.reverseDirection(); animation.safeStart(); } }
javascript
function(template) { var animation = this._animations_by_template_guid[template.guid]; if (!animation && template.isInDOM()) { animation = this._createAnimation(template); } if (animation) { animation.reverseDirection(); animation.safeStart(); } }
[ "function", "(", "template", ")", "{", "var", "animation", "=", "this", ".", "_animations_by_template_guid", "[", "template", ".", "guid", "]", ";", "if", "(", "!", "animation", "&&", "template", ".", "isInDOM", "(", ")", ")", "{", "animation", "=", "thi...
Apply template removal animation and remove element from DOM in the end of it @param {Lava.system.Template} template
[ "Apply", "template", "removal", "animation", "and", "remove", "element", "from", "DOM", "in", "the", "end", "of", "it" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11114-L11131
46,886
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(animation) { var template = this._templates_by_animation_guid[animation.guid]; if (animation.isReversed()) { this._onRemovalComplete(animation, template); this._fire('removal_complete', template); } else { this._onInsertionComplete(animation, template); this._fire('insertion_complete', template); } delete this._templates_by_animation_guid[animation.guid]; delete this._animations_by_template_guid[template.guid]; }
javascript
function(animation) { var template = this._templates_by_animation_guid[animation.guid]; if (animation.isReversed()) { this._onRemovalComplete(animation, template); this._fire('removal_complete', template); } else { this._onInsertionComplete(animation, template); this._fire('insertion_complete', template); } delete this._templates_by_animation_guid[animation.guid]; delete this._animations_by_template_guid[template.guid]; }
[ "function", "(", "animation", ")", "{", "var", "template", "=", "this", ".", "_templates_by_animation_guid", "[", "animation", ".", "guid", "]", ";", "if", "(", "animation", ".", "isReversed", "(", ")", ")", "{", "this", ".", "_onRemovalComplete", "(", "an...
Cleanup animation instance and update state of it's template @param {Lava.animation.Abstract} animation
[ "Cleanup", "animation", "instance", "and", "update", "state", "of", "it", "s", "template" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11137-L11156
46,887
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(config, widget, parent_view, template, properties) { var name, argument, constructor; this.guid = Lava.guid++; if (Lava.schema.DEBUG && config.id && !Lava.isValidId(config.id)) Lava.t(); if ('id' in config) { this.id = config.id; } if ('label' in config) { this.label = config.label; } Lava.view_manager.registerView(this); this._config = config; this._widget = widget; this._template = template; if (parent_view) { this._parent_view = parent_view; this._parent_with_container = parent_view.getContainer() ? parent_view : parent_view.getParentWithContainer(); this.depth = parent_view.depth + 1; } this._initMembers(properties); for (name in config.assigns) { if (config.assigns[name].once) { argument = new Lava.scope.Argument(config.assigns[name], this, this._widget); this.set(name, argument.getValue()); argument.destroy(); } else { if (name in this._property_bindings_by_property) Lava.t("Error initializing assign: property binding already created"); this._property_bindings_by_property[name] = new Lava.scope.PropertyBinding(this, name, config.assigns[name]); } } if ('container' in config) { constructor = Lava.ClassManager.getConstructor(config.container['type'], 'Lava.view.container'); this._container = new constructor(this, config.container, widget); } this._postInit(); if ('roles' in config) Lava.view_manager.dispatchRoles(this, config.roles); }
javascript
function(config, widget, parent_view, template, properties) { var name, argument, constructor; this.guid = Lava.guid++; if (Lava.schema.DEBUG && config.id && !Lava.isValidId(config.id)) Lava.t(); if ('id' in config) { this.id = config.id; } if ('label' in config) { this.label = config.label; } Lava.view_manager.registerView(this); this._config = config; this._widget = widget; this._template = template; if (parent_view) { this._parent_view = parent_view; this._parent_with_container = parent_view.getContainer() ? parent_view : parent_view.getParentWithContainer(); this.depth = parent_view.depth + 1; } this._initMembers(properties); for (name in config.assigns) { if (config.assigns[name].once) { argument = new Lava.scope.Argument(config.assigns[name], this, this._widget); this.set(name, argument.getValue()); argument.destroy(); } else { if (name in this._property_bindings_by_property) Lava.t("Error initializing assign: property binding already created"); this._property_bindings_by_property[name] = new Lava.scope.PropertyBinding(this, name, config.assigns[name]); } } if ('container' in config) { constructor = Lava.ClassManager.getConstructor(config.container['type'], 'Lava.view.container'); this._container = new constructor(this, config.container, widget); } this._postInit(); if ('roles' in config) Lava.view_manager.dispatchRoles(this, config.roles); }
[ "function", "(", "config", ",", "widget", ",", "parent_view", ",", "template", ",", "properties", ")", "{", "var", "name", ",", "argument", ",", "constructor", ";", "this", ".", "guid", "=", "Lava", ".", "guid", "++", ";", "if", "(", "Lava", ".", "sc...
Create an instance of the view, including container and assigns; dispatch roles @param {_cView} config @param {Lava.widget.Standard} widget @param {Lava.view.Abstract} parent_view @param {Lava.system.Template} template @param {Object} properties
[ "Create", "an", "instance", "of", "the", "view", "including", "container", "and", "assigns", ";", "dispatch", "roles" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11398-L11458
46,888
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(depth) { var root = this; while (depth > 0) { root = root.getParentView(); if (!root) Lava.t("Error evaluating depth: parent view does not exist"); depth--; } return root; }
javascript
function(depth) { var root = this; while (depth > 0) { root = root.getParentView(); if (!root) Lava.t("Error evaluating depth: parent view does not exist"); depth--; } return root; }
[ "function", "(", "depth", ")", "{", "var", "root", "=", "this", ";", "while", "(", "depth", ">", "0", ")", "{", "root", "=", "root", ".", "getParentView", "(", ")", ";", "if", "(", "!", "root", ")", "Lava", ".", "t", "(", "\"Error evaluating depth:...
Get N'th parent of the view @param {number} depth The number of view's parent you want to get @returns {Lava.view.Abstract}
[ "Get", "N", "th", "parent", "of", "the", "view" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11535-L11551
46,889
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { if (this._is_inDOM) { if (this._container) { this._is_dirty = true; if (!this._is_queued_for_refresh) { Lava.view_manager.scheduleViewRefresh(this); this._is_queued_for_refresh = true; } } else if (this._parent_with_container) { this._parent_with_container.trySetDirty(); } } }
javascript
function() { if (this._is_inDOM) { if (this._container) { this._is_dirty = true; if (!this._is_queued_for_refresh) { Lava.view_manager.scheduleViewRefresh(this); this._is_queued_for_refresh = true; } } else if (this._parent_with_container) { this._parent_with_container.trySetDirty(); } } }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_is_inDOM", ")", "{", "if", "(", "this", ".", "_container", ")", "{", "this", ".", "_is_dirty", "=", "true", ";", "if", "(", "!", "this", ".", "_is_queued_for_refresh", ")", "{", "Lava", ".", "vie...
This view needs to be refreshed. If it has a container - then it can refresh itself independently, but views without container must ask their parents to refresh them
[ "This", "view", "needs", "to", "be", "refreshed", ".", "If", "it", "has", "a", "container", "-", "then", "it", "can", "refresh", "itself", "independently", "but", "views", "without", "container", "must", "ask", "their", "parents", "to", "refresh", "them" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11557-L11580
46,890
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var buffer = this._renderContent(), result; if (this._container) { result = this._container.wrap(buffer); } else { result = buffer; } return result; }
javascript
function() { var buffer = this._renderContent(), result; if (this._container) { result = this._container.wrap(buffer); } else { result = buffer; } return result; }
[ "function", "(", ")", "{", "var", "buffer", "=", "this", ".", "_renderContent", "(", ")", ",", "result", ";", "if", "(", "this", ".", "_container", ")", "{", "result", "=", "this", ".", "_container", ".", "wrap", "(", "buffer", ")", ";", "}", "else...
Render the view, including container and all it's inner content @returns {string} The HTML representation of the view
[ "Render", "the", "view", "including", "container", "and", "all", "it", "s", "inner", "content" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11624-L11641
46,891
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(id) { if (Lava.schema.DEBUG && !id) Lava.t(); return Lava.view_manager.getViewById(id); }
javascript
function(id) { if (Lava.schema.DEBUG && !id) Lava.t(); return Lava.view_manager.getViewById(id); }
[ "function", "(", "id", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "id", ")", "Lava", ".", "t", "(", ")", ";", "return", "Lava", ".", "view_manager", ".", "getViewById", "(", "id", ")", ";", "}" ]
Get a view with given user-defined id @param {string} id @returns {Lava.view.Abstract}
[ "Get", "a", "view", "with", "given", "user", "-", "defined", "id" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11780-L11786
46,892
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(guid) { if (Lava.schema.DEBUG && !guid) Lava.t(); return Lava.view_manager.getViewByGuid(guid); }
javascript
function(guid) { if (Lava.schema.DEBUG && !guid) Lava.t(); return Lava.view_manager.getViewByGuid(guid); }
[ "function", "(", "guid", ")", "{", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "guid", ")", "Lava", ".", "t", "(", ")", ";", "return", "Lava", ".", "view_manager", ".", "getViewByGuid", "(", "guid", ")", ";", "}" ]
Get a view by GUID @param {_tGUID} guid @returns {Lava.view.Abstract}
[ "Get", "a", "view", "by", "GUID" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11793-L11799
46,893
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(path_config) { var result = this['locateViewBy' + path_config.locator_type](path_config.locator); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ':' + path_config.locator); if ('depth' in path_config) { result = result.getViewByDepth(path_config.depth); } return result; }
javascript
function(path_config) { var result = this['locateViewBy' + path_config.locator_type](path_config.locator); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ':' + path_config.locator); if ('depth' in path_config) { result = result.getViewByDepth(path_config.depth); } return result; }
[ "function", "(", "path_config", ")", "{", "var", "result", "=", "this", "[", "'locateViewBy'", "+", "path_config", ".", "locator_type", "]", "(", "path_config", ".", "locator", ")", ";", "if", "(", "Lava", ".", "schema", ".", "DEBUG", "&&", "!", "result"...
Find a view in hierarchy of parents by the given route @param {_cScopeLocator|_cKnownViewLocator} path_config @returns {Lava.view.Abstract}
[ "Find", "a", "view", "in", "hierarchy", "of", "parents", "by", "the", "given", "route" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11806-L11820
46,894
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(name) { var view = this; while (view && !view.isset(name)) { view = view.getParentView(); } return view; }
javascript
function(name) { var view = this; while (view && !view.isset(name)) { view = view.getParentView(); } return view; }
[ "function", "(", "name", ")", "{", "var", "view", "=", "this", ";", "while", "(", "view", "&&", "!", "view", ".", "isset", "(", "name", ")", ")", "{", "view", "=", "view", ".", "getParentView", "(", ")", ";", "}", "return", "view", ";", "}" ]
Get a parent with property `name` defined @param {string} name @returns {Lava.view.Abstract}
[ "Get", "a", "parent", "with", "property", "name", "defined" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11827-L11839
46,895
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(path_config) { var view, i = 0, count, result, tail = path_config.tail; if ('property_name' in path_config) { view = ('locator_type' in path_config) ? this.locateViewByPathConfig(path_config) : this; view = view.locateViewWithProperty(path_config.property_name); if (Lava.schema.DEBUG && !view) Lava.t("Property not found: " + path_config.property_name); result = view.getDataBinding(path_config.property_name); } else { if (Lava.schema.DEBUG && !('locator_type' in path_config)) Lava.t("Malformed scope path (1)"); if (Lava.schema.DEBUG && !tail) Lava.t("Malformed scope path (2)"); result = this.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ": " + path_config.locator + ", depth:" + path_config.depth); } if (tail) { for (count = tail.length; i < count; i++) { result = (typeof(tail[i]) == 'object') ? result.getSegment(this.getScopeByPathConfig(tail[i])) : result.getDataBinding(tail[i]); } } return result; }
javascript
function(path_config) { var view, i = 0, count, result, tail = path_config.tail; if ('property_name' in path_config) { view = ('locator_type' in path_config) ? this.locateViewByPathConfig(path_config) : this; view = view.locateViewWithProperty(path_config.property_name); if (Lava.schema.DEBUG && !view) Lava.t("Property not found: " + path_config.property_name); result = view.getDataBinding(path_config.property_name); } else { if (Lava.schema.DEBUG && !('locator_type' in path_config)) Lava.t("Malformed scope path (1)"); if (Lava.schema.DEBUG && !tail) Lava.t("Malformed scope path (2)"); result = this.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ": " + path_config.locator + ", depth:" + path_config.depth); } if (tail) { for (count = tail.length; i < count; i++) { result = (typeof(tail[i]) == 'object') ? result.getSegment(this.getScopeByPathConfig(tail[i])) : result.getDataBinding(tail[i]); } } return result; }
[ "function", "(", "path_config", ")", "{", "var", "view", ",", "i", "=", "0", ",", "count", ",", "result", ",", "tail", "=", "path_config", ".", "tail", ";", "if", "(", "'property_name'", "in", "path_config", ")", "{", "view", "=", "(", "'locator_type'"...
Get a scope or property binding by the given route @param {_cScopeLocator} path_config @returns {_iValueContainer}
[ "Get", "a", "scope", "or", "property", "binding", "by", "the", "given", "route" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11846-L11890
46,896
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(path_config) { var view, i = 0, count, result, tail = path_config.tail, property_name; if ('property_name' in path_config) { view = ('locator_type' in path_config) ? this.locateViewByPathConfig(path_config) : this; view = view.locateViewWithProperty(path_config.property_name); result = view.get(path_config.property_name); } else { if (Lava.schema.DEBUG && !('locator_type' in path_config)) Lava.t("Malformed scope path (1)"); if (Lava.schema.DEBUG && !tail) Lava.t("Malformed scope path (2)"); result = this.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ": " + path_config.locator + ", depth:" + path_config.depth); } if (tail) { for (count = tail.length; i < count; i++) { property_name = (typeof(tail[i]) == 'object') ? this.evalPathConfig(tail[i]) : tail[i]; if (result.isCollection && /^\d+$/.test(property_name)) { result = result.getValueAt(+property_name); } else if (result.isProperties) { result = result.get(property_name); } else { result = result[property_name]; } if (!result) { break; } } } return result; }
javascript
function(path_config) { var view, i = 0, count, result, tail = path_config.tail, property_name; if ('property_name' in path_config) { view = ('locator_type' in path_config) ? this.locateViewByPathConfig(path_config) : this; view = view.locateViewWithProperty(path_config.property_name); result = view.get(path_config.property_name); } else { if (Lava.schema.DEBUG && !('locator_type' in path_config)) Lava.t("Malformed scope path (1)"); if (Lava.schema.DEBUG && !tail) Lava.t("Malformed scope path (2)"); result = this.locateViewByPathConfig(path_config); if (Lava.schema.DEBUG && !result) Lava.t("View not found. " + path_config.locator_type + ": " + path_config.locator + ", depth:" + path_config.depth); } if (tail) { for (count = tail.length; i < count; i++) { property_name = (typeof(tail[i]) == 'object') ? this.evalPathConfig(tail[i]) : tail[i]; if (result.isCollection && /^\d+$/.test(property_name)) { result = result.getValueAt(+property_name); } else if (result.isProperties) { result = result.get(property_name); } else { result = result[property_name]; } if (!result) { break; } } } return result; }
[ "function", "(", "path_config", ")", "{", "var", "view", ",", "i", "=", "0", ",", "count", ",", "result", ",", "tail", "=", "path_config", ".", "tail", ",", "property_name", ";", "if", "(", "'property_name'", "in", "path_config", ")", "{", "view", "=",...
Get value of the route without creating scopes @param {_cScopeLocator} path_config @returns {*}
[ "Get", "value", "of", "the", "route", "without", "creating", "scopes" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11897-L11958
46,897
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(property_name) { if (!(property_name in this._property_bindings_by_property)) { this._property_bindings_by_property[property_name] = new Lava.scope.PropertyBinding(this, property_name); } return this._property_bindings_by_property[property_name]; }
javascript
function(property_name) { if (!(property_name in this._property_bindings_by_property)) { this._property_bindings_by_property[property_name] = new Lava.scope.PropertyBinding(this, property_name); } return this._property_bindings_by_property[property_name]; }
[ "function", "(", "property_name", ")", "{", "if", "(", "!", "(", "property_name", "in", "this", ".", "_property_bindings_by_property", ")", ")", "{", "this", ".", "_property_bindings_by_property", "[", "property_name", "]", "=", "new", "Lava", ".", "scope", "....
Get a binding to this view's property @param {string} property_name @returns {Lava.scope.PropertyBinding}
[ "Get", "a", "binding", "to", "this", "view", "s", "property" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L11965-L11975
46,898
kogarashisan/LiquidLava
lib/packages/core-classes.js
function() { var i = 0, removed_templates = []; for (; i < this._current_count; i++) { removed_templates.push(this._current_hash[this._current_uids[i]]); } removed_templates.length && this._removeTemplates(removed_templates); this._current_count = 0; this._current_hash = {}; this._current_uids = []; this._current_templates = []; this._setCount(0); }
javascript
function() { var i = 0, removed_templates = []; for (; i < this._current_count; i++) { removed_templates.push(this._current_hash[this._current_uids[i]]); } removed_templates.length && this._removeTemplates(removed_templates); this._current_count = 0; this._current_hash = {}; this._current_uids = []; this._current_templates = []; this._setCount(0); }
[ "function", "(", ")", "{", "var", "i", "=", "0", ",", "removed_templates", "=", "[", "]", ";", "for", "(", ";", "i", "<", "this", ".", "_current_count", ";", "i", "++", ")", "{", "removed_templates", ".", "push", "(", "this", ".", "_current_hash", ...
Scope has created a new instance of Enumerable. Now all UIDs belong to the old enumerable, so must get rid of all templates
[ "Scope", "has", "created", "a", "new", "instance", "of", "Enumerable", ".", "Now", "all", "UIDs", "belong", "to", "the", "old", "enumerable", "so", "must", "get", "rid", "of", "all", "templates" ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L12377-L12396
46,899
kogarashisan/LiquidLava
lib/packages/core-classes.js
function(removed_templates) { for (var i = 0, removed_count = removed_templates.length; i < removed_count; i++) { removed_templates[i].destroy(); } }
javascript
function(removed_templates) { for (var i = 0, removed_count = removed_templates.length; i < removed_count; i++) { removed_templates[i].destroy(); } }
[ "function", "(", "removed_templates", ")", "{", "for", "(", "var", "i", "=", "0", ",", "removed_count", "=", "removed_templates", ".", "length", ";", "i", "<", "removed_count", ";", "i", "++", ")", "{", "removed_templates", "[", "i", "]", ".", "destroy",...
Callback that removes templates for removed Enumerable items. Version without Refresher support. @param {Array.<Lava.system.Template>} removed_templates
[ "Callback", "that", "removes", "templates", "for", "removed", "Enumerable", "items", ".", "Version", "without", "Refresher", "support", "." ]
fb8618821a51fad373106b5cc9247464b0a23cf6
https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L12403-L12411