tlmanager (master) doxdox documentation

Development tool

# createUpdateExtensionNotify()

Create notify with new extension version

# executeScripts(tabId, injectDetailsArray)

Execute js files recursively

Parameters

Name Types Description
tabId number null
injectDetailsArray object

# insertCSSs(tabId, injectDetailsArray)

Execute css files recursively

Parameters

Name Types Description
tabId number null
injectDetailsArray object

# MANIFEST_DATA()

Contains all mainfest json data

# onInstallExtension()

On install extension create tab with configuration landing

# onUpdateExtension()

On update extension (major or medium update), create notify with new version and set alert badge.

# _extractShopId(text, regex)

Extract shop id from text by regexp

Parameters

Name Types Description
text String
regex RegExp

# _getComments()

Get html comments texts

# _isTemplateModular2018()

Get if is template modular 2018

# ecommerceData()

# ENV_IGD_PRE_PRODUCTION()

Development testing environment

# ENV_IGD_PRODUCTION()

Development local environment

# ENV_PRE_OPENSAAS()

Development opensaas environment

# ENV_PRODUCTION()

Production environment (no testing, no dev)

# getCache()

Return if web has any cache detected

# getData()

Return all data object

# getEnvironment()

Return environment

# getFluidCache()

Return if web has fluid cache by html comments

# getShopId(text, regex)

Extract shop id from text by regexp

Parameters

Name Types Description
text String
regex RegExp

# getTemplate()

Return template

# getType()

Return type

# TEMPLATE_MODULAR_2018()

Ecommerce source code template 2018

# TYPE_BEYOND()

Ecommerce type beyond (php, twig)

# TYPE_COLD_FUSION()

Ecommerce type cold fusion (cf)

# TYPE_FLUID()

Ecommerce type fluid

# _match()

If node is valid element this method execute the plugin This method has to be overwritten !!

# constructor()

Create a Modifier.

# init(node)

Initialize Modifier logic if node is valid

Parameters

Name Types Description
node HTMLElement - Finded element from ObserverLC to test

# Modifier()

Creates a new Modifier

# constructor()

Create a Observer. Initialize observer and execute Modifier.init from registeredModifiers

# disconnect()

Disconnect observer

# observe(element)

Initialize observer

Parameters

Name Types Description
element HTMLElement - parent observer node

# Observer()

Creates a new Observer

# register(Modifier)

Push Modifier to registeredModifiers

Parameters

Name Types Description
Modifier Modifier

# _getBgImgs(container)

Find all elements inside container and return array of objects with background image src and node.

Parameters

Name Types Description
container object - HTML node

# _getElementAttrName(element)

Of img or picture HTML node returns src attribute name to refresh

Parameters

Name Types Description
element object

# _initCssBackground(background)

Initialize refresh css image background

Parameters

Name Types Description
background object

# _initImg(img)

Initialize refresh image and picture tag

Parameters

Name Types Description
img object

# init()

Initialize GETRefreshImg

# initCssBackgrounds()

Initialize refresh css image backgrounds

# initImgs()

Initialize refresh image and picture tags

# refreshValue()

Refresh get param string

# containerLinesGuide.init()

# _deleteCookie(name, path, domain)

Delete a cookie by name

Parameters

Name Types Description
name String - The name of the cookie to be deleted
path String - The value of the path
domain String - The domain value

# _getContainerOuterWidth()

Return width included paddings of #containerLinesGuide_left Element

# _getContainerPadding()

Return padding left value of #containerLinesGuide_left Element

# _getContainerWidth()

Return width without paddings of #containerLinesGuide_left Element

# _getCookie(name)

Returns a cookie value if a name is specified. Otherwise returns the entire cookies as an object

Parameters

Name Types Description
name String - The name of the cookie to fetch the value for. Returns the entire map of cookies if not specified

# _getStyle()

Return js calculated css, static css located into ./index.css

# _setCookie(name, value, options)

Set a cookie

Parameters

Name Types Description
name String - The name of the cookie to be set
value String Number
options Object - supports any cookie option like path, expires, maxAge and domain. MDN Cookie Reference

# _setSizeValues()

Set container and padding data values on window resize

# _windowResizeListener()

Update container and padding data values on window resize

# cookieName()

Cookie Name

# create()

Create containerLinesGuide, add elements and cookie

# destroy()

Destroy containerLinesGuide, remove elements and cookie

# init(load)

Initialize containerLinesGuide

Parameters

Name Types Description
load Boolean - Indicate if call is in load or by click directive from popup

# containerLinesGuide.init()

# checkCheckbox(input, checked)

Simulate click event over check if checked param and already check state is different

Parameters

Name Types Description
input object
checked boolean

# fillCountry(divField, mutationSelector)

Fill country block

Parameters

Name Types Description
divField object
mutationSelector string

# fillInputVal(value, node)

Fill input with string value

Parameters

Name Types Description
value string
node object

# formSubmit()

Submit the form by button (force)

# getFirstAndLastName(_username)

Form user saved username define first and last names field values.

Parameters

Name Types Description
_username string

# mutationObserver(divField, mutationSelector)

Create MutationObserver for fillCountry()

Parameters

Name Types Description
divField object
mutationSelector string

# showErrorUserDataNotify()

Inject script with small error notify with Fluid.notify plugin

# simulateEvent(element, type)

Simulate native event change

Parameters

Name Types Description
element object
type string - Event type

# _addModuleMarkup(element)

Add HTML structure for display module limits and her name

Parameters

Name Types Description
element object

# _clean(element)

Clean all ShowModulesTemplate2018 system of module

Parameters

Name Types Description
element object

# _cleanElements()

Destroy modules markup

# _getElementPositionBottom(element)

Return element position bottom

Parameters

Name Types Description
element object

# _getElementPositions(element)

Returns element cardinal margins

Parameters

Name Types Description
element object

# _getElementPositionTop(element)

Return element position top

Parameters

Name Types Description
element object

# _getMarkupElementsObj(element)

Return all markup module elements

Parameters

Name Types Description
element object

# _initElements()

Initialize modules markup

# _isValidModule()

Returns if module is valid for display markup

# alreadyShowing()

Indicates if ShowModulesTemplate2018 system is already initialized

# constructor()

Create a showModulesTemplate2018.

# elements()

HTML nodes to iterate

# s(element)

Returns class with a position css value

Parameters

Name Types Description
element object

# s()

Create a unique class

# ShowModulesTemplate2018()

Creates a new ShowModulesTemplate2018

# sList(elementType, classList, text)

Create an HTML node

Parameters

Name Types Description
elementType string
classList string[]
text string

# sName(className, positions)

Append calculated module markup styles

Parameters

Name Types Description
className string
positions object

# zIndex()

z-index of each module that is being decremented.

# _copyHandler(target, event)

Copy event handler

Parameters

Name Types Description
target Object
event Object

# _downloadHandler(target, event)

Download event handler

Parameters

Name Types Description
target Object
event Object

# _events()

Add event listeners

# _findDefsIcons(node)

Search within a node for elements to extract their svg

Parameters

Name Types Description
node object

# _findIcons()

Find all svg icons.

# _getElAttributes(node)

Get all HTMLElement attributes

Parameters

Name Types Description
node HTMLElement - Element to substract attributes

# _insertIcons()

For each icon generate html structure.

# _insertWidget()

Insert #showSvgIcons_layout node before end

# _parseImgIcon(node, src, type)

Get HTML parsed code from img node.

Parameters

Name Types Description
node HTMLElement - Img html node.
src String - Image source
type String - Icon type

# _parseSvgDefIcon(node)

Get HTML parsed code from element inside defs node.

Parameters

Name Types Description
node HTMLElement - Svg html node.

# _parseSvgIcon(node)

Get HTML parsed code from svg node.

Parameters

Name Types Description
node HTMLElement - Svg html node.

# _parseSymbolIcon(node)

Get HTML parsed code from symbol node.

Parameters

Name Types Description
node HTMLElement - Symbol html node.

# _removeDuplicateds(findedIcons)

Remove duplicated icons from array based on code Icon property

Parameters

Name Types Description
findedIcons Array.<Icon> - Array of Icon objects

# constructor()

Create a showSvgIcons. If the widget already exists it destroys it and reinitializes it.

# destroy()

Destroy created widget.

# document.getElementById()

Inserted widget wrapper

# getEl()

Get the el value.

# getIcons()

Get the icons value.

# getTotalIcons()

Get the totalIcons value.

# getUniqueCssBgIcons()

Get the uniqueCssBgIcons value.

# getUniqueIcons()

Get the uniqueIcons value.

# getUniqueImgIcons()

Get the uniqueImgIcons value.

# getUniqueSvgIcons()

Get the uniqueSvgIcons value.

# getUniqueSymbolIcons()

Get the uniqueSymbolIcons value.

# icons()

Finded and unique svg, symbol and img svg elements

# setDarkTheme()

If web theme is dark set body class

# setEl(el)

Set the el value.

Parameters

Name Types Description
el HTMLElement - The el value.

# setIcons(icons)

Set the icons value.

Parameters

Name Types Description
icons Array.<Icon> - The icons value.

# setTotalIcons(totalIcons)

Set the totalIcons value.

Parameters

Name Types Description
totalIcons Number - The totalIcons value.

# setUniqueCssBgIcons(uniqueCssBgIcons)

Set the uniqueCssBgIcons value.

Parameters

Name Types Description
uniqueCssBgIcons Number - The uniqueCssBgIcons value.

# setUniqueIcons(uniqueIcons)

Set the uniqueIcons value.

Parameters

Name Types Description
uniqueIcons Number - The uniqueIcons value.

# setUniqueImgIcons(uniqueImgIcons)

Set the uniqueImgIcons value.

Parameters

Name Types Description
uniqueImgIcons Number - The uniqueImgIcons value.

# setUniqueSvgIcons(uniqueSvgIcons)

Set the uniqueSvgIcons value.

Parameters

Name Types Description
uniqueSvgIcons Number - The uniqueSvgIcons value.

# setUniqueSymbolIcons(uniqueSymbolIcons)

Set the uniqueSymbolIcons value.

Parameters

Name Types Description
uniqueSymbolIcons Number - The uniqueSymbolIcons value.

# ShowSvgIcons()

Creates a new ShowSvgIcons

# totalIcons()

Total finded icons

# uniqueCssBgIcons()

Total unique css bg type finded icons

# uniqueIcons()

Total unique finded icons

# uniqueImgIcons()

Total unique img type finded icons

# uniqueSvgIcons()

Total unique svg type finded icons

# uniqueSymbolIcons()

Total unique symbol type finded icons

# setCookie(name, value, days)

Set a cookie

Parameters

Name Types Description
name String - The name of the cookie to be set
value String Number
days Number - Days of cookie

# constructor()

Create a FlushRedisIgdDomain.

# FlushRedisIgdDomain()

Creates a new FlushRedisIgdDomain

# window.location.origin()

Location origin string url

# console(message, debugEl, level, bgColor, textColor)

Parameters

Name Types Description
message string - Text to show in console log
debugEl any - Element to debug
level string - Level of log
bgColor string - Background color badge
textColor string - Text color badge

# error(message, debugEl)

Parameters

Name Types Description
message string - Text to show in console log
debugEl any - Element to debug

# info(message, debugEl)

Parameters

Name Types Description
message string - Text to show in console log
debugEl any - Element to debug

# log()

# success(message, debugEl)

Parameters

Name Types Description
message string - Text to show in console log
debugEl any - Element to debug

# warn(message, debugEl)

Parameters

Name Types Description
message string - Text to show in console log
debugEl any - Element to debug

# document.getElementById()

LC is development open saas

# document.getElementById()

Lc is production open saas

# document.getElementById()

User has login in LC

# LogiInfo()

Creates a new LoginInfo

# test()

Development lc is (adm.igd.production)

# test()

Development lc is (adm.igd.pre.production)

# test()

Production lc is (8x.logicommerce.net)

# test()

Production lc is (8x-hk.logicommerce.net)

# test()

Production lc is (8x.logicommerce.cn)

# constructor()

# ObserverLC()

Creates a new ObserverLC

# _getNextPublishVersion()

Return next publish version

# _getPartByRegexp(data, regexp, defaultValue)

Find a value into data.id els return default

Parameters

Name Types Description
data object - Dataset of last publication row of publications window
regexp RegExp - Regexp to find
defaultValue string

# _getVersionNextNumberPart(versionStrPart, versionNumbersArr)

Return concat of next version value

Parameters

Name Types Description
versionStrPart string - ('v', 'V', ...)
versionNumbersArr array - Array of number part [2, 3, 1] from '2.3.1' for example.

# _match()

If node contains #popupPublishForm find and set next publish version

# AutoIncrVersionPublish()

Creates a new AutoIncrVersionPublish

# constructor()

Create a AutoIncrVersionPublish.

# tNumber(number, lastNumber)

Return incremented penultimate number

Parameters

Name Types Description
number string
lastNumber number

# tNumberIncr(number)

Return incremented last number

Parameters

Name Types Description
number string

# _executeDL()

Execute ajax to downloadLocation

# _isBeyondLc()

Detect if Logicommerce is beyond version

# BackgroundLC()

Creates a new BackgroundLC

# constructor(chromeData)

Create a DeveloperBar.

Parameters

Name Types Description
chromeData object

# ses()

Add classes to html node

# _appendStructure()

Called in _initEnvironment, add bar html structure.

# _devOSButtonsWindow()

Change dev open saas buttons text

# _flushRedisBetter()

Open saas flush button custom event

# _flushRedisBetterHandler(event)

Open saas flush button custom event handler

Parameters

Name Types Description
event object

# _initDevOpenSaas()

Initialize bar if LC is dev open saas

# _initEnvironment()

Initialize bar depends LC environment

# _initProOpenSaas()

Initialize bar if LC is production open saas

# _initSearch()

Initialize bar search system

# constructor(logiInfo)

Create a DeveloperBar.

Parameters

Name Types Description
logiInfo LogiInfo

# DeveloperBar()

Creates a new DeveloperBar

# executeTagScript(scriptString)

Append script and execute-it into body

Parameters

Name Types Description
scriptString string

# _createBadge(text)

Create span with badge

Parameters

Name Types Description
text String - Example: [textfinded] -> textfinded

# _createBadgeIcon(textContent)

Create span with badge icon, for each type search and mathc type of icon

Parameters

Name Types Description
textContent String - textContent of nameLabel property

# _createInnerTextNode(textContent)

Create span with simple text

Parameters

Name Types Description
textContent String - textContent of nameLabel property

# _makeSafeForCSS(name)

Util, convert string to valid class attr string

Parameters

Name Types Description
name String

# _match()

If node contains .nameLabel HTMLElement edit all inner HTML

# BetterGroupHeaders()

Creates a new BetterGroupHeaders

# constructor()

Create a BetterGroupHeaders.

# _match()

If node contains .pagesTreeContainer HTMLElement edit all inner HTML

# BetterTreeLevels()

Creates a new BetterTreeLevels

# constructor()

Create a BetterTreeLevels.

# _match()

If node contains .pagesTreeContainer HTMLElement edit all inner HTML

# constructor()

Create a GridView.

# GridView()

Creates a new GridView

# _createButton(option)

From an option of a selector create a button

Parameters

Name Types Description
option HTMLOptionElement

# _createWrap()

Create an element that will contain the buttons

# _getButtonText(option)

From a select option it returns the text that will go inside the new button

Parameters

Name Types Description
option HTMLOptionElement

# _initSelect()

For each select option create a button and add events to control original html select

# _match()

If node contains select#sandbox init plugin and hide select

# constructor(selector, regexTextButton, regexFindedInData, regexWrapText)

Create a SandboxLoginButtons.

Parameters

Name Types Description
selector String
regexTextButton RegExp
regexFindedInData Boolean
regexWrapText Boolean

# insertAfter(newNode, referenceNode)

Insert an element right after another element, siblings.

Parameters

Name Types Description
newNode HTMLElement
referenceNode HTMLElement

# SandboxLoginButtons()

Creates a new SandboxLoginButtons

# _match()

If find node search find text elements and initialize tickets search

# changeLines(elements)

For each html element find tickets and add links

Parameters

Name Types Description
elements Array<HTMLElement>

# constructor()

Create a TicketRefLinks.

# getLineHtml(html, tickets)

If html string contains tickets replace it with ticket link, else return defautl html.

Parameters

Name Types Description
html string
tickets array<string>

# getTicketLink(ticket)

Return string html of ticket

Parameters

Name Types Description
ticket string

# TicketRefLinks()

Creates a new TicketRefLinks

# addWidget()

Destroy existent widget and add new widget

# destroy()

Destroy the widget

# escapeRegExp(str)

Escape string regexp

Parameters

Name Types Description
str String - Regex string to escape

# getCss()

Return calculated css part, other css is into ./index.css

# getFontWesomeIcons()

# getOutputElement(key, text)

Return widget column with textarea, if key is svg add a download button

Parameters

Name Types Description
key String - textarea key output
text String - textarea label text

# getStructure()

Return widget main structure

# init(raw, color)

Initialize object function

Parameters

Name Types Description
raw String - Svg icon html
color String - Hex or rgb/a color string

# replaceAll(str, find, replace)

Replace text by regexp string

Parameters

Name Types Description
str String - String to aply replace
find String - Regex string
replace String - Replace string

# setBg()

Set bg property, transforming code of svg property

# setName()

Set name property

# setSvg()

Set svg property, cleaning original code (raw)

# setSymbol()

Set symbol property, transforming code of svg property

# setUse()

Set use property

# constructor()

# ObserverZendesk()

Creates a new ObserverZendesk

# api_showManyOrganizations(idList)

https://developer.zendesk.com/rest_api/docs/support/organizations#show-many-organizations

Parameters

Name Types Description
idList string - String list, organitzations id list

# api_showOrganization(id)

https://developer.zendesk.com/rest_api/docs/support/organizations#show-organization

Parameters

Name Types Description
id string - Organitzation id

# api_showUser(id)

https://developer.zendesk.com/rest_api/docs/support/users#show-user

Parameters

Name Types Description
id string - User id

# api_updateOrganization(id, obj)

https://developer.zendesk.com/rest_api/docs/support/organizations#update-organization

Parameters

Name Types Description
id string - Organitzation id
obj object - Organization fields to update object

# ZENDESK_API_HEADERS()

Define api headers

# ZENDESK_API_TOKEN()

Define user session api token

# _match()

On finded changed nodes, up to tbody and update all tbody rows

# constructor(selector, replyTicketConfirmPopup)

Create a CoolTicketSubmit.

Parameters

Name Types Description
selector string
replyTicketConfirmPopup boolean

# CoolTicketSubmit()

Creates a new CoolTicketSubmit

# createElementFromHTML(htmlString)

Parameters

Name Types Description
htmlString string

# createMenuExpanderFull(buttonGroup)

Parameters

Name Types Description
buttonGroup object

# createMenuExpanderUnique(buttonGroup)

Parameters

Name Types Description
buttonGroup object

# createUniqueLiNode(text, type)

Parameters

Name Types Description
text string
type string

# destroy(workspace)

Parameters

Name Types Description
workspace object

# executeSubmit(target, replyTicketConfirmPopup)

Parameters

Name Types Description
target object
replyTicketConfirmPopup boolean

# getDropdownLis(workspace)

Parameters

Name Types Description
workspace object

# getNewExpanderItem(li, buttonGroup)

Parameters

Name Types Description
li object
buttonGroup object

# initElement(buttonGroup)

Parameters

Name Types Description
buttonGroup object

# isDestroyable(buttonGroup)

Parameters

Name Types Description
buttonGroup object

# isHidden(el)

Return if html node is visible

Parameters

Name Types Description
el object

# isValidCreateMenuExpanderFull(expanderButton, buttonGroup)

Parameters

Name Types Description
expanderButton object
buttonGroup object

# isValidCreateMenuExpanderUnique(uniqueButton, buttonGroup)

Parameters

Name Types Description
uniqueButton object
buttonGroup object

# prevAll(element, selector)

Parameters

Name Types Description
element object
selector string

# replaceTextElements(elements)

Parameters

Name Types Description
elements object

# ses(li, classes, insideNode)

Parameters

Name Types Description
li object
classes string[]
insideNode object

# sPrevAllElements(elements)

Parameters

Name Types Description
elements object

# NavigationMenu()

Creates a new NavigationMenu

# _match()

On finded changed nodes, up to tbody and update all tbody rows

# addCssVariables()

Add root color css variables

# clearRow(row)

Remove classes of decorateRow()

Parameters

Name Types Description
row HTMLElement

# colorLuminance(hex, lum)

Returns color with luminance modification

Parameters

Name Types Description
hex string
lum number - Accepts positive and negative floats

# constructor(selector, onlyIncidents, colors)

Create a TicketPriorityHighlightColors.

Parameters

Name Types Description
selector string
onlyIncidents boolean
colors object

# decorateRow(row, priorityText)

Add class

Parameters

Name Types Description
row HTMLElement
priorityText string

# getIncident(text)

Returns if this td has priority text

Parameters

Name Types Description
text string

# getRowData(cells)

Returns priority text and if is incident row

Parameters

Name Types Description
cells HTMLCollection

# getTextPriority(text)

Get text priority of if match with this.priorities

Parameters

Name Types Description
text string

# Priority(hasPriority, isIncident)

Returns boolean if the row has to be decorated

Parameters

Name Types Description
hasPriority boolean
isIncident boolean

# TicketPriorityHighlightColors()

Creates a new TicketPriorityHighlightColors

# updateRows()

Update rows highlight

# _createNotify(archvievement, earned)

Create chrome notify

Parameters

Name Types Description
archvievement object - object from achievements.js
earned boolean

# _singleClickLogic(metricsKey, achievementKey)

Logic of an achievement that consists of capturing a single click.

Parameters

Name Types Description
metricsKey string
achievementKey string