summaryrefslogtreecommitdiff
path: root/tau/docs/dox.json
blob: 67ae2ed9ed3a95408f53407bdab6a7b222a23c48 (plain)
1
[{"name":"ns","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Maciej Moczulski <m.moczulski@samsung.com>","Piotr Karny <p.karny@samsung.com>","Tomasz Lukawski <t.lukawski@samsung.com>"],"title":"Core namespace","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns, nsConfig) {\n\t\n\t\t\tvar idNumberCounter = 0,\n\t\t\tcurrentDate = +new Date(),\n\t\t\tslice = [].slice,\n\t\t\trootNamespace = nsConfig.rootNamespace,\n\t\t\tfileName = nsConfig.fileName,\n\t\t\tinfoForLog = function (args) {\n\t\t\t\tvar dateNow = new Date();\n\t\t\t\targs.unshift('[' + rootNamespace + '][' + dateNow.toLocaleString() + ']');\n\t\t\t};","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"return":{"type":"return","types":["string"],"description":""},"name":"getUniqueId","tags":[{"type":"method","string":"getUniqueId"},{"type":"static","string":""},{"type":"return","types":["string"],"description":""},{"type":"member","string":"ns"}],"example":"","brief":"<p>Return unique id</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.getUniqueId = function () {\n\t\t\treturn rootNamespace + \"-\" + ns.getNumberUniqueId() + \"-\" + currentDate;\n\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["number"],"description":""},"name":"getNumberUniqueId","tags":[{"type":"method","string":"getNumberUniqueId"},{"type":"static","string":""},{"type":"return","types":["number"],"description":""},{"type":"member","string":"ns"}],"example":"","brief":"<p>Return unique id</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.getNumberUniqueId = function () {\n\t\t\treturn idNumberCounter++;\n\t\t};"},{"params":[{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"log","tags":[{"type":"method","string":"log"},{"type":"static","string":""},{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns"}],"example":"","brief":"<p>logs supplied messages/arguments</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.log = function (argument) {\n\t\t\tvar args = slice.call(arguments);\n\t\t\tinfoForLog(args);\n\t\t\tif (console) {\n\t\t\t\tconsole.log.apply(console, args);\n\t\t\t}\n\t\t};"},{"params":[{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"warn","tags":[{"type":"method","string":"warn"},{"type":"static","string":""},{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns"}],"example":"","brief":"<p>logs supplied messages/arguments ad marks it as warning</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.warn = function (argument) {\n\t\t\tvar args = slice.call(arguments);\n\t\t\tinfoForLog(args);\n\t\t\tif (console) {\n\t\t\t\tconsole.warn.apply(console, args);\n\t\t\t}\n\t\t};"},{"params":[{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"error","tags":[{"type":"method","string":"error"},{"type":"static","string":""},{"type":"param","types":"...*","name":"argument","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns"}],"example":"","brief":"<p>logs supplied messages/arguments and marks it as error</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.error = function (argument) {\n\t\t\tvar args = slice.call(arguments);\n\t\t\tinfoForLog(args);\n\t\t\tif (console) {\n\t\t\t\tconsole.error.apply(console, args);\n\t\t\t}\n\t\t};"},{"params":[{"type":"param","types":"string","name":"key","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"defaultValue","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Mixed"],"description":""},"name":"get","tags":[{"type":"method","string":"get"},{"type":"param","types":"string","name":"key","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"defaultValue","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Mixed"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns"}],"example":"","brief":"<p>get from nsConfig</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.get = function (key, defaultValue) {\n\t\t\treturn nsConfig[key] === undefined ? defaultValue : nsConfig[key];\n\t\t};"},{"params":[{"type":"param","types":"string","name":"key","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"set","tags":[{"type":"method","string":"set"},{"type":"param","types":"string","name":"key","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns"}],"example":"","brief":"<p>set in nsConfig</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.set = function (key, value) {\n\t\t\tnsConfig[key] = value;\n\t\t};"},{"params":[],"hasParams":false,"return":{"type":"returns","string":"{?string}"},"name":"getFrameworkPath","tags":[{"type":"method","string":"getFrameworkPath"},{"type":"returns","string":"{?string}"},{"type":"member","string":"ns"}],"example":"","brief":"<p>Return path for framework script file.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"ns.getFrameworkPath = function () {\n\t\t\tvar scripts = document.getElementsByTagName('script'),\n\t\t\t\tcountScripts = scripts.length,\n\t\t\t\ti,\n\t\t\t\turl,\n\t\t\t\tarrayUrl,\n\t\t\t\tcount;\n\t\t\tfor (i = 0; i < countScripts; i++) {\n\t\t\t\turl = scripts[i].src;\n\t\t\t\tarrayUrl = url.split('/');\n\t\t\t\tcount = arrayUrl.length;\n\t\t\t\tif (arrayUrl[count - 1] === fileName + '.js' || arrayUrl[count - 1] === fileName + '.min.js') {\n\t\t\t\t\treturn arrayUrl.slice(0, count - 1).join('/');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\n\t\t}(window, window.document, ns, nsConfig));"}]},{"name":"ns.utils","authors":[],"title":"Class with utils functions","brief":"","description":"","isPrivate":false,"isInternal":false,"properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"return":{"type":"return","types":["Function"],"description":""},"name":"cancelAnimationFrame","tags":[{"type":"method","string":"cancelAnimationFrame"},{"type":"return","types":["Function"],"description":""},{"type":"member","string":"ns.utils"},{"type":"static","string":""}],"example":"","brief":"<p>cancelAnimationFrame function</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"utils.cancelAnimationFrame = (window.cancelAnimationFrame ||\n\t\t\t\t\twindow.webkitCancelAnimationFrame ||\n\t\t\t\t\twindow.mozCancelAnimationFrame ||\n\t\t\t\t\twindow.oCancelAnimationFrame ||\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\t// propably wont work if there is any more than 1\n\t\t\t\t\t\t// active animationFrame but we are trying anyway\n\t\t\t\t\t\twindow.clearTimeout(currentFrame);\n\t\t\t\t\t}).bind(window);"},{"params":[],"hasParams":false,"name":"async","tags":[{"type":"method","string":"async"},{"type":"inheritdoc","string":"#requestAnimationFrame"},{"type":"member","string":"ns.utils"},{"type":"static","string":""}],"example":"","brief":"<p>Method make asynchronous call of function</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"utils.async = requestAnimationFrame;"},{"params":[],"hasParams":false,"return":{"type":"return","types":["boolean"],"description":""},"name":"isNumber","tags":[{"type":"method","string":"isNumber"},{"type":"return","types":["boolean"],"description":""},{"type":"member","string":"ns.utils"},{"type":"static","string":""}],"example":"","brief":"<p>Checks if specified string is a number or not</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"utils.isNumber = function (query) {\n\t\t\t\tvar parsed = parseFloat(query);\n\t\t\t\treturn !isNaN(parsed) && isFinite(parsed);\n\t\t\t};\n\n\t\t\tutils.runScript = function (baseUrl, script) {\n\t\t\t\tvar newscript = document.createElement('script'),\n\t\t\t\t\ti,\n\t\t\t\t\tscriptAttributes = script.attributes,\n\t\t\t\t\tcount = script.childNodes.length,\n\t\t\t\t\tsrc = script.getAttribute(\"src\"),\n\t\t\t\t\tpath = utils.path,\n\t\t\t\t\txhrObj,\n\t\t\t\t\tattribute,\n\t\t\t\t\tstatus;\n\n\t\t\t\t// 'src' may become null when none src attribute is set\n\t\t\t\tif (src !== null) {\n\t\t\t\t\tsrc = path.makeUrlAbsolute(src, baseUrl);\n\t\t\t\t}\n\n\t\t\t\t//Copy script tag attributes\n\t\t\t\tfor (i = scriptAttributes.length - 1; i >= 0; i -= 1) {\n\t\t\t\t\tattribute = scriptAttributes[i];\n\t\t\t\t\tif (attribute.name !== 'src') {\n\t\t\t\t\t\tnewscript.setAttribute(attribute.name, attribute.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If external script exists, fetch and insert it inline\n\t\t\t\tif (src) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// get some kind of XMLHttpRequest\n\t\t\t\t\t\txhrObj = new XMLHttpRequest();\n\t\t\t\t\t\t// open and send a synchronous request\n\t\t\t\t\t\txhrObj.open('GET', src, false);\n\t\t\t\t\t\txhrObj.send('');\n\t\t\t\t\t\tstatus = xhrObj.status;\n\t\t\t\t\t\tif (status === 200 || status === 0) {\n\t\t\t\t\t\t\t// add the returned content to a newly created script tag\n\t\t\t\t\t\t\tnewscript.type = \"text/javascript\";\n\t\t\t\t\t\t\tnewscript.text = xhrObj.responseText;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (ignore) {\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (i = 0; i < count; i++) {\n\t\t\t\t\t\tnewscript.appendChild(script.childNodes[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tscript.parentNode.replaceChild(newscript, script);\n\t\t\t};\n\n\t\t\tns.utils = utils;\n\t\t\t}(window, ns));"},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"hashObject","tags":[{"type":"method","string":"hashObject"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"member","string":"ns.utils"},{"type":"static","string":""}],"example":"","brief":"<p>Return hash for object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"hashObject = function (value) {\n\t\t\t\t\tif (value === undefined ||\n\t\t\t\t\t\t\tvalue === null ||\n\t\t\t\t\t\t\tvalue === false) {\n\t\t\t\t\t\tthrow \"Hashed object/primitive can not be undefined, null or false\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (value instanceof Element && value.hasAttribute(\"data-ns-hash\")) {\n\t\t\t\t\t\treturn value.getAttribute(\"data-ns-hash\");\n\t\t\t\t\t}\n\n\t\t\t\t\tif (value instanceof Object) {\n\t\t\t\t\t\tvalue.__tau_hash = value.__tau_hash || ns.getUniqueId();\n\t\t\t\t\t}\n\t\t\t\t\tvar h = (typeof value) + \"-\" + (value instanceof Object ?\n\t\t\t\t\t\t\t\tvalue.__tau_hash : value.toString());\n\n\t\t\t\t\tif (value instanceof Element) {\n\t\t\t\t\t\tvalue.setAttribute(\"data-ns-hash\", h);\n\t\t\t\t\t}\n\t\t\t\t\treturn h;\n\t\t\t\t};\n\n\t\t\tns.utils.data = {\n\n\t\t\t\tset: function (element, key, value) {\n\t\t\t\t\tvar hash = hashObject(element);\n\t\t\t\t\tif (!hash) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!hashMap[hash]) {\n\t\t\t\t\t\thashMap[hash] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\thashMap[hash][key] = value;\n\n\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\teventUtils.trigger(element, \"setData\", {\"key\": key, \"value\": value});\n\t\t\t\t\t}\n\t\t\t\t\teventUtils.trigger(body, \"globalSetData\", {\"element\": element, \"key\": key, \"value\": value});\n\n\t\t\t\t\treturn value;\n\t\t\t\t},\n\n\t\t\t\tget: function (element, key, defaultValue) {\n\t\t\t\t\tvar hash = hashObject(element),\n\t\t\t\t\t\tvalue;\n\t\t\t\t\tif (hash) {\n\t\t\t\t\t\tif (hashMap[hash] && hashMap[hash][key] !== undefined) {\n\t\t\t\t\t\t\tvalue = hashMap[hash][key];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tif (value === undefined) {\n\t\t\t\t\t\t\t\tvalue = fetchDom(element, key);\n\t\t\t\t\t\t\t\t// pass it to memory HashMap\n\t\t\t\t\t\t\t\thashMap[hash] = hashMap[hash] || {};\n\t\t\t\t\t\t\t\thashMap[hash][key] = hashMap[hash][key] || value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\teventUtils.trigger(element, \"getData\", {\"key\": key, \"value\": value});\n\t\t\t\t\t\t}\n\t\t\t\t\t\teventUtils.trigger(body, \"globalGetData\", {\"element\": element, \"key\": key, \"value\": value});\n\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn defaultValue;\n\t\t\t\t},\n\n\t\t\t\tremove: function (element, key) {\n\t\t\t\t\tvar hash = hashObject(element),\n\t\t\t\t\t\tvalue;\n\t\t\t\t\tif (hash && hashMap[hash] && hashMap[hash][key] !== undefined) {\n\t\t\t\t\t\tvalue = hashMap[hash][key];\n\n\t\t\t\t\t\tdelete hashMap[hash][key];\n\t\t\t\t\t\tif (Object.keys(hashMap[hash]) === 0) {\n\t\t\t\t\t\t\tdelete hashMap[hash];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (element instanceof Element) {\n\t\t\t\t\t\t\tremoveDom(element, key);\n\t\t\t\t\t\t\teventUtils.trigger(element, \"removeData\", {\"key\": key, \"value\": value});\n\t\t\t\t\t\t}\n\t\t\t\t\t\teventUtils.trigger(body, \"globalRemoveData\", {\"element\": element, \"key\": key, \"value\": value});\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.utils.events","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>"],"title":"Utils class with events functions","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (ns) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"return":{"type":"return","types":["boolean"],"description":""},"name":"isArray","tags":[{"type":"method","string":"isArray"},{"type":"return","types":["boolean"],"description":""},{"type":"member","string":"ns.utils.events"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Checks if specified variable is a array or not</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var isArray = Array.isArray,"},{"params":[{"type":"param","types":"string | Array | Object","name":"names","description":"string with one name of event, many names of events divided by spaces, array with names of widgets or object in which keys are names of events and values are callbacks","isOptional":false},{"type":"param","types":"Function","name":"globalListener","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"trim","tags":[{"type":"method","string":"trim"},{"type":"param","types":"string | Array | Object","name":"names","description":"string with one name of event, many names of events divided by spaces, array with names of widgets or object in which keys are names of events and values are callbacks","isOptional":false},{"type":"param","types":"Function","name":"globalListener","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"private","string":""},{"type":"member","string":"ns.utils.events"}],"example":"","brief":"<p>Split string to array</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"getEventsListeners = function (names, globalListener) {\n                    var name,\n                        result = [],\n                        i;\n                    if (typeof names === 'string') {\n                        names = names.split(SPLIT_BY_SPACES_REGEXP).map(trim);\n                    }\n\t\t\t\t\tif (isArray(names)) {\n                        for (i=0; i<names.length; i++) {\n                            result.push({type: names[i], callback: globalListener});\n                        }\n                    } else {\n                        for (name in names) {\n                            if (names.hasOwnProperty(name)) {\n                                result.push({type: name, callback: names[name]});\n                            }\n                        }\n                    }\n                    return result;\n\t\t\t\t},\n\t\t\t\tevents = {"},{"params":[{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"preventDefault","tags":[{"type":"method","string":"preventDefault"},{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Prevent default on original event</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"preventDefault: function (event) {\n\t\t\t\t\tvar originalEvent = event._originalEvent;\n\t\t\t\t\t// @todo this.isPropagationStopped = returnTrue;\n\t\t\t\t\tif (originalEvent && originalEvent.preventDefault) {\n\t\t\t\t\t\toriginalEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t},"},{"params":[{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"stopPropagation","tags":[{"type":"method","string":"stopPropagation"},{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Stop event propagation</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"stopPropagation: function (event) {\n\t\t\t\t\tvar originalEvent = event._originalEvent;\n\t\t\t\t\t// @todo this.isPropagationStopped = returnTrue;\n\t\t\t\t\tif (originalEvent && originalEvent.stopPropagation) {\n\t\t\t\t\t\toriginalEvent.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t},"},{"params":[{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"stopImmediatePropagation","tags":[{"type":"method","string":"stopImmediatePropagation"},{"type":"param","types":"CustomEvent","name":"event","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Stop event propagation immediately</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"stopImmediatePropagation: function (event) {\n\t\t\t\t\tvar originalEvent = event._originalEvent;\n\t\t\t\t\t// @todo this.isPropagationStopped = returnTrue;\n\t\t\t\t\tif (originalEvent && originalEvent.stopImmediatePropagation) {\n\t\t\t\t\t\toriginalEvent.stopImmediatePropagation();\n\t\t\t\t\t}\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t},"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"documentRelativeCoordsFromEvent","tags":[{"type":"method","string":"documentRelativeCoordsFromEvent"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"return","types":["number"],"description":"return.x"},{"type":"return","types":["number"],"description":"return.y"},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Return document relative cords for event</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"documentRelativeCoordsFromEvent: function(event) {\n\t\t\t\t\tvar _event = event ? event : window.event,\n\t\t\t\t\t\t\tclient = {\n\t\t\t\t\t\t\t\tx: _event.clientX,\n\t\t\t\t\t\t\t\ty: _event.clientY\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpage = {\n\t\t\t\t\t\t\t\tx: _event.pageX,\n\t\t\t\t\t\t\t\ty: _event.pageY\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tposX = 0,\n\t\t\t\t\t\t\tposY = 0,\n\t\t\t\t\t\t\ttouch0,\n\t\t\t\t\t\t\tbody = document.body,\n\t\t\t\t\t\t\tdocumentElement = document.documentElement;\n\n\t\t\t\t\t\tif (event.type.match(/^touch/)) {\n\t\t\t\t\t\t\ttouch0 = _event.originalEvent.targetTouches[0];\n\t\t\t\t\t\t\tpage = {\n\t\t\t\t\t\t\t\tx: touch0.pageX,\n\t\t\t\t\t\t\t\ty: touch0.pageY\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tclient = {\n\t\t\t\t\t\t\t\tx: touch0.clientX,\n\t\t\t\t\t\t\t\ty: touch0.clientY\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (page.x || page.y) {\n\t\t\t\t\t\t\tposX = page.x;\n\t\t\t\t\t\t\tposY = page.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (client.x || client.y) {\n\t\t\t\t\t\t\tposX = client.x + body.scrollLeft + documentElement.scrollLeft;\n\t\t\t\t\t\t\tposY = client.y + body.scrollTop  + documentElement.scrollTop;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn { x: posX, y: posY };\n\t\t\t\t},"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"targetRelativeCoordsFromEvent","tags":[{"type":"method","string":"targetRelativeCoordsFromEvent"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"return","types":["number"],"description":"return.x"},{"type":"return","types":["number"],"description":"return.y"},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Return target relative cords for event</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"targetRelativeCoordsFromEvent: function(event) {\n\t\t\t\t\tvar target = event.target,\n\t\t\t\t\t\tcords = {\n\t\t\t\t\t\t\tx: event.offsetX,\n\t\t\t\t\t\t\ty: event.offsetY\n\t\t\t\t\t\t};\n\n\t\t\t\t\tif (cords.x === undefined || isNaN(cords.x) ||\n\t\t\t\t\t\tcords.y === undefined || isNaN(cords.y)) {\n\t\t\t\t\t\tcords = events.documentRelativeCoordsFromEvent(event);\n\t\t\t\t\t\tcords.x -= target.offsetLeft;\n\t\t\t\t\t\tcords.y -= target.offsetTop;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn cords;\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"fastOn","tags":[{"type":"method","string":"fastOn"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Add event listener to element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"fastOn: function(element, type, listener, useCapture) {\n\t\t\t\t\telement.addEventListener(type, listener, useCapture || false);\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"fastOff","tags":[{"type":"method","string":"fastOff"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Remove event listener to element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"fastOff: function(element, type, listener, useCapture) {\n\t\t\t\t\telement.removeEventListener(type, listener, useCapture || false);\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Add event listener to element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"on: function(element, type, listener, useCapture) {\n\t\t\t\t\tvar i,\n                        j,\n\t\t\t\t\t\telementsLength,\n                        typesLength,\n                        elements,\n                        listeners;\n                    if (element instanceof HTMLElement) {\n                        elements = [element];\n                    } else {\n                        elements = element;\n                    }\n                    elementsLength = elements.length;\n                    listeners = getEventsListeners(type, listener);\n                    typesLength = listeners.length;\n\t\t\t\t\tfor (i = 0; i < elementsLength; i++) {\n                        for (j = 0; j < typesLength; j++) {\n                            events.fastOn(elements[i], listeners[j].type, listeners[j].callback, useCapture);\n                        }\n\t\t\t\t\t}\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Remove event listener to element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"off: function(element, type, listener, useCapture) {\n                    var i,\n                        j,\n                        elementsLength,\n                        typesLength,\n                        elements,\n                        listeners;\n                    if (element instanceof HTMLElement) {\n                        elements = [element];\n                    } else {\n                        elements = element;\n                    }\n                    elementsLength = elements.length;\n                    listeners = getEventsListeners(type, listener);\n                    typesLength = listeners.length;\n                    for (i = 0; i < elementsLength; i++) {\n                        for (j = 0; j < typesLength; j++) {\n                            events.fastOn(elements[i], listeners[j].type, listeners[j].callback, useCapture);\n                        }\n                    }\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"one","tags":[{"type":"method","string":"one"},{"type":"param","types":"HTMLElement | HTMLCollection","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array | Object","name":"type","description":"","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.utils.events"},{"type":"static","string":""}],"example":"","brief":"<p>Add event listener to element only for one trigger</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"one: function(element, type, listener, useCapture) {\n                    var i,\n                        j,\n                        elementsLength,\n                        typesLength,\n                        elements,\n                        types,\n                        listeners,\n                        callback;\n                    if (element instanceof HTMLElement) {\n                        elements = [element];\n                    } else {\n                        elements = element;\n                    }\n                    elementsLength = elements.length;\n                    listeners = getEventsListeners(type, listener);\n                    typesLength = listeners.length;\n                    for (i = 0; i < elementsLength; i++) {\n                        for (j = 0; j < typesLength; j++) {\n                            callback = (function(i, j) {\n                                events.fastOff(elements[i], listeners[j].type, callback, useCapture);\n                                listeners[j].callback.apply(this, arguments);\n                            }).bind(null, i, j);\n                            events.fastOn(elements[i], listeners[j].type, callback, useCapture);\n                        }\n                    }\n\t\t\t\t}\n\t\t\t};\n\t\t\tns.utils.events = events;\n\t\t\t}(ns));"}]},{"name":"ns.utils.selectors","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Jadwiga Sosnowska <j.sosnowska@partner.samsung.com>","Damian Osipiuk <d.osipiuk@samsung.com>"],"title":"Selectors","brief":"Utils class with selectors functions","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"getDataSelector","tags":[{"type":"method","string":"getDataSelector"},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"member","string":"ns.utils.selectors"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Prefix selector with 'data-' and namespace if present</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function getDataSelector(selector) {\n\t\t\t\tvar namespace = ns.get('namespace');\n\t\t\t\treturn '[data-' + (namespace ? namespace + '-' : '') + selector + ']';\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"matchesSelector","tags":[{"type":"method","string":"matchesSelector"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Runs matches implementation of matchesSelector<br />method on specified element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function matchesSelector(element, selector) {\n\t\t\t\tif (matchesSelectorType && element[matchesSelectorType]) {\n\t\t\t\t\treturn element[matchesSelectorType](selector);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"parents","tags":[{"type":"method","string":"parents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"member","string":"ns.utils.selectors"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Return array with all parents of element.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function parents(element) {\n\t\t\t\tvar items = [],\n\t\t\t\t\tcurrent = element.parentNode;\n\t\t\t\twhile (current && current !== document) {\n\t\t\t\t\titems.push(current);\n\t\t\t\t\tcurrent = current.parentNode;\n\t\t\t\t}\n\t\t\t\treturn items;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Function","name":"testFunction","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?HTMLElement"],"description":""},"name":"closest","tags":[{"type":"method","string":"closest"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Function","name":"testFunction","description":"","isOptional":false,"isLast":true},{"type":"return","types":["?HTMLElement"],"description":""},{"type":"member","string":"ns.utils.selectors"},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Checks if given element and its ancestors matches given function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function closest(element, testFunction) {\n\t\t\t\tvar current = element;\n\t\t\t\twhile (current && current !== document) {\n\t\t\t\t\tif (testFunction(current)) {\n\t\t\t\t\t\treturn current;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parentNode;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getChildrenBySelector","tags":[{"type":"method","string":"getChildrenBySelector"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with children pass by given selector.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getChildrenBySelector: function (context, selector) {\n\t\t\t\t\treturn slice.call(context.children).filter(testSelector.bind(null, selector));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"dataSelector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getChildrenByDataNS","tags":[{"type":"method","string":"getChildrenByDataNS"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"dataSelector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with children pass by given data-namespace-selector.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getChildrenByDataNS: function (context, dataSelector) {\n\t\t\t\t\treturn slice.call(context.children).filter(testSelector.bind(null, getDataSelector(dataSelector)));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"className","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getChildrenByClass","tags":[{"type":"method","string":"getChildrenByClass"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"className","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with children with given class name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getChildrenByClass: function (context, className) {\n\t\t\t\t\treturn slice.call(context.children).filter(testClass.bind(null, className));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"tagName","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getChildrenByTag","tags":[{"type":"method","string":"getChildrenByTag"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"tagName","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with children with given tag name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getChildrenByTag: function (context, tagName) {\n\t\t\t\t\treturn slice.call(context.children).filter(testTag.bind(null, tagName));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getParents","tags":[{"type":"method","string":"getParents"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with all parents of element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getParents: parents,"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getParentsBySelector","tags":[{"type":"method","string":"getParentsBySelector"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with all parents of element pass by given selector.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getParentsBySelector: function (context, selector) {\n\t\t\t\t\treturn parents(context).filter(testSelector.bind(null, selector));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getParentsBySelectorNS","tags":[{"type":"method","string":"getParentsBySelectorNS"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with all parents of element pass by given selector with namespace.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getParentsBySelectorNS: function (context, selector) {\n\t\t\t\t\treturn parents(context).filter(testSelector.bind(null, getDataSelector(selector)));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"className","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getParentsByClass","tags":[{"type":"method","string":"getParentsByClass"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"className","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with all parents of element with given class name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getParentsByClass: function (context, className) {\n\t\t\t\t\treturn parents(context).filter(testClass.bind(null, className));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"tagName","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getParentsByTag","tags":[{"type":"method","string":"getParentsByTag"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"tagName","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array with all parents of element with given tag name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getParentsByTag: function (context, tagName) {\n\t\t\t\t\treturn parents(context).filter(testTag.bind(null, tagName));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"getClosestBySelector","tags":[{"type":"method","string":"getClosestBySelector"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return first element from parents of element pass by selector.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getClosestBySelector: function (context, selector) {\n\t\t\t\t\treturn closest(context, testSelector.bind(null, selector));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"getClosestBySelectorNS","tags":[{"type":"method","string":"getClosestBySelectorNS"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return first element from parents of element pass by selector with namespace.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getClosestBySelectorNS: function (context, selector) {\n\t\t\t\t\treturn closest(context, testSelector.bind(null, getDataSelector(selector)));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"getClosestByClass","tags":[{"type":"method","string":"getClosestByClass"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return first element from parents of element with given class name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getClosestByClass: function (context, selector) {\n\t\t\t\t\treturn closest(context, testClass.bind(null, selector));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"getClosestByTag","tags":[{"type":"method","string":"getClosestByTag"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return first element from parents of element with given tag name.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getClosestByTag: function (context, selector) {\n\t\t\t\t\treturn closest(context, testTag.bind(null, selector));\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"dataSelector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":""},"name":"getAllByDataNS","tags":[{"type":"method","string":"getAllByDataNS"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"string","name":"dataSelector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Array"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.selectors"}],"example":"","brief":"<p>Return array of elements from context with given data-selector</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getAllByDataNS: function (context, dataSelector) {\n\t\t\t\t\treturn slice.call(context.querySelectorAll(getDataSelector(dataSelector)));\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(window.document, ns));"}]},{"name":"ns.engine","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Michal Szepielak <m.szepielak@samsung.com>","Jadwiga Sosnowska <j.sosnowska@partner.samsung.com>","Maciej Moczulski <m.moczulski@samsung.com>","Piotr Karny <p.karny@samsung.com>","Tomasz Lukawski <t.lukawski@samsung.com>","Przemyslaw Ciezkowski <p.ciezkowski@samsung.com>"],"title":"Main class with engine of library","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {","properties":[{"types":"string","defaultValue":"\"tauinit\"","tags":[{"type":"property","string":"{string} eventType.INIT=\"tauinit\" INIT of framework init event"},{"type":"property","string":"{string} eventType.WIDGET_BOUND=\"widgetbound\" WIDGET_BOUND of widget bound event"},{"type":"property","string":"{string} eventType.WIDGET_DEFINED=\"widgetdefined\" WIDGET_DEFINED of widget built event"},{"type":"property","string":"{string} eventType.WIDGET_BUILT=\"widgetbuilt\" WIDGET_BUILT of widget built event"},{"type":"property","string":"{string} eventType.BOUND=\"bound\" BOUND of bound event"},{"type":"static","string":""},{"type":"readonly","string":""},{"type":"member","string":"ns.engine"}],"description":"INIT of framework init event","isPrivate":false,"code":"eventType = {\n\t\t\t\t\tINIT: \"tauinit\",\n\t\t\t\t\tWIDGET_BOUND: \"widgetbound\",\n\t\t\t\t\tWIDGET_DEFINED: \"widgetdefined\",\n\t\t\t\t\tWIDGET_BUILT: \"widgetbuilt\",\n\t\t\t\t\tBOUND: \"bound\"\n\t\t\t\t},\n\t\t\t\tengine,","name":"eventType.INIT"},{"types":"string","defaultValue":"\"widgetbound\"","tags":[{"type":"property","string":"{string} eventType.INIT=\"tauinit\" INIT of framework init event"},{"type":"property","string":"{string} eventType.WIDGET_BOUND=\"widgetbound\" WIDGET_BOUND of widget bound event"},{"type":"property","string":"{string} eventType.WIDGET_DEFINED=\"widgetdefined\" WIDGET_DEFINED of widget built event"},{"type":"property","string":"{string} eventType.WIDGET_BUILT=\"widgetbuilt\" WIDGET_BUILT of widget built event"},{"type":"property","string":"{string} eventType.BOUND=\"bound\" BOUND of bound event"},{"type":"static","string":""},{"type":"readonly","string":""},{"type":"member","string":"ns.engine"}],"description":"WIDGET_BOUND of widget bound event","isPrivate":false,"code":"eventType = {\n\t\t\t\t\tINIT: \"tauinit\",\n\t\t\t\t\tWIDGET_BOUND: \"widgetbound\",\n\t\t\t\t\tWIDGET_DEFINED: \"widgetdefined\",\n\t\t\t\t\tWIDGET_BUILT: \"widgetbuilt\",\n\t\t\t\t\tBOUND: \"bound\"\n\t\t\t\t},\n\t\t\t\tengine,","name":"eventType.WIDGET_BOUND"},{"types":"string","defaultValue":"\"widgetdefined\"","tags":[{"type":"property","string":"{string} eventType.INIT=\"tauinit\" INIT of framework init event"},{"type":"property","string":"{string} eventType.WIDGET_BOUND=\"widgetbound\" WIDGET_BOUND of widget bound event"},{"type":"property","string":"{string} eventType.WIDGET_DEFINED=\"widgetdefined\" WIDGET_DEFINED of widget built event"},{"type":"property","string":"{string} eventType.WIDGET_BUILT=\"widgetbuilt\" WIDGET_BUILT of widget built event"},{"type":"property","string":"{string} eventType.BOUND=\"bound\" BOUND of bound event"},{"type":"static","string":""},{"type":"readonly","string":""},{"type":"member","string":"ns.engine"}],"description":"WIDGET_DEFINED of widget built event","isPrivate":false,"code":"eventType = {\n\t\t\t\t\tINIT: \"tauinit\",\n\t\t\t\t\tWIDGET_BOUND: \"widgetbound\",\n\t\t\t\t\tWIDGET_DEFINED: \"widgetdefined\",\n\t\t\t\t\tWIDGET_BUILT: \"widgetbuilt\",\n\t\t\t\t\tBOUND: \"bound\"\n\t\t\t\t},\n\t\t\t\tengine,","name":"eventType.WIDGET_DEFINED"},{"types":"string","defaultValue":"\"widgetbuilt\"","tags":[{"type":"property","string":"{string} eventType.INIT=\"tauinit\" INIT of framework init event"},{"type":"property","string":"{string} eventType.WIDGET_BOUND=\"widgetbound\" WIDGET_BOUND of widget bound event"},{"type":"property","string":"{string} eventType.WIDGET_DEFINED=\"widgetdefined\" WIDGET_DEFINED of widget built event"},{"type":"property","string":"{string} eventType.WIDGET_BUILT=\"widgetbuilt\" WIDGET_BUILT of widget built event"},{"type":"property","string":"{string} eventType.BOUND=\"bound\" BOUND of bound event"},{"type":"static","string":""},{"type":"readonly","string":""},{"type":"member","string":"ns.engine"}],"description":"WIDGET_BUILT of widget built event","isPrivate":false,"code":"eventType = {\n\t\t\t\t\tINIT: \"tauinit\",\n\t\t\t\t\tWIDGET_BOUND: \"widgetbound\",\n\t\t\t\t\tWIDGET_DEFINED: \"widgetdefined\",\n\t\t\t\t\tWIDGET_BUILT: \"widgetbuilt\",\n\t\t\t\t\tBOUND: \"bound\"\n\t\t\t\t},\n\t\t\t\tengine,","name":"eventType.WIDGET_BUILT"},{"types":"string","defaultValue":"\"bound\"","tags":[{"type":"property","string":"{string} eventType.INIT=\"tauinit\" INIT of framework init event"},{"type":"property","string":"{string} eventType.WIDGET_BOUND=\"widgetbound\" WIDGET_BOUND of widget bound event"},{"type":"property","string":"{string} eventType.WIDGET_DEFINED=\"widgetdefined\" WIDGET_DEFINED of widget built event"},{"type":"property","string":"{string} eventType.WIDGET_BUILT=\"widgetbuilt\" WIDGET_BUILT of widget built event"},{"type":"property","string":"{string} eventType.BOUND=\"bound\" BOUND of bound event"},{"type":"static","string":""},{"type":"readonly","string":""},{"type":"member","string":"ns.engine"}],"description":"BOUND of bound event","isPrivate":false,"code":"eventType = {\n\t\t\t\t\tINIT: \"tauinit\",\n\t\t\t\t\tWIDGET_BOUND: \"widgetbound\",\n\t\t\t\t\tWIDGET_DEFINED: \"widgetdefined\",\n\t\t\t\t\tWIDGET_BUILT: \"widgetbuilt\",\n\t\t\t\t\tBOUND: \"bound\"\n\t\t\t\t},\n\t\t\t\tengine,","name":"eventType.BOUND"},{"types":"string","defaultValue":"\"data-tau-built\"","tags":[{"type":"property","string":"{string} [dataTau.built=\"data-tau-built\"] attribute inform that widget id build"},{"type":"property","string":"{string} [dataTau.name=\"data-tau-name\"] attribute contains widget name"},{"type":"property","string":"{string} [dataTau.bound=\"data-tau-bound\"] attribute inform that widget id bound"},{"type":"property","string":"{string} [dataTau.separator=\",\"] separation string for widget names"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"description":"attribute inform that widget id build","isPrivate":false,"code":"dataTau: {\n\t\t\t\t\tbuilt: DATA_BUILT,\n\t\t\t\t\tname: DATA_NAME,\n\t\t\t\t\tbound: DATA_BOUND,\n\t\t\t\t\tseparator: NAMES_SEPARATOR\n\t\t\t\t},\n\t\t\t\tdestroyWidget: destroyWidget,\n\t\t\t\tdestroyAllWidgets: destroyAllWidgets,\n\t\t\t\tcreateWidgets: createWidgets,","name":"dataTau.built"},{"types":"string","defaultValue":"\"data-tau-name\"","tags":[{"type":"property","string":"{string} [dataTau.built=\"data-tau-built\"] attribute inform that widget id build"},{"type":"property","string":"{string} [dataTau.name=\"data-tau-name\"] attribute contains widget name"},{"type":"property","string":"{string} [dataTau.bound=\"data-tau-bound\"] attribute inform that widget id bound"},{"type":"property","string":"{string} [dataTau.separator=\",\"] separation string for widget names"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"description":"attribute contains widget name","isPrivate":false,"code":"dataTau: {\n\t\t\t\t\tbuilt: DATA_BUILT,\n\t\t\t\t\tname: DATA_NAME,\n\t\t\t\t\tbound: DATA_BOUND,\n\t\t\t\t\tseparator: NAMES_SEPARATOR\n\t\t\t\t},\n\t\t\t\tdestroyWidget: destroyWidget,\n\t\t\t\tdestroyAllWidgets: destroyAllWidgets,\n\t\t\t\tcreateWidgets: createWidgets,","name":"dataTau.name"},{"types":"string","defaultValue":"\"data-tau-bound\"","tags":[{"type":"property","string":"{string} [dataTau.built=\"data-tau-built\"] attribute inform that widget id build"},{"type":"property","string":"{string} [dataTau.name=\"data-tau-name\"] attribute contains widget name"},{"type":"property","string":"{string} [dataTau.bound=\"data-tau-bound\"] attribute inform that widget id bound"},{"type":"property","string":"{string} [dataTau.separator=\",\"] separation string for widget names"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"description":"attribute inform that widget id bound","isPrivate":false,"code":"dataTau: {\n\t\t\t\t\tbuilt: DATA_BUILT,\n\t\t\t\t\tname: DATA_NAME,\n\t\t\t\t\tbound: DATA_BOUND,\n\t\t\t\t\tseparator: NAMES_SEPARATOR\n\t\t\t\t},\n\t\t\t\tdestroyWidget: destroyWidget,\n\t\t\t\tdestroyAllWidgets: destroyAllWidgets,\n\t\t\t\tcreateWidgets: createWidgets,","name":"dataTau.bound"},{"types":"string","defaultValue":"\",\"","tags":[{"type":"property","string":"{string} [dataTau.built=\"data-tau-built\"] attribute inform that widget id build"},{"type":"property","string":"{string} [dataTau.name=\"data-tau-name\"] attribute contains widget name"},{"type":"property","string":"{string} [dataTau.bound=\"data-tau-bound\"] attribute inform that widget id bound"},{"type":"property","string":"{string} [dataTau.separator=\",\"] separation string for widget names"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"description":"separation string for widget names","isPrivate":false,"code":"dataTau: {\n\t\t\t\t\tbuilt: DATA_BUILT,\n\t\t\t\t\tname: DATA_NAME,\n\t\t\t\t\tbound: DATA_BOUND,\n\t\t\t\t\tseparator: NAMES_SEPARATOR\n\t\t\t\t},\n\t\t\t\tdestroyWidget: destroyWidget,\n\t\t\t\tdestroyAllWidgets: destroyAllWidgets,\n\t\t\t\tcreateWidgets: createWidgets,","name":"dataTau.separator"}],"options":[],"methods":[{"params":[{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":"trimmed string"},"name":"trim","tags":[{"type":"method","string":"trim"},{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":"trimmed string"},{"type":"static","string":""},{"type":"private","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Returns trimmed value</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"trim = function (value) {\n\t\t\t\t\treturn value.trim();\n\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false},{"type":"param","types":"Array","name":"methods","description":"","isOptional":false},{"type":"param","types":"Object","name":"widgetClass","description":"","isOptional":false},{"type":"param","types":"string","name":"namespace","description":"","isOptional":true},{"type":"param","types":"boolean","name":"redefine","description":"","isOptional":true},{"type":"param","types":"boolean","name":"widgetNameToLowercase","description":"= true]","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"defineWidget","tags":[{"type":"method","string":"defineWidget"},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false},{"type":"param","types":"Array","name":"methods","description":"","isOptional":false},{"type":"param","types":"Object","name":"widgetClass","description":"","isOptional":false},{"type":"param","types":"string","name":"namespace","description":"","isOptional":true},{"type":"param","types":"boolean","name":"redefine","description":"","isOptional":true},{"type":"param","types":"boolean","name":"widgetNameToLowercase","description":"= true]","isOptional":true,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"member","string":"ns.engine"},{"type":"static","string":""}],"example":"","brief":"<p>Function to define widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function defineWidget(name, selector, methods, widgetClass, namespace, redefine, widgetNameToLowercase) {\n\t\t\t\tvar definition;\n\t\t\t\t// Widget name is absolutely required\n\t\t\t\tif (name) {\n\t\t\t\t\tif (!widgetDefs[name] || redefine) {\n\t\t\t\t\t\t\t\t\t\t\t\tmethods = methods || [];\n\t\t\t\t\t\tmethods.push(\"destroy\", \"disable\", \"enable\", \"option\", \"refresh\", \"value\");\n\t\t\t\t\t\tdefinition = {\n\t\t\t\t\t\t\tname: name,\n\t\t\t\t\t\t\tmethods: methods,\n\t\t\t\t\t\t\tselector: selector || \"\",\n\t\t\t\t\t\t\tselectors: selector ? selector.split(\",\").map(trim) : [],\n\t\t\t\t\t\t\twidgetClass: widgetClass || null,\n\t\t\t\t\t\t\tnamespace: namespace || \"\",\n\t\t\t\t\t\t\twidgetNameToLowercase: widgetNameToLowercase === undefined ? true : !!widgetNameToLowercase\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\twidgetDefs[name] = definition;\n\t\t\t\t\t\teventUtils.trigger(document, \"widgetdefined\", definition, false);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\tns.error(\"Widget with selector [\" + selector + \"] defined without a name, aborting!\");\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget name","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?Object"],"description":""},"name":"getBinding","tags":[{"type":"method","string":"getBinding"},{"type":"static","string":""},{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget name","isOptional":false,"isLast":true},{"type":"return","types":["?Object"],"description":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Get binding for element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function getBinding(element, type) {\n\t\t\t\tvar id = !element || typeof element === TYPE_STRING ? element : element.id,\n\t\t\t\t\tbinding,\n\t\t\t\t\twidgetInstance,\n\t\t\t\t\tbindingElement,\n\t\t\t\t\tstoredWidgetNames;\n\n\t\t\t\tif (typeof element === TYPE_STRING) {\n\t\t\t\t\telement = document.getElementById(id);\n\t\t\t\t}\n\n\t\t\t\t// Fetch group of widget defined for this element\n\t\t\t\tbinding = widgetBindingMap[id];\n\n\t\t\t\tif (typeof binding === \"object\") {\n\t\t\t\t\t// If name is defined it's possible to fetch it instantly\n\t\t\t\t\tif (type) {\n\t\t\t\t\t\twidgetInstance = binding.instances[type];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstoredWidgetNames = Object.keys(binding.instances);\n\t\t\t\t\t\twidgetInstance = binding.instances[storedWidgetNames[0]];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Return only it instance of the proper widget exists\n\t\t\t\t\tif (widgetInstance) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if widget instance has that same object referenced\n\t\t\t\t\t\tif (widgetInstance.element === element) {\n\t\t\t\t\t\t\treturn widgetInstance;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}"},{"params":[{"type":"param","types":"definition.widgetClass","name":"widgetInstance","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"setBinding","tags":[{"type":"method","string":"setBinding"},{"type":"param","types":"definition.widgetClass","name":"widgetInstance","description":"","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Set binding of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function setBinding(widgetInstance) {\n\t\t\t\tvar id = widgetInstance.element.id,\n\t\t\t\t\ttype = widgetInstance.name,\n\t\t\t\t\twidgetBinding = widgetBindingMap[id];\n\n\t\t\t\t\n\t\t\t\t// If the HTMLElement never had a widget declared create an empty object\n\t\t\t\tif(!widgetBinding) {\n\t\t\t\t\twidgetBinding = {\n\t\t\t\t\t\telementId: id,\n\t\t\t\t\t\telement: widgetInstance.element,\n\t\t\t\t\t\tinstances: {}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\twidgetBinding.instances[type] = widgetInstance;\n\t\t\t\twidgetBindingMap[id] = widgetBinding;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget type (name)","isOptional":false,"isLast":true}],"hasParams":true,"name":"_removeBindingAttributes","tags":[{"type":"method","string":"_removeBindingAttributes"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget type (name)","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Remove binding data attributes for element.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function _removeWidgetFromAttributes(element, type) {\n\t\t\t\tvar dataBuilt,\n\t\t\t\t\tdataBound,\n\t\t\t\t\tdataName;\n\n\t\t\t\t// Most often case is that name is not defined\n\t\t\t\tif (!type) {\n\t\t\t\t\t_removeAllBindingAttributes(element);\n\t\t\t\t} else {\n\t\t\t\t\tdataBuilt = _removeWidgetNameFromAttribute(type, element.getAttribute(DATA_BUILT) || \"\");\n\t\t\t\t\tdataBound = _removeWidgetNameFromAttribute(type, element.getAttribute(DATA_BOUND) || \"\");\n\t\t\t\t\tdataName = _removeWidgetNameFromAttribute(type, element.getAttribute(DATA_NAME) || \"\");\n\n\t\t\t\t\t// Check if all attributes have at least one widget\n\t\t\t\t\tif (dataBuilt && dataBound && dataName) {\n\t\t\t\t\t\telement.setAttribute(DATA_BUILT, dataBuilt);\n\t\t\t\t\t\telement.setAttribute(DATA_BOUND, dataBound);\n\t\t\t\t\t\telement.setAttribute(DATA_NAME, dataName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If something is missing remove everything\n\t\t\t\t\t\t_removeAllBindingAttributes(element);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget name","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"removeBinding","tags":[{"type":"method","string":"removeBinding"},{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"widget name","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Remove binding for widget based on element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function removeBinding(element, type) {\n\t\t\t\tvar id = (typeof element === TYPE_STRING) ? element : element.id,\n\t\t\t\t\tbinding = widgetBindingMap[id],\n\t\t\t\t\tbindingGroup,\n\t\t\t\t\twidgetName,\n\t\t\t\t\tpartialSuccess,\n\t\t\t\t\tfullSuccess = false;\n\n\t\t\t\t// [NOTICE] Due to backward compatibility calling removeBinding\n\t\t\t\t// with one parameter should remove all bindings\n\n\t\t\t\tif (binding) {\n\t\t\t\t\tif (typeof element === TYPE_STRING) {\n\t\t\t\t\t\t// Search based on current document may return bad results,\n\t\t\t\t\t\t// use previously defined element if it exists\n\t\t\t\t\t\telement = binding.element;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\t_removeWidgetFromAttributes(element, type);\n\t\t\t\t\t}\n\n\t\t\t\t\tbindingGroup = widgetBindingMap[id] && widgetBindingMap[id].instances;\n\n\t\t\t\t\tif (bindingGroup) {\n\t\t\t\t\t\tif (!type) {\n\t\t\t\t\t\t\tfullSuccess = true;\n\n\t\t\t\t\t\t\t// Iterate over group of created widgets\n\t\t\t\t\t\t\tfor (widgetName in bindingGroup) {\n\t\t\t\t\t\t\t\tif (bindingGroup.hasOwnProperty(widgetName)) {\n\t\t\t\t\t\t\t\t\tpartialSuccess = _removeSingleBinding(bindingGroup, widgetName);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// As we iterate over keys we are sure we want to remove this element\n\t\t\t\t\t\t\t\t\tdelete bindingGroup[widgetName];\n\n\t\t\t\t\t\t\t\t\tfullSuccess = (fullSuccess && partialSuccess);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(Object.keys(bindingGroup).length === 0) {\n\t\t\t\t\t\t\t\tdelete widgetBindingMap[id];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn fullSuccess;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpartialSuccess = _removeSingleBinding(bindingGroup, type);\n\n\t\t\t\t\t\tif(Object.keys(bindingGroup).length === 0) {\n\t\t\t\t\t\t\tdelete widgetBindingMap[id];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn partialSuccess;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"base element of widget","isOptional":false},{"type":"param","types":"Object","name":"definition","description":"definition of widget","isOptional":false},{"type":"param","types":"ns.widget.BaseWidget","name":"definition.widgetClass","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"options for widget","isOptional":true,"isLast":true}],"hasParams":true,"name":"processWidget","tags":[{"type":"method","string":"processWidget"},{"type":"param","types":"HTMLElement","name":"element","description":"base element of widget","isOptional":false},{"type":"param","types":"Object","name":"definition","description":"definition of widget","isOptional":false},{"type":"param","types":"ns.widget.BaseWidget","name":"definition.widgetClass","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"options for widget","isOptional":true,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Load widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function processWidget(element, definition, options) {\n\t\t\t\tvar widgetOptions = options || {},\n\t\t\t\t\tcreateFunction = widgetOptions.create,\n\t\t\t\t\tWidget = definition.widgetClass,"},{"params":[{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"childOnly","description":"destroy only widgets on children elements","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"destroyWidget","tags":[{"type":"method","string":"destroyWidget"},{"type":"param","types":"HTMLElement | string","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"childOnly","description":"destroy only widgets on children elements","defaultValue":"false","isOptional":true,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Calls destroy on widget (or widgets) connected with given HTMLElement<br />Removes child widgets as well.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function destroyAllWidgets(element, childOnly) {\n\t\t\t\tvar widgetName,\n\t\t\t\t\twidgetInstance,\n\t\t\t\t\twidgetGroup,\n\t\t\t\t\tchildWidgets,\n\t\t\t\t\ti;\n\n\t\t\t\tif (typeof element === TYPE_STRING) {\n\t\t\t\t\telement = document.getElementById(element);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tif (!childOnly) {\n\t\t\t\t\t// If type is not defined all widgets should be removed\n\t\t\t\t\t// this is for backward compatibility\n\t\t\t\t\twidgetGroup = getAllBindings(element);\n\t\t\t\t\tfor (widgetName in widgetGroup) {\n\t\t\t\t\t\tif (widgetGroup.hasOwnProperty(widgetName)) {\n\t\t\t\t\t\t\twidgetInstance = widgetGroup[widgetName];\n\n\t\t\t\t\t\t\t//Destroy widget\n\t\t\t\t\t\t\twidgetInstance.destroy();\n\t\t\t\t\t\t\twidgetInstance.trigger(\"widgetdestroyed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Destroy child widgets, if something left.\n\t\t\t\tchildWidgets = slice.call(element.querySelectorAll(\"[\" + DATA_BOUND + \"]\"));\n\t\t\t\tfor (i = childWidgets.length - 1; i >= 0; i -= 1) {\n\t\t\t\t\tif (childWidgets[i]) {\n\t\t\t\t\t\tdestroyAllWidgets(childWidgets[i], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tremoveAllBindings(element);\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"base element of widget","isOptional":false},{"type":"param","types":"Object","name":"definition","description":"widget definition","isOptional":false},{"type":"param","types":"Object","name":"options","description":"options for create widget","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"base element of widget"},"name":"processHollowWidget","tags":[{"type":"method","string":"processHollowWidget"},{"type":"param","types":"HTMLElement","name":"element","description":"base element of widget","isOptional":false},{"type":"param","types":"Object","name":"definition","description":"widget definition","isOptional":false},{"type":"param","types":"Object","name":"options","description":"options for create widget","isOptional":true,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"base element of widget"},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Load widgets from data-* definition</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function processHollowWidget(element, definition, options) {\n\t\t\t\tvar name = element.getAttribute(DATA_NAME) || (definition && definition.name);\n\t\t\t\t\t\t\t\tdefinition = definition || (name && widgetDefs[name]) || {\n\t\t\t\t\t\"name\": name\n\t\t\t\t};\n\t\t\t\treturn processWidget(element, definition, options);\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"base html for create children","isOptional":false,"isLast":true}],"hasParams":true,"name":"createWidgets","tags":[{"type":"method","string":"createWidgets"},{"type":"static","string":""},{"type":"param","types":"HTMLElement","name":"context","description":"base html for create children","isOptional":false,"isLast":true},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Build widgets on all children of context element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function createWidgets(context) {\n\t\t\t\tvar builtWithoutTemplates = slice.call(context.querySelectorAll(querySelectorWidgets)),\n\t\t\t\t\tnormal = [],\n\t\t\t\t\tbuildQueue = [],\n\t\t\t\t\tselectorKeys = Object.keys(widgetDefs),\n\t\t\t\t\texcludeSelector,\n\t\t\t\t\ti,\n\t\t\t\t\tj,\n\t\t\t\t\tlen = selectorKeys.length,\n\t\t\t\t\tdefinition,\n\t\t\t\t\twidgetName,\n\t\t\t\t\tdefinitionSelectors;\n\n\t\t\t\t\n\t\t\t\t// @TODO EXPERIMENTAL WIDGETS WITHOUT TEMPLATE DEFINITION\n\t\t\t\tbuiltWithoutTemplates.forEach(processBuildQueueItem);"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"createEventHandler","tags":[{"type":"method","string":"createEventHandler"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Handler for event create</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function createEventHandler(event) {\n\t\t\t\tcreateWidgets(event.target);\n\t\t\t}\n\n\t\t\tfunction setViewport() {"},{"params":[],"hasParams":false,"name":"build","tags":[{"type":"method","string":"build"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Build first page</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function build() {\n\t\t\t\tif (router) {\n\t\t\t\t\t// @TODO: Consider passing viewport options via script tag arguments (web-ui-fw style).\n\t\t\t\t\tsetViewport();\n\n\t\t\t\t\teventUtils.trigger(document, \"beforerouterinit\", router, false);\n\t\t\t\t\trouter.init(justBuild);\n\t\t\t\t\teventUtils.trigger(document, \"routerinit\", router, false);\n\t\t\t\t}\n\t\t\t}"},{"params":[],"hasParams":false,"name":"stop","tags":[{"type":"method","string":"stop"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Method to remove all listeners bound in run</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function stop() {\n\t\t\t\tif (router) {\n\t\t\t\t\trouter.destroy();\n\t\t\t\t}\n\t\t\t}"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"getDefinitions","tags":[{"type":"method","string":"getDefinitions"},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Method to get all definitions of widgets</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getDefinitions: function () {\n\t\t\t\t\treturn widgetDefs;\n\t\t\t\t},\n\t\t\t\tgetWidgetDefinition: function (name) {\n\t\t\t\t\treturn widgetDefs[name];\n\t\t\t\t},\n\t\t\t\tdefineWidget: defineWidget,\n\t\t\t\tgetBinding: getBinding,\n\t\t\t\tgetAllBindings: getAllBindings,\n\t\t\t\tsetBinding: setBinding,\n\t\t\t\t// @TODO either rename or fix functionally because\n\t\t\t\t// this method does not only remove binding but\n\t\t\t\t// actually destroys widget\n\t\t\t\tremoveBinding: removeBinding,\n\t\t\t\tremoveAllBindings: removeAllBindings,"},{"params":[],"hasParams":false,"name":"_clearBindings","tags":[{"type":"method","string":"_clearBindings"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Clear bindings of widgets</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"_clearBindings: function () {\n\t\t\t\t\t//clear and set references to the same object\n\t\t\t\t\twidgetBindingMap = {};\n\t\t\t\t},\n\n\t\t\t\tbuild: build,"},{"params":[],"hasParams":false,"name":"run","tags":[{"type":"method","string":"run"},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Run engine</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"run: function () {\n\t\t\t\t\tstop();\n\n\t\t\t\t\teventUtils.fastOn(document, \"create\", createEventHandler);\n\n\t\t\t\t\teventUtils.trigger(document, eventType.INIT);\n\n\t\t\t\t\tif (document.body) {\n\t\t\t\t\t\tbuild();\n\t\t\t\t\t} else {\n\t\t\t\t\t\teventUtils.fastOn(document, \"DOMContentLoaded\", build.bind(engine));\n\t\t\t\t\t}\n\n\t\t\t\t},"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"getRouter","tags":[{"type":"method","string":"getRouter"},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Return router</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getRouter: function () {\n\t\t\t\t\treturn router;\n\t\t\t\t},"},{"params":[{"type":"param","types":"Function","name":"RouterClass","description":"Router class","isOptional":false,"isLast":true}],"hasParams":true,"name":"initRouter","tags":[{"type":"method","string":"initRouter"},{"type":"param","types":"Function","name":"RouterClass","description":"Router class","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Initialize router. This method should be call in file with router class definition.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"initRouter: function (RouterClass) {\n\t\t\t\t\trouter = new RouterClass();\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?Object"],"description":""},"name":"instanceWidget","tags":[{"type":"method","string":"instanceWidget"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true},{"type":"return","types":["?Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Build instance of widget and binding events<br />Returns error when empty element is passed</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"instanceWidget: function (element, name, options) {\n\t\t\t\t\tvar binding = getBinding(element, name),\n\t\t\t\t\t\tdefinition;\n\n\t\t\t\t\tif (!element) {\n\t\t\t\t\t\tns.error(\"'element' cannot be empty\");\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!binding && widgetDefs[name]) {\n\t\t\t\t\t\tdefinition = widgetDefs[name];\n\t\t\t\t\t\telement = processHollowWidget(element, definition, options);\n\t\t\t\t\t\tbinding = getBinding(element, name);\n\t\t\t\t\t}\n\t\t\t\t\treturn binding;\n\t\t\t\t},\n\n\t\t\t\tstop: stop,"},{"params":[{"type":"param","types":"boolean","name":"newJustBuild","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"setJustBuild","tags":[{"type":"method","string":"setJustBuild"},{"type":"param","types":"boolean","name":"newJustBuild","description":"","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Method to change build mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"setJustBuild: function (newJustBuild) {\n\t\t\t\t\t// Set location hash to have a consistent behavior\n\t\t\t\t\tif(newJustBuild){\n\t\t\t\t\t\tlocation.hash = \"build\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlocation.hash = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tjustBuild = newJustBuild;\n\t\t\t\t},"},{"params":[],"hasParams":false,"return":{"type":"return","types":["boolean"],"description":""},"name":"getJustBuild","tags":[{"type":"method","string":"getJustBuild"},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.engine"}],"example":"","brief":"<p>Method to get build mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getJustBuild: function () {\n\t\t\t\t\treturn justBuild;\n\t\t\t\t},\n\t\t\t\t_createEventHandler : createEventHandler\n\t\t\t};\n\n\t\t\tengine.eventType = eventType;\n\t\t\tns.engine = engine;\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.jqm","authors":[],"title":"jQuery Mobile mapping class","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns, $) {\n\t\n\t\t\t\tns.jqm.colors = {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"init","tags":[{"type":"method","string":"init"},{"type":"member","string":"ns.jqm"},{"type":"static","string":""}],"example":"","brief":"<p>Proxy colors library from ns namespace to jQM namespace</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"init: function () {\n\t\t\t\t\tif ($) {\n\t\t\t\t\t\t$.mobile.tizen.clrlib = ns.utils.colors;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\t// Listen when framework is ready\n\t\t\tdocument.addEventListener(ns.engine.eventType.INIT, function () {\n\t\t\t\tns.jqm.colors.init();\n\t\t\t}, false);\n\n\t\t\t}(window, window.document, ns, ns.jqm.jQuery));"}]},{"name":"ns.utils.object","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Piotr Karny <p.karny@samsung.com>"],"title":"Object utilities","brief":"Namespace with helpers function connected with objects.","description":"","isPrivate":false,"isInternal":false,"code":"(function (ns) {\n\t\n\t\n\t\t\tvar object = {","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"orgObject","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"copy","tags":[{"type":"method","string":"copy"},{"type":"param","types":"Object","name":"orgObject","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.object"}],"example":"","brief":"<p>Copy object to new object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"copy: function (orgObject) {\n\t\t\t\t\treturn object.merge({}, orgObject);\n\t\t\t\t},"},{"params":[{"type":"param","types":"Object","name":"newObject","description":"","isOptional":false},{"type":"param","types":"Object","name":"orgObject","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"fastMerge","tags":[{"type":"method","string":"fastMerge"},{"type":"param","types":"Object","name":"newObject","description":"","isOptional":false},{"type":"param","types":"Object","name":"orgObject","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.object"}],"example":"","brief":"<p>Attach fields from second object to first object.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"fastMerge: function (newObject, orgObject) {\n\t\t\t\t\tvar key;\n\t\t\t\t\tfor (key in orgObject) {\n\t\t\t\t\t\tif (orgObject.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tnewObject[key] = orgObject[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn newObject;\n\t\t\t\t},"},{"params":[{"type":"param","types":"Object","name":"newObject","description":"","isOptional":false},{"type":"param","types":"...Object","name":"orgObject","description":"","isOptional":false},{"type":"param","types":"boolean","name":"override","description":"","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"merge","tags":[{"type":"method","string":"merge"},{"type":"param","types":"Object","name":"newObject","description":"","isOptional":false},{"type":"param","types":"...Object","name":"orgObject","description":"","isOptional":false},{"type":"param","types":"boolean","name":"override","description":"","defaultValue":"true","isOptional":true,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""},{"type":"member","string":"ns.utils.object"}],"example":"","brief":"<p>Attach fields from second and next object to first object.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"merge: function ("},{"params":[{"type":"param","types":"Function","name":"Constructor","description":"","isOptional":false},{"type":"param","types":"Function","name":"Base","description":"","isOptional":false},{"type":"param","types":"Object","name":"prototype","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"inherit","tags":[{"type":"method","string":"inherit"},{"type":"param","types":"Function","name":"Constructor","description":"","isOptional":false},{"type":"param","types":"Function","name":"Base","description":"","isOptional":false},{"type":"param","types":"Object","name":"prototype","description":"","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.utils.object"}],"example":"","brief":"<p>Function add to Constructor prototype Base object and add to prototype properties and methods from<br />prototype object.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true}]},{"name":"ns.utils.DOM","authors":["Jadwiga Sosnowska <j.sosnowska@partner.samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Maciej Moczulski <m.moczulski@samsung.com>","Piotr Karny <p.karny@samsung.com>"],"title":"DOM Object","brief":"Utilities object with function to manipulation DOM","description":"<h1>How to replace jQuery methods  by ns methods</h1>\n\n<h2>append vs {@link #appendNodes}</h2>\n\n<h4>HTML code before manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;And&lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h4>jQuery manipulation</h4>\n\n<pre><code>@example\n$( \"#second\" ).append( \"&lt;span&gt;Test&lt;/span&gt;\" );\n</code></pre>\n\n<h4>ns manipulation</h4>\n\n<pre><code>@example\nvar context = document.getElementById(\"second\"),\n    element = document.createElement(\"span\");\nelement.innerHTML = \"Test\";\nns.utils.DOM.appendNodes(context, element);\n</code></pre>\n\n<h4>HTML code after manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;And\n        &lt;span&gt;Test&lt;/span&gt;\n    &lt;/div&gt;\n   &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h2>replaceWith vs {@link #replaceWithNodes}</h2>\n\n<h4>HTML code before manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;And&lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h4>jQuery manipulation</h4>\n\n<pre><code>@example\n$('#second').replaceWith(\"&lt;span&gt;Test&lt;/span&gt;\");\n</code></pre>\n\n<h4>ns manipulation</h4>\n\n<pre><code>@example\nvar context = document.getElementById(\"second\"),\n    element = document.createElement(\"span\");\nelement.innerHTML = \"Test\";\nns.utils.DOM.replaceWithNodes(context, element);\n</code></pre>\n\n<h4>HTML code after manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;span&gt;Test&lt;/span&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h2>before vs {@link #insertNodesBefore}</h2>\n\n<h4>HTML code before manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;And&lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h4>jQuery manipulation</h4>\n\n<pre><code>@example\n$( \"#second\" ).before( \"&lt;span&gt;Test&lt;/span&gt;\" );\n</code></pre>\n\n<h4>ns manipulation</h4>\n\n<pre><code>@example\nvar context = document.getElementById(\"second\"),\n    element = document.createElement(\"span\");\nelement.innerHTML = \"Test\";\nns.utils.DOM.insertNodesBefore(context, element);\n</code></pre>\n\n<h4>HTML code after manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;span&gt;Test&lt;/span&gt;\n    &lt;div id=\"second\"&gt;And&lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h2>wrapInner vs {@link #wrapInHTML}</h2>\n\n<h4>HTML code before manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;And&lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h4>jQuery manipulation</h4>\n\n<pre><code>@example\n$( \"#second\" ).wrapInner( \"&lt;span class=\"new\"&gt;&lt;/span&gt;\" );\n</code></pre>\n\n<h4>ns manipulation</h4>\n\n<pre><code>@example\nvar element = document.getElementById(\"second\");\nns.utils.DOM.wrapInHTML(element, \"&lt;span class=\"new\"&gt;&lt;/span&gt;\");\n</code></pre>\n\n<h4>HTML code after manipulation</h4>\n\n<pre><code>@example\n&lt;div&gt;\n    &lt;div id=\"first\"&gt;Hello&lt;/div&gt;\n    &lt;div id=\"second\"&gt;\n        &lt;span class=\"new\"&gt;And&lt;/span&gt;\n    &lt;/div&gt;\n    &lt;div id=\"third\"&gt;Goodbye&lt;/div&gt;\n&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (ns) {\n\t\n\t\t\t\tns.utils.DOM = ns.utils.DOM || {};\n\t\t\t}(ns));","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"attr","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?string"],"description":""},"name":"inheritAttr","tags":[{"type":"method","string":"inheritAttr"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"attr","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["?string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Returns given attribute from element or the closest parent,<br />which matches the selector.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.inheritAttr = function (element, attr, selector) {\n\t\t\t\tvar value = element.getAttribute(attr),\n\t\t\t\t\tparent;\n\t\t\t\tif (!value) {\n\t\t\t\t\tparent = selectors.getClosestBySelector(element, selector);\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\treturn parent.getAttribute(attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"attribute","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"auto type casting","isOptional":true},{"type":"param","types":"number","name":"defaultValue","description":"default returned value","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number"],"description":""},"name":"getNumberFromAttribute","tags":[{"type":"method","string":"getNumberFromAttribute"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"attribute","description":"","isOptional":false},{"type":"param","types":"string","name":"type","description":"auto type casting","isOptional":true},{"type":"param","types":"number","name":"defaultValue","description":"default returned value","isOptional":true,"isLast":true},{"type":"static","string":""},{"type":"return","types":["number"],"description":""}],"example":"","brief":"<p>Returns Number from properties described in html tag</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.getNumberFromAttribute = function (element, attribute, type, defaultValue) {\n\t\t\t\tvar value = element.getAttribute(attribute),\n\t\t\t\t\tresult = defaultValue;\n\n\t\t\t\tif (value) {\n\t\t\t\t\tif (type === \"float\") {\n\t\t\t\t\t\tvalue = parseFloat(value);\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\tresult = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = parseInt(value, 10);\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\tresult = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};\n\n\t\t\tfunction getDataName(name) {\n\t\t\t\tvar namespace = ns.get(namespace);\n\t\t\t\treturn \"data-\" + (namespace ? namespace + \"-\" : \"\") + name;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false},{"type":"param","types":"string | number | boolean","name":"value","description":"New value","isOptional":false,"isLast":true}],"hasParams":true,"name":"setNSData","tags":[{"type":"method","string":"setNSData"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false},{"type":"param","types":"string | number | boolean","name":"value","description":"New value","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>This function sets value of attribute data-{namespace}-{name} for element.<br />If the namespace is empty, the attribute data-{name} is used.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.setNSData = function (element, name, value) {\n\t\t\t\telement.setAttribute(getDataName(name), value);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?string","boolean"],"description":""},"name":"getNSData","tags":[{"type":"method","string":"getNSData"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"return","types":["?string","boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>This function returns value of attribute data-{namespace}-{name} for element.<br />If the namespace is empty, the attribute data-{name} is used.<br />Method may return boolean in case of 'true' or 'false' strings as attribute value.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.getNSData = function (element, name) {\n\t\t\t\tvar value = element.getAttribute(getDataName(name));\n\n\t\t\t\tif (value === \"true\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (value === \"false\") {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"hasNSData","tags":[{"type":"method","string":"hasNSData"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>This function returns true if attribute data-{namespace}-{name} for element is set<br />or false in another case. If the namespace is empty, attribute data-{name} is used.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.hasNSData = function (element, name) {\n\t\t\t\treturn element.hasAttribute(getDataName(name));\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"nsData","tags":[{"type":"method","string":"nsData"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":true,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.utils.DOM"}],"example":"","brief":"<p>Get or set value on data attribute.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.nsData = function (element, name, value) {\n\t\t\t\t// @TODO add support for object in value\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\treturn DOM.getNSData(element, name);\n\t\t\t\t} else {\n\t\t\t\t\treturn DOM.setNSdata(element, name, value);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true}],"hasParams":true,"name":"removeNSData","tags":[{"type":"method","string":"removeNSData"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false},{"type":"param","types":"string","name":"name","description":"Name of attribute","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>This function removes attribute data-{namespace}-{name} from element.<br />If the namespace is empty, attribute data-{name} is used.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.removeNSData = function (element, name) {\n\t\t\t\telement.removeAttribute(getDataName(name));\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"getData","tags":[{"type":"method","string":"getData"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"return","types":["Object"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Returns object with all data-* attributes of element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.getData = function (element) {\n\t\t\t\tvar dataPrefix = \"data-\",\n\t\t\t\t\tdata = {},\n\t\t\t\t\tattrs = element.attributes,\n\t\t\t\t\tattr,\n\t\t\t\t\tnodeName,\n\t\t\t\t\ti,\n\t\t\t\t\tlength = attrs.length;\n\n\t\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\t\tattr = attrs.item(i);\n\t\t\t\t\tnodeName = attr.nodeName;\n\t\t\t\t\tif (nodeName.indexOf(dataPrefix) > -1) {\n\t\t\t\t\t\tdata[nodeName.replace(dataPrefix, \"\")] = attr.nodeValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn data;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"removeAttribute","tags":[{"type":"method","string":"removeAttribute"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>Special function to remove attribute and property in the same time</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.removeAttribute = function (element, name) {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t\telement[name] = false;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"setAttribute","tags":[{"type":"method","string":"setAttribute"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"name","description":"","isOptional":false},{"type":"param","types":"Mixed","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>Special function to set attribute and property in the same time</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.setAttribute = function (element, name, value) {\n\t\t\t\telement[name] = value;\n\t\t\t\telement.setAttribute(name, value);\n\t\t\t};\n\t\t\t}(window, window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"getElementOffset","tags":[{"type":"method","string":"getElementOffset"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>Returns offset of element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function getElementOffset(element) {\n\t\t\t\tvar left = 0,\n\t\t\t\t\ttop = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttop += element.offsetTop;\n\t\t\t\t\tleft += element.offsetLeft;\n\t\t\t\t\telement = element.offsetParent;\n\t\t\t\t} while (element !== null);\n\n\t\t\t\treturn {\n\t\t\t\t\ttop: top,\n\t\t\t\t\tleft: left\n\t\t\t\t};\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isOccupiedPlace","tags":[{"type":"method","string":"isOccupiedPlace"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>Check if element occupies place at view</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"function isOccupiedPlace(element) {\n\t\t\t\treturn !(element.offsetWidth <= 0 && element.offsetHeight <= 0);\n\t\t\t}\n\n\t\t\t// assign methods to namespace\n\t\t\tDOM.getCSSProperty = getCSSProperty;\n\t\t\tDOM.extractCSSProperties = extractCSSProperties;\n\t\t\tDOM.getElementHeight = getElementHeight;\n\t\t\tDOM.getElementWidth = getElementWidth;\n\t\t\tDOM.getElementOffset = getElementOffset;\n\t\t\tDOM.isOccupiedPlace = isOccupiedPlace;\n\n\t\t\t}(window, window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.utils.DOM"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice method</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice,\n\t\t\t\tDOM = ns.utils.DOM;"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement","Array","null"],"description":""},"name":"appendNodes","tags":[{"type":"method","string":"appendNodes"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement","Array","null"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Appends node or array-like node list array<br />to context</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.appendNodes = function (context, elements) {\n\t\t\t\tvar i,\n\t\t\t\t\tlen;\n\t\t\t\tif (context) {\n\t\t\t\t\tif (elements instanceof Array || elements instanceof NodeList || elements instanceof HTMLCollection) {\n\t\t\t\t\t\telements = slice.call(elements);\n\t\t\t\t\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\t\t\t\t\tcontext.appendChild(elements[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.appendChild(elements);\n\t\t\t\t\t}\n\t\t\t\t\treturn elements;\n\t\t\t\t}\n\n\t\t\t\tthrow \"Context empty!\";\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement","Array","null"],"description":""},"name":"replaceWithNodes","tags":[{"type":"method","string":"replaceWithNodes"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement","Array","null"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Replaces context with node or array-like node<br />list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.replaceWithNodes = function (context, elements) {\n\t\t\t\tif (elements instanceof Array || elements instanceof NodeList || elements instanceof HTMLCollection) {\n\t\t\t\t\telements = this.insertNodesBefore(context, elements);\n\t\t\t\t\tcontext.parentNode.removeChild(context);\n\t\t\t\t} else {\n\t\t\t\t\tcontext.parentNode.replaceChild(elements, context);\n\t\t\t\t}\n\t\t\t\treturn elements;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"removeAllChildren","tags":[{"type":"method","string":"removeAllChildren"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false,"isLast":true},{"type":"static","string":""}],"example":"","brief":"<p>Remove all children</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.removeAllChildren = function (context) {\n\t\t\t\tcontext.innerHTML = \"\";\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement","Array","null"],"description":""},"name":"insertNodesBefore","tags":[{"type":"method","string":"insertNodesBefore"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement | HTMLCollection | NodeList | Array","name":"elements","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement","Array","null"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Inserts node or array-like node list before<br />context</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.insertNodesBefore = function (context, elements) {\n\t\t\t\tvar i,\n\t\t\t\t\tlen,\n\t\t\t\t\tparent;\n\t\t\t\tif (context) {\n\t\t\t\t\tparent = context.parentNode;\n\t\t\t\t\tif (elements instanceof Array || elements instanceof NodeList || elements instanceof HTMLCollection) {\n\t\t\t\t\t\telements = slice.call(elements);\n\t\t\t\t\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\t\t\t\t\tparent.insertBefore(elements[i], context);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.insertBefore(elements, context);\n\t\t\t\t\t}\n\t\t\t\t\treturn elements;\n\t\t\t\t}\n\n\t\t\t\tthrow \"Context empty!\";\n\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"insertNodeAfter","tags":[{"type":"method","string":"insertNodeAfter"},{"type":"member","string":"ns.utils.DOM"},{"type":"param","types":"HTMLElement","name":"context","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Inserts node after context</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.insertNodeAfter = function (context, element) {\n\t\t\t\tif (context) {\n\t\t\t\t\tcontext.parentNode.insertBefore(element, context.nextSibling);\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t\tthrow \"Context empty!\";\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement | NodeList | HTMLCollection | Array","name":"elements","description":"","isOptional":false},{"type":"param","types":"string","name":"html","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement","NodeList","Array"],"description":"wrapped element"},"name":"wrapInHTML","tags":[{"type":"method","string":"wrapInHTML"},{"type":"param","types":"HTMLElement | NodeList | HTMLCollection | Array","name":"elements","description":"","isOptional":false},{"type":"param","types":"string","name":"html","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement","NodeList","Array"],"description":"wrapped element"},{"type":"member","string":"ns.utils.DOM"},{"type":"static","string":""}],"example":"","brief":"<p>Wraps element or array-like node list in html<br />markup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"DOM.wrapInHTML = function (elements, html) {\n\t\t\t\tvar container = document.createElement(\"div\"),\n\t\t\t\t\tcontentFlag = false,\n\t\t\t\t\telementsLen = elements.length,\n\t\t\t\t\t//if elements is nodeList, retrieve parentNode of first node\n\t\t\t\t\toriginalParentNode = elementsLen ? elements[0].parentNode : elements.parentNode,\n\t\t\t\t\tnext = elementsLen ? elements[elementsLen - 1].nextSibling : elements.nextSibling,\n\t\t\t\t\tinnerContainer;\n\n\t\t\t\tfragment.appendChild(container);\n\t\t\t\thtml = html.replace(/(\\$\\{content\\})/gi, function () {\n\t\t\t\t\tcontentFlag = true;\n\t\t\t\t\treturn \"<span id='temp-container-\" + (++containerCounter) + \"'></span>\";\n\t\t\t\t});\n\t\t\t\tcontainer.innerHTML = html;\n\n\t\t\t\tif (contentFlag === true) {\n\t\t\t\t\tinnerContainer = container.querySelector(\"span#temp-container-\" + containerCounter);\n\t\t\t\t\telements = this.replaceWithNodes(innerContainer, elements);\n\t\t\t\t} else {\n\t\t\t\t\tinnerContainer = container.children[0];\n\t\t\t\t\telements = this.appendNodes(innerContainer || container, elements);\n\t\t\t\t}\n\n\t\t\t\t// move the nodes\n\t\t\t\twhile (fragment.firstChild.firstChild) {\n\t\t\t\t\tfragment2.appendChild(fragment.firstChild.firstChild);\n\t\t\t\t}\n\n\t\t\t\t// clean up\n\t\t\t\twhile (fragment.firstChild) {\n\t\t\t\t\tfragment.removeChild(fragment.firstChild);\n\t\t\t\t}\n\n\t\t\t\tif (originalParentNode) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\toriginalParentNode.insertBefore(fragment2, next);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toriginalParentNode.appendChild(fragment2);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// clean up\n\t\t\t\t\twhile (fragment2.firstChild) {\n\t\t\t\t\t\tfragment2.removeChild(fragment2.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn elements;\n\t\t\t};\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.BaseWidget","authors":["Jadwiga Sosnowska <j.sosnowska@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Tomasz Lukawski <t.lukawski@samsung.com>","Przemyslaw Ciezkowski <p.ciezkowski@samsung.com>","Maciej Urbanski <m.urbanski@samsung.com>","Piotr Karny <p.karny@samsung.com>","Michał Szepielak <m.szepielak@samsung.com>"],"title":"BaseWidget","brief":"Prototype class of widget","description":"<p>To build and initialize widget in JavaScript you have to use method {@link ns.engine#instanceWidget} . First argument for method<br />is HTMLElement, which specifies the element of widget. Second parameter is name of widget to create.</p>\n\n<p>If you load jQuery before initializing tau library, you can use standard jQuery UI Widget notation.</p>\n\n<h3>Examples</h3>\n\n<h4>Build widget from JavaScript</h4>\n\n<pre><code> @example\n var element = document.getElementById('id'),\n     ns.engine.instanceWidget(element, 'Button');\n</code></pre>\n\n<h4>Build widget from jQuery</h4>\n\n<pre><code> @example\n var element = $('#id').button();\n</code></pre>\n\n<h2>How to create new widget</h2>\n\n<pre><code> @example\n (function (ns) {\n\n      *              var BaseWidget = ns.widget.BaseWidget, // create alias to main objects\n                 ...\n                 arrayOfElements, // example of private property, common for all instances of widget\n                 Button = function () { // create local object with widget\n                     ...\n                 },\n                 prototype = new BaseWidget(); // add ns.widget.BaseWidget as prototype to widget's object, for better minification this should be assign to local variable and next variable should be assign to prototype of object\n\n             function closestEnabledButton(element) { // example of private method\n                 ...\n             }\n             ...\n\n             prototype.options = { //add default options to be read from data- attributes\n                 theme: 's',\n                 ...\n             };\n\n             prototype._build = function (template, element) { // method called when the widget is being built, should contain all HTML manipulation actions\n                 ...\n                 return element;\n             };\n\n             prototype._init = function (element) { // method called during initialization of widget, should contain all actions necessary fastOn application start\n                 ...\n                 return element;\n             };\n\n             prototype._bindEvents = function (element) { // method to bind all events, should contain all event bindings\n                 ...\n             };\n\n             prototype._enable = function (element) { // method called during invocation of enable() method\n                 ...\n             };\n\n             prototype._disable = function (element) { // method called during invocation of disable() method\n                 ...\n             };\n\n             prototype.refresh = function (element) { // example of public method\n                 ...\n             };\n\n             prototype._refresh = function () { // example of protected method\n                 ...\n             };\n\n             Button.prototype = prototype;\n\n             engine.defineWidget( // define widget\n                 \"Button\", //name of widget\n                 \"[data-role='button'],button,[type='button'],[type='submit'],[type='reset']\",  //widget's selector\n                 [ // public methods, here should be list all public method, without that method will not be available\n                     \"enable\",\n                     \"disable\",\n                     \"refresh\"\n                 ],\n                 Button, // widget's object\n                 \"mobile\" // widget's namespace\n             );\n             ns.widget.Button = Button;\n              *  }(ns));\n</code></pre>","isPrivate":false,"isInternal":true,"code":"(function (document, ns, undefined) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"}]},{"name":"ns.jqm.widgets","authors":[],"title":"jQuery Mobile mapping class","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns, $) {","properties":[],"options":[],"methods":[]},{"name":"ns.utils.zoom","authors":["Maciej Urbanski <m.urbanski@samsung.com>"],"title":"Zoom utilities","brief":"Namespace with helpers function connected with zoom.","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {\n\t\n\t\t\t\tvar meta = document.querySelector(\"meta[name=viewport]\"),\n\t\t\t\tinitialContent = meta && meta.getAttribute(\"content\"),\n\t\t\t\tdisabledZoom = initialContent + \",maximum-scale=1, user-scalable=no\",\n\t\t\t\tenabledZoom = initialContent + \",maximum-scale=10, user-scalable=yes\",\n\t\t\t\tdisabledInitially = /(user-scalable[\\s]*=[\\s]*no)|(maximum-scale[\\s]*=[\\s]*1)[$,\\s]/.test(initialContent),\n\t\t\t\tzoom = {\n\t\t\t\t\tenabled: !disabledInitially,\n\t\t\t\t\tlocked: false,\n\t\t\t\t\tdisable: function (lock) {\n\t\t\t\t\t\tif (!disabledInitially && !zoom.locked) {\n\t\t\t\t\t\t\tif (meta) {\n\t\t\t\t\t\t\t\tmeta.setAttribute(\"content\", disabledZoom);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tzoom.enabled = false;\n\t\t\t\t\t\t\tzoom.locked = lock || false;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tenable: function (unlock) {\n\t\t\t\t\t\tif (!disabledInitially && (!zoom.locked || unlock === true)) {\n\t\t\t\t\t\t\tif (meta) {\n\t\t\t\t\t\t\t\tmeta.setAttribute(\"content\", enabledZoom);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tzoom.enabled = true;\n\t\t\t\t\t\t\tzoom.locked = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\trestore: function () {\n\t\t\t\t\t\tif (!disabledInitially) {\n\t\t\t\t\t\t\tif (meta) {\n\t\t\t\t\t\t\t\tmeta.setAttribute(\"content\", initialContent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tzoom.enabled = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tns.utils.zoom = zoom;\n\t\t\t}(window, window.document, ns));","properties":[],"options":[],"methods":[]},{"name":"ns.events.vmouse","authors":[],"title":"Virtual Mouse Events","brief":"Reimplementation of jQuery Mobile virtual mouse events.","description":"<h2>Purpose</h2>\n\n<p>It will let for users to register callbacks to the standard events like bellow,<br />without knowing if device support touch or mouse events</p>","isPrivate":false,"isInternal":false,"properties":[{"types":"Object","tags":[{"type":"property","string":"{Object} vmouse"},{"type":"member","string":"ns.events.vmouse"},{"type":"static","string":""},{"type":"private","string":""}],"description":"<p>Object with default options</p>","isPrivate":false,"code":"var vmouse,","name":"vmouse"},{"types":"number","defaultValue":"10","tags":[{"type":"property","string":"{number} [eventDistanceThreshold=10]"},{"type":"member","string":"ns.events.vmouse"},{"type":"private","string":""},{"type":"static","string":""},{"type":"instance","string":""}],"description":"<p>Sets the distance of pixels after which the scroll event will be successful</p>","isPrivate":false,"code":"eventDistanceThreshold: 10,\n\n\t\t\t\ttouchSupport: touchSupport\n\t\t\t};","name":"eventDistanceThreshold"}],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"from","description":"Sets the original event","isOptional":false},{"type":"param","types":"Object","name":"to","description":"Sets the new events","isOptional":false},{"type":"param","types":"Object","name":"props","description":"Describe parameters which will be copied from Original to To event","isOptional":false,"isLast":true}],"hasParams":true,"name":"copyProps","tags":[{"type":"method","string":"copyProps"},{"type":"param","types":"Object","name":"from","description":"Sets the original event","isOptional":false},{"type":"param","types":"Object","name":"to","description":"Sets the new events","isOptional":false},{"type":"param","types":"Object","name":"props","description":"Describe parameters which will be copied from Original to To event","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Extends objects with other objects</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function copyProps(from, to, props) {\n\t\t\t\tvar i,\n\t\t\t\t\tlen,\n\t\t\t\t\tdescriptor;\n\n\t\t\t\tfor (i = 0, len = props.length; i < len; ++i) {\n\t\t\t\t\tif (isNaN(from[props[i]]) === false) {\n\t\t\t\t\t\tdescriptor = Object.getOwnPropertyDescriptor(to, props[i]);\n\t\t\t\t\t\tif (!descriptor || descriptor.writable) {\n\t\t\t\t\t\t\tto[props[i]] = from[props[i]];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"string","name":"newType","description":"gives a name for the new Type of event","isOptional":false},{"type":"param","types":"Event","name":"original","description":"Event which trigger the new event","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Event"],"description":""},"name":"createEvent","tags":[{"type":"method","string":"createEvent"},{"type":"param","types":"string","name":"newType","description":"gives a name for the new Type of event","isOptional":false},{"type":"param","types":"Event","name":"original","description":"Event which trigger the new event","isOptional":false,"isLast":true},{"type":"return","types":["Event"],"description":""},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Create custom event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function createEvent(newType, original) {\n\t\t\t\tvar evt = new CustomEvent(newType, {\n\t\t\t\t\t\"bubbles\": original.bubbles,\n\t\t\t\t\t\"cancelable\": original.cancelable,\n\t\t\t\t\t\"detail\": original.detail\n\t\t\t\t}),\n\t\t\t\t\torginalType = original.type,\n\t\t\t\t\tchangeTouches,\n\t\t\t\t\ttouch,\n\t\t\t\t\tj = 0,\n\t\t\t\t\tlen,\n\t\t\t\t\tprop;\n\n\t\t\t\tcopyProps(original, evt, eventProps);\n\t\t\t\tevt._originalEvent = original;\n\n\t\t\t\tif (orginalType.indexOf(\"touch\") !== -1) {\n\t\t\t\t\torginalType = original.touches;\n\t\t\t\t\tchangeTouches = original.changedTouches;\n\n\t\t\t\t\tif (orginalType && orginalType.length) {\n\t\t\t\t\t\ttouch = orginalType[0];\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttouch = (changeTouches && changeTouches.length) ? changeTouches[0] : null;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (touch) {\n\t\t\t\t\t\tfor (len = touchEventProps.length; j < len; j++) {\n\t\t\t\t\t\t\tprop = touchEventProps[j];\n\t\t\t\t\t\t\tevt[prop] = touch[prop];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn evt;\n\t\t\t}"},{"params":[{"type":"param","types":"string","name":"eventName","description":"event name","isOptional":false},{"type":"param","types":"Event","name":"evt","description":"original event","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"fireEvent","tags":[{"type":"method","string":"fireEvent"},{"type":"param","types":"string","name":"eventName","description":"event name","isOptional":false},{"type":"param","types":"Event","name":"evt","description":"original event","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Dispatch Events</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function fireEvent(eventName, evt) {\n\t\t\t\treturn evt.target.dispatchEvent(createEvent(eventName, evt));\n\t\t\t}\n\n\t\t\teventProps = [\n\t\t\t\t\"currentTarget\",\n\t\t\t\t\"detail\",\n\t\t\t\t\"button\",\n\t\t\t\t\"buttons\",\n\t\t\t\t\"clientX\",\n\t\t\t\t\"clientY\",\n\t\t\t\t\"offsetX\",\n\t\t\t\t\"offsetY\",\n\t\t\t\t\"pageX\",\n\t\t\t\t\"pageY\",\n\t\t\t\t\"screenX\",\n\t\t\t\t\"screenY\",\n\t\t\t\t\"toElement\"\n\t\t\t];\n\n\t\t\tvmouse = {"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleDown","tags":[{"type":"method","string":"handleDown"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click down</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleDown(evt) {\n\t\t\t\tfireEvent(\"vmousedown\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleClick","tags":[{"type":"method","string":"handleClick"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleClick(evt) {\n\t\t\t\tfireEvent(\"vclick\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleUp","tags":[{"type":"method","string":"handleUp"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click up</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleUp(evt) {\n\t\t\t\tfireEvent(\"vmouseup\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleMove","tags":[{"type":"method","string":"handleMove"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click move</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleMove(evt) {\n\t\t\t\tfireEvent(\"vmousemove\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleOver","tags":[{"type":"method","string":"handleOver"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click over</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleOver(evt) {\n\t\t\t\tfireEvent(\"vmouseover\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleOut","tags":[{"type":"method","string":"handleOut"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle click out</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleOut(evt) {\n\t\t\t\tfireEvent(\"vmouseout\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleTouchStart","tags":[{"type":"method","string":"handleTouchStart"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle touch start</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleTouchStart(evt) {\n\t\t\t\tvar touches = evt.touches,\n\t\t\t\t\tfirstTouch;\n\t\t\t\t//if touches are registered and we have only one touch\n\t\t\t\tif (touches && touches.length === 1) {\n\t\t\t\t\tdidScroll = false;\n\t\t\t\t\tfirstTouch = touches[0];\n\t\t\t\t\tstartX = firstTouch.pageX;\n\t\t\t\t\tstartY = firstTouch.pageY;\n\t\t\t\t\tfireEvent(\"vmouseover\", evt);\n\t\t\t\t\tfireEvent(\"vmousedown\", evt);\n\t\t\t\t}\n\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleTouchEnd","tags":[{"type":"method","string":"handleTouchEnd"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle touch end</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleTouchEnd(evt) {\n\t\t\t\tfireEvent(\"vmouseup\", evt);\n\t\t\t\tfireEvent(\"vmouseout\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleTouchMove","tags":[{"type":"method","string":"handleTouchMove"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle touch move</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleTouchMove(evt) {\n\t\t\t\tvar over,\n\t\t\t\t\tfirstTouch = evt.touches && evt.touches[0],\n\t\t\t\t\tdidCancel = didScroll,\n\t\t\t\t\t//sets the threshold, based on which we consider if it was the touch-move event\n\t\t\t\t\tmoveThreshold = vmouse.eventDistanceThreshold;\n\n\t\t\t\tdidScroll = didScroll ||\n\t\t\t\t//check in both axes X,Y if the touch-move event occur\n\t\t\t\t\t(Math.abs(firstTouch.pageX - startX) > moveThreshold ||\n\t\t\t\t\tMath.abs(firstTouch.pageY - startY) > moveThreshold);\n\n\t\t\t\t// detect over event\n\t\t\t\t// for compatibility with mouseover because \"touchenter\" fires only once\n\t\t\t\tover = document.elementFromPoint(evt.pageX, evt.pageY);\n\t\t\t\tif (over) {\n\t\t\t\t\tfireEvent(\"_touchover\", evt);\n\t\t\t\t}\n\n\t\t\t\t//if didscroll occur and wasn't canceled then trigger touchend otherwise just touchmove\n\t\t\t\tif (didScroll && !didCancel) {\n\t\t\t\t\tfireEvent(\"vmousecancel\", evt);\n\t\t\t\t}\n\t\t\t\tfireEvent(\"vmousemove\", evt);\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleScroll","tags":[{"type":"method","string":"handleScroll"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle Scroll</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleScroll(evt) {\n\t\t\t\tif (!didScroll) {\n\t\t\t\t\tfireEvent(\"vmousecancel\", evt);\n\t\t\t\t}\n\t\t\t\tdidScroll = true;\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleTouchCancel","tags":[{"type":"method","string":"handleTouchCancel"},{"type":"param","types":"Event","name":"evt","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle touch cancel</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleTouchCancel(evt) {\n\t\t\t\tfireEvent(\"vmousecancel\", evt);\n\t\t\t}"},{"params":[],"hasParams":false,"name":"handleTouchOver","tags":[{"type":"method","string":"handleTouchOver"},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle touch cancel</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleTouchOver() {\n\t\t\t\treturn false;\n\t\t\t\t// @TODO add callback with handleTouchOver,\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleKeyUp","tags":[{"type":"method","string":"handleKeyUp"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle key up</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleKeyUp(event) {\n\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\tfireEvent(\"vmouseup\", event);\n\t\t\t\t\tfireEvent(\"vclick\", event);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"handleKeyDown","tags":[{"type":"method","string":"handleKeyDown"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.events.vmouse"}],"example":"","brief":"<p>Handle key down</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function handleKeyDown(event) {\n\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\tfireEvent(\"vmousedown\", event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// @TODO delete touchSupport flag and attach touch and mouse listeners,\n\t\t\t// @TODO check if v-events are not duplicated if so then called only once\n\n\t\t\tvmouse.bindTouch = function () {\n\t\t\t\tdocument.addEventListener(\"touchstart\", handleTouchStart, true);\n\t\t\t\tdocument.addEventListener(\"touchend\", handleTouchEnd, true);\n\t\t\t\tdocument.addEventListener(\"touchmove\", handleTouchMove, true);\n\n\t\t\t\t// @TODO add callback with handleTouchOver,\n\t\t\t\tdocument.addEventListener(\"touchenter\", handleTouchOver, true);\n\t\t\t\t// for compatibility with mouseover because \"touchenter\" fires only once\n\t\t\t\t// @TODO add callback with handleTouchOver,\n\t\t\t\tdocument.addEventListener(\"_touchover\", handleTouchOver, true);\n\t\t\t\t// document.addEventListener(\"touchleave\", callbacks.out, true);\n\t\t\t\tdocument.addEventListener(\"touchcancel\", handleTouchCancel, true);\n\n\t\t\t\tdocument.addEventListener(\"click\", handleClick, true);\n\t\t\t};\n\n\t\t\tvmouse.bindMouse = function () {\n\t\t\t\tdocument.addEventListener(\"mousedown\", handleDown, true);\n\n\t\t\t\tdocument.addEventListener(\"mouseup\", handleUp, true);\n\t\t\t\tdocument.addEventListener(\"mousemove\", handleMove, true);\n\t\t\t\tdocument.addEventListener(\"mouseover\", handleOver, true);\n\t\t\t\tdocument.addEventListener(\"mouseout\", handleOut, true);\n\n\t\t\t\tdocument.addEventListener(\"keyup\", handleKeyUp, true);\n\t\t\t\tdocument.addEventListener(\"keydown\", handleKeyDown, true);\n\t\t\t\tdocument.addEventListener(\"scroll\", handleScroll, true);\n\t\t\t\tdocument.addEventListener(\"click\", handleClick, true);\n\t\t\t};\n\n\t\t\tns.events.vmouse = vmouse;\n\n\t\t\tif (touchSupport) {\n\t\t\t\tvmouse.bindTouch();\n\t\t\t} else {\n\t\t\t\tvmouse.bindMouse();\n\t\t\t}\n\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.events.orientationchange","authors":[],"title":"Namespace to support orientationchange event","brief":"","description":"","isPrivate":false,"isInternal":false,"properties":[],"options":[],"methods":[]},{"name":"ns.events.touch","authors":[],"title":"Touch events","brief":"Reimplementation of jQuery Mobile virtual mouse events.","description":"","isPrivate":false,"isInternal":false,"properties":[],"options":[],"methods":[]},{"name":"ns.widget.mobile","authors":["Maciej Urbanski <m.urbanski@samsung.com>"],"title":"Widget Reference","type":"page","description":{"full":"<p>The Tizen Web UI service provides rich Tizen widgets that are optimized for the Tizen Web browser. You can use the widgets for:</p>\n\n<ul>\n<li>CSS animation</li>\n<li>Rendering</li>\n</ul>\n\n<p>The following table displays the widgets provided by the Tizen Web UI service.</p>","summary":"<p>The Tizen Web UI service provides rich Tizen widgets that are optimized for the Tizen Web browser. You can use the widgets for:</p>","body":"<ul>\n<li>CSS animation</li>\n<li>Rendering</li>\n</ul>\n\n<p>The following table displays the widgets provided by the Tizen Web UI service.</p>"},"seeMore":[{"file":"https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.uiwidget.apireference/html/web_ui_framework.htm","name":"\"Web UI Framework Reference\""}]},{"name":"ns.widget.mobile.BaseWidgetMobile","authors":[],"title":"Extenstion of class BaseWidget for mobile profile.This class has compability properties and methods with jQuery Mobile Widget.","brief":"","description":"","isPrivate":false,"isInternal":true,"code":"(function (document, ns) {\n\t\n\t\n\t\t\tvar BaseWidgetMobile = function () {\n\t\t\t\t\tthis.options = {};\n\t\t\t\t},\n\t\t\t\tBaseWidget = ns.widget.BaseWidget,\n\t\t\t\tbasePrototype = BaseWidget.prototype,\n\t\t\t\tparent_configure = basePrototype.configure,\n\t\t\t\tparent_disable = basePrototype.disable,\n\t\t\t\tparent_enable = basePrototype.enable,\n\t\t\t\tprototype = new BaseWidget(),\n\t\t\t\tdisableClass = \"ui-state-disabled\",\n\t\t\t\tariaDisabled = \"aria-disabled\",\n\t\t\t\tslice = [].slice;\n\n\t\t\tBaseWidgetMobile.classes = {\n\t\t\t\tdisable: disableClass\n\t\t\t};","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["BaseWidgetMobile"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\twidgetName;\n\t\t\t\tparent_configure.call(self, definition, element, options);\n\t\t\t\tif (definition) {\n\t\t\t\t\tdefinitionName = definition.name;\n\t\t\t\t\twidgetName = definitionName && definitionName.toLowerCase();"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget, call: #_disable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_disable.apply(self, args);\n\t\t\t\telementClasses.add(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.add(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, true);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_enable.apply(self, args);\n\t\t\t\telementClasses.remove(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.remove(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, false);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true}],"hasParams":true,"name":"raise","tags":[{"type":"method","string":"raise"},{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Throw exception</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.raise = function (msg) {\n\t\t\t\tthrow \"Widget [\" + this.widgetName + \"]: \" + msg;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhanceWithin","tags":[{"type":"method","string":"enhanceWithin"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhanceWithin = function () {\n\t\t\t\tns.log('method enhanceWithin is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhance","tags":[{"type":"method","string":"enhance"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhance = function () {\n\t\t\t\tns.log('method enhance is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"widget","tags":[{"type":"method","string":"widget"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Return element of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.widget = function () {\n\t\t\t\treturn this.element;\n\t\t\t};\n\n\t\t\tBaseWidgetMobile.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.BaseWidgetMobile = BaseWidgetMobile;\n\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.mobile.Loader","authors":[],"extends":"ns.widget.mobile.BaseWidget","title":"Loader widget","brief":"","description":"<p>Widget displaying loader popup on page changes.</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of loader widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar loader = ns.engine.instanceWidget(document.getElementById('ns-loader'), 'loader');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar loader = $('#ns-loader').loader();\n\n@example\n$.mobile.loading( 'show', {\n    text: 'foo',\n    textVisible: true,\n    theme: 'z',\n    html: \"\"\n});\n\n@example\n$.mobile.loading('hide');\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple loader pending from div using data-role:</h3>\n\n<pre><code>@example\n&lt;div data-role=\"loader\"&gt;&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (window, ns) {","properties":[],"options":[{"types":"string","defaultValue":"a","tags":[{"type":"property","string":"{string} [options.theme=a] the theme for the loading messages"},{"type":"property","string":"{string} [options.textVisible=false] whether the text in the loading message is shown"},{"type":"property","string":"{string} [options.html=''] custom html for the inner content of the loading messages"},{"type":"property","string":"{string} [options.text='loading'] the text to be displayed when the popup is shown"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instanceWidget","string":""}],"description":"the theme for the loading messages","isPrivate":false,"code":"prototype.options = {\n\t\t\t\ttheme: 'a',\n\t\t\t\ttextVisible: false,\n\t\t\t\thtml: '',\n\t\t\t\ttext: 'loading'\n\t\t\t};","name":"data-theme"},{"types":"string","defaultValue":"false","tags":[{"type":"property","string":"{string} [options.theme=a] the theme for the loading messages"},{"type":"property","string":"{string} [options.textVisible=false] whether the text in the loading message is shown"},{"type":"property","string":"{string} [options.html=''] custom html for the inner content of the loading messages"},{"type":"property","string":"{string} [options.text='loading'] the text to be displayed when the popup is shown"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instanceWidget","string":""}],"description":"whether the text in the loading message is shown","isPrivate":false,"code":"prototype.options = {\n\t\t\t\ttheme: 'a',\n\t\t\t\ttextVisible: false,\n\t\t\t\thtml: '',\n\t\t\t\ttext: 'loading'\n\t\t\t};","name":"data-text-visible"},{"types":"string","defaultValue":"''","tags":[{"type":"property","string":"{string} [options.theme=a] the theme for the loading messages"},{"type":"property","string":"{string} [options.textVisible=false] whether the text in the loading message is shown"},{"type":"property","string":"{string} [options.html=''] custom html for the inner content of the loading messages"},{"type":"property","string":"{string} [options.text='loading'] the text to be displayed when the popup is shown"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instanceWidget","string":""}],"description":"custom html for the inner content of the loading messages","isPrivate":false,"code":"prototype.options = {\n\t\t\t\ttheme: 'a',\n\t\t\t\ttextVisible: false,\n\t\t\t\thtml: '',\n\t\t\t\ttext: 'loading'\n\t\t\t};","name":"data-html"},{"types":"string","defaultValue":"'loading'","tags":[{"type":"property","string":"{string} [options.theme=a] the theme for the loading messages"},{"type":"property","string":"{string} [options.textVisible=false] whether the text in the loading message is shown"},{"type":"property","string":"{string} [options.html=''] custom html for the inner content of the loading messages"},{"type":"property","string":"{string} [options.text='loading'] the text to be displayed when the popup is shown"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instanceWidget","string":""}],"description":"the text to be displayed when the popup is shown","isPrivate":false,"code":"prototype.options = {\n\t\t\t\ttheme: 'a',\n\t\t\t\ttextVisible: false,\n\t\t\t\thtml: '',\n\t\t\t\ttext: 'loading'\n\t\t\t};","name":"data-text"}],"methods":[{"params":[],"hasParams":false,"name":"Loader","tags":[{"type":"method","string":"Loader"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"private","string":""}],"example":"","brief":"<p>Alias for class ns.widget.mobile.Loader</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Loader = function () {\n\t\t\t\t\tvar self = this;\n\t\t\t\t\tself.action = '';\n\t\t\t\t\tself.label = null;\n\t\t\t\t\tself.defaultHtml = '';\n\t\t\t\t\tself.options = object.copy(Loader.prototype.options);\n\t\t\t\t},\n\t\t\t\tclasses = {\n\t\t\t\t\tuiLoader: 'ui-loader',\n\t\t\t\t\tuiLoaderPrefix: 'ui-loader-',\n\t\t\t\t\tuiBodyPrefix: 'ui-body-',\n\t\t\t\t\tuiCorner: 'ui-corner-all',\n\t\t\t\t\tuiIcon: 'ui-icon',\n\t\t\t\t\tuiLoaderIcon: 'ui-icon-loading',\n\t\t\t\t\tuiLoading: 'ui-loading',\n\t\t\t\t\tuiTextOnly: 'ui-loader-textonly'\n\t\t\t\t},\n\t\t\t\tproperties = {\n\t\t\t\t\tpageLoadErrorMessageTheme: 'e',\n\t\t\t\t\tpageLoadErrorMessage: 'Error Loading Page'\n\t\t\t\t},\n\t\t\t\tprototype = new BaseWidget();"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of loader widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._build = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tloaderElementSpan = document.createElement('span'),\n\t\t\t\t\tloaderElementTile = document.createElement('h1'),\n\t\t\t\t\telementClassList = element.classList,\n\t\t\t\t\tspanClassList = loaderElementSpan.classList;\n\n\t\t\t\tloaderElementTile.textContent = options.text;\n\t\t\t\tspanClassList.add(classes.uiIcon);\n\t\t\t\tspanClassList.add(classes.uiLoaderIcon);\n\n\t\t\t\telement.appendChild(loaderElementSpan);\n\t\t\t\telement.appendChild(loaderElementTile);\n\t\t\t\telementClassList.add(classes.uiLoader);\n\t\t\t\telementClassList.add(classes.uiCorner);\n\t\t\t\telementClassList.add(classes.uiBodyPrefix + options.theme);\n\t\t\t\telementClassList.add(classes.uiLoaderPrefix + 'default');\n\n\t\t\t\tthis.defaultHtml = element.innerHTML;\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instance","string":""}],"example":"","brief":"<p>Init structure of loader widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tthis.defaultHtml = element.innerHTML;\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"resetHtml","tags":[{"type":"method","string":"resetHtml"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instance","string":""}],"example":"","brief":"<p>Reset HTML</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.resetHtml = function (element) {\n\t\t\t\telement = element || this.element;\n\t\t\t\telement.innerHTML = this.defaultHtml;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"Show","tags":[{"type":"method","string":"Show"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instance","string":""}],"example":"","brief":"<p>Show loader</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.show = function (theme, msgText, textonly) {\n\t\t\t\tvar classes = Loader.classes,\n\t\t\t\t\tself = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClassList = element.classList,\n\t\t\t\t\tbody = document.body,\n\t\t\t\t\tcopySettings = {},\n\t\t\t\t\tloadSettings = {},\n\t\t\t\t\ttextVisible,\n\t\t\t\t\tmessage;\n\n\t\t\t\tself.resetHtml(element);\n\n\t\t\t\tif (theme !== undefined && theme.constructor === Object) {\n\t\t\t\t\tcopySettings = object.copy(self.options);\n\t\t\t\t\tloadSettings = object.merge(copySettings, theme);\n\t\t\t\t\t// @todo remove $.mobile.loadingMessageTheme\n\t\t\t\t\ttheme = loadSettings.theme || $.mobile.loadingMessageTheme;\n\t\t\t\t} else {\n\t\t\t\t\tloadSettings = self.options;\n\t\t\t\t\t// @todo remove $.mobile.loadingMessageTheme\n\t\t\t\t\ttheme = theme || $.mobile.loadingMessageTheme || loadSettings.theme;\n\t\t\t\t}\n\n\t\t\t\t// @todo remove $.mobile.loadingMessage\n\t\t\t\tmessage = msgText || $.mobile.loadingMessage || loadSettings.text;\n\t\t\t\tdocument.documentElement.classList.add(classes.uiLoading);\n\n\t\t\t\t// @todo remove $.mobile.loadingMessage\n\t\t\t\tif ($.mobile.loadingMessage === false && !loadSettings.html) {\n\t\t\t\t\telement.getElementsByTagName('h1')[0].innerHTML = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t// @todo remove $.mobile.loadingMessageTextVisible\n\t\t\t\t\tif ($.mobile.loadingMessageTextVisible !== undefined) {\n\t\t\t\t\t\ttextVisible = $.mobile.loadingMessageTextVisible;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttextVisible = loadSettings.textVisible;\n\t\t\t\t\t}\n\n\t\t\t\t\telement.className = '';\n\t\t\t\t\telementClassList.add(classes.uiLoader);\n\t\t\t\t\telementClassList.add(classes.uiCorner);\n\t\t\t\t\telementClassList.add(classes.uiBodyPrefix + theme);\n\t\t\t\t\telementClassList.add(classes.uiLoaderPrefix + (textVisible || msgText || theme.text ? 'verbose' : 'default'));\n\n\t\t\t\t\tif ((loadSettings.textonly !== undefined && loadSettings.textonly) || textonly) {\n\t\t\t\t\t\telementClassList.add(classes.uiTextOnly);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (loadSettings.html) {\n\t\t\t\t\t\telement.innerHTML = loadSettings.html;\n\t\t\t\t\t} else {\n\t\t\t\t\t\telement.getElementsByTagName('h1')[0].textContent = message;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};"},{"params":[],"hasParams":false,"name":"hide","tags":[{"type":"method","string":"hide"},{"type":"member","string":"ns.widget.mobile.Loader"},{"type":"instance","string":""}],"example":"","brief":"<p>Hide loader</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.hide = function () {\n\t\t\t\tvar classes = Loader.classes;\n\t\t\t\tdocument.documentElement.classList.remove(classes.uiLoading);\n\t\t\t};\n\n\n\t\t\t// definition\n\t\t\tLoader.prototype = prototype;\n\t\t\tns.widget.mobile.Loader = Loader;\n\t\t\tengine.defineWidget(\n\t\t\t\t'Loader',\n\t\t\t\t'[data-role=\"loader\"], .ui-loader',\n\t\t\t\t[\n\t\t\t\t\t'show',\n\t\t\t\t\t'hide'\n\t\t\t\t],\n\t\t\t\tLoader,\n\t\t\t\t\"mobile\"\n\t\t\t);\n\n}(window.document, ns));"}]},{"name":"ns.utils.path","authors":["Tomasz Lukawski <t.lukawski@samsung.com>","Maciej Urbanski <m.urbanski@samsung.com>","Piotr Karny <p.karny@samsung.com>"],"title":"/**","brief":"Path","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {","properties":[{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.engine}"},{"type":"member","string":"ns.utils.path"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.engine}","isPrivate":false,"code":"var engine = ns.engine,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsObject Alias for {@link ns.utils.object}"},{"type":"member","string":"ns.utils.path"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.object}","isPrivate":false,"code":"utilsObject = ns.utils.object,","name":"utilsObject"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsSelectors Alias for {@link ns.utils.selectors}"},{"type":"member","string":"ns.utils.path"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.selectors}","isPrivate":false,"code":"utilsSelectors = ns.utils.selectors,","name":"utilsSelectors"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsDOM Alias for {@link ns.utils.DOM}"},{"type":"member","string":"ns.utils.path"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.DOM}","isPrivate":false,"code":"utilsDOM = ns.utils.DOM,","name":"utilsDOM"},{"types":"HTMLBaseElement","tags":[{"type":"member","string":"ns.utils.path"},{"type":"property","string":"{HTMLBaseElement} base"},{"type":"static","string":""},{"type":"private","string":""}],"description":"<p>Cache for document base element</p>","isPrivate":false,"code":"base,","name":"base"},{"types":"Object","tags":[{"type":"property","string":"{Object} location"},{"type":"static","string":""},{"type":"private","string":""},{"type":"member","string":"ns.utils.path"}],"description":"<p>location object</p>","isPrivate":false,"code":"location = {},\n\t\t\t\tpath = {","name":"location"},{"types":"string","defaultValue":"\"&ui-state\"","tags":[{"type":"property","string":"{string} [uiStateKey=\"&ui-state\"]"},{"type":"static","string":""},{"type":"member","string":"ns.utils.path"}],"description":"<p>href part for mark state</p>","isPrivate":false,"code":"uiStateKey: \"&ui-state\",\n\n\t\t\t\t\t// This scary looking regular expression parses an absolute URL or its relative\n\t\t\t\t\t// variants (protocol, site, document, query, and hash), into the various\n\t\t\t\t\t// components (protocol, host, path, query, fragment, etc that make up the\n\t\t\t\t\t// URL as well as some other commonly used sub-parts. When used with RegExp.exec()\n\t\t\t\t\t// or String.match, it parses the URL into a results array that looks like this:\n\t\t\t\t\t//\n\t\t\t\t\t//\t[0]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread#msg-content\n\t\t\t\t\t//\t[1]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread\n\t\t\t\t\t//\t[2]: http://jblas:password@mycompany.com:8080/mail/inbox\n\t\t\t\t\t//\t[3]: http://jblas:password@mycompany.com:8080\n\t\t\t\t\t//\t[4]: http:\n\t\t\t\t\t//\t[5]: //\n\t\t\t\t\t//\t[6]: jblas:password@mycompany.com:8080\n\t\t\t\t\t//\t[7]: jblas:password\n\t\t\t\t\t//\t[8]: jblas\n\t\t\t\t\t//\t[9]: password\n\t\t\t\t\t//\t[10]: mycompany.com:8080\n\t\t\t\t\t//\t[11]: mycompany.com\n\t\t\t\t\t//\t[12]: 8080\n\t\t\t\t\t//\t[13]: /mail/inbox\n\t\t\t\t\t//\t[14]: /mail/\n\t\t\t\t\t//\t[15]: inbox\n\t\t\t\t\t//\t[16]: ?msg=1234&type=unread\n\t\t\t\t\t//\t[17]: #msg-content\n\t\t\t\t\t//","name":"uiStateKey"},{"types":"string | null","tags":[{"type":"member","string":"ns.utils.path"},{"type":"property","string":"{string|null} documentUrl"}],"description":"<p>Document Url</p>","isPrivate":false,"code":"documentUrl: null,","name":"documentUrl"},{"types":"boolean","tags":[{"type":"member","string":"ns.utils.path"},{"type":"property","string":"{boolean} documentBaseDiffers"}],"description":"<p>The document base differs</p>","isPrivate":false,"code":"documentBaseDiffers: false,","name":"documentBaseDiffers"},{"types":"Object","tags":[{"type":"member","string":"ns.utils.path"},{"type":"property","string":"{Object} documentBase uri structure"},{"type":"static","string":""}],"description":"uri structure","isPrivate":false,"code":"path.documentBase = base ? path.parseUrl(path.makeUrlAbsolute(base.getAttribute(\"href\"), path.documentUrl.href)) : path.documentUrl;\n\n\t\t\tpath.documentBaseDiffers = (path.documentUrl.hrefNoHash !== path.documentBase.hrefNoHash);","name":"documentBase"}],"options":[],"methods":[{"params":[{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"getLocation","tags":[{"type":"method","string":"getLocation"},{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"member","string":"ns.utils.path"}],"example":"","brief":"<p>Abstraction to address xss (Issue #4787) by removing the authority in<br />browsers that auto decode it. All references to location.href should be<br />replaced with a call to this method so that it can be dealt with properly here</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getLocation: function (url) {\n\t\t\t\t\t\tvar uri = this.parseUrl(url || window.location.href),\n\t\t\t\t\t\t\thash = uri.hash;\n\t\t\t\t\t\t// mimic the browser with an empty string when the hash is empty\n\t\t\t\t\t\thash = hash === \"#\" ? \"\" : hash;\n\t\t\t\t\t\tlocation = uri;\n\t\t\t\t\t\t// Make sure to parse the url or the location object for the hash because using location.hash\n\t\t\t\t\t\t// is autodecoded in firefox, the rest of the url should be from the object (location unless\n\t\t\t\t\t\t// we're testing) to avoid the inclusion of the authority\n\t\t\t\t\t\treturn uri.protocol + \"//\" + uri.host + uri.pathname + uri.search + hash;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"boolean","name":"asParsedObject","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string","Object"],"description":""},"name":"getDocumentUrl","tags":[{"type":"method","string":"getDocumentUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"boolean","name":"asParsedObject","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"return","types":["string","Object"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Return the original document url</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getDocumentUrl: function (asParsedObject) {\n\t\t\t\t\t\treturn asParsedObject ? utilsObject.copy(path.documentUrl) : path.documentUrl.href;\n\t\t\t\t\t},"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"parseLocation","tags":[{"type":"method","string":"parseLocation"},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.utils.path"}],"example":"","brief":"<p>Parse a location into a structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"parseLocation: function () {\n\t\t\t\t\t\treturn this.parseUrl(this.getLocation());\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":"uri record"},"name":"parseUrl","tags":[{"type":"method","string":"parseUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":"uri record"},{"type":"return","types":["string"],"description":"return.href"},{"type":"return","types":["string"],"description":"return.hrefNoHash"},{"type":"return","types":["string"],"description":"return.hrefNoSearch"},{"type":"return","types":["string"],"description":"return.domain"},{"type":"return","types":["string"],"description":"return.protocol"},{"type":"return","types":["string"],"description":"return.doubleSlash"},{"type":"return","types":["string"],"description":"return.authority"},{"type":"return","types":["string"],"description":"return.username"},{"type":"return","types":["string"],"description":"return.password"},{"type":"return","types":["string"],"description":"return.host"},{"type":"return","types":["string"],"description":"return.hostname"},{"type":"return","types":["string"],"description":"return.port"},{"type":"return","types":["string"],"description":"return.pathname"},{"type":"return","types":["string"],"description":"return.directory"},{"type":"return","types":["string"],"description":"return.filename"},{"type":"return","types":["string"],"description":"return.search"},{"type":"return","types":["string"],"description":"return.hash"},{"type":"static","string":""}],"example":"","brief":"<p>Parse a URL into a structure that allows easy access to<br />all of the URL components by name.<br />If we're passed an object, we'll assume that it is<br />a parsed url object and just return it back to the caller.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"parseUrl: function (url) {\n\t\t\t\t\t\tvar matches;\n\t\t\t\t\t\tif (typeof url === \"object\") {\n\t\t\t\t\t\t\treturn url;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmatches = path.urlParseRE.exec(url || \"\") || [];\n\n\t\t\t\t\t\t\t// Create an object that allows the caller to access the sub-matches\n\t\t\t\t\t\t\t// by name. Note that IE returns an empty string instead of undefined,\n\t\t\t\t\t\t\t// like all other browsers do, so we normalize everything so its consistent\n\t\t\t\t\t\t\t// no matter what browser we're running on.\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\thref:\t\tmatches[0] || \"\",\n\t\t\t\t\t\t\threfNoHash:   matches[1] || \"\",\n\t\t\t\t\t\t\threfNoSearch: matches[2] || \"\",\n\t\t\t\t\t\t\tdomain:\tmatches[3] || \"\",\n\t\t\t\t\t\t\tprotocol:\tmatches[4] || \"\",\n\t\t\t\t\t\t\tdoubleSlash:  matches[5] || \"\",\n\t\t\t\t\t\t\tauthority:\tmatches[6] || \"\",\n\t\t\t\t\t\t\tusername:\tmatches[8] || \"\",\n\t\t\t\t\t\t\tpassword:\tmatches[9] || \"\",\n\t\t\t\t\t\t\thost:\t\tmatches[10] || \"\",\n\t\t\t\t\t\t\thostname:\tmatches[11] || \"\",\n\t\t\t\t\t\t\tport:\t\tmatches[12] || \"\",\n\t\t\t\t\t\t\tpathname:\tmatches[13] || \"\",\n\t\t\t\t\t\t\tdirectory:\tmatches[14] || \"\",\n\t\t\t\t\t\t\tfilename:\tmatches[15] || \"\",\n\t\t\t\t\t\t\tsearch:\tmatches[16] || \"\",\n\t\t\t\t\t\t\thash:\t\tmatches[17] || \"\"\n\t\t\t\t\t\t};\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"relPath","description":"","isOptional":false},{"type":"param","types":"string","name":"absPath","description":"","defaultValue":"\"\"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"makePathAbsolute","tags":[{"type":"method","string":"makePathAbsolute"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"relPath","description":"","isOptional":false},{"type":"param","types":"string","name":"absPath","description":"","defaultValue":"\"\"","isOptional":true,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Turn relPath into an asbolute path. absPath is<br />an optional absolute path which describes what<br />relPath is relative to.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"makePathAbsolute: function (relPath, absPath) {\n\t\t\t\t\t\tvar absStack,\n\t\t\t\t\t\t\trelStack,\n\t\t\t\t\t\t\tdirectory,\n\t\t\t\t\t\t\ti;\n\t\t\t\t\t\tif (relPath && relPath.charAt(0) === \"/\") {\n\t\t\t\t\t\t\treturn relPath;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trelPath = relPath || \"\";\n\t\t\t\t\t\tabsPath = absPath ? absPath.replace(/^\\/|(\\/[^\\/]*|[^\\/]+)$/g, \"\") : \"\";\n\n\t\t\t\t\t\tabsStack = absPath ? absPath.split(\"/\") : [];\n\t\t\t\t\t\trelStack = relPath.split(\"/\");\n\t\t\t\t\t\tfor (i = 0; i < relStack.length; i++) {\n\t\t\t\t\t\t\tdirectory = relStack[i];\n\t\t\t\t\t\t\tswitch (directory) {\n\t\t\t\t\t\t\tcase \".\":\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"..\":\n\t\t\t\t\t\t\t\tif (absStack.length) {\n\t\t\t\t\t\t\t\t\tabsStack.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tabsStack.push(directory);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"/\" + absStack.join(\"/\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string | Object","name":"absUrl1","description":"","isOptional":false},{"type":"param","types":"string | Object","name":"absUrl2","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isSameDomain","tags":[{"type":"method","string":"isSameDomain"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string | Object","name":"absUrl1","description":"","isOptional":false},{"type":"param","types":"string | Object","name":"absUrl2","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Returns true if both urls have the same domain.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isSameDomain: function (absUrl1, absUrl2) {\n\t\t\t\t\t\treturn path.parseUrl(absUrl1).domain === path.parseUrl(absUrl2).domain;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isRelativeUrl","tags":[{"type":"method","string":"isRelativeUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Returns true for any relative variant.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isRelativeUrl: function (url) {\n\t\t\t\t\t\t// All relative Url variants have one thing in common, no protocol.\n\t\t\t\t\t\treturn path.parseUrl(url).protocol === \"\";\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"relUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"absUrl","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"makeUrlAbsolute","tags":[{"type":"method","string":"makeUrlAbsolute"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"relUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"absUrl","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Turn the specified realtive URL into an absolute one. This function<br />can handle all relative variants (protocol, site, document, query, fragment).</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"makeUrlAbsolute: function (relUrl, absUrl) {\n\t\t\t\t\t\tif (!path.isRelativeUrl(relUrl)) {\n\t\t\t\t\t\t\treturn relUrl;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar relObj = path.parseUrl(relUrl),\n\t\t\t\t\t\t\tabsObj = path.parseUrl(absUrl),\n\t\t\t\t\t\t\tprotocol = relObj.protocol || absObj.protocol,\n\t\t\t\t\t\t\tdoubleSlash = relObj.protocol ? relObj.doubleSlash : (relObj.doubleSlash || absObj.doubleSlash),\n\t\t\t\t\t\t\tauthority = relObj.authority || absObj.authority,\n\t\t\t\t\t\t\thasPath = relObj.pathname !== \"\",\n\t\t\t\t\t\t\tpathname = path.makePathAbsolute(relObj.pathname || absObj.filename, absObj.pathname),\n\t\t\t\t\t\t\tsearch = relObj.search || (!hasPath && absObj.search) || \"\",\n\t\t\t\t\t\t\thash = relObj.hash;\n\n\t\t\t\t\t\treturn protocol + doubleSlash + authority + pathname + search + hash;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false},{"type":"param","types":"Object | string","name":"params","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"addSearchParams","tags":[{"type":"method","string":"addSearchParams"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false},{"type":"param","types":"Object | string","name":"params","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""}],"example":"","brief":"<p>Add search (aka query) params to the specified url.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"addSearchParams: function (url, params) {\n\t\t\t\t\t\tvar urlObject = path.parseUrl(url),\n\t\t\t\t\t\t\tparamsString = (typeof params === \"object\") ? this.getAsURIParameters(params) : params,\n\t\t\t\t\t\t\tsearchChar = urlObject.search || \"?\";\n\t\t\t\t\t\treturn urlObject.hrefNoSearch + searchChar + (searchChar.charAt(searchChar.length - 1) === \"?\" ? \"\" : \"&\") + paramsString + (urlObject.hash || \"\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"absUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"convertUrlToDataUrl","tags":[{"type":"method","string":"convertUrlToDataUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"absUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Convert absolute Url to data Url<br />- for embedded pages strips hash and paramters<br />- for the same domain as document base remove domain<br />otherwise returns decoded absolute Url</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"convertUrlToDataUrl: function (absUrl, dialogHashKey, documentBase) {\n\t\t\t\t\t\tvar urlObject = path.parseUrl(absUrl);\n\n\t\t\t\t\t\tif (path.isEmbeddedPage(urlObject, dialogHashKey)) {\n\t\t\t\t\t\t\t// For embedded pages, remove the dialog hash key as in getFilePath(),\n\t\t\t\t\t\t\t// otherwise the Data Url won't match the id of the embedded Page.\n\t\t\t\t\t\t\treturn urlObject.hash.replace(/^#|\\?.*$/g, \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocumentBase = documentBase || path.documentBase;\n\t\t\t\t\t\tif (path.isSameDomain(urlObject, documentBase)) {\n\t\t\t\t\t\t\treturn urlObject.hrefNoHash.replace(documentBase.domain, \"\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn window.decodeURIComponent(absUrl);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"newPath","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"get","tags":[{"type":"method","string":"get"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"newPath","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""}],"example":"","brief":"<p>Get path from current hash, or from a file path</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"get: function (newPath) {\n\t\t\t\t\t\tif (newPath === undefined) {\n\t\t\t\t\t\t\tnewPath = this.parseLocation().hash;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn this.stripHash(newPath).replace(/[^\\/]*\\.[^\\"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isPath","tags":[{"type":"method","string":"isPath"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"/**","brief":"<p>+$/, '');<br />                    },</p>","description":"\n\n<p>Test if a given url (string) is a path<br />NOTE might be exceptionally naive</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isPath: function (url) {\n\t\t\t\t\t\treturn (/\\//).test(url);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"clean","tags":[{"type":"method","string":"clean"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Return a url path with the window's location protocol/hostname/pathname removed</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"clean: function (url, documentBase) {\n\t\t\t\t\t\treturn url.replace(documentBase.domain, \"\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"stripHash","tags":[{"type":"method","string":"stripHash"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Just return the url without an initial #</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"stripHash: function (url) {\n\t\t\t\t\t\treturn url.replace(/^#/, \"\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"stripQueryParams","tags":[{"type":"method","string":"stripQueryParams"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Return the url without an query params</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"stripQueryParams: function (url) {\n\t\t\t\t\t\treturn url.replace(/\\?.*$/, \"\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"isHashValid","tags":[{"type":"method","string":"isHashValid"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true},{"type":"static","string":""}],"example":"","brief":"<p>Validation proper hash</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isHashValid: function (hash) {\n\t\t\t\t\t\treturn (/^#[^#]+$/).test(hash);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentUrl","description":"uri object","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isExternal","tags":[{"type":"method","string":"isExternal"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string | Object","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentUrl","description":"uri object","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Check whether a url is referencing the same domain, or an external domain or different protocol<br />could be mailto, etc</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isExternal: function (url, documentUrl) {\n\t\t\t\t\t\tvar urlObject = path.parseUrl(url);\n\t\t\t\t\t\treturn urlObject.protocol && urlObject.domain !== documentUrl.domain ? true : false;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"hasProtocol","tags":[{"type":"method","string":"hasProtocol"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Check if the url has protocol</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"hasProtocol: function (url) {\n\t\t\t\t\t\treturn (/^(:?\\w+:)/).test(url);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{boolean}"},"name":"isEmbedded","tags":[{"type":"method","string":"isEmbedded"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{boolean}"},{"type":"static","string":""}],"example":"","brief":"<p>Check if the url refers to embedded content</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isEmbedded: function (url) {\n\t\t\t\t\t\tvar urlObject = path.parseUrl(url);\n\n\t\t\t\t\t\tif (urlObject.protocol !== \"\") {\n\t\t\t\t\t\t\treturn (!path.isPath(urlObject.hash) && !!urlObject.hash && (urlObject.hrefNoHash === path.parseLocation().hrefNoHash));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (/^#/).test(urlObject.href);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"string","name":"resolutionUrl","description":"","defaultValue":"undefined","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"squash","tags":[{"type":"method","string":"squash"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"string","name":"resolutionUrl","description":"","defaultValue":"undefined","isOptional":true,"isLast":true},{"type":"return","types":["string"],"description":""}],"example":"","brief":"<p>Get the url as it would look squashed on to the current resolution url</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"squash: function (url, resolutionUrl) {\n\t\t\t\t\t\tvar href,\n\t\t\t\t\t\t\tcleanedUrl,\n\t\t\t\t\t\t\tsearch,\n\t\t\t\t\t\t\tstateIndex,\n\t\t\t\t\t\t\tisPath = this.isPath(url),\n\t\t\t\t\t\t\turi = this.parseUrl(url),\n\t\t\t\t\t\t\tpreservedHash = uri.hash,\n\t\t\t\t\t\t\tuiState = \"\";\n\n\t\t\t\t\t\t// produce a url against which we can resole the provided path\n\t\t\t\t\t\tresolutionUrl = resolutionUrl || (path.isPath(url) ? path.getLocation() : path.getDocumentUrl());\n\n\t\t\t\t\t\t// If the url is anything but a simple string, remove any preceding hash\n\t\t\t\t\t\t// eg #foo/bar -> foo/bar\n\t\t\t\t\t\t//\t#foo -> #foo\n\t\t\t\t\t\tcleanedUrl = isPath ? path.stripHash(url) : url;\n\n\t\t\t\t\t\t// If the url is a full url with a hash check if the parsed hash is a path\n\t\t\t\t\t\t// if it is, strip the #, and use it otherwise continue without change\n\t\t\t\t\t\tcleanedUrl = path.isPath(uri.hash) ? path.stripHash(uri.hash) : cleanedUrl;\n\n\t\t\t\t\t\t// Split the UI State keys off the href\n\t\t\t\t\t\tstateIndex = cleanedUrl.indexOf(this.uiStateKey);\n\n\t\t\t\t\t\t// store the ui state keys for use\n\t\t\t\t\t\tif (stateIndex > -1) {\n\t\t\t\t\t\t\tuiState = cleanedUrl.slice(stateIndex);\n\t\t\t\t\t\t\tcleanedUrl = cleanedUrl.slice(0, stateIndex);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// make the cleanedUrl absolute relative to the resolution url\n\t\t\t\t\t\thref = path.makeUrlAbsolute(cleanedUrl, resolutionUrl);\n\n\t\t\t\t\t\t// grab the search from the resolved url since parsing from\n\t\t\t\t\t\t// the passed url may not yield the correct result\n\t\t\t\t\t\tsearch = this.parseUrl(href).search;\n\n\t\t\t\t\t\t// @TODO all this crap is terrible, clean it up\n\t\t\t\t\t\tif (isPath) {\n\t\t\t\t\t\t\t// reject the hash if it's a path or it's just a dialog key\n\t\t\t\t\t\t\tif (path.isPath(preservedHash) || preservedHash.replace(\"#\", \"\").indexOf(this.uiStateKey) === 0) {\n\t\t\t\t\t\t\t\tpreservedHash = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Append the UI State keys where it exists and it's been removed\n\t\t\t\t\t\t\t// from the url\n\t\t\t\t\t\t\tif (uiState && preservedHash.indexOf(this.uiStateKey) === -1) {\n\t\t\t\t\t\t\t\tpreservedHash += uiState;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// make sure that pound is on the front of the hash\n\t\t\t\t\t\t\tif (preservedHash.indexOf(\"#\") === -1 && preservedHash !== \"\") {\n\t\t\t\t\t\t\t\tpreservedHash = \"#\" + preservedHash;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// reconstruct each of the pieces with the new search string and hash\n\t\t\t\t\t\t\thref = path.parseUrl(href);\n\t\t\t\t\t\t\thref = href.protocol + \"//\" + href.host + href.pathname + search + preservedHash;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\thref += href.indexOf(\"#\") > -1 ? uiState : \"#\" + uiState;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn href;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isPreservableHash","tags":[{"type":"method","string":"isPreservableHash"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""}],"example":"","brief":"<p>Check if the hash is preservable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isPreservableHash: function (hash) {\n\t\t\t\t\t\treturn hash.replace(\"#\", \"\").indexOf(this.uiStateKey) === 0;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"hashToSelector","tags":[{"type":"method","string":"hashToSelector"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"hash","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Escape weird characters in the hash if it is to be used as a selector</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"hashToSelector: function (hash) {\n\t\t\t\t\t\tvar hasHash = (hash.substring(0, 1) === \"#\");\n\t\t\t\t\t\tif (hasHash) {\n\t\t\t\t\t\t\thash = hash.substring(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (hasHash ? \"#\" : \"\") + hash.replace(new RegExp('([!\"#$%&\\'()*+,./:;<=>?@[\\\\]^`{|}~])', 'g'), \"\\\\$1\");\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false},{"type":"param","types":"boolean","name":"documentBaseDiffers","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentUrl","description":"uri structure","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isFirstPageUrl","tags":[{"type":"method","string":"isFirstPageUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentBase","description":"uri structure","isOptional":false},{"type":"param","types":"boolean","name":"documentBaseDiffers","description":"","isOptional":false},{"type":"param","types":"Object","name":"documentUrl","description":"uri structure","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Check if the specified url refers to the first page in the main application document.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isFirstPageUrl: function (url, documentBase, documentBaseDiffers, documentUrl) {\n\t\t\t\t\t\tvar urlStructure,\n\t\t\t\t\t\t\tsamePath,\n\t\t\t\t\t\t\tfirstPage,\n\t\t\t\t\t\t\tfirstPageId,\n\t\t\t\t\t\t\thash;\n\n\t\t\t\t\t\tdocumentBase = documentBase === undefined ? path.documentBase : documentBase;\n\t\t\t\t\t\tdocumentBaseDiffers = documentBaseDiffers === undefined ? path.documentBaseDiffers : documentBaseDiffers;\n\t\t\t\t\t\tdocumentUrl = documentUrl === undefined ? path.documentUrl : documentUrl;\n\n\t\t\t\t\t\t// We only deal with absolute paths.\n\t\t\t\t\t\turlStructure = path.parseUrl(path.makeUrlAbsolute(url, documentBase));\n\n\t\t\t\t\t\t// Does the url have the same path as the document?\n\t\t\t\t\t\tsamePath = urlStructure.hrefNoHash === documentUrl.hrefNoHash || (documentBaseDiffers && urlStructure.hrefNoHash === documentBase.hrefNoHash);\n\n\t\t\t\t\t\t// Get the first page element.\n\t\t\t\t\t\tfirstPage = engine.getRouter().firstPage;\n\n\t\t\t\t\t\t// Get the id of the first page element if it has one.\n\t\t\t\t\t\tfirstPageId = firstPage ? firstPage.id : undefined;\n\t\t\t\t\t\thash = urlStructure.hash;\n\n\t\t\t\t\t\t// The url refers to the first page if the path matches the document and\n\t\t\t\t\t\t// it either has no hash value, or the hash is exactly equal to the id of the\n\t\t\t\t\t\t// first page element.\n\t\t\t\t\t\treturn samePath && (!hash || hash === \"#\" || (firstPageId && hash.replace(/^#/, \"\") === firstPageId));\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"Object","name":"docUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"reqUrl","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isPermittedCrossDomainRequest","tags":[{"type":"method","string":"isPermittedCrossDomainRequest"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"Object","name":"docUrl","description":"","isOptional":false},{"type":"param","types":"string","name":"reqUrl","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR<br />requests if the document doing the request was loaded via the file:// protocol.<br />This is usually to allow the application to \"phone home\" and fetch app specific<br />data. We normally let the browser handle external/cross-domain urls, but if the<br />allowCrossDomainPages option is true, we will allow cross-domain http/https<br />requests to go through our page loading logic.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isPermittedCrossDomainRequest: function (docUrl, reqUrl) {\n\t\t\t\t\t\treturn ns.get('allowCrossDomainPages', false) &&\n\t\t\t\t\t\t\tdocUrl.protocol === \"file:\" &&\n\t\t\t\t\t\t\treqUrl.search(/^https?:/) !== -1;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"Object","name":"data","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"getAsURIParameters","tags":[{"type":"method","string":"getAsURIParameters"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"Object","name":"data","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Convert a object data to URI parameters</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getAsURIParameters: function (data) {\n\t\t\t\t\t\tvar url = '',\n\t\t\t\t\t\t\tkey;\n\t\t\t\t\t\tfor (key in data) {\n\t\t\t\t\t\t\tif (data.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\turl += encodeURIComponent(key) + '=' + encodeURIComponent(data[key]) + '&';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn url.substring(0, url.length - 1);\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"path","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"set","tags":[{"type":"method","string":"set"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"path","description":"","isOptional":false,"isLast":true},{"type":"static","string":""}],"example":"","brief":"<p>Set location hash to path</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"set: function (path) {\n\t\t\t\t\t\tlocation.hash = path;\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"path","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"getFilePath","tags":[{"type":"method","string":"getFilePath"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"path","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Return the substring of a filepath before the sub-page key,<br />for making a server request</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getFilePath: function (path, dialogHashKey) {\n\t\t\t\t\t\tvar splitkey = '&' + ns.get('subPageUrlKey', '');\n\t\t\t\t\t\treturn path && path.split(splitkey)[0].split(dialogHashKey)[0];\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"hash","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"cleanHash","tags":[{"type":"method","string":"cleanHash"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"hash","description":"","isOptional":false},{"type":"param","types":"string","name":"dialogHashKey","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Remove the preceding hash, any query params, and dialog notations</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"cleanHash: function (hash, dialogHashKey) {\n\t\t\t\t\t\treturn path.stripHash(hash.replace(/\\?.*$/, \"\").replace(dialogHashKey, \"\"));\n\t\t\t\t\t},"},{"params":[{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"boolean","name":"allowEmbeddedOnlyBaseDoc","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"isEmbeddedPage","tags":[{"type":"method","string":"isEmbeddedPage"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"string","name":"url","description":"","isOptional":false},{"type":"param","types":"boolean","name":"allowEmbeddedOnlyBaseDoc","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Check if url refers to the embedded page</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"isEmbeddedPage: function (url, allowEmbeddedOnlyBaseDoc) {\n\t\t\t\t\t\tvar urlObject = path.parseUrl(url);\n\n\t\t\t\t\t\t//if the path is absolute, then we need to compare the url against\n\t\t\t\t\t\t//both the documentUrl and the documentBase. The main reason for this\n\t\t\t\t\t\t//is that links embedded within external documents will refer to the\n\t\t\t\t\t\t//application document, whereas links embedded within the application\n\t\t\t\t\t\t//document will be resolved against the document base.\n\t\t\t\t\t\tif (urlObject.protocol !== \"\") {\n\t\t\t\t\t\t\treturn (urlObject.hash &&\n\t\t\t\t\t\t\t\t\t( allowEmbeddedOnlyBaseDoc ?\n\t\t\t\t\t\t\t\t\t\t\turlObject.hrefNoHash === path.documentUrl.hrefNoHash :\n\t\t\t\t\t\t\t\t\t\t\turlObject.hrefNoHash === path.parseLocation().hrefNoHash ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (/^#/).test(urlObject.href);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\tpath.documentUrl = path.parseLocation();\n\n\t\t\tbase = document.querySelector('base');"},{"params":[{"type":"param","types":"boolean","name":"asParsedObject","description":"","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string","Object"],"description":""},"name":"getDocumentBase","tags":[{"type":"method","string":"getDocumentBase"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"boolean","name":"asParsedObject","description":"","defaultValue":"false","isOptional":true,"isLast":true},{"type":"return","types":["string","Object"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Get document base</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"path.getDocumentBase = function (asParsedObject) {\n\t\t\t\treturn asParsedObject ? utilsObject.copy(path.documentBase) : path.documentBase.href;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":""},"name":"getClosestBaseUrl","tags":[{"type":"method","string":"getClosestBaseUrl"},{"type":"member","string":"ns.utils.path"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"selector","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Find the closest page and extract out its url</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"path.getClosestBaseUrl = function (element, selector) {\n\t\t\t\t// Find the closest page and extract out its url.\n\t\t\t\tvar url = utilsDOM.getNSData(utilsSelectors.getClosestBySelector(element, selector), \"url\"),\n\t\t\t\t\tbaseUrl = path.documentBase.hrefNoHash;\n\n\t\t\t\tif (!ns.get('dynamicBaseEnabled', true) || !url || !path.isPath(url)) {\n\t\t\t\t\turl = baseUrl;\n\t\t\t\t}\n\n\t\t\t\treturn path.makeUrlAbsolute(url, baseUrl);\n\t\t\t};\n\n\t\t\tns.utils.path = path;\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.jqm.support","authors":[],"title":"jQuery Mobile mapping class","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns, $) {\n\t\n\t\t\t\tvar support = ns.support,\n\t\t\t\tobject = ns.utils.object;\n\n\t\t\tns.jqm.support = {","properties":[],"options":[],"methods":[]},{"name":"tau","authors":["Maciej Urbanski <m.urbanski@samsung.com>"],"title":"Tizen Advanced UI Framework main namespace","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {\n\t\n\t\t\t\tvar orgTau,\n\t\t\t\ttau = {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"noConflict","tags":[{"type":"method","string":"noConflict"},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"tau"}],"example":"","brief":"<p>revert changes in gear namespace make by framework and return framework object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"noConflict: function () {\n\t\t\t\t\t\tvar newTau = window.tau;\n\t\t\t\t\t\twindow.tau = orgTau;\n\t\t\t\t\t\torgTau = null;\n\t\t\t\t\t\treturn newTau;\n\t\t\t\t\t},"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"getOrginalNamespace","tags":[{"type":"method","string":"getOrginalNamespace"},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"tau"}],"example":"","brief":"<p>Return original window.gear object;</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"getOrginalNamespace: function () {\n\t\t\t\t\t\treturn orgTau;\n\t\t\t\t\t},"},{"params":[],"hasParams":false,"name":"createNewNamespace","tags":[{"type":"method","string":"createNewNamespace"},{"type":"member","string":"tau"}],"example":"","brief":"<p>Create new window.gear object;</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"createNewNamespace: function() {\n\t\t\t\t\t\torgTau = orgTau || window.tau;\n\t\t\t\t\t\twindow.tau = tau;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttau.createNewNamespace();\n\t\t\t\tdocument.addEventListener(ns.engine.eventType.INIT, tau.createNewNamespace, false);\n\t\t\t}(window, document, ns));"}]},{"name":"ns.utils.grid","authors":[],"title":"Class with functions to create css grids","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"ns.utils.grid = {","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"gridType","description":"","defaultValue":"\"a\"","isOptional":true,"isLast":true}],"hasParams":true,"name":"makeGrid","tags":[{"type":"method","string":"makeGrid"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"gridType","description":"","defaultValue":"\"a\"","isOptional":true,"isLast":true},{"type":"static","string":""},{"type":"member","string":"ns.utils.grid"}],"example":"","brief":"<p>make css grid</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"makeGrid: function (element, gridType) {\n\t\t\t\t\tvar gridClassList = element.classList,\n\t\t\t\t\t\tkids = slice.call(element.children),\n\t\t\t\t\t\titerator;\n\t\t\t\t\tif (!gridType) {\n\t\t\t\t\t\tgridType = gridTypes[kids.length];\n\t\t\t\t\t\tif (!gridType) {\n\t\t\t\t\t\t\t//if gridType is not defined in gritTypes\n\t\t\t\t\t\t\t//make it grid type \"a\"\"\n\t\t\t\t\t\t\tgridType = \"a\";\n\t\t\t\t\t\t\titerator = 2;\n\t\t\t\t\t\t\tgridClassList.add(\"ui-grid-duo\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!iterator) {\n\t\t\t\t\t\t//jquery grid doesn't care if someone gives non-existing gridType\n\t\t\t\t\t\titerator = gridTypes.indexOf(gridType);\n\t\t\t\t\t}\n\n\t\t\t\t\tgridClassList.add(\"ui-grid-\" + gridType);\n\n\t\t\t\t\tsetClassOnMatches(kids, \":nth-child(\" + iterator + \"n+1)\", \"ui-block-a\");\n\n\t\t\t\t\tif (iterator > 1) {\n\t\t\t\t\t\tsetClassOnMatches(kids, \":nth-child(\" + iterator + \"n+2)\", \"ui-block-b\");\n\t\t\t\t\t}\n\t\t\t\t\tif (iterator > 2) {\n\t\t\t\t\t\tsetClassOnMatches(kids, \":nth-child(\" + iterator + \"n+3)\", \"ui-block-c\");\n\t\t\t\t\t}\n\t\t\t\t\tif (iterator > 3) {\n\t\t\t\t\t\tsetClassOnMatches(kids, \":nth-child(\" + iterator + \"n+4)\", \"ui-block-d\");\n\t\t\t\t\t}\n\t\t\t\t\tif (iterator > 4) {\n\t\t\t\t\t\tsetClassOnMatches(kids, \":nth-child(\" + iterator + \"n+5)\", \"ui-block-e\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(ns));"}]},{"name":"ns.utils.array","authors":[],"title":"Array utilities","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {","properties":[],"options":[],"methods":[]},{"name":"ns.utils.anim.Keyframes","authors":["Krzysztof Antoszek <k.antoszek@samsung.com>"],"title":"Keyframes class for easy keyframe css syntax creation andmanaging. Each frame is specified as an element of an array with size 100.","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\t// Helper function for generating css string from\n\t\t\t// @TODO the steps array could be propably be more\n\t\t\t// optimized (most usages will use maybe up to 3-5\n\t\t\t// array elements, when it has 100) but thats not\n\t\t\t// important for the moment\n\t\t\t// frames array\n\t\t\t// @param {string} prefix\n\t\t\t// @param {string} name\n\t\t\t// @param {Array} steps\n\t\t\t// @return {string}\n\t\t\tfunction keyframesToString(prefix, name, steps) {\n\t\t\t\tvar buff = \"@\" + prefix + \"keyframes \" + name + \" {\",\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\t\t\t\t\tprop,\n\t\t\t\t\tstep;\n\t\t\t\tfor (i = 0, l = steps.length; i < l; ++i) {\n\t\t\t\t\tstep = steps[i];\n\t\t\t\t\tif (!step) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbuff += i + \"% { \";\n\t\t\t\t\tfor (prop in step) {\n\t\t\t\t\t\tif (step.hasOwnProperty(prop)) {\n\t\t\t\t\t\t\tbuff += prop + \": \" + step[prop] + \"; \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbuff += \"} \";\n\t\t\t\t}\n\t\t\t\tbuff += \"} \";\n\t\t\t\treturn buff;\n\t\t\t}\n\t\t\t\t// Reference to stylesheet\n\t\t\tvar styleContainer = null,\n\t\t\t\tcssPropertyPrefix = ns.support.cssAnimationPrefix,\n\t\t\t\tKeyframes = function (steps) {\n\t\t\t\t\tvar id = ns.getUniqueId(),\n\t\t\t\t\t\telement = null;\n\t\t\t\t\tif (!styleContainer) {\n\t\t\t\t\t\telement = document.createElement(\"style\");\n\t\t\t\t\t\t// a text node hack, it forces the browser\n\t\t\t\t\t\t// to create a stylesheet object in the\n\t\t\t\t\t\t// HTMLStyleElement object, which we can \n\t\t\t\t\t\t// then use\n\t\t\t\t\t\telement.appendChild(document.createTextNode(\"\"));\n\t\t\t\t\t\tdocument.head.appendChild(element);\n\t\t\t\t\t\tstyleContainer = element.sheet;\n\t\t\t\t\t}\n\t\t\t\t\tstyleContainer.insertRule(keyframesToString(cssPropertyPrefix, id, steps), 0);","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.utils.anim.Keyframes"}],"example":"","brief":"<p>Destroys keyframes and removes css references from stylesheet</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Keyframes.prototype.destroy = function () {\n\t\t\t\tvar keyframes = this.keyframes,\n\t\t\t\t\tstylesheet = keyframes.parentStyleSheet,\n\t\t\t\t\trules = stylesheet.rules,\n\t\t\t\t\ti,\n\t\t\t\t\tl;\n\n\t\t\t\t// no other way for removal than with index\n\t\t\t\t// and since it changes we have to search for it\n\t\t\t\t// :(\n\t\t\t\tfor (i = 0, l = rules.length; i < l; ++i) {\n\t\t\t\t\tif (rules[i] === keyframes) {\n\t\t\t\t\t\tstylesheet.deleteRule(i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tns.utils.anim.Keyframes = Keyframes;\n\t\t\t}(window.document, ns));"}]},{"name":"ns.utils.anim.Animation","authors":["Krzysztof Antoszek <k.antoszek@samsung.com>"],"title":"Animation class for easy animations of elements. There can bemultiple animations on one element but in such case the usageof ns.utils.anim.Chain is preferred.","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\t// simple helper for using trim in Array.map() function\n\t\t\t// @param {string} string\n\t\t\tfunction trim(string) {\n\t\t\t\treturn string.trim();\n\t\t\t}\n\n\t\t\t// helper for fetching animation index in animation list\n\t\t\t// @param {string|Array.<string>} props\n\t\t\t// @param {string} name\n\t\t\t// @return {string}\n\t\t\tfunction getAnimationIndex(props, name) {\n\t\t\t\tif (typeof props === \"string\") {\n\t\t\t\t\tprops = props.split(\",\").map(trim);\n\t\t\t\t}\n\t\t\t\treturn props.indexOf(name);\n\t\t\t}\n\n\t\t\tvar objectUtils = ns.utils.object,\n\t\t\t\tKeyframes = ns.utils.anim.Keyframes,\n\t\t\t\tCSSUtils = ns.utils.DOM,\n\t\t\t\tdateUtils = ns.utils.date,\n\t\t\t\tcssPropertyPrefix = ns.support.cssAnimationPrefix,\n\t\t\t\teventPrefix = cssPropertyPrefix.replace(/\\-/gi, \"\"),\n\t\t\t\tendEventName = eventPrefix.length > 0 ? eventPrefix + \"AnimationEnd\" : \"animationEnd\",\n\t\t\t\t// paused state flag\n\t\t\t\tPAUSED = 0,\n\t\t\t\t// playing state flag\n\t\t\t\tPLAYING = 1,\n\t\t\t\t// finished state flag\n\t\t\t\tFINISHED = 2,\n\t\t\t\t// alias for function string for typeof conditionals\n\t\t\t\tTYPE_FUNCTION = \"function\",\n\t\t\t\t// animation end handler\n\t\t\t\t// @param {ns.utils.anim.Animation} self\n\t\t\t\t// @param {Event} event\n\t\t\t\thandleEnd = function (self, event) {\n\t\t\t\t\tvar options = self.options,\n\t\t\t\t\t\telement = options.element,\n\t\t\t\t\t\tonEnd = options.onEnd,\n\t\t\t\t\t\tonPause = options.onPause;\n\t\t\t\t\tif (event.animationName === self.keyframes.id) {\n\t\t\t\t\t\tswitch (self.state) {\n\t\t\t\t\t\tcase PLAYING:\n\t\t\t\t\t\t\tself.state = FINISHED;\n\t\t\t\t\t\t\tif (typeof onEnd === TYPE_FUNCTION) {\n\t\t\t\t\t\t\t\tonEnd(self, element, event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase PAUSED:\n\t\t\t\t\t\t\tif (typeof onPause === TYPE_FUNCTION) {\n\t\t\t\t\t\t\t\tonPause(self, element, event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// helper for playing/pausing\n\t\t\t\t// @param {ns.utils.anim.Animation}\n\t\t\t\t// @param {string} state\n\t\t\t\tchangeState = function (self, state) {\n\t\t\t\t\tif (!self._applied) { // this needs to be before keyframe fetch\n\t\t\t\t\t\tself._apply();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar options = self.options,\n\t\t\t\t\t\telement = options.element,\n\t\t\t\t\t\tonPlay = options.onPlay,\n\t\t\t\t\t\tstyle = element.style,\n\t\t\t\t\t\tkeyframes = self.keyframes,\n\t\t\t\t\t\tpropString = style.getPropertyValue(cssPropertyPrefix + \"animation-play-state\"),\n\t\t\t\t\t\tpropsArray = (propString && propString.split(\",\").map(trim)) || [],\n\t\t\t\t\t\tindex = keyframes ? getAnimationIndex(style.getPropertyValue(cssPropertyPrefix + \"animation-name\"), keyframes.id) : -1;\n\n\t\t\t\t\tif (index > -1) {\n\t\t\t\t\t\tpropsArray[index] = state || \"running\";\n\t\t\t\t\t\tstyle.setProperty(cssPropertyPrefix + \"animation-play-state\", propsArray.join(\",\"));\n\t\t\t\t\t\tself.state = PLAYING;\n\t\t\t\t\t\tif (typeof onPlay === TYPE_FUNCTION) {\n\t\t\t\t\t\t\twindow.clearTimeout(self.playTimer);\n\t\t\t\t\t\t\tself.playTimer = window.setTimeout(function () {\n\t\t\t\t\t\t\t\tonPlay(self, element);\n\t\t\t\t\t\t\t}, dateUtils.convertToMiliseconds(options.delay));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t},\n\t\t\t\tAnimation = function (options) {\n\t\t\t\t\tvar self = this,","properties":[],"options":[],"methods":[]},{"name":"ns.utils.anim.Chain","authors":["Krzysztof Antoszek <k.antoszek@samsung.com>"],"title":"Chain class for easy multiple animations managment. The chaincan be executed as is (animations are concurrent) or in orderof adding in which animations are delayed so that the executein turn","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (ns) {\n\t\n\t\t\t\tvar Animation = ns.utils.anim.Animation,\n\t\t\t\tobjectUtils = ns.utils.object,\n\t\t\t\tdateUtils = ns.utils.date,\n\t\t\t\t// paused state flag\n\t\t\t\tPAUSED = 0,\n\t\t\t\t// playing state flag\n\t\t\t\tPLAYING = 1,\n\t\t\t\t// finished state flag\n\t\t\t\tFINISHED = 2,\n\t\t\t\t// function type for typeof comparisions\n\t\t\t\tTYPE_FUNCTION = \"function\",\n\t\t\t\t// animation end handler\n\t\t\t\thandleEnd = function (self, animation) {\n\t\t\t\t\tvar onEnd = self.options.onEnd,\n\t\t\t\t\t\tanimations = self.animations,\n\t\t\t\t\t\tindex = animations.indexOf(animation);\n\t\t\t\t\tself.current = index;\n\t\t\t\t\tif (index === animations.length - 1) {\n\t\t\t\t\t\tself.state = FINISHED;\n\t\t\t\t\t\tif (typeof onEnd === TYPE_FUNCTION) {\n\t\t\t\t\t\t\tonEnd(self);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tChain = function (options, animations) {","properties":[],"options":[],"methods":[]},{"name":"ns.events.hwkey","authors":[],"title":"Namespace to support tizenhwkey event","brief":"","description":"","isPrivate":false,"isInternal":false,"properties":[],"options":[],"methods":[]},{"name":"ns.events.throttledresize","authors":[],"title":"Namespace to support throttledresize event","brief":"","description":"","isPrivate":false,"isInternal":false,"properties":[],"options":[],"methods":[]},{"name":"ns.widget.mobile.Button","authors":["Grzegorz Osimowicz <g.osimowicz@samsung.com>","Jadwiga Sosnowska <j.sosnowska@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Maciej Moczulski <m.moczulski@samsung.com>","Maciej Urbanski <m.urbanski@samsung.com>","Marcin Jakuszko <m.jakuszko@samsung.com>","Piotr Gorny <p.gorny2@samsung.com>","Piotr Karny <p.karny@samsung.com>","Przemyslaw Ciezkowski <p.ciezkowski@samsung.com>","Sergiusz Struminski <s.struminski@samsung.com>","Tomasz Lukawski <t.lukawski@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Button Widget","brief":"Button widget changes default browser buttons to special buttons with additional opportunities like icon, corners, shadow.","description":"<h2>Default selectors</h2>\n\n<p>In default all <strong>BUTTON</strong> tags and all <strong>INPUT</strong> tags with type equals <em>button</em>, <em>submit</em> or <em>reset</em> are change to Tizen WebUI buttons.<br />In addition all elements with <em>data-role=button</em> and class <em>ui-btn</em> are changed to Tizen Web UI buttons.<br />To prevent auto enhance element to Tizen Web UI buttons you can use <em>data-role=none</em> attribute on <strong>BUTTON</strong> or <strong>INPUT</strong> element.</p>\n\n<h3>HTML Examples</h3>\n\n<h4>Create simple button from link using data-role</h4>\n\n<pre><code>    @example\n    &lt;a href=\"#page2\" data-role=\"button\"&gt;Link button&lt;/a&gt;\n</code></pre>\n\n<h4>Create simple button from link using class selector</h4>\n\n<pre><code>    @example\n    &lt;a href=\"#page2\" class=\"ui-btn\"&gt;Link button&lt;/a&gt;\n</code></pre>\n\n<h4>Create simple button using button's tag</h4>\n\n<pre><code>    @example\n    &lt;button&gt;Button element&lt;/button&gt;\n</code></pre>\n\n<h4>Create simple button from input using type</h4>\n\n<pre><code>    @example\n    &lt;input type=\"button\" value=\"Button\" /&gt;\n    &lt;input type=\"submit\" value=\"Submit Button\" /&gt;\n    &lt;input type=\"reset\" value=\"Reset Button\" /&gt;\n</code></pre>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of button widget you can use constructor of widget from <strong>tau</strong> namespace:</p>\n\n<pre><code>    @example\n    var buttonElement = document.getElementById('button'),\n        button = tau.widget.button(buttonElement, {mini: true});\n</code></pre>\n\n<p>Constructor has one require parameter <strong>element</strong> which are base <strong>HTMLElement</strong> to create widget. We recommend get this element by method <em>document.getElementById</em>. Second parameter is <strong>options</strong> and it is a object with options for widget.</p>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>    @example\n    var button = $('#button').button({mini: true});\n</code></pre>\n\n<p>jQuery Mobile constructor has one optional parameter is <strong>options</strong> and it is a object with options for widget.</p>\n\n<h2>Options for Button Widget</h2>\n\n<p>Options for widget can be defined as <em>data-...</em> attributes or give as parameter in constructor.</p>\n\n<p>You can change option for widget using method <strong>option</strong>.</p>\n\n<h3>Mini version</h3>\n\n<p>For a more compact version that is useful in toolbars and tight spaces, add the data-mini=\"true\" attribute to the button to create a mini version. This will produce a button that is not as tall as the standard version and has a smaller text size.</p>\n\n<pre><code>    @example\n    &lt;a href=\"index.html\" data-role=\"button\" data-mini=\"true\"&gt;Link button&lt;/a&gt;\n</code></pre>\n\n<h3>Inline buttons</h3>\n\n<p>By default, all buttons in the body content are styled as block-level elements so they fill the width of the screen. However, if you want a more compact button that is only as wide as the text and icons inside, add the data-inline=\"true\" attribute to the button.</p>\n\n<pre><code>    @example\n    &lt;a href=\"index.html\" data-role=\"button\" data-inline=\"true\"&gt;Cancel&lt;/a&gt;\n</code></pre>\n\n<p>If you have multiple buttons that should sit side-by-side on the same line, add the data-inline=\"true\" attribute to each button. This will style the buttons to be the width of their content and float the buttons so they sit on the same line.</p>\n\n<pre><code>    @example\n    &lt;a href=\"index.html\" data-role=\"button\" data-inline=\"true\"&gt;Cancel&lt;/a&gt;\n    &lt;a href=\"index.html\" data-role=\"button\" data-inline=\"true\" data-theme=\"b\"&gt;Save&lt;/a&gt;\n</code></pre>\n\n<h3>Icon positioning</h3>\n\n<p>By default, all icons in buttons are placed to the left of the button text. This default may be overridden using the data-iconpos attribute.</p>\n\n<pre><code>    @example\n    &lt;a href=\"index.html\" data-role=\"button\" data-icon=\"delete\" data-iconpos=\"right\"&gt;Delete&lt;/a&gt;\n</code></pre>\n\n<p>Possible values of data-iconpos:<br></p>\n\n<ul>\n<li>\"left\"  - creates the button with left-aligned icon<br></li>\n<li>\"right\"  - creates the button with right-aligned icon<br></li>\n<li>\"top\"  - creates the button with icon positioned above the text<br></li>\n<li>\"bottom\"  - creates the button with icon positioned below the text</li>\n</ul>\n\n<p>You can also create an icon-only button, by setting the data-iconpos attribute to notext. The button plugin will hide the text on-screen, but add it as a title attribute on the link to provide context for screen readers and devices that support tooltips.</p>\n\n<pre><code>    @example\n    &lt;a href=\"index.html\" data-role=\"button\" data-icon=\"delete\" data-iconpos=\"notext\"&gt;Delete&lt;/a&gt;\n</code></pre>\n\n<h2>Methods</h2>\n\n<p>To call method ion widget you can use one of existing API:</p>\n\n<p>First API is from tau namespace:</p>\n\n<pre><code>    @example\n    var buttonElement = document.getElementById('button'),\n        button = tau.widget.button(buttonElement, 'Button');\n\n    button.methodName(methodArgument1, methodArgument2, ...);\n</code></pre>\n\n<p>Second API is jQuery Mobile API and for call <em>methodName</em> you can use:</p>\n\n<pre><code>    @example\n    $(\".selector\").button('methodName', methodArgument1, methodArgument2, ...);\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\tvar BaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tselectorsUtils = ns.utils.selectors,\n\t\t\t\tthemes = ns.theme,\n\t\t\t\tButton = function () {\n\t\t\t\t\tvar self = this;\n\n\t\t\t\t\tself.action = \"\";\n\t\t\t\t\tself.label = null;\n\t\t\t\t},\n\t\t\t\tclasses = {\n\t\t\t\t\tuiDisabled: 'ui-disabled',\n\t\t\t\t\tuiBtn: 'ui-btn',\n\t\t\t\t\tuiBtnUpThemePrefix: 'ui-btn-up-',\n\t\t\t\t\tuiBtnHoverThemePrefix: 'ui-btn-hover-',\n\t\t\t\t\tuiBtnDownThemePrefix: 'ui-btn-down-',\n\t\t\t\t\tuiShadow: 'ui-shadow',\n\t\t\t\t\tuiBtnCornerAll: 'ui-btn-corner-all',\n\t\t\t\t\tuiBtnHidden: 'ui-btn-hidden',\n\t\t\t\t\tuiBtnBoxThemePrefix: 'ui-btn-box-',\n\t\t\t\t\tuiBtnTextPaddingTop: 'ui-btn-text-padding-top',\n\t\t\t\t\tuiBtnTextPaddingLeft: 'ui-btn-text-padding-left',\n\t\t\t\t\tuiBtnTextPaddingRight: 'ui-btn-text-padding-right',\n\t\t\t\t\tuiBtnTextPaddingBottom: 'ui-btn-text-padding-bottom',\n\t\t\t\t\tuiBtnCornerCircle: 'ui-btn-corner-circle',\n\t\t\t\t\tuiBtnHastxt: 'ui-btn-hastxt',\n\t\t\t\t\tuiBtnIconNobg: 'ui-btn-icon-nobg',\n\t\t\t\t\tuiBtnIconOnly: 'ui-btn-icon_only',\n\t\t\t\t\tuiBtnIconOnlyInner: 'ui-btn-icon-only',\n\t\t\t\t\tuiBtnIconRight: 'ui-btn-icon-right',\n\t\t\t\t\tuiBtnRound: 'ui-btn-round',\n\t\t\t\t\tuiMini: 'ui-mini',\n\t\t\t\t\tuiBtnInline: 'ui-btn-inline',\n\t\t\t\t\tuiBtnBlock: 'ui-btn-block',\n\t\t\t\t\tuiIcon: 'ui-icon',\n\t\t\t\t\tuiIconPositionPrefix: 'ui-icon-',\n\t\t\t\t\tuiIconShadow: 'ui-icon-shadow',\n\t\t\t\t\tuiBtnIconPositionPrefix: 'ui-btn-icon-',\n\t\t\t\t\tuiLink: 'ui-link',\n\t\t\t\t\tuiBtnInner: 'ui-btn-inner',\n\t\t\t\t\tuiBtnText: 'ui-btn-text',\n\t\t\t\t\tuiFocus: 'ui-focus',\n\t\t\t\t\tuiBtnEdit: 'ui-btn-edit',\n\t\t\t\t\tuiBtnLeft: 'ui-btn-left',\n\t\t\t\t\tuiBtnRight: 'ui-btn-right',\n\t\t\t\t\tuiSubmit: 'ui-submit',\n\t\t\t\t\tuiBtnActive: 'ui-btn-active',\n\t\t\t\t\tuiBtnIconNotext: 'ui-btn-icon-notext'\n\t\t\t\t},\n\t\t\t\teventsAdded = false,\n\t\t\t\tprototype = new BaseWidget();\n\n\t\t\tButton.prototype = prototype;","properties":[],"options":[{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"theme of widget","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-theme"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"icon type","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-icon"},{"types":"\"left\" | \"right\" | \"top\" | \"bottom\" | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"position of icon","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-iconpos"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"if value is \"true\" then button has css property display = \"inline\"","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-inline"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"shadow of button","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-shadow"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"shadow of button's icon","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-iconshadow"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"corners of button","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-corners"},{"types":"boolean | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"size of button","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-mini"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"if button is part of bar then you should set true","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-bar"},{"types":"\"circle\" | \"nobg\" | null","defaultValue":"null","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"style of button","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-style"},{"types":"\"span\" | \"div\"","defaultValue":"\"span\"","tags":[{"type":"property","string":"{?string} [options.theme=null] theme of widget"},{"type":"property","string":"{?string} [options.icon=null] icon type"},{"type":"property","string":"{\"left\"|\"right\"|\"top\"|\"bottom\"|null} [options.iconpos=null] position of icon"},{"type":"property","string":"{?string} [options.inline=null] if value is \"true\" then button has css property display = \"inline\""},{"type":"property","string":"{boolean} [options.shadow=true] shadow of button"},{"type":"property","string":"{boolean} [options.iconshadow=true] shadow of button's icon"},{"type":"property","string":"{boolean} [options.corners=false] corners of button"},{"type":"property","string":"{?boolean} [options.mini=null] size of button"},{"type":"property","string":"{boolean} [options.bar=false] if button is part of bar then you should set true"},{"type":"property","string":"{\"circle\"|\"nobg\"|null} [options.style=null] style of button"},{"type":"property","string":"{\"span\"|\"div\"} [options.wrapperEls=\"span\"] wrapper tag name of button"},{"type":"member","string":"ns.widget.mobile.Button"}],"description":"wrapper tag name of button","isPrivate":false,"code":"ns.utils.object.merge(this.options, {\n\t\t\t\t\ttheme: null,\n\t\t\t\t\ticon: null,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\tinline: null,\n\t\t\t\t\tshadow: true,\n\t\t\t\t\ticonshadow: true,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tmini: null,\n\t\t\t\t\tbar: false,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twrapperEls: 'span'\n\t\t\t\t});\n\n\t\t\t\t// Object for storing ui elements\n\t\t\t\tthis.ui = {};\n\t\t\t};","name":"data-wrapper-els"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Configure button widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._configure = function () {"},{"params":[{"type":"param","types":"HTMLElement | HTMLInputElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement | HTMLInputElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Build structure of button widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._build = function (element) {\n\t\t\t\tvar attributes = {\n\t\t\t\t\t\t\"disabled\": element.getAttribute(\"disabled\")\n\t\t\t\t\t},\n\t\t\t\t\ticonClass,\n\t\t\t\t\tbuttonInner,\n\t\t\t\t\tbuttonText,\n\t\t\t\t\tbuttonIcon,\n\t\t\t\t\tbuttonStyle,\n\t\t\t\t\tbuttonClassList,\n\t\t\t\t\tbuttonClassArray = [],\n\t\t\t\t\telementTagName,\n\t\t\t\t\tinnerClass = classes.uiBtnInner,\n\t\t\t\t\ttextClass = classes.uiBtnText,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tbuttonValue,\n\t\t\t\t\tbuttonInnerHTML,\n\t\t\t\t\tcontainer,\n\t\t\t\t\tinnerTextLength,\n\t\t\t\t\tlabel,\n\t\t\t\t\tprototypeOptions = prototype.options;\n\n\t\t\t\t// Set theme\n\t\t\t\toptions.theme = options.theme || themes.getInheritedTheme(element, (prototypeOptions && prototypeOptions.theme) || 's');\n\n\t\t\t\t// Create default structure of button\n\t\t\t\tbuttonInner = document.createElement(options.wrapperEls);\n\t\t\t\tbuttonText = document.createElement(options.wrapperEls);\n\t\t\t\tbuttonText.id = element.id + \"-div-text\";\n\n\t\t\t\tthis.ui.buttonText = buttonText;\n\n\t\t\t\telementTagName = element.tagName.toLowerCase();\n\t\t\t\tbuttonClassList = element.classList;\n\n\t\t\t\tif (elementTagName === \"input\" && element.type === \"button\") {\n\t\t\t\t\toptions.corners = true;\n\t\t\t\t}\n\t\t\t\tbuttonIcon = options.icon ? document.createElement(\"span\") : null;\n\t\t\t\tbuttonClassArray.push(classes.uiBtn, classes.uiBtnUpThemePrefix + options.theme);\n\t\t\t\tif (options.shadow){\n\t\t\t\t\tbuttonClassArray.push(classes.uiShadow);\n\t\t\t\t}\n\t\t\t\tif (options.corners){\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnCornerAll);\n\t\t\t\t}\n\n\t\t\t\tbuttonInnerHTML = element.innerHTML;\n\t\t\t\tbuttonValue = element.value;\n\n\t\t\t\tbuttonStyle = options.style;\n\n\t\t\t\tif (elementTagName === \"a\") {\n\t\t\t\t\tcontainer = element;\n\t\t\t\t\tif (buttonClassList.contains(classes.uiBtn)) {\n\t\t\t\t\t\treturn element;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (elementTagName === \"button\" || elementTagName === \"input\") {\n\t\t\t\t\t\tbuttonClassList.add(classes.uiBtnHidden);\n\t\t\t\t\t\tcontainer = document.createElement(\"div\");\n\t\t\t\t\t\tcontainer.setAttribute(\"id\", element.id + \"-div-container\");\n\n\t\t\t\t\t\tif (buttonClassList.contains(classes.uiBtnRight)) {\n\t\t\t\t\t\t\tcontainer.classList.add(classes.uiBtnRight);\n\t\t\t\t\t\t} else if (buttonClassList.contains(classes.uiBtnLeft)) {\n\t\t\t\t\t\t\tcontainer.classList.add(classes.uiBtnLeft);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (element.type === \"submit\" || element.type === \"reset\") {\n\t\t\t\t\t\t\tcontainer.classList.add(classes.uiSubmit);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainer = element;\n\t\t\t\t\t}\n\n\t\t\t\t\tlabel = document.querySelector(\"label[for='\" + element.id + \"']\");\n\t\t\t\t\tif (label) {\n\t\t\t\t\t\tlabel.classList.add(classes.uiSubmit);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcontainer.setAttribute(\"tabindex\", 0);\n\t\t\t\tif ((element.getAttribute(\"data-role\") === \"button\" && !options.bar) || elementTagName === \"button\" || elementTagName === \"div\" || elementTagName === \"input\") {\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnBoxThemePrefix + options.theme);\n\t\t\t\t}\n\n\t\t\t\tinnerTextLength = element.textContent.length || (element.value ? element.value.length : 0);\n\n\t\t\t\tswitch (buttonStyle) {\n\t\t\t\tcase \"circle\":\n\t\t\t\t\tif (innerTextLength > 0) {\n\t\t\t\t\t\tbuttonClassArray.push(classes.uiBtnRound);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuttonClassArray.push(classes.uiBtnCornerCircle, classes.uiBtnIconOnly);\n\t\t\t\t\t\tif (options.icon) {\n\t\t\t\t\t\t\t// Style: no text, Icon only\n\t\t\t\t\t\t\tinnerClass += \" \" + classes.uiBtnCornerCircle;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuttonClassArray.push(classes.uiBtnRound);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"nobg\":\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnIconNobg, classes.uiBtnIconOnly);\n\t\t\t\t\tif (options.icon && innerTextLength <= 0) {\n\t\t\t\t\t\t// Style: no text, Icon only, no background\n\t\t\t\t\t\tinnerClass += \" \" + classes.uiBtnIconNobg;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"edit\":\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnEdit);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"round\":\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnRound);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Set icon\n\t\t\t\tif (options.icon) {\n\t\t\t\t\tif (innerTextLength > 0) {\n\t\t\t\t\t\tswitch (options.iconpos) {\n\t\t\t\t\t\tcase \"right\":\n\t\t\t\t\t\t\ttextClass += \" \" + classes.uiBtnTextPaddingRight;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"left\":\n\t\t\t\t\t\t\ttextClass += \" \" + classes.uiBtnTextPaddingLeft;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"top\":\n\t\t\t\t\t\t\ttextClass += \" \" + classes.uiBtnTextPaddingTop;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"bottom\":\n\t\t\t\t\t\t\ttextClass += \" \" + classes.uiBtnTextPaddingBottom;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\ttextClass += \" \" + classes.uiBtnTextPaddingLeft;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerClass += \" \" + classes.uiBtnHastxt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuttonClassArray.push(classes.uiBtnIconOnly);\n\t\t\t\t\t\tinnerClass += \" \" + classes.uiBtnIconOnlyInner;\n\t\t\t\t\t}\n\t\t\t\t} else if (innerTextLength > 0) {\n\t\t\t\t\tinnerClass += \" \" + classes.uiBtnHastxt;\n\t\t\t\t}\n\n\t\t\t\t// Used to control styling in headers/footers, where buttons default to `mini` style.\n\t\t\t\tif (options.mini) {\n\t\t\t\t\tbuttonClassArray.push(classes.uiMini);\n\t\t\t\t}\n\n\t\t\t\t// Used to control styling in headers/footers, where buttons default to `inline` style.\n\t\t\t\tif (options.inline !== null) {\n\t\t\t\t\tbuttonClassArray.push(options.inline ? classes.uiBtnInline : classes.uiBtnBlock);\n\t\t\t\t}\n\n\t\t\t\tif (options.icon) {\n\t\t\t\t\toptions.iconpos = options.iconpos || \"left\";\n\t\t\t\t\ticonClass = classes.uiIcon + \" \" + classes.uiIconPositionPrefix + options.icon;\n\n\t\t\t\t\t// Set icon shadow\n\t\t\t\t\tif (options.iconshadow) {\n\t\t\t\t\t\ticonClass += \" \" + classes.uiIconShadow;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set iconpos\n\t\t\t\t\tbuttonClassArray.push(classes.uiBtnIconPositionPrefix + options.iconpos);\n\t\t\t\t\tif (options.iconpos === \"notext\" && !element.getAttribute(\"title\")) {\n\t\t\t\t\t\telement.setAttribute(\"title\", element.textContent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Default disable element\n\t\t\t\tif (attributes.disabled) {\n\t\t\t\t\tdisableElement(element, container);\n\t\t\t\t} else {\n\t\t\t\t\tenableElement(element, container);\n\t\t\t\t}\n\n\t\t\t\tinnerClass += options.corners ? \" \"  + classes.uiBtnCornerAll : \"\";\n\n\t\t\t\t// Copy classes of structure\n\t\t\t\tbuttonClassList = container.classList;\n\t\t\t\tbuttonClassList.remove(classes.uiLink);\n\n\t\t\t\t// Copy all classes from buttonClassArray to buttonClassList\n\t\t\t\tDOMTokenList.prototype.add.apply(buttonClassList, buttonClassArray);\n\n\t\t\t\tbuttonInner.className = innerClass;\n\t\t\t\tbuttonText.className = textClass;\n\t\t\t\tbuttonInner.appendChild(buttonText);\n\n\t\t\t\tif (buttonIcon) {\n\t\t\t\t\tbuttonIcon.className = iconClass;\n\t\t\t\t\tbuttonIcon.innerHTML = \"&#160;\";\n\t\t\t\t\tbuttonInner.appendChild(buttonIcon);\n\t\t\t\t}\n\n\t\t\t\t// copy inner structure of button to new tag\n\t\t\t\twhile (element.firstChild) {\n\t\t\t\t\tbuttonText.appendChild(element.firstChild);\n\t\t\t\t}\n\n\t\t\t\tif (!buttonText.innerHTML.length && buttonIcon && elementTagName !== \"label\") {\n\t\t\t\t\tthis._setValue(options.icon.replace(\"naviframe-\", \"\"), element);\n\t\t\t\t}\n\n\t\t\t\tif (elementTagName === \"button\" || elementTagName === \"input\") {\n\t\t\t\t\tns.utils.DOM.replaceWithNodes(element, container);\n\t\t\t\t\tcontainer.appendChild(buttonInner);\n\t\t\t\t\tcontainer.appendChild(element);\n\t\t\t\t\tif (buttonInnerHTML) {\n\t\t\t\t\t\tcontainer.firstChild.firstChild.innerHTML = buttonInnerHTML;\n\t\t\t\t\t\telement.innerHTML = buttonInnerHTML;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainer.firstChild.firstChild.textContent = buttonValue;\n\t\t\t\t\t\telement.value = buttonValue;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\telement.appendChild(buttonInner);\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tvar container = document.getElementById(element.id + \"-div-container\");\n\t\t\t\tif (!container) {\n\t\t\t\t\tcontainer = element;\n\t\t\t\t}\n\t\t\t\tthis.ui.container = container;\n\t\t\t\tthis.ui.buttonText = document.getElementById(element.id + \"-div-text\");\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._bindEvents = function () {\n\t\t\t\taddGlobalEvents();\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["Button"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"chainable","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":" var buttonWidget = tau.widget.Button(document.getElementById(\"button\"));\n buttonWidget.enable();\n\n // or\n\n $( \"#button\" ).button( \"enable\" );","brief":"<p>Enable the button</p>","description":"<p>Method removes disabled attribute on button and changes look of button to enabled state.</p>\n\n","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Enable button</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._enable = function (element) {\n\t\t\t\tif (element) {\n\t\t\t\t\tenableElement(element, this.ui.container);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"value","description":"Value to set on button","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":"In get mode return inner text of button."},"since":"2.3","name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"string","name":"value","description":"Value to set on button","isOptional":true,"isLast":true},{"type":"return","types":["string"],"description":"In get mode return inner text of button."},{"type":"since","string":"2.3"},{"type":"member","string":"ns.widget.mobile.Button"}],"example":" var buttonWidget = tau.widget.Button(document.getElementById(\"button\")),\n     value = buttonWidget.value(); // value contains inner text of button\n\n buttonWidget.value( \"New text\" ); // \"New text\" will be text of button\n\n // or\n\n $( \"#button\" ).button( \"value\" ); // value contains inner text of button\n\n $( \"#button\" ).button( \"value\", \"New text\" ); // \"New text\" will be text of button","brief":"<p>Get or set value</p>","description":"<p>Return inner text of button or set text on button</p>\n\n","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true},{"params":[],"hasParams":false,"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Get value of button</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getValue = function () {\n\t\t\t\treturn this.ui.buttonText.innerText;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"value","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"string","name":"value","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Set value of button</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._setValue = function (value, element) {\n\t\t\t\tvar elementTagName;\n\t\t\t\telement = element || this.element;\n\t\t\t\telementTagName = element.tagName.toLowerCase();\n\n\t\t\t\tthis.ui.buttonText.innerText = value;\n\n\t\t\t\tif (elementTagName === \"button\" || elementTagName === \"input\") {\n\t\t\t\t\telement.innerText = value;\n\t\t\t\t\telement.value = value;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["Button"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"chainable","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":" var buttonWidget = tau.widget.Button(document.getElementById(\"button\"));\n buttonWidget.disable();\n\n // or\n\n $( \"#button\" ).button( \"disable\" );","brief":"<p>Disable the button</p>","description":"<p>Method sets disabled attribute on button and changes look of button to disabled state.</p>\n\n","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Disable button</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._disable = function (element) {\n\t\t\t\tif (element) {\n\t\t\t\t\tdisableElement(element, this.ui.container);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["Button"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"chainable","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":" var buttonWidget = tau.widget.Button(document.getElementById(\"button\"));\n buttonWidget.refresh();\n\n // or\n\n $( \"#button\" ).button( \"refresh\" );\n\n // also will be called after\n\n buttonWidget.option(\"mini\", true);","brief":"<p>Refresh a button markup.</p>","description":"<p>This method will rebuild while DOM structure of widget.</p>\n\n<p>This method should be called after are manually change in HTML attributes of widget DOM structure.</p>\n\n<p>This method is called automatically after change any option of widget.</p>\n\n","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Button"}],"example":"","brief":"<p>Refresh button</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refresh = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tcontainer = this.ui.container;\n\t\t\t\tif (element) {\n\t\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\t\tthis.disable(element);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.enable(element);\n\t\t\t\t\t}\n\t\t\t\t\tif (element.innerHTML) {\n\t\t\t\t\t\tcontainer.firstChild.firstChild.innerHTML = element.innerHTML;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainer.firstChild.firstChild.textContent = element.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.mobile.Button"}],"example":" var buttonWidget = tau.widget.Button(document.getElementById(\"button\"));\n buttonWidget.destroy();\n\n // or\n\n $( \"#button\" ).button( \"destroy\" );","brief":"<p>Removes the button functionality completely.</p>","description":"<p>This will return the element back to its pre-init state.</p>\n\n","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"// definition\n\t\t\tns.widget.mobile.Button = Button;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Button\",\n\t\t\t\t\"[data-role='button'], button, [type='button'], [type='submit'], [type='reset'], .ui-btn\",\n\t\t\t\t[],\n\t\t\t\tButton,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t// ButtonMarkup is alias for Button widget\n\t\t\t// required for backward compatibility with jQM\n\t\t\tengine.defineWidget(\n\t\t\t\t\"buttonMarkup\",\n\t\t\t\t\"\",\n\t\t\t\t[],\n\t\t\t\tButton,\n\t\t\t\t'mobile',\n\t\t\t\tfalse, // redefine: false\n\t\t\t\tfalse // change name of widget to lowercase: false\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.utils.easing","authors":[],"title":"easing","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"ns.utils.easing = {","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number"],"description":""},"name":"cubicOut","tags":[{"type":"method","string":"cubicOut"},{"type":"member","string":"ns.utils.easing"},{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true},{"type":"return","types":["number"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Performs quad easing out calcuclations based on time</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"easeOutQuad: function (currentTime, startValue, changeInValue, duration) {\n\t\t\t\t\treturn -changeInValue * (currentTime /= duration) * (currentTime - 2) + startValue;\n\t\t\t\t},"},{"params":[{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number"],"description":""},"name":"easeOutExpo","tags":[{"type":"method","string":"easeOutExpo"},{"type":"member","string":"ns.utils.easing"},{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true},{"type":"return","types":["number"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Performs out expo easing calcuclations based on time</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"easeOutExpo: function (currentTime, startValue, changeInValue, duration) {\n\t\t\t\t\treturn (currentTime === duration) ?\n\t\t\t\t\t\t\tstartValue + changeInValue :\n\t\t\t\t\t\t\t\tchangeInValue * (-Math.pow(2, -10 * currentTime / duration) + 1) +\n\t\t\t\t\t\t\t\tstartValue;\n\t\t\t\t},"},{"params":[{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number"],"description":""},"name":"linear","tags":[{"type":"method","string":"linear"},{"type":"member","string":"ns.utils.easing"},{"type":"param","types":"number","name":"currentTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startValue","description":"","isOptional":false},{"type":"param","types":"number","name":"changeInValue","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true},{"type":"return","types":["number"],"description":""},{"type":"static","string":""}],"example":"","brief":"<p>Performs out linear calcuclations based on time</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"linear: function (currentTime, startValue, changeInValue, duration) {\n\t\t\t\t\treturn startValue + duration * currentTime;\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(ns));"}]},{"name":"ns.widget.mobile.Scrollview","authors":[],"extends":"ns.widget.BaseWidget","title":"Scrollview Widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"view","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"makePositioned","tags":[{"type":"method","string":"makePositioned"},{"type":"param","types":"HTMLElement","name":"view","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Changes static position to relative</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function makePositioned(view) {\n\t\t\t\tif (DOMUtils.getCSSProperty(view, \"position\") === \"static\") {\n\t\t\t\t\tview.style.position = \"relative\";\n\t\t\t\t} else {\n\t\t\t\t\tview.style.position = \"absolute\";\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"startTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startX","description":"","isOptional":false},{"type":"param","types":"number","name":"startY","description":"","isOptional":false},{"type":"param","types":"number","name":"translateX","description":"","isOptional":false},{"type":"param","types":"number","name":"translateY","description":"","isOptional":false},{"type":"param","types":"number","name":"endX","description":"","isOptional":false},{"type":"param","types":"number","name":"endY","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"translateTransition","tags":[{"type":"method","string":"translateTransition"},{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"startTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startX","description":"","isOptional":false},{"type":"param","types":"number","name":"startY","description":"","isOptional":false},{"type":"param","types":"number","name":"translateX","description":"","isOptional":false},{"type":"param","types":"number","name":"translateY","description":"","isOptional":false},{"type":"param","types":"number","name":"endX","description":"","isOptional":false},{"type":"param","types":"number","name":"endY","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Translation animation loop</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function translateTransition(state, element, startTime, startX, startY, translateX, translateY, endX, endY, duration) {\n\t\t\t\tvar timestamp = (new Date()).getTime() - startTime,\n\t\t\t\t\tnewX = parseInt(easingUtils.cubicOut(timestamp, startX, translateX, duration), 10),\n\t\t\t\t\tnewY = parseInt(easingUtils.cubicOut(timestamp, startY, translateY, duration), 10);\n\t\t\t\tif (element.scrollLeft !== endX) {\n\t\t\t\t\telement.scrollLeft = newX;\n\t\t\t\t}\n\t\t\t\tif (element.scrollTop !== endY) {\n\t\t\t\t\telement.scrollTop = newY;\n\t\t\t\t}\n\n\t\t\t\tif ((newX !== endX || newY !== endY) &&\n\t\t\t\t\t(newX >= 0 && newY >= 0) &&\n\t\t\t\t\tstate.currentTransition) {\n\t\t\t\t\tutils.requestAnimationFrame(state.currentTransition);\n\t\t\t\t} else {\n\t\t\t\t\tstate.currentTransition = null;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"translate","tags":[{"type":"method","string":"translate"},{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Translates scroll posotion directly or with an animation<br />if duration is specified</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function translate(state, element, x, y, duration) {\n\t\t\t\tif (duration) {\n\t\t\t\t\tstate.currentTransition = translateTransition.bind(\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\t(new Date()).getTime(),\n\t\t\t\t\t\telement.scrollLeft,\n\t\t\t\t\t\telement.scrollTop,\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t\telement.scrollLeft + x,\n\t\t\t\t\t\telement.scrollTop + y,\n\t\t\t\t\t\tduration\n\t\t\t\t\t);\n\t\t\t\t\tutils.requestAnimationFrame(state.currentTransition);\n\t\t\t\t} else {\n\t\t\t\t\tif (x) {\n\t\t\t\t\t\telement.scrollLeft = element.scrollLeft + x;\n\t\t\t\t\t}\n\t\t\t\t\tif (y) {\n\t\t\t\t\t\telement.scrollTop = element.scrollTop + y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction repositionJumps(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\thorizontalJumpButton = ui.jumpHorizontalButton,\n\t\t\t\t\tverticalJumpButton = ui.jumpVerticalButton,\n\t\t\t\t\toffsets = horizontalJumpButton || verticalJumpButton ? DOMUtils.getElementOffset(self.element) : null; // dont calc when not used\n\n\t\t\t\tif (horizontalJumpButton) {\n\t\t\t\t\thorizontalJumpButton.style.left = offsets.left + \"px\";\n\t\t\t\t}\n\n\t\t\t\tif (verticalJumpButton) {\n\t\t\t\t\tverticalJumpButton.style.top = offsets.top + \"px\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tScrollview.classes = classes;\n\n\t\t\tScrollview.prototype = new BaseWidget();"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Builds the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._build = function (element) {\n\t\t\t\t//@TODO wrap element's content with external function\n\t\t\t\tvar self = this,\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\tview = selectors.getChildrenByClass(element, classes.view)[0] || document.createElement('div'),\n\t\t\t\t\tclipStyle = element.style,\n\t\t\t\t\tnode = null,\n\t\t\t\t\tchild = element.firstChild,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tdirection = options.scroll,\n\t\t\t\t\tjumpButton,\n\t\t\t\t\tjumpBackground;\n\t\t\t\tview.className = classes.view;\n\n\t\t\t\twhile (child) {\n\t\t\t\t\tnode = child;\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t\tif (view !== node) {\n\t\t\t\t\t\tview.appendChild(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (view.parentNode !== element) {\n\t\t\t\t\telement.appendChild(view);\n\t\t\t\t}\n\n\t\t\t\t// setting view style\n\t\t\t\tmakePositioned(view);\n\n\t\t\t\telement.classList.add(classes.clip);\n\n\t\t\t\tswitch (direction) {\n\t\t\t\t\tcase \"x\":\n\t\t\t\t\t\tclipStyle.overflowX = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"xy\":\n\t\t\t\t\t\tclipStyle.overflow = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tclipStyle.overflowY = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (options.scrollJump) {\n\t\t\t\t\tif (direction.indexOf(\"x\") > -1) {\n\t\t\t\t\t\tjumpBackground = document.createElement('div');\n\t\t\t\t\t\tjumpBackground.className = classes.jumpLeft;\n\t\t\t\t\t\tjumpButton = document.createElement('div');\n\n\t\t\t\t\t\tjumpBackground.appendChild(jumpButton);\n\t\t\t\t\t\telement.appendChild(jumpBackground);\n\t\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\t\tjumpButton,\n\t\t\t\t\t\t\t\"Button\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"icon\": \"scrollleft\",\n\t\t\t\t\t\t\t\t\"style\": \"box\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tui.jumpHorizontalButton = jumpBackground;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (direction.indexOf(\"y\") > -1) {\n\t\t\t\t\t\tjumpBackground = document.createElement('div');\n\t\t\t\t\t\tjumpBackground.className = classes.jumpTop;\n\t\t\t\t\t\tjumpButton = document.createElement('div');\n\n\t\t\t\t\t\tjumpBackground.appendChild(jumpButton);\n\t\t\t\t\t\telement.appendChild(jumpBackground);\n\t\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\t\tjumpButton,\n\t\t\t\t\t\t\t\"Button\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"icon\": \"scrolltop\",\n\t\t\t\t\t\t\t\t\"style\": \"box\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tui.jumpVerticalButton = jumpBackground;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tui.view = view;\n\t\t\t\t// @TODO\n\t\t\t\t//this._addOverflowIndicator(element);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"instance","string":""}],"example":"","brief":"<p>Inits widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._init = function (element) {\n\t\t\t\tvar ui = this.ui,\n\t\t\t\t\tpage = ui.page;\n\n\t\t\t\tif (!ui.view) {\n\t\t\t\t\tui.view = selectors.getChildrenByClass(element, classes.view)[0];\n\t\t\t\t}\n\n\t\t\t\tif (!page) {\n\t\t\t\t\tpage = selectors.getClosestByClass(element, pageClass);\n\t\t\t\t\tif (page) {\n\t\t\t\t\t\tui.page = page;\n\t\t\t\t\t\tif (page.classList.contains(pageActiveClass) && this.options.scrollJump) {\n\t\t\t\t\t\t\trepositionJumps(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"clip","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_addOverflowIndicator","tags":[{"type":"method","string":"_addOverflowIndicator"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"clip","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Adds overflow indicators</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._addOverflowIndicator = function (clip) {\n\t\t\t\tif ((clip.getAttribute('data-overflow-enable') || 'true') === 'false') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tclip.insertAdjacentHTML('beforeend', '<div class=\"ui-overflow-indicator-top\"></div><div class=\"ui-overflow-indicator-bottom\"></div>');\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"scrollTo","tags":[{"type":"method","string":"scrollTo"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Scrolls to specified position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype.scrollTo = function (x, y, duration) {\n\t\t\t\tvar element = this.element;\n\t\t\t\tthis.translateTo(x - element.scrollLeft, y - element.scrollTop, duration);\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"translateTo","tags":[{"type":"method","string":"translateTo"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Translates the scroll to specified position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.translateTo = function (x, y, duration) {\n\t\t\t\ttranslate(this.state, this.element, x, y, duration);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"ensureElementIsVisible","tags":[{"type":"method","string":"ensureElementIsVisible"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Ensures that specified element is visible in the<br />clip area</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.ensureElementIsVisible = function (element) {\n\t\t\t\tvar clip = this.element,\n\t\t\t\t\tclipHeight = DOMUtils.getElementHeight(clip),\n\t\t\t\t\tclipWidth = DOMUtils.getElementWidth(clip),\n\t\t\t\t\tclipTop = 0,\n\t\t\t\t\tclipBottom = clipHeight,\n\t\t\t\t\telementHeight = DOMUtils.getElementHeight(element),\n\t\t\t\t\telementWidth = DOMUtils.getElementWidth(element),\n\t\t\t\t\telementTop = 0,\n\t\t\t\t\telementBottom,\n\t\t\t\t\telementFits = clipHeight >= elementHeight && clipWidth >= elementWidth,\n\t\t\t\t\tanchor,\n\t\t\t\t\tanchorPositionX,\n\t\t\t\t\tanchorPositionY,\n\t\t\t\t\tparent,\n\t\t\t\t\tfindPositionAnchor = function (input) {\n\t\t\t\t\t\tvar id = input.getAttribute(\"id\"),\n\t\t\t\t\t\t\ttagName = input.tagName.toLowerCase();\n\t\t\t\t\t\tif (id && [\"input\", \"textarea\", \"button\"].indexOf(tagName) > -1) {\n\t\t\t\t\t\t\treturn input.parentNode.querySelector(\"label[for=\" + id + \"]\");\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t_true = true;\n\n\t\t\t\tparent = element.parentNode;\n\t\t\t\twhile (parent && parent.node !== clip) {\n\t\t\t\t\telementTop += parent.offsetTop;\n\t\t\t\t\t//elementLeft += parent.offsetLeft;\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\t\t\t\telementBottom = elementTop + elementHeight;\n\t\t\t\t//elementRight = elementLeft + elementWidth;\n\n\t\t\t\tswitch (_true) {\n\t\t\t\t\tcase elementFits && clipTop < elementTop && clipBottom > elementBottom: // element fits in view is inside clip area\n\t\t\t\t\t\t// pass, element position is ok\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase elementFits && clipTop < elementTop && clipBottom < elementBottom: // element fits in view but its visible only at top\n\t\t\t\t\tcase elementFits && clipTop > elementTop && clipBottom > elementBottom: // element fits in view but its visible only at bottom\n\t\t\t\t\tcase elementFits: // element fits in view but is not visible\n\t\t\t\t\t\tthis.centerToElement(element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase clipTop < elementTop && clipBottom < elementBottom: // element visible only at top\n\t\t\t\t\tcase clipTop > elementTop && clipBottom > elementBottom: // element visible only at bottom\n\t\t\t\t\t\t// pass, we cant do anything, if we move the scroll\n\t\t\t\t\t\t// the user could lost view of something he scrolled to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // element is not visible\n\t\t\t\t\t\tanchor = findPositionAnchor(element);\n\t\t\t\t\t\tif (!anchor) {\n\t\t\t\t\t\t\tanchor = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanchorPositionX = anchor.offsetLeft + DOMUtils.getCSSProperty(anchor, \"margin-left\", 0, \"integer\");\n\t\t\t\t\t\tanchorPositionY = anchor.offsetTop + DOMUtils.getCSSProperty(anchor, \"margin-top\", 0, \"integer\");\n\t\t\t\t\t\tparent = anchor.parentNode;\n\t\t\t\t\t\twhile (parent && parent !== clip) {\n\t\t\t\t\t\t\tanchorPositionX = parent.offsetLeft + DOMUtils.getCSSProperty(parent, \"margin-left\", 0, \"integer\");\n\t\t\t\t\t\t\tanchorPositionY = parent.offsetTop + DOMUtils.getCSSProperty(parent, \"margin-top\", 0, \"integer\");\n\t\t\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.scrollTo(anchorPositionX, anchorPositionY, this.scrollDuration);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"centerToElement","tags":[{"type":"method","string":"centerToElement"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Centers specified element in the clip area</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.centerToElement = function (element) {\n\t\t\t\tvar clip = this.element,\n\t\t\t\t\tdeltaX = parseInt(DOMUtils.getElementWidth(clip) / 2 - DOMUtils.getElementWidth(element) / 2, 10),\n\t\t\t\t\tdeltaY = parseInt(DOMUtils.getElementHeight(clip) / 2 - DOMUtils.getElementHeight(element) / 2, 10),\n\t\t\t\t\telementPositionX = element.offsetLeft,\n\t\t\t\t\telementPositionY = element.offsetTop,\n\t\t\t\t\tparent = element.parentNode;\n\n\t\t\t\twhile (parent && parent !== clip) {\n\t\t\t\t\telementPositionX += parent.offsetLeft + DOMUtils.getCSSProperty(parent, \"margin-left\", 0, \"integer\");\n\t\t\t\t\telementPositionY += parent.offsetTop + DOMUtils.getCSSProperty(parent, \"margin-top\", 0, \"integer\");\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\t\t\t\tthis.scrollTo(elementPositionX - deltaX, elementPositionY - deltaY, this.scrollDuration);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"skipDragging","tags":[{"type":"method","string":"skipDragging"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"deprecated","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>This is just for compatibility</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.skipDragging = function () {\n\t\t\t\tif (window.console) {\n\t\t\t\t\twindow.console.warn(\"ns.widget.mobile.Scrollview: skipDragging is deprecated\");\n\t\t\t\t}\n\t\t\t}; // just for TWEBUIFW compat"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"getScrollPosition","tags":[{"type":"method","string":"getScrollPosition"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"return","types":["Object"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Returns scroll current position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.getScrollPosition = function () {\n\t\t\t\tvar element = this.element;\n\t\t\t\treturn {\n\t\t\t\t\t\"x\": element.scrollLeft,\n\t\t\t\t\t\"y\": element.scrollTop\n\t\t\t\t};\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"instance","string":""}],"example":"","brief":"<p>Binds scrollview events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._bindEvents = function (element) {\n\t\t\t\tvar scrollTimer = null,\n\t\t\t\t\tview = element.children[0],\n\t\t\t\t\tlastClipHeight = DOMUtils.getElementHeight(element),\n\t\t\t\t\tlastClipWidth = DOMUtils.getElementWidth(element),\n\t\t\t\t\tnotifyScrolled = function () {\n\t\t\t\t\t\teventUtils.trigger(element, \"scrollstop\");\n\t\t\t\t\t\twindow.clearTimeout(scrollTimer);\n\t\t\t\t\t\tscrollTimer = null;\n\t\t\t\t\t},\n\t\t\t\t\tself = this,\n\t\t\t\t\t//FIXME there should be some other way to get parent container\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tjumpTop = ui.jumpVerticalButton,\n\t\t\t\t\tjumpLeft = ui.jumpHorizontalButton,\n\t\t\t\t\trepositionJumpsCallback,\n\t\t\t\t\tjumpTopCallback,\n\t\t\t\t\tjumpLeftCallback,\n\t\t\t\t\tcallbacks = self._callbacks;\n\n\t\t\t\tif (page) {\n\t\t\t\t\tif (this.options.scrollJump) {\n\t\t\t\t\t\trepositionJumpsCallback = repositionJumps.bind(null, this);\n\t\t\t\t\t\tjumpTopCallback = function () {\n\t\t\t\t\t\t\tself.scrollTo(element.scrollLeft, 0, 250);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tjumpLeftCallback = function () {\n\t\t\t\t\t\t\tself.scrollTo(0, element.scrollTop, 250);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpage.addEventListener(\"pageshow\", repositionJumpsCallback, false);\n\t\t\t\t\t\tif (jumpTop) {\n\t\t\t\t\t\t\tjumpTop.firstChild.addEventListener(\"vclick\", jumpTopCallback, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (jumpLeft) {\n\t\t\t\t\t\t\tjumpLeft.firstChild.addEventListener(\"vclick\", jumpLeftCallback, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcallbacks.repositionJumps = repositionJumpsCallback;\n\t\t\t\t\t\tcallbacks.jumpTop = jumpTopCallback;\n\t\t\t\t\t\tcallbacks.jumpLeft = jumpLeftCallback;\n\t\t\t\t\t}\n\n\t\t\t\t\telement.addEventListener(\"scroll\", function () {\n\t\t\t\t\t\tif (scrollTimer) {\n\t\t\t\t\t\t\twindow.clearTimeout(scrollTimer);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\teventUtils.trigger(element, \"scrollstart\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscrollTimer = window.setTimeout(notifyScrolled, 50);\n\t\t\t\t\t\teventUtils.trigger(element, \"scrollupdate\");\n\t\t\t\t\t}, false);\n\n\n\t\t\t\t\twindow.addEventListener(\"throttledresize\", function () {\n\t\t\t\t\t\tvar focusedElement = view.querySelector(\".ui-focus\"),\n\t\t\t\t\t\t\tclipWidth,\n\t\t\t\t\t\t\tclipHeight;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tself.ensureElementIsVisible(focusedElement);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclipHeight = DOMUtils.getElementHeight(element);\n\t\t\t\t\t\t\tclipWidth = DOMUtils.getElementWidth(element);\n\t\t\t\t\t\t\tself.translateTo(\n\t\t\t\t\t\t\t\tlastClipWidth - clipWidth,\n\t\t\t\t\t\t\t\tlastClipHeight - clipHeight,\n\t\t\t\t\t\t\t\tself.scrollDuration\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tlastClipHeight = clipHeight;\n\t\t\t\t\t\t\tlastClipWidth = clipWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\n\t\t\t\t\tdocument.addEventListener(\"vmousedown\", function () {\n\t\t\t\t\t\tif (currentTransition) {\n\t\t\t\t\t\t\tcurrentTransition = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tScrollview.prototype._destroy = function () {\n\t\t\t\tvar ui = this.ui,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tscrollJump = this.options.scrollJump,\n\t\t\t\t\tjumpTop = ui.jumpVerticalButton,\n\t\t\t\t\tjumpLeft = ui.jumpHorizontalButton,\n\t\t\t\t\tcallbacks = this._callbacks,\n\t\t\t\t\trepositionJumpsCallback = callbacks.repositionJumps,\n\t\t\t\t\tjumpTopCallback = callbacks.jumpTop,\n\t\t\t\t\tjumpLeftCallback = callbacks.jumpLeft;\n\n\t\t\t\tif (scrollJump) {\n\t\t\t\t\tif (page && repositionJumpsCallback) {\n\t\t\t\t\t\tpage.removeEventListener(\"pageshow\", repositionJumpsCallback, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (jumpTop && jumpTopCallback) {\n\t\t\t\t\t\tjumpTop.firstChild.removeEventListener(\"vclick\", jumpTopCallback, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (jumpLeft && jumpLeftCallback) {\n\t\t\t\t\t\tjumpLeft.firstChild.removeEventListener(\"vclick\", jumpLeftCallback, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tns.widget.mobile.Scrollview = Scrollview;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Scrollview\",\n\t\t\t\t\"[data-role='content']:not([data-scroll='none']):not([data-handler='true']):not(.ui-scrollview-clip):not(.ui-scrolllistview), [data-scroll]:not([data-scroll='none']):not([data-handler='true']), .ui-scrollview\",\n\t\t\t\t[\n\t\t\t\t\t\"scrollTo\",\n\t\t\t\t\t\"ensureElementIsVisible\",\n\t\t\t\t\t\"centerToElement\",\n\t\t\t\t\t\"getScrollPosition\",\n\t\t\t\t\t\"skipDragging\",\n\t\t\t\t\t\"translateTo\"\n\t\t\t\t],\n\t\t\t\tScrollview,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.Circularview","authors":[],"title":"Circularview widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"var CircularView = function () {\n\t\t\t\t\tthis.options = {\n\t\t\t\t\t\t\"fps\": 60,\n\t\t\t\t\t\t\"scrollDuration\": 2000,\n\t\t\t\t\t\t\"moveThreshold\": 10,\n\t\t\t\t\t\t\"moveIntervalThreshold\": 150,\n\t\t\t\t\t\t\"startEventName\": \"scrollstart\",\n\t\t\t\t\t\t\"updateEventName\": \"scrollupdate\",\n\t\t\t\t\t\t\"stopEventName\": \"scrollstop\",\n\t\t\t\t\t\t\"eventType\": ns.events.vmouse.touchSupport ? \"touch\" : \"mouse\",\n\t\t\t\t\t\t\"delaydedClickSelector\": \"a, .ui-btn\",\n\t\t\t\t\t\t\"delayedClickEnabled\": false,\n\t\t\t\t\t\t\"list\": \"> *\"\n\t\t\t\t\t};\n\t\t\t\t\tthis._callbacks = {};\n\t\t\t\t\tthis._view = null;\n\t\t\t\t\tthis._list = null;\n\t\t\t\t\tthis._items = null;\n\t\t\t\t\tthis._listItems = null;\n\t\t\t\t\tthis._moving = false;\n\t\t\t\t\tthis._lastMouseX = 0;\n\t\t\t\t\tthis._lastStepX = 0;\n\t\t\t\t\tthis._transformation = null;\n\t\t\t\t\tthis._itemWidth = 0;\n\t\t\t\t\tthis._width = 0;\n\t\t\t\t\tthis._lastGapSize = 0;\n\n\t\t\t\t\tthis._positionX = 0;\n\t\t\t\t\tthis._positionXOffset = 0;\n\n\t\t\t\t\tthis._centerTo = true;\n\t\t\t\t},\n\t\t\t\tslice = [].slice,\n\t\t\t\tBaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tdomutils = ns.utils.DOM,\n\t\t\t\tselectors = ns.utils.selectors,\n\t\t\t\tutils = ns.utils,\n\t\t\t\teventUtils = ns.utils.events,\n\t\t\t\tengine = ns.engine,\n\t\t\t\teasingUtils = ns.utils.easing,\n\t\t\t\tdragEvents = {\n\t\t\t\t\t\"mouse\": {\n\t\t\t\t\t\t\"start\": \"mousedown\",\n\t\t\t\t\t\t\"move\": \"mousemove\",\n\t\t\t\t\t\t\"end\": \"mouseup\"\n\t\t\t\t\t},\n\t\t\t\t\t\"touch\": {\n\t\t\t\t\t\t\"start\": \"touchstart\",\n\t\t\t\t\t\t\"move\": \"touchmove\",\n\t\t\t\t\t\t\"end\": \"touchend\"\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\tCircularView.prototype = new BaseWidget();\n\n\t\t\tfunction applyLeftItems(circularview, gapSizeDiff) {\n\t\t\t\tvar list = circularview._list,\n\t\t\t\t\titems = list.children,\n\t\t\t\t\tlastIndex = items.length - 1,\n\t\t\t\t\ti;\n\t\t\t\tfor (i = 0; i < gapSizeDiff; i++) {\n\t\t\t\t\tlist.insertBefore(items[lastIndex], items[0])\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyRightItems(circularview, gapSizeDiff) {\n\t\t\t\tvar list = circularview._list,\n\t\t\t\t\titems = list.children,\n\t\t\t\t\ti;\n\t\t\t\tfor (i = 0; i < gapSizeDiff; i++) {\n\t\t\t\t\tlist.appendChild(items[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction updateView(circularview) {\n\t\t\t\tvar viewStyle = circularview._view.style,\n\t\t\t\t\tpositionX = circularview._positionX,\n\t\t\t\t\tpositionXOffset = - circularview._positionXOffset,\n\t\t\t\t\tlastStepX = circularview._lastStepX,\n\t\t\t\t\ttranslate,\n\t\t\t\t\tgapSize = Math.floor((positionX - positionXOffset) / circularview._itemWidth),\n\t\t\t\t\titemWidth = circularview._itemWidth,\n\t\t\t\t\ttranslateX = positionX + positionXOffset - (itemWidth * gapSize),\n\t\t\t\t\tgapSizeDiff = Math.abs(gapSize - circularview._lastGapSize);\n\n\t\t\t\tif(circularview._centerTo) {\n\t\t\t\t\tif (gapSize > 0) { // show more on left side\n\t\t\t\t\t\tapplyLeftItems(circularview, gapSizeDiff);\n\t\t\t\t\t} else { // show more on right side\n\t\t\t\t\t\tapplyRightItems(circularview, gapSizeDiff);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (gapSizeDiff) {\n\t\t\t\t\t\tif (lastStepX > 0) { // show more on left side\n\t\t\t\t\t\t\tapplyLeftItems(circularview, gapSizeDiff);\n\t\t\t\t\t\t} else { // show more on right side\n\t\t\t\t\t\t\tapplyRightItems(circularview, gapSizeDiff);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttranslate =  \"translate3d(\" + translateX + \"px, 0px, 0px)\";\n\t\t\t\tviewStyle.transform = translate;\n\t\t\t\tviewStyle.webkitTransform = translate;\n\t\t\t\tcircularview._lastGapSize = gapSize;\n\t\t\t}\n\n\t\t\tfunction moveTo(circularview, startTime, changeX, endX, duration) {\n\t\t\t\tvar isCentring = circularview._centerTo,\n\t\t\t\t\telapsed = +new Date() - startTime, // timestamp passed to requestAnimationFrame callback is not stable so we create our own\n\t\t\t\t\ttimestamp = elapsed > duration ? duration : elapsed,\n\t\t\t\t\teasingVal = easingUtils.easeOutQuad(timestamp, 0, 1, duration),\n\t\t\t\t\tnewPositionX = isCentring ? changeX * easingVal : changeX * (1 - easingVal),\n\t\t\t\t\ttransformation = circularview._transformation,\n\t\t\t\t\toptions = circularview.options,\n\t\t\t\t\telement = circularview.element;\n\n\t\t\t\teventUtils.trigger(element, options.updateEventName);\n\n\t\t\t\tif (!duration || +new Date() > startTime + duration) {\n\t\t\t\t\tcircularview._positionX = isCentring ? endX : circularview._positionX;\n\t\t\t\t\tupdateView(circularview);\n\t\t\t\t\ttransformation = null;\n\t\t\t\t\tcircularview._centerTo = false;\n\t\t\t\t\teventUtils.trigger(element, options.stopEventName);\n\t\t\t\t} else if (newPositionX !== endX && isNaN(newPositionX) === false && transformation !== null) { // used isNaN to prevent jslint error, hope that closure will change this to val === val for speedup\n\t\t\t\t\tcircularview._positionX = isCentring ? newPositionX : circularview._positionX + newPositionX;\n\t\t\t\t\tupdateView(circularview);\n\t\t\t\t\tutils.requestAnimationFrame.call(window, transformation);\n\t\t\t\t} else {\n\t\t\t\t\tcircularview._positionX = isCentring ? newPositionX : circularview._positionX + newPositionX;\n\t\t\t\t\tupdateView(circularview);\n\t\t\t\t\tcircularview._transformation = null;\n\t\t\t\t\tcircularview._centerTo = false;\n\t\t\t\t\teventUtils.trigger(element, options.stopEventName);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfunction handleDragStart(circularview, event) {\n\t\t\t\tvar lastMouseX = event.clientX,\n\t\t\t\t\toptions = circularview.options,\n\t\t\t\t\telement = circularview.element;\n\n\t\t\t\t//event.preventDefault();\n\t\t\t\t//event.stopPropagation();\n\n\t\t\t\tif (circularview._moving === true || circularview._transformation !== null) {\n\t\t\t\t\teventUtils.trigger(element, options.stopEventName);\n\t\t\t\t}\n\n\t\t\t\tcircularview._moving = true;\n\t\t\t\tcircularview._transformation = null;\n\n\t\t\t\tif (circularview.options.eventType === \"touch\") {\n\t\t\t\t\tlastMouseX = event.touches[0].clientX;\n\t\t\t\t}\n\t\t\t\tcircularview._lastMouseX = lastMouseX;\n\n\t\t\t\teventUtils.trigger(element, options.startEventName);\n\t\t\t}\n\n\t\t\tfunction handleDragMove(circularview, event) {\n\t\t\t\tvar stepX = 0,\n\t\t\t\t\tmouseX = event.clientX;\n\n\t\t\t\tcircularview._lastMoveTime = Date.now();\n\n\t\t\t\tif (circularview.options.eventType === \"touch\") {\n\t\t\t\t\tmouseX = event.touches[0].clientX;\n\t\t\t\t}\n\n\t\t\t\tif (circularview._moving) {\n\t\t\t\t\tstepX = mouseX - circularview._lastMouseX;\n\t\t\t\t\tif (stepX !== 0) {\n\t\t\t\t\t\tcircularview._positionX += stepX;\n\t\t\t\t\t\tutils.requestAnimationFrame.call(window, updateView.bind(null, circularview));\n\t\t\t\t\t}\n\t\t\t\t\tcircularview._lastMouseX = mouseX;\n\t\t\t\t\tcircularview._lastStepX = stepX;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction handleDragEnd(circularview) {\n\t\t\t\tvar lastStepX = circularview._lastStepX,\n\t\t\t\t\tlastMoveTime = circularview._lastMoveTime,\n\t\t\t\t\tposition = circularview.getScrollPosition(),\n\t\t\t\t\tmomentum = lastStepX,\n\t\t\t\t\tdoScroll = lastMoveTime && (Date.now() - lastMoveTime) <= circularview.options.moveIntervalThreshold;\n\n\t\t\t\tcircularview._moving = false;\n\n\t\t\t\tif (doScroll) {\n\t\t\t\t\tcircularview._transformation = moveTo.bind(\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tcircularview,\n\t\t\t\t\t\t+new Date(),\n\t\t\t\t\t\tmomentum,\n\t\t\t\t\t\tposition.x + momentum,\n\t\t\t\t\t\tcircularview.options.scrollDuration\n\t\t\t\t\t);\n\t\t\t\t\tutils.requestAnimationFrame.call(window, circularview._transformation);\n\t\t\t\t} else {\n\t\t\t\t\tcircularview._transformation = null;\n\t\t\t\t\teventUtils.trigger(circularview.element, circularview.options.stopEventName);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyViewItems(circularview) {\n\t\t\t\tvar i,\n\t\t\t\t\titems = circularview._listItems,\n\t\t\t\t\titemsLength = items.length,\n\t\t\t\t\tfragment = document.createDocumentFragment();\n\n\t\t\t\tfor (i = 0; i < itemsLength; ++i) {\n\t\t\t\t\tfragment.appendChild(items[i]);\n\t\t\t\t}\n\t\t\t\tcircularview._list.appendChild(fragment);\n\t\t\t\tupdateView(circularview);\n\t\t\t}\n\n\t\t\tCircularView.classes = {\n\t\t\t\t\"clip\": \"ui-scrollview-clip\",\n\t\t\t\t\"view\": \"ui-scrollview-view\",\n\t\t\t\t\"listCurrent\": \"current\"\n\t\t\t};\n\n\t\t\tCircularView.prototype._build = function (element) {\n\t\t\t\tvar view = document.createElement(\"div\"),\n\t\t\t\t\tlist = document.createElement(\"ul\"),\n\t\t\t\t\tviewStyle = view.style,\n\t\t\t\t\tclasses = CircularView.classes,\n\t\t\t\t\tsourceListSelector = this.options.list,\n\t\t\t\t\tsourceRefNodeIsElement = sourceListSelector.charAt(0) === \">\",\n\t\t\t\t\tsourceRefNode = sourceRefNodeIsElement ? element : document;\n\n\t\t\t\tif (sourceRefNodeIsElement) {\n\t\t\t\t\tsourceListSelector = sourceListSelector.replace(/^>\\s*/, '');\n\t\t\t\t}\n\n\t\t\t\t// rewrite source to our list\n\t\t\t\tslice.call(sourceRefNode.querySelectorAll(sourceListSelector)).forEach(function (item) {\n\t\t\t\t\tlist.appendChild(item);\n\t\t\t\t});\n\n\t\t\t\telement.classList.add(classes.clip);\n\t\t\t\tview.classList.add(classes.view);\n\n\t\t\t\tviewStyle.overflow = \"hidden\";\n\n\t\t\t\tview.appendChild(list);\n\t\t\t\telement.innerHTML = \"\";\n\t\t\t\telement.appendChild(view);\n\n\t\t\t\tif (domutils.getCSSProperty(element, \"position\") === \"static\") {\n\t\t\t\t\telement.style.position = \"relative\";\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tCircularView.prototype._init = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tclasses = CircularView.classes,\n\t\t\t\t\tview = selectors.getChildrenByClass(element, classes.view)[0],\n\t\t\t\t\tlist = selectors.getChildrenByTag(view, \"ul\")[0],\n\t\t\t\t\tlistItems = [];\n\n\t\t\t\tself._list = list;\n\t\t\t\t// add to array by copy not through children reference\n\t\t\t\tslice.call(list.children).forEach(function (child) {\n\t\t\t\t\tlistItems.push(child);\n\t\t\t\t});\n\t\t\t\tself._items = listItems;\n\t\t\t\tself._view = view;\n\n\t\t\t\tself._refresh();\n\t\t\t};\n\n\t\t\tCircularView.prototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tcallbacks = self._callbacks,\n\t\t\t\t\teventType = self.options.eventType;\n\t\t\t\tcallbacks.dragstart = handleDragStart.bind(null, this);\n\t\t\t\tcallbacks.dragmove = handleDragMove.bind(null, this);\n\t\t\t\tcallbacks.dragend = handleDragEnd.bind(null, this);\n\n\t\t\t\telement.addEventListener(dragEvents[eventType].start, callbacks.dragstart, false);\n\t\t\t\telement.addEventListener(dragEvents[eventType].move, callbacks.dragmove, false);\n\t\t\t\telement.addEventListener(dragEvents[eventType].end, callbacks.dragend, false);\n\t\t\t};\n\n\t\t\tCircularView.prototype.getScrollPosition = function () {\n\t\t\t\treturn {\n\t\t\t\t\t\"x\": -this._positionX,\n\t\t\t\t\t\"y\": 0 // compatibility\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tCircularView.prototype.scrollTo = function (x, y, duration) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tposition = self.getScrollPosition(),\n\t\t\t\t\tstepX = Math.round(x), // we have to be sure that integers are supplied so we do Math.round on input\n\t\t\t\t\ttime = +new Date();\n\n\t\t\t\tself._transformation = moveTo.bind(\n\t\t\t\t\tnull,\n\t\t\t\t\tthis,\n\t\t\t\t\ttime,\n\t\t\t\t\tstepX - (-position.x),\n\t\t\t\t\tstepX,\n\t\t\t\t\tduration\n\t\t\t\t);\n\t\t\t\tutils.requestAnimationFrame.call(window, self._transformation);\n\t\t\t};\n\n\t\t\tCircularView.prototype.centerTo = function (selector, duration) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tsearched = self._view.querySelector(selector),\n\t\t\t\t\tsibling = null,\n\t\t\t\t\tsiblings = 0,\n\t\t\t\t\titemWidth = self._itemWidth,\n\t\t\t\t\t// We need to add a half of element to make it on the center, and\n\t\t\t\t\t// additionaly one more element due to positionXOffset which have\n\t\t\t\t\t// exactly one item width - this is why here we have itemWidth\n\t\t\t\t\t// multiplication by 1.5\n\t\t\t\t\tcenter = parseInt(self._width / 2 + (itemWidth * 1.5), 10);\n\n\t\t\t\tif (searched) {\n\t\t\t\t\tself._centerTo = true;\n\t\t\t\t\tsibling = searched.previousSibling;\n\t\t\t\t\twhile (sibling) {\n\t\t\t\t\t\t++siblings;\n\t\t\t\t\t\tsibling = sibling.previousSibling;\n\t\t\t\t\t}\n\t\t\t\t\tself.scrollTo(-((siblings * itemWidth) - center), 0, duration);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tCircularView.prototype.reflow = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tposition = this.getScrollPosition();\n\t\t\t\tself._refresh();\n\t\t\t\tself.scrollTo(position.x, position.y, self.options.scrollDuration);\n\t\t\t};\n\n\t\t\tCircularView.prototype.add = function (item) {\n\t\t\t\tthis._items.push(item);\n\t\t\t};\n\n\t\t\tCircularView.prototype._refresh = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\twidth = domutils.getElementWidth(element),\n\t\t\t\t\titems = self._items,\n\t\t\t\t\tfirstItem = items[0],\n\t\t\t\t\tfilledList = [],\n\t\t\t\t\tviewStyle = self._view.style,\n\t\t\t\t\titemWidth,\n\t\t\t\t\titemHeight,\n\t\t\t\t\titemsPerView,\n\t\t\t\t\tlist = self._list,\n\t\t\t\t\tfill,\n\t\t\t\t\tfills,\n\t\t\t\t\ti,\n\t\t\t\t\tlen;\n\n\t\t\t\tlist.innerHTML = \"\";\n\t\t\t\tif (!firstItem) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlist.appendChild(firstItem);\n\t\t\t\titemWidth = domutils.getElementWidth(items[0]);\n\t\t\t\titemHeight = domutils.getElementHeight(items[0]);\n\n\t\t\t\tlist.removeChild(firstItem);\n\n\t\t\t\titemsPerView = parseInt(width / itemWidth, 10);\n\n\t\t\t\t// fill list\n\t\t\t\tfor (fill = 0, fills = Math.ceil(itemsPerView / items.length) + 1; fill < fills; ++fill) {\n\t\t\t\t\tfor (i = 0, len = items.length; i < len; ++i) {\n\t\t\t\t\t\tfilledList.push(items[i].cloneNode(true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilledList.unshift(filledList.pop());\n\n\t\t\t\tviewStyle.height = itemHeight + \"px\";\n\t\t\t\tviewStyle.width = itemWidth * filledList.length + \"px\";\n\n\t\t\t\tself._listItems = filledList;\n\t\t\t\tself._itemWidth = itemWidth;\n\t\t\t\tself._width = width;\n\t\t\t\tself._itemsPerView = itemsPerView;\n\t\t\t\tself._positionXOffset = itemWidth;\n\n\t\t\t\tapplyViewItems(self);\n\t\t\t};\n\n\t\t\tCircularView.prototype._destroy = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\tcallbacks = self._callbacks,\n\t\t\t\t\teventType = self.options.eventType;\n\t\t\t\tif (element) {\n\t\t\t\t\telement.removeEventListener(dragEvents[eventType].start, callbacks.dragstart, false);\n\t\t\t\t\telement.removeEventListener(dragEvents[eventType].move, callbacks.dragmove, false);\n\t\t\t\t\telement.removeEventListener(dragEvents[eventType].end, callbacks.dragend, false);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Circularview = CircularView;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Circularview\",\n\t\t\t\t\"[data-role='circularview'], .ui-circularview\", //@TODO ???\n\t\t\t\t[\n\t\t\t\t\t\"getScrollPosition\",\n\t\t\t\t\t\"scrollTo\",\n\t\t\t\t\t\"centerTo\",\n\t\t\t\t\t\"reflow\",\n\t\t\t\t\t\"add\"\n\t\t\t\t],\n\t\t\t\tCircularView,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));","properties":[],"options":[],"methods":[]},{"name":"ns.widget.mobile.Collapsible","authors":["Piotr Karny <p.karny@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Collapsible widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[{"types":"string","defaultValue":"'s'","tags":[{"type":"property","string":"{string} defaultOptions.theme='s'"},{"type":"property","string":"{string} defaultOptions.collapsedIcon='arrow-u'"},{"type":"property","string":"{string} defaultOptions.expandedIcon='arrow-d'"},{"type":"property","string":"{string} defaultOptions.iconpos='right'"},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"<p>@property {Object} defaultOptions Default options for settings of collapsible widget</p>","isPrivate":false,"code":"Collapsible.defaultOptions = {\n\t\t\t\ttheme: 's',\n\t\t\t\tcollapsedIcon: 'arrow-u',\n\t\t\t\texpandedIcon: 'arrow-d',\n\t\t\t\ticonpos: 'right'\n\t\t\t};","name":"defaultOptions.theme"},{"types":"string","defaultValue":"'arrow-u'","tags":[{"type":"property","string":"{string} defaultOptions.theme='s'"},{"type":"property","string":"{string} defaultOptions.collapsedIcon='arrow-u'"},{"type":"property","string":"{string} defaultOptions.expandedIcon='arrow-d'"},{"type":"property","string":"{string} defaultOptions.iconpos='right'"},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"<p>@property {Object} defaultOptions Default options for settings of collapsible widget</p>","isPrivate":false,"code":"Collapsible.defaultOptions = {\n\t\t\t\ttheme: 's',\n\t\t\t\tcollapsedIcon: 'arrow-u',\n\t\t\t\texpandedIcon: 'arrow-d',\n\t\t\t\ticonpos: 'right'\n\t\t\t};","name":"defaultOptions.collapsedIcon"},{"types":"string","defaultValue":"'arrow-d'","tags":[{"type":"property","string":"{string} defaultOptions.theme='s'"},{"type":"property","string":"{string} defaultOptions.collapsedIcon='arrow-u'"},{"type":"property","string":"{string} defaultOptions.expandedIcon='arrow-d'"},{"type":"property","string":"{string} defaultOptions.iconpos='right'"},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"<p>@property {Object} defaultOptions Default options for settings of collapsible widget</p>","isPrivate":false,"code":"Collapsible.defaultOptions = {\n\t\t\t\ttheme: 's',\n\t\t\t\tcollapsedIcon: 'arrow-u',\n\t\t\t\texpandedIcon: 'arrow-d',\n\t\t\t\ticonpos: 'right'\n\t\t\t};","name":"defaultOptions.expandedIcon"},{"types":"string","defaultValue":"'right'","tags":[{"type":"property","string":"{string} defaultOptions.theme='s'"},{"type":"property","string":"{string} defaultOptions.collapsedIcon='arrow-u'"},{"type":"property","string":"{string} defaultOptions.expandedIcon='arrow-d'"},{"type":"property","string":"{string} defaultOptions.iconpos='right'"},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"<p>@property {Object} defaultOptions Default options for settings of collapsible widget</p>","isPrivate":false,"code":"Collapsible.defaultOptions = {\n\t\t\t\ttheme: 's',\n\t\t\t\tcollapsedIcon: 'arrow-u',\n\t\t\t\texpandedIcon: 'arrow-d',\n\t\t\t\ticonpos: 'right'\n\t\t\t};","name":"defaultOptions.iconpos"}],"options":[{"types":"string","defaultValue":"'","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Expandable list, tap to open list']","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-expand-cue-text"},{"types":"string","defaultValue":"'","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Expandable list, tap to close list']","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-collapse-cue-text"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Determines if content should be collapsed on load","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-collapsed"},{"types":"string","defaultValue":"'h1,h2,h3,h4,h5,h6,legend,li'","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"<p>@property {Object} options Collapsible widget options</p>","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-heading"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-theme"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"widget content theme","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-content-theme"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-collapsed-icon"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-expanded-icon"},{"types":"string | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-iconpos"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Determines if widget should be shown as inset","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-inset"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{string} [options.expandCueText=' Expandable list, tap to open list']"},{"type":"property","string":"{string} [options.collapseCueText=' Expandable list, tap to close list']"},{"type":"property","string":"{boolean} [options.collapsed=true] Determines if content should be collapsed on load"},{"type":"property","string":"{string} [options.heading='h1,h2,h3,h4,h5,h6,legend,li']"},{"type":"property","string":"{?string} [options.theme=null] widget theme, `{@link ns.widget.mobile.Collapsible#defaultOptions}.theme`"},{"type":"value","string":"is used when .theme option isn't on element itself and on it's parents"},{"type":"property","string":"{?string} [options.contentTheme=null] widget content theme"},{"type":"property","string":"{?string} [options.collapsedIcon=null] Icon for collapsed widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.collapsedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.expandedIcon=null] Icon for expanded widget, `{@link ns.widget.mobile.Collapsible#defaultOptions}.expandedIcon`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{?string} [options.iconpos=null] Icon position, `{@link ns.widget.mobile.Collapsible#defaultOptions}.iconPos`"},{"type":"value","string":"is used when collapsible is not in a collapsible-set or option isn't set"},{"type":"property","string":"{boolean} [options.inset=true] Determines if widget should be shown as inset"},{"type":"property","string":"{boolean} [options.mini=false] Sets widget to mini version"},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"description":"Sets widget to mini version","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\texpandCueText: \" Expandable list, tap to open list\",\n\t\t\t\t\t\tcollapseCueText: \" Expandable list, tap to close list\",\n\t\t\t\t\t\tcollapsed: true,\n\t\t\t\t\t\theading: \"h1,h2,h3,h4,h5,h6,legend,li\",\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\tcontentTheme: null,\n\t\t\t\t\t\tcollapsedIcon: null,\n\t\t\t\t\t\texpandedIcon: null,\n\t\t\t\t\t\ticonpos: null,\n\t\t\t\t\t\tinset: false,\n\t\t\t\t\t\tmini: false\n\t\t\t\t\t};\n\t\t\t\t\t// theme, collapsedIcon, expandedIcon, iconpos set as null because they may be overriden with collapsible-set options\n\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};\n\n\t\t\tCollapsible.prototype = new BaseWidget();","name":"data-mini"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Collapsible","tags":[{"type":"method","string":"Collapsible"},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"example":"","brief":"<p>Local constructor function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Collapsible = function () {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"example":"","brief":"<p>Build widget structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Collapsible.prototype._build = function (element) {\n\t\t\t\tvar classes = Collapsible.classes,\n\t\t\t\t\tdefaults = Collapsible.defaultOptions,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\telementClassList = element.classList,\n\t\t\t\t\theader,\n\t\t\t\t\theaderLink,\n\t\t\t\t\theaderLinkClassList,\n\t\t\t\t\theaderStatus,\n\t\t\t\t\tbtnInner,\n\t\t\t\t\tbtnInnerClassList,\n\t\t\t\t\tcontent,\n\t\t\t\t\talterHeader,\n\t\t\t\t\tparentCollapsibleSet = selectors.getClosestBySelector(element, \"[data-role='collapsible-set']\"),\n\t\t\t\t\tgetDataFromParentSet = domUtils.getNSData.bind(null, parentCollapsibleSet);\n\n\t\t\t\telementClassList.add(classes.uiCollapsible);\n\n\t\t\t\t// First child matching selector is collapsible header\n\t\t\t\theader = selectors.getChildrenBySelector(element, options.heading)[0];\n\t\t\t\tif (!header) {\n\t\t\t\t\t\t\t\t\t\theader = document.createElement('h1');\n\t\t\t\t\telement.appendChild(header);\n\t\t\t\t}\n\n\t\t\t\tif (header.tagName.toLowerCase() === 'legend') {\n\t\t\t\t\talterHeader = document.createElement('div');\n\t\t\t\t\talterHeader.setAttribute('role', 'heading');\n\t\t\t\t\talterHeader.innerHTML = header.innerHTML;\n\n\t\t\t\t\telement.replaceChild(alterHeader, header);\n\t\t\t\t\theader = alterHeader;\n\t\t\t\t}\n\t\t\t\theader.classList.add(classes.uiCollapsibleHeading);\n\n\t\t\t\t// Wrap all widget content\n\t\t\t\tdomUtils.wrapInHTML(element.childNodes, '<div class=\"' + classes.uiCollapsibleContent + '\"></div>');\n\n\t\t\t\t// Move header out\n\t\t\t\theader = element.insertBefore(header, element.firstChild);\n\t\t\t\t// .. and set reference to content\n\t\t\t\tcontent = header.nextElementSibling;\n\n\t\t\t\tif (parentCollapsibleSet) {\n\t\t\t\t\t// If set theme from parent set or closest element and if everything is empty set default\n\t\t\t\t\tif (!options.theme) {\n\t\t\t\t\t\toptions.theme = getDataFromParentSet('theme') || themes.getInheritedTheme(element) || defaults.theme;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!options.contentTheme) {\n\t\t\t\t\t\toptions.contentTheme = getDataFromParentSet('content-theme');\n\t\t\t\t\t}\n\t\t\t\t\t//Get the preference for collapsed icon in the set\n\t\t\t\t\tif (!options.collapsedIcon) {\n\t\t\t\t\t\toptions.collapsedIcon = getDataFromParentSet('collapsed-icon');\n\t\t\t\t\t}\n\t\t\t\t\t// Get the preference for expanded icon in the set\n\t\t\t\t\tif (!options.expandedIcon) {\n\t\t\t\t\t\toptions.expandedIcon = getDataFromParentSet('expanded-icon');\n\t\t\t\t\t}\n\t\t\t\t\t// Gets the preference icon position in the set\n\t\t\t\t\tif (!options.iconpos) {\n\t\t\t\t\t\toptions.iconpos = getDataFromParentSet('iconpos');\n\t\t\t\t\t}\n\t\t\t\t\t// Inherit the preference for inset from collapsible-set\n\t\t\t\t\tif (getDataFromParentSet(\"inset\") !== undefined) {\n\t\t\t\t\t\toptions.inset = getDataFromParentSet(\"inset\");\n\t\t\t\t\t}\n\t\t\t\t\t// Gets the preference for mini in the set\n\t\t\t\t\tif (!options.mini) {\n\t\t\t\t\t\toptions.mini = getDataFromParentSet(\"mini\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!options.theme) {\n\t\t\t\t\t\toptions.theme = themes.getInheritedTheme(element) || defaults.theme;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (options.contentTheme) {\n\t\t\t\t\tcontent.classList.add(classes.uiBodyPrefix + options.contentTheme);\n\t\t\t\t}\n\n\t\t\t\t// Based on value from:\n\t\t\t\t// elements data-collapsed-icon or passed options\n\t\t\t\t// [-> collapible-set data-collapsed-icon]\n\t\t\t\t// -> defaultValue\n\t\t\t\toptions.collapsedIcon = options.collapsedIcon || defaults.collapsedIcon;\n\t\t\t\t// Based on value from:\n\t\t\t\t// elements data-expanded-icon or passed options\n\t\t\t\t// [-> collapible-set data-collapsed-icon]\n\t\t\t\t// -> defaultValue\n\t\t\t\toptions.expandedIcon = options.expandedIcon || defaults.expandedIcon;\n\n\t\t\t\toptions.iconpos = options.iconpos || defaults.iconpos;\n\n\t\t\t\theaderStatus = document.createElement('span');\n\t\t\t\theaderStatus.classList.add(classes.uiCollapsibleHeadingStatus);\n\n\t\t\t\theader.appendChild(headerStatus);\n\n\t\t\t\tdomUtils.wrapInHTML(header.childNodes, '<a href=\"#\" class=\"' + classes.uiCollapsibleHeadingToggle + '\"></a>');\n\t\t\t\theaderLink = header.firstElementChild;\n\t\t\t\theaderLinkClassList = headerLink.classList;\n\n\t\t\t\t// Make headerLink button-like\n\t\t\t\tengine.instanceWidget(headerLink, \"Button\", {\n\t\t\t\t\tshadow: false,\n\t\t\t\t\tcorners: false,\n\t\t\t\t\ticonpos: options.iconpos,\n\t\t\t\t\ticon: options.collapsedIcon,\n\t\t\t\t\tmini: options.mini,\n\t\t\t\t\ttheme: options.theme\n\t\t\t\t});\n\n\t\t\t\theaderLink.removeAttribute('role');\n\n\t\t\t\t// Append everything to header\n\t\t\t\theader.appendChild(headerLink);\n\n\t\t\t\tif (options.inset) {\n\t\t\t\t\telementClassList.add(classes.uiCollapsibleInset);\n\n\t\t\t\t\theaderLinkClassList.add(classes.uiCornerTop);\n\t\t\t\t\theaderLinkClassList.add(classes.uiCornerBottom);\n\n\t\t\t\t\tbtnInner = headerLink.firstElementChild;\n\t\t\t\t\tif (btnInner) {\n\t\t\t\t\t\tbtnInnerClassList = btnInner.classList;\n\t\t\t\t\t\tbtnInnerClassList.add(classes.uiCornerTop);\n\t\t\t\t\t\tbtnInnerClassList.add(classes.uiCornerBottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tCollapsible.prototype.options = options;\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"example":"","brief":"<p>Bind widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Collapsible.prototype._bindEvents = function (element) {\n\t\t\t\tvar classes = Collapsible.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\teventHandlers = this._eventHandlers,\n\t\t\t\t\ttoggleHandler,\n\t\t\t\t\tremoveActiveClass,\n\t\t\t\t\theader = selectors.getChildrenByClass(element, classes.uiCollapsibleHeading)[0],\n\t\t\t\t\tsetActiveHeaderLinkClass = function (setClass) {\n\t\t\t\t\t\tvar link = header.querySelector('a');\n\t\t\t\t\t\t// @todo change to method called on button object\n\t\t\t\t\t\tif (setClass) {\n\t\t\t\t\t\t\tlink.classList.add(Button.classes.uiBtnActive);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlink.classList.remove(Button.classes.uiBtnActive);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t// Declare handlers with and assign them to local variables\n\t\t\t\ttoggleHandler = eventHandlers.toggleHandler = toggleCollapsibleHandler.bind(null, element, options);\n\t\t\t\tremoveActiveClass = eventHandlers.removeActiveClass = setActiveHeaderLinkClass.bind(null, false);\n\t\t\t\teventHandlers.addActiveClass = setActiveHeaderLinkClass.bind(null, true);\n\t\t\t\teventHandlers.toggleCollapsiness = function toggleCollapsiness(event) {\n\t\t\t\t\tvar eventType = header.classList.contains(classes.uiCollapsibleHeadingCollapsed) ? 'expand' : 'collapse';\n\n\t\t\t\t\tevents.trigger(element, eventType);\n\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevents.stopPropagation(event);\n\t\t\t\t};\n\n\t\t\t\t// Handle 'expand' and 'collapse' events\n\t\t\t\telement.addEventListener('expand', toggleHandler, false);\n\t\t\t\telement.addEventListener('collapse', toggleHandler, false);\n\n\t\t\t\t// Handle 'vmousedown' event (this event is triggered with 'touchstart' too)\n\t\t\t\theader.addEventListener('vmousedown', eventHandlers.addActiveClass, false);\n\n\t\t\t\t// Handle 'vmousemove', 'vmousecancel' and 'vmouseup' events\n\t\t\t\theader.addEventListener('vmousemove', removeActiveClass, false);\n\t\t\t\theader.addEventListener('vmousecancel', removeActiveClass, false);\n\t\t\t\theader.addEventListener('vmouseup', removeActiveClass, false);\n\n\t\t\t\t// Handle touching and clicking\n\t\t\t\theader.addEventListener('vclick', eventHandlers.toggleCollapsiness, false);\n\n\t\t\t\tevents.trigger(element, options.collapsed ? 'collapse' : 'expand');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"example":"","brief":"<p>Refresh structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Collapsible.prototype._refresh = function () {\n\t\t\t\treturn;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Collapsible"}],"example":"","brief":"<p>Destroy widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Collapsible.prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\theader = selectors.getChildrenByClass(element, Collapsible.classes.uiCollapsibleHeading)[0],\n\t\t\t\t\teventHandlers = this._eventHandlers,\n\t\t\t\t\ttoggleHandler = eventHandlers.toggleHandler,\n\t\t\t\t\tremoveActiveClassHandler = eventHandlers.removeActiveClass,\n\t\t\t\t\tparentNode = element.parentNode;\n\n\t\t\t\t// Remove 'expand' and 'collapse' listeners\n\t\t\t\telement.removeEventListener('expand', toggleHandler, false);\n\t\t\t\telement.removeEventListener('collapse', toggleHandler, false);\n\n\t\t\t\t// Remove 'vmousedown' event (this event is triggered with 'touchstart' too) listeners\n\t\t\t\theader.removeEventListener('vmousedown', eventHandlers.addActiveClass, false);\n\n\t\t\t\t// Remove 'vmousemove', 'vmousecancel' and 'vmouseup' events listeners\n\t\t\t\theader.removeEventListener('vmousemove', removeActiveClassHandler, false);\n\t\t\t\theader.removeEventListener('vmousecancel', removeActiveClassHandler, false);\n\t\t\t\theader.removeEventListener('vmouseup', removeActiveClassHandler, false);\n\n\t\t\t\t// Remove touching and clicking event listeners\n\t\t\t\theader.removeEventListener('vclick', eventHandlers.toggleCollapsiness, false);\n\n\t\t\t\t// @TODO remove all operations performed on _build\n\t\t\t\t// maybe store base structure inside element's object property as string\n\t\t\t\t// instead of reversing all operations?\n\n\t\t\t\tevents.trigger(document, 'destroyed', {\n\t\t\t\t\twidget: \"Collapsible\",\n\t\t\t\t\tparent: parentNode\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Collapsible = Collapsible;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Collapsible\",\n\t\t\t\t\"[data-role='collapsible'], .ui-collapsible\",\n\t\t\t\t[],\n\t\t\t\tCollapsible,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Collapsibleset","authors":["Marcin Jakuszko <m.jakuszko@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Collapsibleset widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Collapsibleset","tags":[{"type":"method","string":"Collapsibleset"},{"type":"private","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Local constructor function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Collapsibleset = function () {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Build widget structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._build = function (element) {\n\t\t\t\telement.classList.add(Collapsibleset.classes.uiCollapsibleSet);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"Array","name":"collapsiblesInSet","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"roundCollapsibleSetBoundaries","tags":[{"type":"method","string":"roundCollapsibleSetBoundaries"},{"type":"param","types":"Array","name":"collapsiblesInSet","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Set proper corners' style for elements inside widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function roundCollapsibleSetBoundaries(collapsiblesInSet) {\n\t\t\t\tif(collapsiblesInSet.length > 0) {\n\n\t\t\t\t\tvar firstCollapsible = collapsiblesInSet[0],\n\t\t\t\t\t\tclasses = Collapsibleset.classes,\n\t\t\t\t\t\tdataAttributes = Collapsibleset.attributes,\n\t\t\t\t\t\tfirstCollapsibleHeading = selectors.getChildrenByClass(firstCollapsible, classes.uiCollapsibleHeading)[0],\n\t\t\t\t\t\tfirstCollapsibleLink = selectors.getChildrenByTag(firstCollapsibleHeading, 'a')[0],\n\t\t\t\t\t\tfirstCollapsibleButtonInner = selectors.getChildrenByClass(firstCollapsibleLink, classes.uiBtnInner)[0],\n\n\t\t\t\t\t\tlastCollapsible = collapsiblesInSet[collapsiblesInSet.length-1],\n\t\t\t\t\t\tlastCollapsibleHeading = selectors.getChildrenByClass(lastCollapsible, classes.uiCollapsibleHeading)[0],\n\t\t\t\t\t\tlastCollapsibleLink = selectors.getChildrenByTag(lastCollapsibleHeading, 'a')[0],\n\t\t\t\t\t\tlastCollapsibleButtonInner = selectors.getChildrenByClass(lastCollapsibleLink, classes.uiBtnInner)[0];\n\n\t\t\t\t\t//clean up borders\n\t\t\t\t\tcollapsiblesInSet.forEach(function(collapsibleElement) {\n\t\t\t\t\t\tvar heading = selectors.getChildrenByClass(collapsibleElement, classes.uiCollapsibleHeading)[0],\n\t\t\t\t\t\t\tlink = selectors.getChildrenByTag(heading, 'a')[0],\n\t\t\t\t\t\t\tlinkClassList = link.classList,\n\t\t\t\t\t\t\tbuttonInner = selectors.getChildrenByClass(link, classes.uiBtnInner)[0],\n\t\t\t\t\t\t\tbuttonInnerClassList = buttonInner.classList;\n\n\t\t\t\t\t\tdomUtils.removeNSData(collapsibleElement, dataAttributes.last);\n\t\t\t\t\t\tlinkClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\tlinkClassList.remove(classes.uiCornerTop);\n\t\t\t\t\t\tbuttonInnerClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\tbuttonInnerClassList.remove(classes.uiCornerTop);\n\t\t\t\t\t});\n\n\t\t\t\t\tfirstCollapsibleLink.classList.add(classes.uiCornerTop);\n\t\t\t\t\tfirstCollapsibleButtonInner.classList.add(classes.uiCornerTop);\n\n\t\t\t\t\tlastCollapsibleLink.classList.add(classes.uiCornerBottom);\n\t\t\t\t\tlastCollapsibleButtonInner.classList.add(classes.uiCornerBottom);\n\t\t\t\t\tdomUtils.setNSData(lastCollapsible, dataAttributes.last, true);\n\t\t\t\t}\n\t\t\t\treturn collapsiblesInSet;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"expandCollapseHandler","tags":[{"type":"method","string":"expandCollapseHandler"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Handler function for expanding/collapsing widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function expandCollapseHandler(element, options, event) {\n\t\t\t\tvar collapsible = event.target,\n\t\t\t\t\tisCollapse = event.type === \"collapse\",\n\t\t\t\t\tclasses = Collapsibleset.classes,\n\t\t\t\t\tdataAttributes = Collapsibleset.attributes,\n\t\t\t\t\tfirstCollapsible = element.firstChild,\n\t\t\t\t\tcollapsibleHeading = selectors.getChildrenByClass(collapsible, classes.uiCollapsibleHeading)[0],\n\t\t\t\t\theadingLink = selectors.getChildrenByTag(collapsibleHeading, 'a')[0],\n\t\t\t\t\theadingLinkClassList = headingLink.classList,\n\t\t\t\t\tbuttonInner = selectors.getChildrenByClass(headingLink, classes.uiBtnInner)[0],\n\t\t\t\t\tbuttonInnerClassList = buttonInner.classList,\n\t\t\t\t\tcollapsibleContent = selectors.getChildrenByClass(collapsible, classes.uiCollapsibleContent)[0],\n\t\t\t\t\tcollapsibleContentClassList =  collapsibleContent.classList;\n\n\t\t\t\tif(domUtils.hasNSData(collapsible, dataAttributes.last) && !!options.inset) {\n\t\t\t\t\tif(isCollapse) {\n\t\t\t\t\t\theadingLinkClassList.add(classes.uiCornerBottom);\n\t\t\t\t\t\tbuttonInnerClassList.add(classes.uiCornerBottom);\n\t\t\t\t\t\tcollapsibleContentClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t} else {\n\t\t\t\t\t\theadingLinkClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\tbuttonInnerClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\tcollapsibleContentClassList.add(classes.uiCornerBottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(!isCollapse) {\n\t\t\t\t\twhile(firstCollapsible) {\n\t\t\t\t\t\tif (firstCollapsible.nodeType === 1 && firstCollapsible !== collapsible) {\n\t\t\t\t\t\t\tevents.trigger(firstCollapsible, 'collapse');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfirstCollapsible = firstCollapsible.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Bind widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._bindEvents = function (element) {\n\t\t\t\tvar eventHandler = this._eventHandlers.expandCollapseHandler = expandCollapseHandler.bind(null, element, this.options);\n\n\t\t\t\telement.addEventListener('expand', eventHandler, true);\n\t\t\t\telement.addEventListener('collapse', eventHandler, true);\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tvar expanded = selectors.getChildrenBySelector(element, \"[data-collapsed='false']\"),\n\t\t\t\t\texpandedLength = expanded.length,\n\t\t\t\t\ti;\n\n\t\t\t\tthis.refresh();\n\n\t\t\t\tfor(i = 0; i < expandedLength; i++) {\n\t\t\t\t\tevents.trigger(expanded[i], 'expand');\n\t\t\t\t}\n\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Refresh structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refresh = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tcollapsiblesInSet = selectors.getChildrenBySelector(element, \"[data-role='collapsible']\"),\n\t\t\t\t\tbareCollapsibles = selectors.getChildrenBySelector(element, \":not(.ui-collapsible)\"),\n\t\t\t\t\tbareCollapsiblesLength = bareCollapsibles.length,\n\t\t\t\t\ti;\n\n\t\t\t\tfor(i=0; i < bareCollapsiblesLength; i++) {\n\t\t\t\t\tengine.instanceWidget(bareCollapsibles[i], 'Collapsible');\n\t\t\t\t}\n\n\t\t\t\troundCollapsibleSetBoundaries(collapsiblesInSet);\n\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Collapsibleset"}],"example":"","brief":"<p>Destroy widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\teventHandler = this._eventHandlers.expandCollapseHandler;\n\n\t\t\t\telement.removeEventListener('expand', eventHandler, true);\n\t\t\t\telement.removeEventListener('collapse', eventHandler, true);\n\t\t\t};\n\n            Collapsibleset.prototype = prototype;\n\n            // definition\n            widget.mobile.Collapsibleset = Collapsibleset;\n            engine.defineWidget(\n                \"Collapsibleset\",\n                \"[data-role='collapsible-set'],.ui-collapsible-set\",\n                [],\n                Collapsibleset,\n                'mobile'\n            );\n            }(window.document, ns));"}]},{"name":"ns.widget.Dialog","authors":[],"extends":"ns.widget.BaseWidget","title":"Dialog Widget","brief":"","description":"<p>Display div as a model dialog page with inset appearance.</p>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[{"types":"string","defaultValue":"'left'","tags":[{"type":"property","string":"{string} [options.closeBtn='left'] Position of the dialog close button in the header, accepts: left, right and none"},{"type":"property","string":"{string} [options.closeBtnText='Close'] Customize text of the close button, by default close button is displayed as an icon-only so the text isn't visible, but is read by screen readers"},{"type":"property","string":"{string} [options.overlayTheme='a'] Backgroudn under dialog content color"},{"type":"property","string":"{boolean} [options.corners=true] Sets if dialog should be drawn with rounded corners"},{"type":"member","string":"ns.widget.Dialog"},{"type":"instance","string":""}],"description":"Position of the dialog close button in the header, accepts: left, right and none","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tcloseBtn : 'left',\n\t\t\t\t\t\tcloseBtnText : \"Close\",\n\t\t\t\t\t\toverlayTheme : \"c\",\n\t\t\t\t\t\tcorners : true\n\t\t\t\t\t};\n\t\t\t\t\tthis._headerCloseButton = null;\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};","name":"data-close-btn"},{"types":"string","defaultValue":"'Close'","tags":[{"type":"property","string":"{string} [options.closeBtn='left'] Position of the dialog close button in the header, accepts: left, right and none"},{"type":"property","string":"{string} [options.closeBtnText='Close'] Customize text of the close button, by default close button is displayed as an icon-only so the text isn't visible, but is read by screen readers"},{"type":"property","string":"{string} [options.overlayTheme='a'] Backgroudn under dialog content color"},{"type":"property","string":"{boolean} [options.corners=true] Sets if dialog should be drawn with rounded corners"},{"type":"member","string":"ns.widget.Dialog"},{"type":"instance","string":""}],"description":"Customize text of the close button, by default close button is displayed as an icon-only so the text isn't visible, but is read by screen readers","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tcloseBtn : 'left',\n\t\t\t\t\t\tcloseBtnText : \"Close\",\n\t\t\t\t\t\toverlayTheme : \"c\",\n\t\t\t\t\t\tcorners : true\n\t\t\t\t\t};\n\t\t\t\t\tthis._headerCloseButton = null;\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};","name":"data-close-btn-text"},{"types":"string","defaultValue":"'a'","tags":[{"type":"property","string":"{string} [options.closeBtn='left'] Position of the dialog close button in the header, accepts: left, right and none"},{"type":"property","string":"{string} [options.closeBtnText='Close'] Customize text of the close button, by default close button is displayed as an icon-only so the text isn't visible, but is read by screen readers"},{"type":"property","string":"{string} [options.overlayTheme='a'] Backgroudn under dialog content color"},{"type":"property","string":"{boolean} [options.corners=true] Sets if dialog should be drawn with rounded corners"},{"type":"member","string":"ns.widget.Dialog"},{"type":"instance","string":""}],"description":"Backgroudn under dialog content color","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tcloseBtn : 'left',\n\t\t\t\t\t\tcloseBtnText : \"Close\",\n\t\t\t\t\t\toverlayTheme : \"c\",\n\t\t\t\t\t\tcorners : true\n\t\t\t\t\t};\n\t\t\t\t\tthis._headerCloseButton = null;\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};","name":"data-overlay-theme"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{string} [options.closeBtn='left'] Position of the dialog close button in the header, accepts: left, right and none"},{"type":"property","string":"{string} [options.closeBtnText='Close'] Customize text of the close button, by default close button is displayed as an icon-only so the text isn't visible, but is read by screen readers"},{"type":"property","string":"{string} [options.overlayTheme='a'] Backgroudn under dialog content color"},{"type":"property","string":"{boolean} [options.corners=true] Sets if dialog should be drawn with rounded corners"},{"type":"member","string":"ns.widget.Dialog"},{"type":"instance","string":""}],"description":"Sets if dialog should be drawn with rounded corners","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tcloseBtn : 'left',\n\t\t\t\t\t\tcloseBtnText : \"Close\",\n\t\t\t\t\t\toverlayTheme : \"c\",\n\t\t\t\t\t\tcorners : true\n\t\t\t\t\t};\n\t\t\t\t\tthis._headerCloseButton = null;\n\t\t\t\t\tthis._eventHandlers = {};\n\t\t\t\t};","name":"data-corners"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"boolean","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"setActive","tags":[{"type":"method","string":"setActive"},{"type":"param","types":"boolean","name":"value","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>Set page active / unactive</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Dialog.prototype.setActive = function (value) {\n\t\t\t\tvar elementClassList = this.element.classList,\n\t\t\t\t\tdialogClasses = Dialog.classes,\n\t\t\t\t\tpageClasses = ns.widget.mobile.Page.classes;\n\t\t\t\tif (value) {\n\t\t\t\t\telementClassList.remove(dialogClasses.uiDialogHidden);\n\t\t\t\t\telementClassList.add(pageClasses.uiPage);\n\t\t\t\t\telementClassList.add(pageClasses.uiPageActive);\n\t\t\t\t\telementClassList.add(dialogClasses.uiOverlayPrefix + this.options.overlayTheme);\n\t\t\t\t} else {\n\t\t\t\t\telementClassList.remove(pageClasses.uiPage);\n\t\t\t\t\telementClassList.remove(pageClasses.uiPageActive);\n\t\t\t\t\telementClassList.remove(dialogClasses.uiOverlayPrefix + this.options.overlayTheme);\n\t\t\t\t\telementClassList.add(dialogClasses.uiDialogHidden);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{HTMLElement}"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{HTMLElement}"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>Builds Dialog widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Dialog.prototype._build = function (element) {\n\t\t\t\tvar container = document.createElement('div'),\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\t\t\t\t\tchildrenLength = element.children.length,\n\t\t\t\t\theaders = selectors.getChildrenBySelector(element, \"[data-role='header']\"),\n\t\t\t\t\tcontent = selectors.getChildrenBySelector(element, \"[data-role='content']\"),\n\t\t\t\t\tfooters = selectors.getChildrenBySelector(element, \"[data-role='footer']\"),\n\t\t\t\t\tdialogClasses = Dialog.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tpageOptions = ns.widget.mobile.Page.prototype.options,\n\t\t\t\t\tcontainerClassList = container.classList,\n\t\t\t\t\theadersClassList,\n\t\t\t\t\tdataTheme,\n\t\t\t\t\telementTheme,\n\t\t\t\t\tcontentTheme;\n\n\t\t\t\tthis.element = element;\n\n\t\t\t\tdataTheme = element.getAttribute('data-theme');\n\t\t\t\telementTheme = dataTheme ? dataTheme : options.overlayTheme;\n\t\t\t\tcontentTheme = dataTheme ? dataTheme : pageOptions.contentTheme;\n\n\t\t\t\telement.classList.add(dialogClasses.uiDialog);\n\t\t\t\telement.classList.add(dialogClasses.uiBodyPrefix + elementTheme);\n\n\t\t\t\tfor (i = 0; i < childrenLength; i++) {\n\t\t\t\t\tcontainer.appendChild(element.children[0]);\n\t\t\t\t}\n\n\t\t\t\tcontainerClassList.add(dialogClasses.uiDialogContain);\n\t\t\t\tcontainerClassList.add(dialogClasses.uiOverlayShadow);\n\n\t\t\t\tif (options.corners) {\n\t\t\t\t\tcontainerClassList.add(dialogClasses.uiCornerAll);\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0, l = headers.length; i < l; i++) {\n\t\t\t\t\theadersClassList = headers[i].classList;\n\t\t\t\t\theadersClassList.add(dialogClasses.uiHeader);\n\t\t\t\t\theadersClassList.add(dialogClasses.uiBarPrefix + pageOptions.headerTheme);\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0, l = content.length; i < l; i++) {\n\t\t\t\t\tcontent[i].classList.add(dialogClasses.uiContent);\n\t\t\t\t\tcontent[i].classList.add(dialogClasses.uiBodyPrefix + contentTheme);\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0, l = footers.length; i < l; i++) {\n\t\t\t\t\tfooters[i].classList.add(dialogClasses.uiFooter);\n\t\t\t\t\tfooters[i].classList.add(dialogClasses.uiBarPrefix + pageOptions.footerTheme);\n\t\t\t\t}\n\n\t\t\t\telement.appendChild(container);\n\t\t\t\telement.parentNode.removeChild(element);\n\t\t\t\tdocument.body.appendChild(element);\n\n\t\t\t\tthis._setCloseButton(options.closeBtn, options.closeBtnText);\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{boolean} false"},"name":"_close","tags":[{"type":"method","string":"_close"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{boolean} false"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>Close dialog.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Dialog.prototype._close = function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close();\n\t\t\t\treturn false;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"location","description":"","isOptional":false},{"type":"param","types":"string","name":"text","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setCloseButton","tags":[{"type":"method","string":"_setCloseButton"},{"type":"param","types":"string","name":"location","description":"","isOptional":false},{"type":"param","types":"string","name":"text","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>If needed add close button.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Dialog.prototype._setCloseButton = function (location, text) {\n\t\t\t\tvar headerCloseButton = this._headerCloseButton,\n\t\t\t\t\theaderCloseButtonClassList,\n\t\t\t\t\tbutton,\n\t\t\t\t\theader;\n\t\t\t\tif (location !== \"left\" && location !== \"right\") {\n\t\t\t\t\tlocation = \"none\";\n\t\t\t\t}\n\t\t\t\tif (location === \"none\") {\n\t\t\t\t\tif (headerCloseButton) {\n\t\t\t\t\t\theaderCloseButton.parentNode.removeChild(headerCloseButton);\n\t\t\t\t\t}\n\t\t\t\t} else if (headerCloseButton) {\n\t\t\t\t\theaderCloseButtonClassList = headerCloseButton.classList;\n\t\t\t\t\theaderCloseButtonClassList.remove(buttonClasses.uiBtnLeft);\n\t\t\t\t\theaderCloseButtonClassList.remove(buttonClasses.uiBtnRight);\n\t\t\t\t\theaderCloseButtonClassList.add(buttonClasses.uiBtn + \"-\" + location);\n\t\t\t\t} else {\n\t\t\t\t\tbutton = document.createElement('a');\n\n\t\t\t\t\t//TODO When button will accept notext and\n\t\t\t\t\tbutton.className = buttonClasses.uiBtn + \"-\" + location;\n\n\t\t\t\t\t//button.innerText = text || this.options.closeBtnText || \"\";\n\n\t\t\t\t\tbutton.addEventListener('vclick', this._close.bind(this), true);\n\t\t\t\t\theader = this.element.getElementsByClassName(Dialog.classes.uiHeader)[0];\n\t\t\t\t\tif (header) {\n\t\t\t\t\t\theader.appendChild(button);\n\t\t\t\t\t}\n\n\t\t\t\t\tengine.instanceWidget(button, \"Button\", {\n\t\t\t\t\t\ticonpos: 'left',\n\t\t\t\t\t\ticon: 'delete',\n\t\t\t\t\t\tinline: true,\n\t\t\t\t\t\tcorners: true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"close","tags":[{"type":"method","string":"close"},{"type":"instance","string":""},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>Close dialog</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Dialog.prototype.close = function () {\n\t\t\t\twindow.history.back();\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Dialog"}],"example":"","brief":"<p>Bind widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Dialog.prototype._bindEvents = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tclasses = Dialog.classes,\n\t\t\t\t\teventHandlers = this._eventHandlers;\n\n\t\t\t\teventHandlers.pageBeforeShow = pageBeforeShowHandler.bind(null, element, options, classes);\n\n\t\t\t\telement.addEventListener('pagebeforeshow', eventHandlers.pageBeforeShow, true);\n\t\t\t};\n\n\t\t\tDialog.prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tparentNode = element.parentNode,\n\t\t\t\t\teventHandlers = this._eventHandlers;\n\n\t\t\t\telement.removeEventListener('pagebeforeshow', eventHandlers.pageBeforeShow, true);\n\n\t\t\t\tevents.trigger(document, 'destroyed', {\n\t\t\t\t\twidget: \"Dialog\",\n\t\t\t\t\tparent: parentNode\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Dialog = Dialog;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Dialog\",\n\t\t\t\t'[data-role=\"dialog\"], .ui-dialog',\n\t\t\t\t['close'],\n\t\t\t\tDialog,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Checkboxradio","authors":[],"extends":"ns.widget.BaseWidget","title":"Checkboxradio widget","brief":"Checkboxradio widget changes default browser checkboxes and radios to form more adapted to mobile environment(larger labels looks clickable)","description":"<h2>Default selectors</h2>\n\n<p>In default all inputs with type <em>checkbox</em> or <em>radio</em> are changed to checkboxradio widget.</p>\n\n<h2>HTML Examples</h2>\n\n<h3>Create checkboxradio</h3>\n\n<pre><code>@example\n&lt;input type=\"checkbox\" name=\"checkbox-yes\" id=\"checkbox-yes\" /&gt;\n&lt;label for=\"checkbox-yes\"&gt;Yes&lt;/label&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[{"types":"string","defaultValue":"'s'","tags":[{"type":"property","string":"{string} [options.theme='s']"},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"description":"<p>Widget's theme</p>","isPrivate":false,"name":"data-theme"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Check","tags":[{"type":"method","string":"Check"},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias for class ns.widget.Checkboxradio</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var Checkboxradio = function () {"},{"params":[{"type":"param","types":"HTMLElement","name":"input","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"getLabel","tags":[{"type":"method","string":"getLabel"},{"type":"param","types":"HTMLElement","name":"input","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Checkboxradio"}],"example":"","brief":"<p>Finds best matched label for given input: <br><br />1. Checks if one of parents is not a label<br><br />2. Checks label#for=input.id if input.id is set in parent form, fieldset, page<br><br />3. Creates label</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function getLabel(input) {\n\t\t\t\tvar parent = selectors.getClosestByTag(input, \"label\"),\n\t\t\t\t\tlabel;\n\t\t\t\tif (parent) { //1\n\t\t\t\t\tparent.parentNode.replaceChild(parent.firstElementChild, parent);\n\t\t\t\t\treturn parent;\n\t\t\t\t}\n\t\t\t\tif (input.id) { //2\n\t\t\t\t\tparent = selectors.getClosestBySelector(input,\n\t\t\t\t\t\t\"form, fieldset, [data-role='page'], [data-role='dialog']\");\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tlabel = parent.querySelector(\"label[for='\" + input.id + \"']\");\n\t\t\t\t\t\tif (label) {\n\t\t\t\t\t\t\treturn label;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//3\n\t\t\t\tlabel = document.createElement(\"label\");\n\t\t\t\tif (input.id) {\n\t\t\t\t\tlabel.setAttribute(\"for\", input.id);\n\t\t\t\t}\n\t\t\t\treturn label;\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onLabelClick","tags":[{"type":"method","string":"onLabelClick"},{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Checkboxradio"}],"example":"","brief":"<p>Function fires on label click event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onLabelClick(self, event) {\n\t\t\t\tvar element = self.element;\n\n\t\t\t\tevents.preventDefault(event);\n\t\t\t\tevents.stopPropagation(event);\n\t\t\t\tevents.stopImmediatePropagation(event);\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Always set checked to true for radios\n\t\t\t\t// for checkboxes toggle value\n\t\t\t\telement.checked = (element.type === 'checkbox') ? !element.checked : true;\n\n\t\t\t\tif (element.checked) {\n\t\t\t\t\tself._getInputSet().forEach(function (el) {\n\t\t\t\t\t\tif (element !== el) {\n\t\t\t\t\t\t\tel.checked = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tself._updateAll();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onInputClick","tags":[{"type":"method","string":"onInputClick"},{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Checkboxradio"}],"example":"","brief":"<p>Function fires on input click event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onInputClick(self, event) {\n\t\t\t\tvar element = self.element;\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telement.checked = !element.checked;\n\n\t\t\t\tif (element.checked) {\n\t\t\t\t\tself._getInputSet().forEach(function (el) {\n\t\t\t\t\t\tif (element !== el) {\n\t\t\t\t\t\t\tel.checked = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tself._updateAll();\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"instance","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"checkElement","tags":[{"type":"method","string":"checkElement"},{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"instance","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"new","string":""}],"example":"","brief":"<p>Check checkboxradio element</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function checkElement(instance) {\n\t\t\t\tvar labelClassList = instance.label.classList,\n\t\t\t\t\ticonClassList,\n\t\t\t\t\telement = instance.element;\n\t\t\t\tif (!element.getAttribute(\"disabled\")) {\n\t\t\t\t\tif (instance.icon) {\n\t\t\t\t\t\ticonClassList = instance.icon.classList;\n\t\t\t\t\t\ticonClassList.add(instance.checkedicon);\n\t\t\t\t\t\ticonClassList.remove(instance.uncheckedicon);\n\t\t\t\t\t}\n\t\t\t\t\tlabelClassList.add(instance.checkedClass);\n\t\t\t\t\tlabelClassList.remove(instance.uncheckedClass);\n\t\t\t\t\tinstance.wrapper.setAttribute(instance.ariaCheckedAttr, true);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"instance","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"uncheckElement","tags":[{"type":"method","string":"uncheckElement"},{"type":"param","types":"ns.widget.mobile.Checkboxradio","name":"instance","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"new","string":""}],"example":"","brief":"<p>Uncheck checkboxradio element</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function uncheckElement(instance) {\n\t\t\t\tvar labelClassList = instance.label.classList,\n\t\t\t\t\ticonClassList,\n\t\t\t\t\telement = instance.element;\n\t\t\t\tif (!element.getAttribute(\"disabled\")) {\n\t\t\t\t\tif (instance.icon) {\n\t\t\t\t\t\ticonClassList = instance.icon.classList;\n\t\t\t\t\t\ticonClassList.add(instance.uncheckedicon);\n\t\t\t\t\t\ticonClassList.remove(instance.checkedicon);\n\t\t\t\t\t}\n\t\t\t\t\tlabelClassList.add(instance.uncheckedClass);\n\t\t\t\t\tlabelClassList.remove(instance.checkedClass);\n\t\t\t\t\tinstance.wrapper.setAttribute(instance.ariaCheckedAttr, false);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLInputElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLInputElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLInputElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLInputElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Builds structure of checkboxradio widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._build = function (element) {\n\t\t\t\tvar inputtype = element.getAttribute('type'),\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tlabel,\n\t\t\t\t\tlabelClassList,\n\t\t\t\t\twrapper,\n\t\t\t\t\tariaCheckedAttr,\n\t\t\t\t\ticon,\n\t\t\t\t\tcheckedState,\n\t\t\t\t\tcheckedClass,\n\t\t\t\t\tuncheckedClass,\n\t\t\t\t\tuncheckedState,\n\t\t\t\t\tcheckedicon,\n\t\t\t\t\tuncheckedicon,\n\t\t\t\t\tactiveBtn,\n\t\t\t\t\ticonSpan,\n\t\t\t\t\ticonClassList,\n\t\t\t\t\ticonpos,\n\t\t\t\t\tmini;\n\n\t\t\t\t//if created dynamically on wrong element, just return from here\n\t\t\t\tif (inputtype !== \"checkbox\" && inputtype !== \"radio\") {\n\t\t\t\t\t//_build should always return element\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t\tariaCheckedAttr = inputtype === 'radio' ? 'aria-selected' : 'aria-checked';\n\t\t\t\tcheckedState = inputtype + \"-on\";\n\t\t\t\tuncheckedState = inputtype + \"-off\";\n\t\t\t\ticon = selectors.getParentsBySelector(element, \"[data-type='horizontal']\").length ? false : uncheckedState;\n\t\t\t\tif (!icon) {\n\t\t\t\t\tactiveBtn = \"ui-btn-active\";\n\t\t\t\t}\n\t\t\t\tcheckedClass = \"ui-\" + checkedState;\n\t\t\t\tuncheckedClass = \"ui-\" + uncheckedState;\n\t\t\t\tcheckedicon = \"ui-icon-\" + checkedState;\n\t\t\t\tuncheckedicon = \"ui-icon-\" + uncheckedState;\n\n\t\t\t\tlabel = getLabel(element);\n\t\t\t\tlabelClassList = label.classList;\n\n\t\t\t\t//@todo these options should not be passed via DOM element\n\t\t\t\tmini = dom.inheritAttr(element, \"data-mini\", \"form,fieldset\");\n\t\t\t\tif (mini) {\n\t\t\t\t\tlabel.setAttribute('data-mini', mini);\n\t\t\t\t}\n\n\t\t\t\ticonpos = dom.inheritAttr(element, \"data-iconpos\", \"form,fieldset\");\n\t\t\t\tif (iconpos) {\n\t\t\t\t\tlabel.setAttribute('data-iconpos', iconpos);\n\t\t\t\t}\n\n\t\t\t\tlabel.setAttribute('data-theme', options.theme);\n\t\t\t\tlabel.setAttribute('data-icon', icon);\n\t\t\t\tlabel.setAttribute('data-shadow', false);\n\t\t\t\tlabel.setAttribute('data-bar', true);\n\t\t\t\tengine.instanceWidget(label, \"Button\");\n\t\t\t\ticonSpan = label.getElementsByClassName('ui-icon')[0];\n\t\t\t\tif (iconSpan) {\n\t\t\t\t\ticonClassList = iconSpan.classList;\n\t\t\t\t}\n\n\t\t\t\t// Wrap the input + label in a div\n\t\t\t\twrapper = '<div role=\"' + inputtype + '\" class=\"ui-' + inputtype;\n\t\t\t\tif (element.classList.contains(\"favorite\")) {\n\t\t\t\t\twrapper += ' favorite';\n\t\t\t\t}\n\t\t\t\twrapper += '\"></div>';\n\n\t\t\t\t//make sure label is after input\n\t\t\t\tif (element.nextElementSibling) {\n\t\t\t\t\telement.parentNode.insertBefore(label, element.nextElementSibling);\n\t\t\t\t} else {\n\t\t\t\t\telement.parentNode.appendChild(label);\n\t\t\t\t}\n\t\t\t\tdom.wrapInHTML([element, label], wrapper);\n\t\t\t\twrapper = element.parentNode;\n\n\t\t\t\tif (element.hasAttribute('checked')) {\n\t\t\t\t\t// quick fix to resolve problem in tests when sometimes attribute checked isn't proper interpreted to property in object\n\t\t\t\t\telement.checked = true;\n\t\t\t\t}\n\t\t\t\tif (element.checked) {\n\t\t\t\t\tlabelClassList.add(checkedClass);\n\t\t\t\t\tif (!icon) {\n\t\t\t\t\t\tlabelClassList.add(activeBtn);\n\t\t\t\t\t}\n\t\t\t\t\tlabelClassList.remove(uncheckedClass);\n\t\t\t\t\tif (iconSpan) {\n\t\t\t\t\t\ticonClassList.add(checkedicon);\n\t\t\t\t\t\ticonClassList.remove(uncheckedicon);\n\t\t\t\t\t}\n\t\t\t\t\twrapper.setAttribute(ariaCheckedAttr, true);\n\t\t\t\t} else {\n\t\t\t\t\tlabelClassList.remove(checkedClass);\n\t\t\t\t\tif (!icon) {\n\t\t\t\t\t\tlabelClassList.remove(activeBtn);\n\t\t\t\t\t}\n\t\t\t\t\tlabelClassList.add(uncheckedClass);\n\t\t\t\t\tif (iconSpan) {\n\t\t\t\t\t\ticonClassList.add(uncheckedicon);\n\t\t\t\t\t\ticonClassList.remove(checkedicon);\n\t\t\t\t\t}\n\t\t\t\t\twrapper.setAttribute(ariaCheckedAttr, false);\n\t\t\t\t}\n\n\t\t\t\telement.checked = element.getAttribute('checked') === 'checked';\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\twrapper.classList.add('ui-disabled');\n\t\t\t\t} else {\n\t\t\t\t\twrapper.classList.remove('ui-disabled');\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Inits widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._init = function (element) {\n\t\t\t\tthis.label = getLabel(element);\n\t\t\t\tthis.icon = this.label.getElementsByClassName('ui-icon')[0];\n\t\t\t\tthis.wrapper = element.parentNode;\n\t\t\t\tthis.inputtype = element.getAttribute('type');\n\t\t\t\tthis.checkedClass = 'ui-' + this.inputtype + '-on';\n\t\t\t\tthis.uncheckedClass = 'ui-' + this.inputtype + '-off';\n\t\t\t\tthis.ariaCheckedAttr = this.inputtype === 'radio' ? 'aria-selected' : 'aria-checked';\n\t\t\t\tthis.checkedicon = \"ui-icon-\" + this.inputtype + '-on';\n\t\t\t\tthis.uncheckedicon = \"ui-icon-\" + this.inputtype + '-off';\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Binds events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._bindEvents = function () {\n\t\t\t\tthis._onLabelClickBound = onLabelClick.bind(null, this);\n\t\t\t\tthis._onInputClickBound = onInputClick.bind(null, this);\n\t\t\t\tthis.label.addEventListener('vclick', this._onLabelClickBound, true);\n\t\t\t\tthis.element.addEventListener('vclick', this._onInputClickBound, false);\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Array"],"description":""},"name":"getInputSet","tags":[{"type":"method","string":"getInputSet"},{"type":"return","types":["Array"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Returns either a set of radios with the same name attribute or a single checkbox</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._getInputSet = function () {\n\t\t\t\tvar parent;\n\n\t\t\t\tif (this.inputtype === 'checkbox') {\n\t\t\t\t\treturn [this.element];\n\t\t\t\t}\n\n\t\t\t\tparent = selectors.getClosestBySelector(this.element,\n\t\t\t\t\t\"form, fieldset, [data-role='page'], [data-role='dialog']\");\n\n\t\t\t\tif (parent) {\n\t\t\t\t\treturn slice.call(parent.querySelectorAll(\n\t\t\t\t\t\t\"input[name='\" + this.element.name + \"'][type='\" + this.inputtype + \"']\"\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_updateAll","tags":[{"type":"method","string":"_updateAll"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Updates all others checkboxradio widgets with the same name attribute (only radios)</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._updateAll = function () {\n\t\t\t\tthis._getInputSet().forEach(function (el) {\n\t\t\t\t\tvar widget = engine.getBinding(el);\n\n\t\t\t\t\tif (widget) {\n\t\t\t\t\t\tif (widget.element.checked || widget.element.type === \"checkbox\") {\n\t\t\t\t\t\t\tevents.trigger(widget.element, \"change\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidget.refresh();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};"},{"params":[],"hasParams":false,"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Refreshes widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Checkboxradio.prototype.refresh = function () {\n\t\t\t\tvar element = this.element;\n\n\t\t\t\tif (element.checked) {\n\t\t\t\t\tcheckElement(this);\n\t\t\t\t} else {\n\t\t\t\t\tuncheckElement(this);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tthis.disable();\n\t\t\t\t} else {\n\t\t\t\t\tthis.enable();\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enables widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._enable = function () {\n\t\t\t\tdom.removeAttribute(this.element, \"disabled\");\n\t\t\t\tthis.wrapper.classList.remove('ui-disabled');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Disables widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._disable = function () {\n\t\t\t\tdom.setAttribute(this.element, \"disabled\", true);\n\t\t\t\tthis.wrapper.classList.add('ui-disabled');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"instance","string":""}],"example":"","brief":"<p>Cleans widget's resources</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._destroy = function () {\n\t\t\t\tthis.label.removeEventListener('vclick', this._onLabelClickBound, true);\n\t\t\t\tthis.element.removeEventListener('vclick', this._onInputClickBound, false);\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["?HTMLElement"],"description":""},"name":"getCheckedElement","tags":[{"type":"method","string":"getCheckedElement"},{"type":"return","types":["?HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"new","string":""}],"example":"","brief":"<p>Return checked checkboxradio element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Checkboxradio.prototype.getCheckedElement = function () {\n\t\t\t\tvar radios = this._getInputSet(),\n\t\t\t\t\ti,\n\t\t\t\t\tmax = radios.length;\n\t\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\t\tif (radios[i].checked) {\n\t\t\t\t\t\treturn radios[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["?string"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"return","types":["?string"],"description":""},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"new","string":""}],"example":"","brief":"<p>Returns value of checkbox if it is checked or value of radios with the same name</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._getValue = function () {\n\t\t\t\tvar checkedElement = this.getCheckedElement();\n\n\t\t\t\tif (checkedElement) {\n\t\t\t\t\treturn checkedElement.value;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.Checkboxradio"],"description":"return this"},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Checkboxradio"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"new","string":""}],"example":"","brief":"<p>Check element with value</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Checkboxradio.prototype._setValue = function (value) {\n\t\t\t\tvar radios = this._getInputSet(),\n\t\t\t\t\tcheckedElement,\n\t\t\t\t\ti,\n\t\t\t\t\tmax = radios.length;\n\n\t\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\t\tif (radios[i].value === value) {\n\t\t\t\t\t\tcheckedElement = this.getCheckedElement();\n\t\t\t\t\t\tif (checkedElement) {\n\t\t\t\t\t\t\tuncheckElement(engine.getBinding(checkedElement));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcheckElement(engine.getBinding(radios[i]));\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Checkboxradio = Checkboxradio;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Checkboxradio\",\n\t\t\t\t\"input[type='checkbox'], input[type='radio'], .ui-checkbox\",\n\t\t\t\t[\n\t\t\t\t\t\"enable\",\n\t\t\t\t\t\"disable\",\n\t\t\t\t\t\"refresh\"\n\t\t\t\t],\n\t\t\t\tCheckboxradio,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.mobile.Listview","authors":[],"extends":"ns.widget.BaseWidget","title":"Listview widget","brief":"","description":"<p>The list widget displays a list view.</p>","isPrivate":false,"isInternal":false,"properties":[],"options":[{"types":"String | null","defaultValue":"null","tags":[{"type":"property","string":"{?String} [options.theme=null]"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"description":"<p>theme of widget</p>","isPrivate":false,"name":"data-theme"},{"types":"String","defaultValue":"'s'","tags":[{"type":"property","string":"{String} [options.theme='s']"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"description":"<p>theme of widget</p>","isPrivate":false,"name":"data-theme"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{boolean} [options.theme=false]"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"description":"<p>inset option - listview is wrapped by additionally layer</p>","isPrivate":false,"name":"data-theme"}],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"example":"","brief":"<p>Registers widget's event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tpageShowCallback = contentFill.bind(null, self),\n\t\t\t\t\tpage = self.ui.page;\n\n\t\t\t\telement.addEventListener(\"vclick\", function (event) {\n\t\t\t\t\tvar target,\n\t\t\t\t\t\tcheckboxRadio,\n\t\t\t\t\t\ti;\n\t\t\t\t\tif (selectors.matchesSelector(this, \"li.\" + classes.uiLiHasCheckbox + \",li.\" + classes.uiLiHasRadio) === true) {\n\t\t\t\t\t\ttarget = event.target;\n\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-checkbox label\"));\n\t\t\t\t\t\tif (!checkboxRadio.length) {\n\t\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-radio label\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti = checkboxRadio.length;\n\t\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\t\teventUtils.trigger(checkboxRadio[i], \"vclick\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\tif (page) {\n\t\t\t\t\tpage.addEventListener(\"pageshow\", pageShowCallback, false);\n\t\t\t\t\tself._callbacks.pageshow = pageShowCallback;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction removeCorners(element, which) {\n\t\t\t\tvar elementClassList = element.classList;\n\t\t\t\tswitch (which) {\n\t\t\t\t\tcase \"top\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTop);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bottom\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tListview.prototype._removeCorners = function (li, which) {\n\t\t\t\tvar additionlElements = slice.call(li.querySelectorAll(\n\t\t\t\t\t'.' + buttonClasses.uiBtnInner + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiLinkAlt + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiThumb\n\t\t\t\t));\n\n\t\t\t\tif (which === \"top\" || which !== \"bottom\") {\n\t\t\t\t\tremoveCorners(li, \"top\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"top\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (which === \"bottom\" || which !== \"top\") {\n\t\t\t\t\tremoveCorners(li, \"bottom\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"bottom\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Destoys widget (unbinds events)</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._destroy = function () {\n\t\t\t\tvar page = this.ui.pagei,\n\t\t\t\t\tpageShowCallback = this._callbacks.pageshow;\n\t\t\t\tif (page && pageShowCallback) {\n\t\t\t\t\tpage.removeEventListener(\"pageshow\", pageShowCallback, false);\n\t\t\t\t}\n\t\t\t};"}]},{"name":"ns.widget.Listdivider","authors":[],"extends":"ns.widget.BaseWidget","title":"Listdivider widget","brief":"Listdivider widget creates a list separator, which can be used for building grouping lists using {@link ns.widget.mobile.Listview Listview widget}.","description":"<h2>Default selectors</h2>\n\n<p>In all elements with <em>data-role=listdivider</em>.</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of listdivider widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar listdivider = ns.engine.instanceWidget(document.getElementById('listdivider'), 'Listdivider');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar listdivider = $('#listdivider').listdivider();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create divider</h3>\n\n<pre><code>@example\n&lt;ul data-role=\"listview\"&gt;\n    &lt;li data-role=\"list-divider\"&gt;Item styles&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li data-role=\"list-divider\"&gt;Item styles&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li data-role=\"list-divider\"&gt;Item styles&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n    &lt;li&gt;&lt;a href=\"#\"&gt;Normal lists&lt;/a&gt;&lt;/li&gt;\n&lt;/ul&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (ns) {\n\t\n\t\t\t\tvar BaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tdom = ns.utils.DOM,\n\t\t\t\tButton = ns.widget.mobile.Button,\n\t\t\t\tListdivider = function () {\n\t\t\t\t\treturn this;\n\t\t\t\t};\n\n\t\t\tListdivider.prototype = new BaseWidget();\n\n\t\t\tListdivider.classes = {\n\t\t\t\tuiLiDivider: 'ui-li-divider'\n\t\t\t};","properties":[],"options":[{"types":"String","defaultValue":"'s'","tags":[{"type":"property","string":"{String} [options.theme='s']"},{"type":"member","string":"ns.widget.Listdivider"},{"type":"instance","string":""}],"description":"<p>theme of widget</p>","isPrivate":false,"name":"data-theme"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Listdivider"}],"example":"","brief":"<p>Build widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Listdivider.prototype._build = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tclasses = Listdivider.classes,\n\t\t\t\t\tclassList = element.classList,\n\t\t\t\t\tbuttonClasses = Button.classes;\n\n\t\t\t\tclassList.add(classes.uiBarThemePrefix + options.theme);\n\t\t\t\tclassList.add(classes.uiLiDivider);\n\t\t\t\telement.setAttribute('role', 'heading');\n\t\t\t\telement.setAttribute('tabindex', '0');\n\t\t\t\t//@todo check if ol tag and reset counter\n\n\t\t\t\tif (!options.style || options.style === \"normal\" || options.style === \"check\") {\n\t\t\t\t\tif (options.folded === false) {\n\t\t\t\t\t\tdom.wrapInHTML(\n\t\t\t\t\t\t\telement.childNodes,\n\t\t\t\t\t\t\t'<span class=\"' + buttonClasses.uiBtnText + '\"></span>'\n\t\t\t\t\t\t);\n\t\t\t\t\t}"}]},{"name":"ns.widget.mobile.Listview.Autodividers","authors":["Tomasz Lukawski <t.lukawski@samsung.com>"],"override":"ns.widget.mobile.Listview","title":"Autodividers extension for ListView Widget","brief":"","description":"<p>The Autodividers widget extension automatically creates dividers for a ListView Widget.</p>\n\n<p>A list can be configured to automatically generate dividers for its items. This is done by adding the <strong>data-autodividers=\"true\"</strong> attribute to the ListView element. This is similar to jQueryMobile version 1.2.0.</p>\n\n<p>To add an autodividers widget to the application, use the following code:</p>\n\n<pre><code> @example\n &lt;ul data-role=\"listview\" data-autodividers=\"true\" id=\"listview-with-autodividers\"&gt;\n     &lt;li&gt;&lt;a href=\"#\"&gt;Amy&lt;/a&gt;&lt;/li&gt;\n     &lt;li&gt;&lt;a href=\"#\"&gt;Arabella&lt;/a&gt;&lt;/li&gt;\n     &lt;li&gt;&lt;a href=\"#\"&gt;Barry&lt;/a&gt;&lt;/li&gt;\n &lt;/ul&gt;\n</code></pre>\n\n<p>Autodividers is not  independent widget, this is extension for <a href=\"ns_widget_mobile_Listview.htm\">ListView widget</a>.</p>\n\n<h2>Methods</h2>\n\n<p>Listview with autodividers have interface to call method tha same as ListView widget. To call method use:</p>\n\n<pre><code> @example\n $(\"#listview-with-autodividers\").listview('methodname', methodArgument1, methodArgument2, ...);\n</code></pre>","isPrivate":false,"isInternal":false,"since":"Tizen 2.0","code":"(function (document, ns) {","properties":[{"types":"Object","tags":[{"type":"property","string":"{Object} selectors Alias for {@link ns.utils.selectors}"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.selectors}","isPrivate":false,"code":"var selectors = ns.utils.selectors,","name":"selectors"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.engine}"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.engine}","isPrivate":false,"code":"engine = ns.engine,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} onBeforeRefreshListItems description"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"static","string":""},{"type":"private","string":""}],"description":"description","isPrivate":false,"code":"beforeRefreshListItemsHandlers = {},","name":"onBeforeRefreshListItems"}],"options":[{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{boolean} [options.autodividers=false]"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"instance","string":""}],"description":"<p>This option enables creating autodividers on ListView</p>","isPrivate":false,"code":"self.options.autodividers = false;\n\t\t\t\t\tself._getCreateOptions(element);\n\t\t\t\t\telement.addEventListener('beforerefreshitems',\n\t\t\t\t\t\tonBeforeRefreshListItems);\n\t\t\t\t};","name":"data-autodividers"}],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"example":"","brief":"<p>Registers widget's event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tpageShowCallback = contentFill.bind(null, self),\n\t\t\t\t\tpage = self.ui.page;\n\n\t\t\t\telement.addEventListener(\"vclick\", function (event) {\n\t\t\t\t\tvar target,\n\t\t\t\t\t\tcheckboxRadio,\n\t\t\t\t\t\ti;\n\t\t\t\t\tif (selectors.matchesSelector(this, \"li.\" + classes.uiLiHasCheckbox + \",li.\" + classes.uiLiHasRadio) === true) {\n\t\t\t\t\t\ttarget = event.target;\n\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-checkbox label\"));\n\t\t\t\t\t\tif (!checkboxRadio.length) {\n\t\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-radio label\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti = checkboxRadio.length;\n\t\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\t\teventUtils.trigger(checkboxRadio[i], \"vclick\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\tif (page) {\n\t\t\t\t\tpage.addEventListener(\"pageshow\", pageShowCallback, false);\n\t\t\t\t\tself._callbacks.pageshow = pageShowCallback;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction removeCorners(element, which) {\n\t\t\t\tvar elementClassList = element.classList;\n\t\t\t\tswitch (which) {\n\t\t\t\t\tcase \"top\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTop);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bottom\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tListview.prototype._removeCorners = function (li, which) {\n\t\t\t\tvar additionlElements = slice.call(li.querySelectorAll(\n\t\t\t\t\t'.' + buttonClasses.uiBtnInner + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiLinkAlt + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiThumb\n\t\t\t\t));\n\n\t\t\t\tif (which === \"top\" || which !== \"bottom\") {\n\t\t\t\t\tremoveCorners(li, \"top\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"top\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (which === \"bottom\" || which !== \"top\") {\n\t\t\t\t\tremoveCorners(li, \"bottom\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"bottom\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview","name":"listview","description":"instance of Listview.","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true}],"hasParams":true,"name":"beforeRefreshListItems","tags":[{"type":"method","string":"beforeRefreshListItems"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"ns.widget.mobile.Listview","name":"listview","description":"instance of Listview.","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Handler method for event \"beforerefreshitems\"</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"beforeRefreshListItems = function beforeRefreshListItems(listview, element) {\n\t\t\t\t\tif (listview.options.autodividers) {\n\t\t\t\t\t\tlistview._addAutodividers(element);\n\t\t\t\t\t}\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"listElement","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["null","string"],"description":"return 'null' if doesn't text found"},"name":"findFirstLetter","tags":[{"type":"method","string":"findFirstLetter"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"listElement","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true},{"type":"return","types":["null","string"],"description":"return 'null' if doesn't text found"},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Method finding text in list element and return first letter</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"findFirstLetter = function (listElement) {\n\t\t\t\t\t// look for the text in the given element\n\t\t\t\t\tvar text = listElement.textContent || null;\n\t\t\t\t\tif (!text) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// create the text for the divider (first uppercased letter)\n\t\t\t\t\ttext = text.trim().slice(0, 1).toUpperCase();\n\t\t\t\t\treturn text;\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true}],"hasParams":true,"name":"removeDividers","tags":[{"type":"method","string":"removeDividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Method removes list dividers from list.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"removeDividers = function removeDividers(list) {\n\t\t\t\t\tvar liCollection = selectors.getChildrenBySelector(list, 'li[data-role=\"list-divider\"]'),\n\t\t\t\t\t\ti,\n\t\t\t\t\t\tlen = liCollection.length;\n\t\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\t\tlist.removeChild(liCollection[i]);\n\t\t\t\t\t}\n\t\t\t\t},"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true}],"hasParams":true,"name":"insertAutodividers","tags":[{"type":"method","string":"insertAutodividers"},{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Insert list dividers into list.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"insertAutodividers = function insertAutodividers(self, list) {"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"name":"replaceDividers","tags":[{"type":"method","string":"replaceDividers"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Major method of autodividers extension.<br />It removes old and inserts new dividers.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"replaceDividers = function replaceDividers(self, list) {\n\t\t\t\t\t// remove dividers if exists;\n\t\t\t\t\tremoveDividers(list);\n\t\t\t\t\t// insert new dividers;\n\t\t\t\t\tinsertAutodividers(self, list);\n\t\t\t\t},"},{"params":[],"hasParams":false,"name":"parent_build","tags":[{"type":"method","string":"parent_build"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _build methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_build = Listview.prototype._build,"},{"params":[],"hasParams":false,"name":"parent_configure","tags":[{"type":"method","string":"parent_configure"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _configure methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_configure = Listview.prototype._configure,"},{"params":[],"hasParams":false,"name":"parent_init","tags":[{"type":"method","string":"parent_init"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _init methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_init = Listview.prototype._init,"},{"params":[],"hasParams":false,"name":"parent_destroy","tags":[{"type":"method","string":"parent_destroy"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _destroy methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_destroy = Listview.prototype._destroy,"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"listview instance.","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"name":"initializeAutodividers","tags":[{"type":"method","string":"initializeAutodividers"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"ns.widget.mobile.Listview","name":"self","description":"listview instance.","isOptional":false},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Initializing autodividers on Listview instance</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"initializeAutodividers = function initializeAutodividers(self, element) {\n\t\t\t\t\tvar onBeforeRefreshListItems = beforeRefreshListItems.bind(null, self, element);\n\t\t\t\t\tbeforeRefreshListItemsHandlers[self.id] = onBeforeRefreshListItems;"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"name":"_addAutodividers","tags":[{"type":"method","string":"_addAutodividers"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"list","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Rebuilding html list element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._addAutodividers = function addAutodividers(list) {\n\t\t\t\treplaceDividers.call(null, this, list);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false},{"type":"param","types":"boolean","name":"enabled","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":""},"name":"_setAutodividers","tags":[{"type":"method","string":"_setAutodividers"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false},{"type":"param","types":"boolean","name":"enabled","description":"","isOptional":false,"isLast":true},{"type":"return","types":["boolean"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>@expose</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._setAutodividers = function Listview_setAutodividers(element, enabled) {\n\t\t\t\tvar options = this.options;\n\t\t\t\tif (options.autodividers === enabled) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// If autodividers option is changing from 'true' to 'false'\n\t\t\t\t// we need remove older dividers;\n\t\t\t\tif (options.autodividers && !enabled) {\n\t\t\t\t\tremoveDividers(element);\n\t\t\t\t}\n\t\t\t\toptions.autodividers = enabled;\n\t\t\t\telement.setAttribute('data-autodividers', enabled);\n\t\t\t\tif (enabled) {\n\t\t\t\t\tthis.refresh();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Initialize autodividers features on Listview<br />Override method '<em>build' from Listview &amp; call the protected '</em>build'</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._build = function Listview_build(element) {\n\t\t\t\tinitializeAutodividers(this, element);\n\t\t\t\treturn parent_build.call(this, element);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Initialize autodividers features on Listview<br />Override method '<em>init' from Listview &amp; call the protected '</em>init' or 'init'</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._init = function Listview_init(element) {\n\t\t\t\tvar autodividers = this.options.autodividers;\n\t\t\t\tif (autodividers === undefined || autodividers === null) {\n\t\t\t\t\tinitializeAutodividers(this, element);\n\t\t\t\t}\n\t\t\t\treturn (typeof parent_init === 'function') ?\n\t\t\t\t\t\tparent_init.call(this, element) :\n\t\t\t\t\t\telement;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"member","string":"ns.widget.mobile.Listview.Autodividers"},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Removing and cleaning autodividers extension<br />Override method '<em>destroy' from Listview &amp; call the protected '</em>destroy'</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._destroy = function _destroy() {\n\t\t\t\tvar element = this.element;\n\t\t\t\telement.removeEventListener('beforerefreshitems',\n\t\t\t\t\tbeforeRefreshListItemsHandlers[this.id]);\n\t\t\t\tthis.options.autodividers = null;\n\t\t\t\t// delete attribute\n\t\t\t\telement.removeAttribute('data-autodividers');\n\t\t\t\t// recovery previous version of protected methods;\n\t\t\t\tthis._build = parent_build;\n\t\t\t\tthis._init = parent_init;\n\t\t\t\tthis._destroy = parent_destroy;\n\t\t\t\t// call protected method from Listview;\n\t\t\t\tif (typeof parent_destroy === 'function') {\n\t\t\t\t\tparent_destroy.call(this);\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Searchbar","authors":[],"extends":"ns.widget.BaseWidget","title":"Searchbar widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\tvar Searchbar = function () {\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tBaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tthemes = ns.theme,\n\t\t\t\tDOM = ns.utils.DOM,\n\t\t\t\tevents = ns.utils.events;\n\n\t\t\tSearchbar.prototype = new BaseWidget();","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Searchbar"},{"type":"protected","string":""}],"example":"","brief":"<p>Enable Searchbar</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Searchbar.prototype._enable = function (element) {\n\t\t\t\telement = element || this.element;\n\t\t\t\tif (element) {\n\t\t\t\t\telement.removeAttribute(\"disabled\");\n\t\t\t\t\telement.classList.remove(\"ui-disabled\");\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Searchbar"},{"type":"protected","string":""}],"example":"","brief":"<p>Disable Searchbar</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Searchbar.prototype._disable = function (element) {\n\t\t\t\telement = element || this.element;\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"disabled\", \"disabled\");\n\t\t\t\t\telement.classList.add(\"ui-disabled\");\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction findLabel(element) {\n\t\t\t\tvar elemParent = element.parentNode,\n\t\t\t\t\tlabel = elemParent.querySelector('label[for=\"' + element.id + '\"]');\n\t\t\t\treturn label;\n\t\t\t}\n\n\t\t\tSearchbar.prototype._build = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tprotoOptions = Searchbar.prototype.options,\n\t\t\t\t\tclasses = Searchbar.classes,\n\t\t\t\t\ttheme = options.theme || themes.getInheritedTheme(element, (protoOptions || protoOptions.theme) || 'c'),\n\t\t\t\t\tthemeClass  = classes.themePrefix + theme,\n\t\t\t\t\tsearchBox,\n\t\t\t\t\tclearButton,\n\t\t\t\t\tcancelButton,\n\t\t\t\t\tdefaultText,\n\t\t\t\t\tlabelDiv,\n\t\t\t\t\tsearchImage,\n\t\t\t\t\tfrontIcon = false,\n\t\t\t\t\tlabel = findLabel(element),\n\t\t\t\t\tsearchBoxClasses,\n\t\t\t\t\tinputSearchBar,\n\t\t\t\t\tinputClassList = element.classList,\n\t\t\t\t\tui;\n\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.classList.add(classes.uiInputText);\n\t\t\t\t}\n\n\t\t\t\tif (element.autocorrect !== undefined) { // @todo && !$.support.touchOverflow ) {\n\t\t\t\t\t// Set the attribute instead of the property just in case there\n\t\t\t\t\t// is code that attempts to make modifications via HTML.\n\t\t\t\t\telement.setAttribute(\"autocorrect\", \"off\");\n\t\t\t\t\telement.setAttribute(\"autocomplete\", \"off\");\n\t\t\t\t}\n\n\t\t\t\telement.removeAttribute('type');\n\n\t\t\t\tinputClassList.add(classes.uiInputText);\n\t\t\t\tinputClassList.add(themeClass);\n\t\t\t\tsearchBox = document.createElement('div');\n\t\t\t\tsearchBoxClasses = searchBox.classList;\n\t\t\t\tsearchBoxClasses.add(classes.uiInputSearch);\n\t\t\t\tsearchBoxClasses.add(classes.uiShadowInset);\n\t\t\t\tsearchBoxClasses.add(classes.uiCornerAll);\n\t\t\t\tsearchBoxClasses.add(classes.uiBtnShadow);\n\t\t\t\tsearchBoxClasses.add(themeClass);\n\t\t\t\telement.parentNode.replaceChild(searchBox, element);\n\t\t\t\tsearchBox.appendChild(element);\n\n\t\t\t\tif (options.cancelBtn) {\n\t\t\t\t\tsearchBoxClasses.add(classes.uiInputSearchDefault);\n\t\t\t\t}\n\n\t\t\t\tclearButton = document.createElement('a');\n\t\t\t\tclearButton.setAttribute('href', '#');\n\t\t\t\tclearButton.setAttribute('title', 'clear text');\n\t\t\t\tclearButton.classList.add(classes.uiInputClear);\n\t\t\t\tclearButton.innerText = 'clear text';\n\t\t\t\tif (!element.value) {\n\t\t\t\t\tclearButton.classList.add(classes.uiInputClearHidden);\n\t\t\t\t}\n\t\t\t\tsearchBox.appendChild(clearButton);\n\t\t\t\tengine.instanceWidget(clearButton, 'Button', {\n\t\t\t\t\ticon: \"deleteSearch\",\n\t\t\t\t\ticonpos: \"notext\",\n\t\t\t\t\tcorners: true,\n\t\t\t\t\tshadow: true\n\t\t\t\t});\n\n\t\t\t\tinputSearchBar = document.createElement('div');\n\t\t\t\tinputSearchBar.classList.add(classes.inputSearchBar);\n\t\t\t\tsearchBox.parentNode.replaceChild(inputSearchBar, searchBox);\n\t\t\t\tinputSearchBar.appendChild(searchBox);\n\n\t\t\t\tif (options.icon) {\n\t\t\t\t\tsearchBoxClasses.add(classes.uiSearchBarIcon);\n\t\t\t\t\tfrontIcon = document.createElement('div');\n\t\t\t\t\tDOM.setNSData(frontIcon, 'role', 'button');\n\t\t\t\t\tDOM.setNSData(frontIcon, 'icon', options.icon);\n\t\t\t\t\tinputSearchBar.appendChild(frontIcon);\n\t\t\t\t\tengine.instanceWidget(frontIcon, 'Button', {\n\t\t\t\t\t\ticonpos: \"notext\",\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tstyle: 'circle'\n\t\t\t\t\t});\n\t\t\t\t\tfrontIcon.classList.add(classes.uiBtnSearchFrontIcon);\n\t\t\t\t}\n\n\t\t\t\t//SLP --start search bar with cancel button\n\t\t\t\tsearchImage = document.createElement('div');\n\t\t\t\tsearchImage.classList.add(classes.uiImageSearch);\n\t\t\t\tsearchBox.appendChild(searchImage);\n\n\t\t\t\tif (options.cancelBtn) {\n\t\t\t\t\tcancelButton = document.createElement('div');\n\t\t\t\t\tDOM.setNSData(cancelButton, 'role', 'button');\n\t\t\t\t\tcancelButton.classList.add(classes.uiInputCancel);\n\t\t\t\t\tcancelButton.setAttribute('title', 'clear text');\n\t\t\t\t\tcancelButton.innerText = 'Cancel';\n\t\t\t\t\tinputSearchBar.appendChild(cancelButton);\n\t\t\t\t\tengine.instanceWidget(cancelButton, 'Button', {\n\t\t\t\t\t\ticon: \"cancel\",\n\t\t\t\t\t\ticonpos: \"cancel\",\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\tshadow: true\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Default Text\n\t\t\t\tdefaultText = DOM.getNSData(element, \"default-text\");\n\n\t\t\t\tif ((defaultText !== null) && (defaultText.length > 0)) {\n\t\t\t\t\tlabelDiv = document.createElement('div');\n\t\t\t\t\tlabelDiv.classList.add(classes.uiInputDefaultText);\n\t\t\t\t\tlabelDiv.style.content = \"'\" + defaultText + \"'\";\n\t\t\t\t\tinputSearchBar.appendChild(labelDiv);\n\t\t\t\t}\n\n\t\t\t\tif (!element.getAttribute(\"placeholder\")) {\n\t\t\t\t\telement.setAttribute(\"placeholder\", \"Search\");\n\t\t\t\t}\n\n\t\t\t\tthis._ui = this._ui || {};\n\t\t\t\tui = this._ui;\n\t\t\t\tui.input = element;\n\t\t\t\tui.clearButton = clearButton;\n\t\t\t\tclearButton.setAttribute('id', this.id + '-clear-button');\n\t\t\t\tif (cancelButton) {\n\t\t\t\t\tui.cancelButton = cancelButton;\n\t\t\t\t\tcancelButton.setAttribute('id', this.id + '-cancel-button');\n\t\t\t\t}\n\t\t\t\tif (labelDiv) {\n\t\t\t\t\tui.labelDiv = labelDiv;\n\t\t\t\t\tlabelDiv.setAttribute('id', this.id + '-label-div');\n\t\t\t\t}\n\t\t\t\tui.searchBox = searchBox;\n\t\t\t\tsearchBox.setAttribute('id', this.id + '-search-box');\n\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tfunction clearButtonClick(self, event) {\n\t\t\t\tvar input = self._ui.input;\n\t\t\t\tif (!input.getAttribute(\"disabled\")) {\n\t\t\t\t\tinput.value = '';\n\t\t\t\t\tevents.trigger(input, 'change');\n\t\t\t\t\tinput.focus();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction cancelButtonClick(self, event) {\n\t\t\t\tvar input = self._ui.input,\n\t\t\t\t\tclasses = Searchbar.classes,\n\t\t\t\t\tlocalClassList;\n\t\t\t\tif (!input.getAttribute(\"disabled\")) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\n\t\t\t\t\tinput.value = '';\n\t\t\t\t\tevents.trigger(input, 'change');\n\t\t\t\t\tinput.blur();\n\n\t\t\t\t\tif (self.options.cancel) {\n\t\t\t\t\t\tlocalClassList = self._ui.searchBox.classList;\n\t\t\t\t\t\tlocalClassList.add(classes.uiInputSearchWide);\n\t\t\t\t\t\tlocalClassList.remove(classes.uiInputSearchDefault);\n\n\t\t\t\t\t\tlocalClassList = self._ui.cancelButton.classList;\n\t\t\t\t\t\tlocalClassList.add(classes.uiBtnCancelHide);\n\t\t\t\t\t\tlocalClassList.remove(classes.uiBtnCancelShow);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction inputFocus(self) {\n\t\t\t\tvar input = self._ui.input,\n\t\t\t\t\tclasses = Searchbar.classes,\n\t\t\t\t\tlocalClassList;\n\t\t\t\tif (!input.getAttribute(\"disabled\")) {\n\t\t\t\t\tlocalClassList = self._ui.searchBox.classList;\n\t\t\t\t\tlocalClassList.add(classes.uiFocus);\n\t\t\t\t\tif (self.options.cancel) {\n\t\t\t\t\t\tlocalClassList.remove(classes.uiInputSearchWide);\n\t\t\t\t\t\tlocalClassList.add(classes.uiInputSearchDefault);\n\n\t\t\t\t\t\tlocalClassList = self._ui.cancelButton.classList;\n\t\t\t\t\t\tlocalClassList.remove(classes.uiBtnCancelHide);\n\t\t\t\t\t\tlocalClassList.add(classes.uiBtnCancelShow);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (self._ui.labelDiv) {\n\t\t\t\t\tself._ui.labelDiv.classList.add(classes.uiInputDefaultHidden);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction inputBlur(self) {\n\t\t\t\tvar inputedText = self._ui.input.value,\n\t\t\t\t\tclasses = Searchbar.classes,\n\t\t\t\t\tui = self._ui;\n\t\t\t\tui.searchBox.classList.add(classes.uiFocus);\n\t\t\t\tif (ui.labelDiv) {\n\t\t\t\t\tif (inputedText.length > 0) {\n\t\t\t\t\t\tui.labelDiv.classList.add(classes.uiInputDefaultHidden);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tui.labelDiv.classList.remove(classes.uiInputDefaultHidden);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction labelClick(self) {\n\t\t\t\tself._ui.input.blur();\n\t\t\t\tself._ui.input.focus();\n\t\t\t}\n\n\t\t\tSearchbar.prototype._init = function (element) {\n\t\t\t\tvar ui;\n\t\t\t\tthis._ui = this._ui || {};\n\t\t\t\tui = this._ui;\n\t\t\t\tui.input = element;\n\t\t\t\tui.clearButton = document.getElementById(this.id + '-clear-button');\n\t\t\t\tui.cancelButton = document.getElementById(this.id + '-cancel-button');\n\t\t\t\tui.labelDiv = document.getElementById(this.id + '-label-div');\n\t\t\t\tui.searchBox = document.getElementById(this.id + '-search-box');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Searchbar"},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Searchbar.prototype._bindEvents = function () {\n\t\t\t\tvar handlers,\n\t\t\t\t\tui = this._ui,\n\t\t\t\t\tinput = ui.input;\n\t\t\t\tthis._handlers = this._handlers || {};\n\t\t\t\thandlers = this._handlers;\n\t\t\t\thandlers.clearClick = clearButtonClick.bind(null, this);\n\t\t\t\thandlers.cancelClick = cancelButtonClick.bind(null, this);\n\t\t\t\thandlers.inputFocus = inputFocus.bind(null, this);\n\t\t\t\thandlers.inputBlur = inputBlur.bind(null, this);\n\t\t\t\thandlers.labelClick = labelClick.bind(null, this);\n\n\t\t\t\tui.clearButton.addEventListener(\"vclick\", handlers.clearClick, false);\n\t\t\t\tif (ui.cancelButton) {\n\t\t\t\t\tui.cancelButton.addEventListener(\"vclick\", handlers.cancelClick, false);\n\t\t\t\t}\n\t\t\t\tinput.addEventListener(\"focus\", handlers.inputFocus, false);\n\t\t\t\tinput.addEventListener(\"blur\", handlers.inputBlur, false);\n\t\t\t\tif (ui.labelDiv) {\n\t\t\t\t\tui.labelDiv.addEventListener(\"vclick\", handlers.labelClick, false);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tns.widget.mobile.Searchbar = Searchbar;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Searchbar\",\n\t\t\t\t\"input[type='search'],[data-type='search'], input[type=tizen-search],[data-type='tizen-search'], .ui-searchbar\",\n\t\t\t\t[],\n\t\t\t\tSearchbar,\n\t\t\t\t\"tizen\"\n\t\t\t);\n}(window.document, ns));"}]},{"name":"ns.widget.mobile.Listview.Filter","authors":["Maciej Urbanski <m.urbanski@samsung.com>"],"override":"ns.widget.mobile.Listview","title":"Listview Filter Widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[{"types":"Object","tags":[{"type":"property","string":"{Object} events Alias for {@link ns.utils.events}"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.events}","isPrivate":false,"code":"var events = ns.utils.events,","name":"events"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.engine}"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.engine}","isPrivate":false,"code":"engine = ns.engine,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} DOM Alias for {@link ns.utils.DOM}"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.DOM}","isPrivate":false,"code":"DOM = ns.utils.DOM,","name":"DOM"},{"types":"Object","tags":[{"type":"property","string":"{Object} selectors Alias for {@link ns.utils.selectors}"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.selectors}","isPrivate":false,"code":"selectors = ns.utils.selectors,","name":"selectors"}],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"instance","string":""}],"example":"","brief":"<p>Registers widget's event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tpageShowCallback = contentFill.bind(null, self),\n\t\t\t\t\tpage = self.ui.page;\n\n\t\t\t\telement.addEventListener(\"vclick\", function (event) {\n\t\t\t\t\tvar target,\n\t\t\t\t\t\tcheckboxRadio,\n\t\t\t\t\t\ti;\n\t\t\t\t\tif (selectors.matchesSelector(this, \"li.\" + classes.uiLiHasCheckbox + \",li.\" + classes.uiLiHasRadio) === true) {\n\t\t\t\t\t\ttarget = event.target;\n\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-checkbox label\"));\n\t\t\t\t\t\tif (!checkboxRadio.length) {\n\t\t\t\t\t\t\tcheckboxRadio = slice.call(target.querySelectorAll(\".ui-radio label\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti = checkboxRadio.length;\n\t\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\t\teventUtils.trigger(checkboxRadio[i], \"vclick\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\tif (page) {\n\t\t\t\t\tpage.addEventListener(\"pageshow\", pageShowCallback, false);\n\t\t\t\t\tself._callbacks.pageshow = pageShowCallback;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction removeCorners(element, which) {\n\t\t\t\tvar elementClassList = element.classList;\n\t\t\t\tswitch (which) {\n\t\t\t\t\tcase \"top\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTop);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerTl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bottom\":\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBottom);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBr);\n\t\t\t\t\t\telementClassList.remove(classes.uiCornerBl);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tListview.prototype._removeCorners = function (li, which) {\n\t\t\t\tvar additionlElements = slice.call(li.querySelectorAll(\n\t\t\t\t\t'.' + buttonClasses.uiBtnInner + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiLinkAlt + ', ' +\n\t\t\t\t\t\t'.' + classes.uiLiThumb\n\t\t\t\t));\n\n\t\t\t\tif (which === \"top\" || which !== \"bottom\") {\n\t\t\t\t\tremoveCorners(li, \"top\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"top\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (which === \"bottom\" || which !== \"top\") {\n\t\t\t\t\tremoveCorners(li, \"bottom\");\n\t\t\t\t\tadditionlElements.forEach(function (item) {\n\t\t\t\t\t\tremoveCorners(item, \"bottom\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"parent_build","tags":[{"type":"method","string":"parent_build"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _build methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_build = Listview.prototype._build,"},{"params":[],"hasParams":false,"name":"parent_configure","tags":[{"type":"method","string":"parent_configure"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _configure methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_configure = Listview.prototype._configure,"},{"params":[],"hasParams":false,"name":"parent_init","tags":[{"type":"method","string":"parent_init"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _init methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_init = Listview.prototype._init,"},{"params":[],"hasParams":false,"name":"parent_bindEvents","tags":[{"type":"method","string":"parent_bindEvents"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _bindEvents methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_bindEvents = Listview.prototype._bindEvents,"},{"params":[],"hasParams":false,"name":"parent_destroy","tags":[{"type":"method","string":"parent_destroy"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _destroy methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_destroy = Listview.prototype._destroy;"},{"params":[{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"param","types":"HTMLUListElement | HTMLOListElement","name":"element","description":"bound UList or OList HTMLElement.","isOptional":false,"isLast":true},{"type":"return","types":["HTMLUListElement","HTMLOListElement"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Initialize autodividers features on Listview<br />Override method '<em>build' from Listview &amp; call the protected '</em>build'</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._build = function Listview_build(element) {\n\t\t\t\tvar wrapper,\n\t\t\t\t\twrapperClass,\n\t\t\t\t\tsearch,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tclasses = Listview.classes,\n\t\t\t\t\tid = this.id;\n\n\t\t\t\tparent_build.call(this, element);\n\n\t\t\t\tif (options.filter) {\n\t\t\t\t\twrapper = document.createElement('form');\n\t\t\t\t\twrapperClass = wrapper.classList;\n\t\t\t\t\twrapperClass.add(classes.uiListviewFilter);\n\t\t\t\t\twrapperClass.add(classes.uiBarPrefix + options.filterTheme);\n\t\t\t\t\twrapper.setAttribute('role', 'search');\n\t\t\t\t\twrapper.setAttribute('id', id + '-form');\n\t\t\t\t\tsearch = document.createElement('input');\n\t\t\t\t\tsearch.setAttribute('placeholder', options.filterPlaceholder);\n\t\t\t\t\tsearch.setAttribute('type', 'search');\n\t\t\t\t\tDOM.getNSData(search, 'lastval', '');\n\t\t\t\t\tsearch.setAttribute('id', id + '-search');\n\t\t\t\t\twrapper.appendChild(search);\n\t\t\t\t\tif (options.inset) {\n\t\t\t\t\t\twrapperClass.add(options.uiListviewFilterInset);\n\t\t\t\t\t}\n\t\t\t\t\tDOM.insertNodesBefore(element, wrapper);\n\t\t\t\t\tengine.instanceWidget(search, 'Searchbar');\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tfunction inputChangeHandler(self, event) {\n\t\t\t\tvar search = event.target,\n\t\t\t\t\tval = search.value.toLowerCase(),\n\t\t\t\t\tlistItems = null,\n\t\t\t\t\tlastval = DOM.getNSData(search, \"lastval\") || \"\",\n\t\t\t\t\tchildItems = false,\n\t\t\t\t\titemtext = \"\",\n\t\t\t\t\titem,\n\t\t\t\t\t// Check if a custom filter callback applies\n\t\t\t\t\tisCustomFilterCallback = self.options.filterCallback !== defaultFilterCallback,\n\t\t\t\t\tlist = self.element,\n\t\t\t\t\tclasses = Listview.classes,\n\t\t\t\t\ti,\n\t\t\t\t\tslice = [].slice;\n\n\t\t\t\tevents.trigger(list, \"beforefilter\", { input: search });\n\n\t\t\t\t// Change val as lastval for next execution\n\t\t\t\tDOM.setNSData(search, \"lastval\", val);\n\t\t\t\tif (val) {\n\t\t\t\t\tif (isCustomFilterCallback || val.length < lastval.length || val.indexOf(lastval) !== 0) {\n\t\t\t\t\t\t// Custom filter callback applies or removed chars or pasted something totally different, check all items\n\t\t\t\t\t\tlistItems = slice.call(list.children);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Only chars added, not removed, only use visible subset\n\t\t\t\t\t\tlistItems = slice.call(selectors.getChildrenBySelector(list, \":not(.ui-screen-hidden)\"));\n\t\t\t\t\t}\n\t\t\t\t\t// This handles hiding regular rows without the text we search for\n\t\t\t\t\t// and any list dividers without regular rows shown under it\n\t\t\t\t\tfor (i = listItems.length - 1; i >= 0; i--) {\n\t\t\t\t\t\titem = listItems[i];\n\n\t\t\t\t\t\titemtext =  DOM.getNSData(item, \"filtertext\") || item.innerText;\n\n\t\t\t\t\t\tif (DOM.getNSData(item, \"role\") === 'list-divider') {\n\t\t\t\t\t\t\tif (childItems) {\n\t\t\t\t\t\t\t\titem.classList.remove(classes.uiFilterHidequeue);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titem.classList.add(classes.uiFilterHidequeue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// New bucket!\n\t\t\t\t\t\t\tchildItems = false;\n\t\t\t\t\t\t} else if (self.options.filterCallback(itemtext, val, item)) {\n\t\t\t\t\t\t\t//mark to be hidden\n\t\t\t\t\t\t\titem.classList.add(classes.uiFilterHidequeue);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// There's a shown item in the bucket\n\t\t\t\t\t\t\tchildItems = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Hide elements which marked to hide\n\t\t\t\t\tlistItems.forEach(function (item) {\n\t\t\t\t\t\tvar itemClassList = item.classList;\n\t\t\t\t\t\tif (itemClassList.contains(classes.uiFilterHidequeue)) {\n\t\t\t\t\t\t\titemClassList.add(\"ui-screen-hidden\");\n\t\t\t\t\t\t\titemClassList.remove(classes.uiFilterHidequeue);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titemClassList.remove(\"ui-screen-hidden\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tslice.call(list.children).forEach(function (item) {\n\t\t\t\t\t\titem.classList.remove(\"ui-screen-hidden\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// @todo self._refreshCorners(); this trigger should move to refreshCorners\n\t\t\t\tevents.trigger(self.element, 'updatelayout');\n\t\t\t}\n\n\t\t\tfunction preventDefault(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tListview.prototype._init = function Listview_init(element) {\n\t\t\t\tvar id = element.id;\n\n\t\t\t\tthis._ui = this._ui || {};\n\t\t\t\tthis._ui.form = document.getElementById(id + \"-form\");\n\t\t\t\tthis._ui.search = document.getElementById(id + \"-search\");\n\n\t\t\t\tif (typeof parent_init === 'function') {\n\t\t\t\t\tparent_init.call(this, element);\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tListview.prototype._bindEvents = function Listview_bindEvents(element) {\n\t\t\t\tvar search = this._ui.search;\n\t\t\t\tparent_bindEvents.call(this, element);\n\n\t\t\t\tif (search) {\n\t\t\t\t\tthis._inputChangeHandler = inputChangeHandler.bind(null, this);\n\t\t\t\t\tsearch.addEventListener(\"keyup\", this._inputChangeHandler, false);\n\t\t\t\t\tsearch.addEventListener(\"change\", this._inputChangeHandler, false);\n\t\t\t\t\tsearch.addEventListener(\"submit\", preventDefault, false);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"member","string":"ns.widget.mobile.Listview.Filter"},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Removing and cleaning autodividers extension<br />Override method '<em>destroy' from Listview &amp; call the protected '</em>destroy'</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._destroy = function Listview_destroy() {\n\t\t\t\tvar search = this._ui.search;\n\t\t\t\tif (search) {\n\t\t\t\t\tsearch.removeEventListener(\"keyup\", this._inputChangeHandler, false);\n\t\t\t\t\tsearch.removeEventListener(\"change\", this._inputChangeHandler, false);\n\t\t\t\t\tsearch.removeEventListener(\"submit\", preventDefault, false);\n\t\t\t\t}\n\t\t\t\t// call protected method from Listview;\n\t\t\t\tif (typeof parent_destroy === 'function') {\n\t\t\t\t\tparent_destroy.call(this);\n\t\t\t\t}\n\t\t\t};\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Tabbar","authors":[],"extends":"ns.widget.BaseWidget","title":"Tabbar widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\tvar ButtonClasses = ns.widget.mobile.Button.classes,\n\t\t\t\tBaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tselectors = ns.utils.selectors,\n\t\t\t\tgrid = ns.utils.grid,\n\t\t\t\tDOM = ns.utils.DOM,\n\t\t\t\tslice = [].slice,\n\t\t\t\tTabbar = function () {\n\t\t\t\t\tthis.vclickCallback = null;\n\t\t\t\t};\n\n\t\t\tTabbar.prototype = new BaseWidget();","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Tabbar"}],"example":"","brief":"<p>Build method</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tabbar.prototype._build = function (element) {\n\t\t\t\tvar classes = Tabbar.classes,\n\t\t\t\t\ttabbarClassList = element.classList,\n\t\t\t\t\tlinks = slice.call(element.getElementsByTagName('a')),\n\t\t\t\t\theaders = selectors.getParentsByClass(element, classes.uiHeader),\n\t\t\t\t\tscrollview = selectors.getParentsByClass(element, classes.uiScrollviewView),\n\t\t\t\t\tli = slice.call(element.getElementsByTagName(\"li\")),\n\t\t\t\t\ticonpos,\n\t\t\t\t\ttextpos;\n\n\t\t\t\tif (links.length) {\n\t\t\t\t\ticonpos = hasIcon(links) ? this.iconpos : undefined;\n\t\t\t\t\ttextpos = links[0].innerHTML.length ? true : false;\n\t\t\t\t}\n\n\t\t\t\tif (headers.length && scrollview.length) {\n\t\t\t\t\tli.forEach(function (item) {\n\t\t\t\t\t\titem.classList.add(classes.tabbarScrollLi);\n\t\t\t\t\t});\n\t\t\t\t\tslice.call(element.getElementsByTagName(\"ul\")).forEach(function (item) {\n\t\t\t\t\t\titem.classList.add(classes.tabbarScrollUl);\n\t\t\t\t\t});"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Tabbar"}],"example":"","brief":"<p>Init method</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tabbar.prototype._init = function (element) {\n\t\t\t\tvar classes = Tabbar.classes,\n\t\t\t\t\ttabbarClassList = element.classList,\n\t\t\t\t\tisLandscape = window.innerWidth > window.innerHeight;\n\n\t\t\t\tif (isLandscape) {\n\t\t\t\t\ttabbarClassList.remove(classes.uiPortraitTabbar);\n\t\t\t\t\ttabbarClassList.add(classes.uiLandscapeTabbar);\n\t\t\t\t} else {\n\t\t\t\t\ttabbarClassList.remove(classes.uiLandscapeTabbar);\n\t\t\t\t\ttabbarClassList.add(classes.uiPortraitTabbar);\n\t\t\t\t}\n\t\t\t};"}]},{"name":"ns.widget.mobile.Listview.Fastscroll","authors":[],"extends":"ns.widget.mobile.Listview","title":"Fastscroll Widget","brief":"","description":"<p>Fastscroll is a scrollview controller. It binds scrollview to a list of short cuts.<br />Short cuts list based on scrollview dividers list. Clicking on a shortcut immediately jumps<br />the scrollview to the selected divider. Same action is on mouse movements.</p>\n\n<p>To apply, add attribute data-fastscroll=\"true\" to a listview (<ul\\> or <ol\\> inside page).<br />Alternatively you can call fastscroll() or ns.engine.instanceWidget(list, 'Fastscroll') on list element.</p>\n\n<p>If a listview has no dividers or a single divider the widget won't display.</p>\n\n<pre><code>@example\nvar fastscroll = ns.engine.instanceWidget(document.getElementById('list'), 'Fastscroll');\n\n@example\nvar fastscroll = $('#list').fastscroll();\n\n@example\n&lt;ul data-role=\"listview\" data-fastscroll=\"true\"&gt;\n    &lt;li data-role=\"list-divider\"&gt;A&lt;/li&gt;\n    &lt;li&gt;Anton&lt;/li&gt;\n    &lt;li&gt;Arabella&lt;/li&gt;\n    &lt;li data-role=\"list-divider\"&gt;B&lt;/li&gt;\n    &lt;li&gt;Barry&lt;/li&gt;\n    &lt;li&gt;Bily&lt;/li&gt;\n&lt;/ul&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Main calss of fascscroll view","isPrivate":false,"code":"listviewClasses,","name":"uiFastscroll"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of fascroll target (listview)","isPrivate":false,"code":"listviewClasses,","name":"uiFastscrollTarget"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of fastscroll popup","isPrivate":false,"code":"listviewClasses,","name":"uiFastscrollPopup"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of scrollbar","isPrivate":false,"code":"listviewClasses,","name":"uiScrollbar"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of fastscroll item with fover","isPrivate":false,"code":"listviewClasses,","name":"uiFastscrollHover"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of first item in fastscroll with fover","isPrivate":false,"code":"listviewClasses,","name":"uiFastscrollHoverFirstItem"},{"types":"string","tags":[{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"static","string":""},{"type":"private","string":""},{"type":"property","string":"{string} uiFastscroll Main calss of fascscroll view"},{"type":"property","string":"{string} uiFastscrollTarget Class of fascroll target (listview)"},{"type":"property","string":"{string} uiFastscrollPopup Class of fastscroll popup"},{"type":"property","string":"{string} uiScrollbar Class of scrollbar"},{"type":"property","string":"{string} uiFastscrollHover Class of fastscroll item with fover"},{"type":"property","string":"{string} uiFastscrollHoverFirstItem Class of first item in fastscroll with fover"},{"type":"property","string":"{string} uiFastscrollHoverDown Class of presed fastscroll item with fover"}],"description":"Class of presed fastscroll item with fover","isPrivate":false,"code":"listviewClasses,","name":"uiFastscrollHoverDown"}],"options":[{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{boolean} [options.fastscroll=true] Sets if fastscroll should be enabled."},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"instance","string":""}],"description":"Sets if fastscroll should be enabled.","isPrivate":false,"code":"this.options = this.options || {};\n\t\t\t\tthis.options.fastscroll = false;\n\t\t\t};","name":"data-fastscroll"}],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"parent_build","tags":[{"type":"method","string":"parent_build"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _build methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_build = Listview.prototype._build,"},{"params":[],"hasParams":false,"name":"parent_configure","tags":[{"type":"method","string":"parent_configure"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _configure methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_configure = Listview.prototype._configure,"},{"params":[],"hasParams":false,"name":"parent_init","tags":[{"type":"method","string":"parent_init"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _init methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_init = Listview.prototype._init,"},{"params":[],"hasParams":false,"name":"parent_bindEvents","tags":[{"type":"method","string":"parent_bindEvents"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _bindEvents methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_bindEvents = Listview.prototype._bindEvents,"},{"params":[],"hasParams":false,"name":"parent_destroy","tags":[{"type":"method","string":"parent_destroy"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _destroy methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_destroy = Listview.prototype._destroy,"},{"params":[],"hasParams":false,"name":"parent_refresh","tags":[{"type":"method","string":"parent_refresh"},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"private","string":""}],"example":"","brief":"<p>Backup of _refresh methods for replacing it</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"parent_refresh = Listview.prototype._refresh;"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"number","name":"itemsCount","description":"","isOptional":false},{"type":"param","types":"number","name":"containerHeight","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{number}"},"name":"getMaxFastscrollItemHeight","tags":[{"type":"method","string":"getMaxFastscrollItemHeight"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"number","name":"itemsCount","description":"","isOptional":false},{"type":"param","types":"number","name":"containerHeight","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{number}"},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Cout what is max height of short cut on fastscroll list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function getMaxFastscrollItemHeight(self, item, itemsCount, containerHeight) {\n\t\t\t\tvar style = window.getComputedStyle(item, null),\n\t\t\t\t\tmarginHeight = self.marginHeight || parseInt(style.marginBottom.replace(/[^\\d\\.]/g, ''), 10),\n\t\t\t\t\titemHeight = Math.floor(containerHeight / itemsCount);\n\n\t\t\t\tmarginHeight = self.marginHeight || marginHeight + 2 * parseInt(style.borderBottomWidth.replace(/[^\\d\\.]/g, ''), 10);\n\n\t\t\t\tself.marginHeight = marginHeight;\n\t\t\t\titemHeight -= marginHeight;\n\n\t\t\t\treturn itemHeight;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false},{"type":"param","types":"string","name":"indexChar","description":"","isOptional":false},{"type":"param","types":"Array","name":"map","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"matchToDivider","tags":[{"type":"method","string":"matchToDivider"},{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false},{"type":"param","types":"string","name":"indexChar","description":"","isOptional":false},{"type":"param","types":"Array","name":"map","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Match char to divider</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function matchToDivider(divider, indexChar, map) {\n\t\t\t\tif (indexChar === divider.innerText) {\n\t\t\t\t\tmap[indexChar] = divider;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false},{"type":"param","types":"string","name":"primaryCharacterSet","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{string}"},"name":"makeCharacterSet","tags":[{"type":"method","string":"makeCharacterSet"},{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false},{"type":"param","types":"string","name":"primaryCharacterSet","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{string}"},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Creates character set for divider</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function makeCharacterSet(divider, primaryCharacterSet) {\n\t\t\t\treturn primaryCharacterSet + divider.innerText;\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onPageshow","tags":[{"type":"method","string":"onPageshow"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Function called whane pageshow event on fastscroll parent is called</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onPageshow(self, event) {\n\t\t\t\tevent.target.removeEventListener('pageshow', self._onPageshowBound);\n\t\t\t\tself._refresh();\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onShortcutsListMouseOut","tags":[{"type":"method","string":"onShortcutsListMouseOut"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Function called on focus out on fast scroll item</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onShortcutsListMouseOut(self) {\n\t\t\t\tvar items,\n\t\t\t\t\titemsLength,\n\t\t\t\t\ti,\n\t\t\t\t\tui = self._ui;\n\n\t\t\t\tui._popup.style.display = \"none\";\n\n\t\t\t\titems = document.getElementsByClassName(listviewClasses.uiFastscrollHover);\n\t\t\t\titemsLength = items.length;\n\t\t\t\tfor (i = 0; i < itemsLength; i++) {\n\t\t\t\t\titems[0].classList.remove(listviewClasses.uiFastscrollHover);\n\t\t\t\t}\n\n\t\t\t\titems = document.getElementsByClassName(listviewClasses.uiFastscrollHoverDown);\n\t\t\t\titemsLength = items.length;\n\t\t\t\tfor (i = 0; i < itemsLength; i++) {\n\t\t\t\t\titems[i].classList.remove(listviewClasses.uiFastscrollHoverDown);\n\t\t\t\t}\n\n\t\t\t\titems = document.getElementsByClassName(listviewClasses.uiFastscrollHoverFirstItem);\n\t\t\t\titemsLength = items.length;\n\t\t\t\tfor (i = 0; i < itemsLength; i++) {\n\t\t\t\t\titems[i].classList.remove(listviewClasses.uiFastscrollHoverFirstItem);\n\t\t\t\t}\n\n\t\t\t\tui._shortcutsContainer.classList.remove(listviewClasses.uiFastscrollHover);\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onShortcutsListMouseOver","tags":[{"type":"method","string":"onShortcutsListMouseOver"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Function called on focus in on fast scroll item</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onShortcutsListMouseOver(self, event) {\n\t\t\t\tvar coords = {\n\t\t\t\t\t\tx: event.pageX,\n\t\t\t\t\t\ty: event.pageY\n\t\t\t\t\t},\n\t\t\t\t\tui = self._ui,\n\t\t\t\t\tshortcutsList = ui._shortcutsList,\n\t\t\t\t\tshortcutsListOffset = {\n\t\t\t\t\t\tleft: shortcutsList.offsetLeft,\n\t\t\t\t\t\ttop: shortcutsList.offsetTop\n\t\t\t\t\t},\n\t\t\t\t\ttarget = event.target,\n\t\t\t\t\tshortcutsListItems,\n\t\t\t\t\tshortcutsListItemsLength,\n\t\t\t\t\ti,\n\t\t\t\t\tj,\n\t\t\t\t\tleft,\n\t\t\t\t\ttop,\n\t\t\t\t\tright,\n\t\t\t\t\tbottom,\n\t\t\t\t\tunit,\n\t\t\t\t\tbaseTop,\n\t\t\t\t\tbaseBottom,\n\t\t\t\t\tomitSet,\n\t\t\t\t\tlistItem,\n\t\t\t\t\tomitSetLength,\n\t\t\t\t\ttagName = target.tagName.toLowerCase();\n\n\t\t\t\tui._shortcutsContainer.classList.add(listviewClasses.uiFastscrollHover);\n\n\t\t\t\t// If the element is a list item, get coordinates relative to the shortcuts list\n\t\t\t\tif (tagName === \"li\") {\n\t\t\t\t\tcoords.x += target.offsetLeft - shortcutsListOffset.left;\n\t\t\t\t\tcoords.y += target.offsetTop  - shortcutsListOffset.top;\n\t\t\t\t}\n\n\t\t\t\tif (tagName === \"span\") {\n\t\t\t\t\tcoords.x += target.parentElement.offsetLeft - shortcutsListOffset.left;\n\t\t\t\t\tcoords.y += target.parentElement.offsetTop  - shortcutsListOffset.top;\n\t\t\t\t}\n\n\t\t\t\tshortcutsListItems = shortcutsList.getElementsByTagName('li');\n\t\t\t\tshortcutsListItemsLength = shortcutsListItems.length;\n\t\t\t\tfor (i = 0; i < shortcutsListItemsLength; i++) {\n\t\t\t\t\tlistItem = shortcutsListItems[i];\n\t\t\t\t\tlistItem.classList.remove(listviewClasses.uiFastscrollHover);\n\t\t\t\t\tlistItem.classList.remove(listviewClasses.uiFastscrollHoverDown);\n\n\t\t\t\t\tleft = listItem.offsetLeft - shortcutsListOffset.left;\n\t\t\t\t\ttop = listItem.offsetTop  - shortcutsListOffset.top;\n\t\t\t\t\tright = left + Math.abs(listItem.offsetWidth);\n\t\t\t\t\tbottom = top + Math.abs(listItem.offsetHeight);\n\n\t\t\t\t\tif (coords.x >= left && coords.x <= right && coords.y >= top && coords.y <= bottom) {\n\t\t\t\t\t\tif (listItem.innerText === \".\") {\n\t\t\t\t\t\t\tomitSet = DOMUtils.getNSData(listItem, \"omitSet\");\n\t\t\t\t\t\t\tomitSetLength = omitSet.length;\n\t\t\t\t\t\t\tunit = (bottom - top) / omitSetLength;\n\t\t\t\t\t\t\tfor (j = 0; j < omitSetLength; j++) {\n\t\t\t\t\t\t\t\tbaseTop = top + (j * unit);\n\t\t\t\t\t\t\t\tbaseBottom = baseTop + unit;\n\t\t\t\t\t\t\t\tif (coords.y >= baseTop && coords.y <= baseBottom) {\n\t\t\t\t\t\t\t\t\tself._hitOmitItem(listItem, omitSet.charAt(i));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._hitItem(listItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Refresh fastscroll list items - recout of fastscroll height, recout of fastscroll item height,<br />refresh short cuts list.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function refresh(self) {\n\t\t\t\tvar element = self.element,\n\t\t\t\t\tui = self._ui,\n\t\t\t\t\tscrollViewClip = selectors.getClosestByClass(\n\t\t\t\t\t\telement,\n\t\t\t\t\t\tTabbar.classes.uiScrollviewClip\n\t\t\t\t\t),\n\t\t\t\t\tcontentHeight = DOMUtils.getElementHeight(scrollViewClip),\n\t\t\t\t\tprimaryCharacterSet = null,\n\t\t\t\t\tsecondCharacterSet = null,\n\t\t\t\t\tpopup = ui._popup,\n\t\t\t\t\tshortcutsList = ui._shortcutsList,\n\t\t\t\t\tshapItem,\n\t\t\t\t\tshapItemSpan1,\n\t\t\t\t\tshapItemSpan2,\n\t\t\t\t\tomitIndex = 0,\n\t\t\t\t\tcontainerHeight,\n\t\t\t\t\tshortcutsItems,\n\t\t\t\t\tshortcutItem,\n\t\t\t\t\tshortcutsTop,\n\t\t\t\t\tmaxNumOfItems,\n\t\t\t\t\tnumOfItems,\n\t\t\t\t\tminHeight,\n\t\t\t\t\tomitInfo,\n\t\t\t\t\tdividers,\n\t\t\t\t\tlistItems,\n\t\t\t\t\temptySize,\n\t\t\t\t\tindexChar,\n\t\t\t\t\tlastIndex,\n\t\t\t\t\tseconds,\n\t\t\t\t\ti,\n\t\t\t\t\tlistItemsLength,\n\t\t\t\t\tdividersLength,\n\t\t\t\t\tsecondsLength,\n\t\t\t\t\tshortcutsItemsLength,\n\t\t\t\t\tstyles,\n\t\t\t\t\titem,\n\t\t\t\t\theaders,\n\t\t\t\t\tshortcutsContainer,\n\t\t\t\t\theadersLength,\n\t\t\t\t\tdividerClass = ns.widget.mobile.Listdivider.classes.uiLiDivider,\n\t\t\t\t\titemHeight,\n\t\t\t\t\tmaxHeight,\n\t\t\t\t\tprimaryCharacterSetLength;\n\n\t\t\t\tif ('function' === typeof parent_refresh) {\n\t\t\t\t\tparent_refresh.call(self);\n\t\t\t\t}\n\t\t\t\tif (true !== self.options.fastscroll) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (shortcutsList) {\n\t\t\t\t\tself._createDividerMap();\n\t\t\t\t\tDOMUtils.removeAllChildren(shortcutsList);\n\n\t\t\t\t\tdividers = element.getElementsByClassName(dividerClass);\n\t\t\t\t\tlistItems = selectors.getChildrenBySelector(element, 'li:not(.' + dividerClass + ')');\n\n\t\t\t\t\tlistItemsLength = listItems.length;\n\n\t\t\t\t\tshortcutsList.style.display = \"block\";\n\t\t\t\t\tui._lastListItem = listItemsLength > 0 ? listItems[listItemsLength - 1] : null;\n\n\t\t\t\t\tshapItem = document.createElement('li');\n\t\t\t\t\tshapItem.setAttribute('aria-label', 'double to move Number list');\n\t\t\t\t\tshapItem.tabIndex = 0;\n\t\t\t\t\tshapItemSpan1 = document.createElement('span');\n\t\t\t\t\tshapItemSpan1.setAttribute('aria-hidden', 'true');\n\t\t\t\t\tshapItemSpan1.innerText = \"#\";\n\t\t\t\t\tshapItem.appendChild(shapItemSpan1);\n\t\t\t\t\tshapItemSpan2 = document.createElement('span');\n\t\t\t\t\tshapItemSpan2.setAttribute('aria-label', 'Number');\n\t\t\t\t\tshapItem.appendChild(shapItemSpan2);\n\n\t\t\t\t\tshortcutsList.appendChild(shapItem);\n\t\t\t\t\tself._focusItem(shapItem);\n\n\t\t\t\t\tdividersLength = dividers.length;\n\n\t\t\t\t\tif (primaryCharacterSet === null) {\n\t\t\t\t\t\tprimaryCharacterSet = \"\";\n\t\t\t\t\t\tfor (i = 0; i < dividersLength; i++) {\n\t\t\t\t\t\t\tprimaryCharacterSet = makeCharacterSet(dividers[i], primaryCharacterSet);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tminHeight = shapItem.offsetHeight;\n\t\t\t\t\tmaxNumOfItems = parseInt(contentHeight / minHeight - 1, 10);\n\t\t\t\t\tnumOfItems = primaryCharacterSet.length;\n\n\t\t\t\t\tmaxNumOfItems = secondCharacterSet ? maxNumOfItems - 2 : maxNumOfItems;\n\n\t\t\t\t\tif (maxNumOfItems < 3) {\n\t\t\t\t\t\tif (shapItem.parentElement) {\n\t\t\t\t\t\t\tshapItem.parentElement.removeChild(shapItem);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tomitInfo = self._omit(numOfItems, maxNumOfItems);\n\n\t\t\t\t\tfor (i = 0, primaryCharacterSetLength = primaryCharacterSet.length; i < primaryCharacterSetLength; i++) {\n\t\t\t\t\t\tindexChar = primaryCharacterSet.charAt(i);\n\t\t\t\t\t\tshortcutItem = document.createElement('li');\n\t\t\t\t\t\tshortcutItem.setAttribute('aria-label', 'double to move ' + indexChar + ' list');\n\t\t\t\t\t\tshortcutItem.setAttribute('tabindex', 0);\n\t\t\t\t\t\tshortcutItem.innerText = indexChar;\n\n\t\t\t\t\t\tself._focusItem(shortcutItem);\n\n\t\t\t\t\t\tif (omitInfo && omitInfo[omitIndex] > 1) {\n\t\t\t\t\t\t\tshortcutItem = document.createElement('li');\n\t\t\t\t\t\t\tshortcutItem.innerText = '.';\n\t\t\t\t\t\t\tDOMUtils.setNSData(shortcutItem, 'omitSet', self._makeOmitSet(i, omitInfo[omitIndex], primaryCharacterSet));\n\t\t\t\t\t\t\ti += omitInfo[omitIndex] - 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tshortcutsList.appendChild(shortcutItem);\n\t\t\t\t\t\tomitIndex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (secondCharacterSet !== null) {\n\t\t\t\t\t\tlastIndex = secondCharacterSet.length - 1;\n\t\t\t\t\t\tseconds = [];\n\n\t\t\t\t\t\tseconds.push(secondCharacterSet.charAt(0));\n\t\t\t\t\t\tseconds.push(secondCharacterSet.charAt(lastIndex));\n\n\t\t\t\t\t\tfor (i = 0, secondsLength = seconds.length; i < secondsLength; i++) {\n\t\t\t\t\t\t\tindexChar = seconds[i];\n\t\t\t\t\t\t\tshortcutItem = document.createElement('li');\n\t\t\t\t\t\t\tshortcutItem.tabIndex = 0;\n\t\t\t\t\t\t\tshortcutItem.setAttribute(\"aria-label\", 'double to move ' + indexChar + ' list');\n\t\t\t\t\t\t\tshortcutItem.innerText = indexChar;\n\n\t\t\t\t\t\t\tself._focusItem(shortcutItem);\n\t\t\t\t\t\t\tshortcutsList.append(shortcutItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tshortcutsContainer = ui._shortcutsContainer;\n\t\t\t\t\tmaxHeight = contentHeight - element.offsetTop;\n\t\t\t\t\tshortcutsContainer.style.maxHeight = maxHeight + \"px\";\n\n\t\t\t\t\tcontainerHeight = shortcutsContainer.offsetHeight;\n\t\t\t\t\temptySize = contentHeight - containerHeight;\n\t\t\t\t\tshortcutsItems = shortcutsList.children;\n\t\t\t\t\tshortcutsItemsLength = shortcutsItems.length;\n\t\t\t\t\tshortcutsTop = (dividersLength > 0) ? dividers[0].offsetTop : 0;\n\n\t\t\t\t\tif (emptySize > 0) {\n\t\t\t\t\t\tif (shortcutsItemsLength > 0) {\n\t\t\t\t\t\t\titem = shortcutsItems[0];\n\t\t\t\t\t\t\titemHeight = getMaxFastscrollItemHeight(self, item, shortcutsItemsLength, maxHeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (i = 0; i < shortcutsItemsLength; i++) {\n\t\t\t\t\t\t\titem = shortcutsItems[i];\n\t\t\t\t\t\t\tstyles = item.style;\n\t\t\t\t\t\t\tstyles.height = itemHeight + 'px';\n\t\t\t\t\t\t\tstyles.lineHeight =  styles.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\theaders = shortcutsContainer.parentNode.getElementsByClassName(ns.widget.mobile.Tabbar.classes.uiHeader);\n\n\t\t\t\t\tfor (i = 0, headersLength = headers.length; i < headersLength; i++) {\n\t\t\t\t\t\tshortcutsTop += headers[i].offsetHeight;\n\t\t\t\t\t}\n\n\t\t\t\t\tshortcutsTop += (maxHeight - shortcutsContainer.offsetHeight) / 2;\n\n\t\t\t\t\tui._shortcutsContainer.style.top = shortcutsTop + 'px';\n\n\t\t\t\t\tpopup.innerText = \"M\";\n\t\t\t\t\tpopup.style.width = popup.offsetHeight + 'px';\n\t\t\t\t\tpopup.style.marginLeft = -(popup.offsetWidth / 2);\n\t\t\t\t\tpopup.style.marginTop = -(popup.offsetHeight / 2);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onListItemVMouseDown","tags":[{"type":"method","string":"onListItemVMouseDown"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Function called on mouse down on short cut</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onListItemVMouseDown(self, event) {\n\t\t\t\tself._ui._shortcutsList.setAttribute(\"aria-hidden\", false);\n\t\t\t\tself._hitItem(event.target);\n\t\t\t}"},{"params":[{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onListItemVMouseUp","tags":[{"type":"method","string":"onListItemVMouseUp"},{"type":"param","types":"ns.widget.mobile.Listview.Fastscroll","name":"self","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Function called on mouse up on short cut</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onListItemVMouseUp(self) {\n\t\t\t\tvar i,\n\t\t\t\t\tlength,\n\t\t\t\t\telements,\n\t\t\t\t\tui = self._ui;\n\n\t\t\t\tui._shortcutsList.setAttribute(\"aria-hidden\", true);\n\t\t\t\tui._popup.style.display = \"none\";\n\n\t\t\t\telements = document.getElementsByClassName(listviewClasses.uiFastscrollHover);\n\t\t\t\tlength = elements.length;\n\t\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\t\telements[0].classList.remove(listviewClasses.uiFastscrollHover);\n\t\t\t\t}\n\n\t\t\t\telements = document.getElementsByClassName(listviewClasses.uiFastscrollHoverFirstItem);\n\t\t\t\tlength = elements.length;\n\t\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\t\telements[0].classList.remove(listviewClasses.uiFastscrollHoverFirstItem);\n\t\t\t\t}\n\n\t\t\t\telements = document.getElementsByClassName(listviewClasses.uiFastscrollHoverDown);\n\t\t\t\tlength = elements.length;\n\t\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\t\telements[0].classList.remove(listviewClasses.uiFastscrollHoverDown);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tListview.classes = Listview.classes || {};\n\n\t\t\tlistviewClasses = Listview.classes;\n\t\t\tlistviewClasses.uiFastscroll = \"ui-fastscroll\";\n\t\t\tlistviewClasses.uiFastscrollTarget = \"ui-fastscroll-target\";\n\t\t\tlistviewClasses.uiFastscrollPopup = \"ui-fastscroll-popup\";\n\t\t\tlistviewClasses.uiScrollbar = \"ui-scrollbar\";\n\t\t\tlistviewClasses.uiFastscrollHover = \"ui-fastscroll-hover\";\n\t\t\tlistviewClasses.uiFastscrollHoverFirstItem = \"ui-fastscroll-hover-first-item\";\n\t\t\tlistviewClasses.uiFastscrollHoverDown = \"ui-fastscroll-hover-down\";"},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"protected","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Prepare default configuration of fastscroll widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._configure = function () {\n\t\t\t\tif (typeof parent_configure === 'function') {\n\t\t\t\t\tparent_configure.call(this);\n\t\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"HTML element with fasctscroll enabled","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{HTMLElement}"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"HTML element with fasctscroll enabled","isOptional":false,"isLast":true},{"type":"returns","string":"{HTMLElement}"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Builds fasctroll</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._build = function (element) {\n\t\t\t\tvar scrollView,\n\t\t\t\t\tshortcutsContainer,\n\t\t\t\t\tshortcutsList,\n\t\t\t\t\tfastscrollPopup,\n\t\t\t\t\tlastListItem,\n\t\t\t\t\telementChildrens,\n\t\t\t\t\telementChildrensLength,\n\t\t\t\t\tscrollBars = [],\n\t\t\t\t\ti,\n\t\t\t\t\tui,\n\t\t\t\t\tscrollviewParent,\n\t\t\t\t\tscrollBarsLength,\n\t\t\t\t\tid = this.id;\n\n\t\t\t\tparent_build.call(this, element);\n\n\t\t\t\tif (this.options.fastscroll === true) {\n\t\t\t\t\t//FIXME Why class uiScrollviewClip is in Tabbar not in Scrollview?\n\t\t\t\t\tscrollView = selectors.getClosestByClass(element, Tabbar.classes.uiScrollviewClip);\n\t\t\t\t\tif (scrollView) {\n\t\t\t\t\t\tshortcutsContainer = document.createElement(\"div\");\n\t\t\t\t\t\tshortcutsContainer.classList.add(listviewClasses.uiFastscroll);\n\t\t\t\t\t\tshortcutsContainer.setAttribute(\"aria-label\", \"Fast scroll bar, double tap to fast scroll mode\");\n\t\t\t\t\t\tshortcutsContainer.setAttribute('tabindex', 0);\n\t\t\t\t\t\tshortcutsContainer.setAttribute('id', id + '-shortcutscontainer');\n\t\t\t\t\t\tshortcutsContainer.style.maxHeight = scrollView.offsetHeight + \"px\";\n\t\n\t\t\t\t\t\tshortcutsList = document.createElement(\"ul\");\n\t\t\t\t\t\tshortcutsList.setAttribute(\"aria-hidden\", \"true\");\n\t\t\t\t\t\tshortcutsList.setAttribute('id', id + '-shortcutslist');\n\t\n\t\t\t\t\t\tfastscrollPopup = document.createElement(\"div\");\n\t\t\t\t\t\tfastscrollPopup.classList.add(listviewClasses.uiFastscrollPopup);\n\t\t\t\t\t\tfastscrollPopup.setAttribute('id', id + '-fastscrollpopup');\n\t\n\t\t\t\t\t\tshortcutsContainer.appendChild(shortcutsList);\n\t\n\t\t\t\t\t\tscrollviewParent = scrollView.parentNode;\n\t\t\t\t\t\tscrollviewParent.appendChild(shortcutsContainer);\n\t\t\t\t\t\tscrollviewParent.appendChild(fastscrollPopup);\n\t\n\t\t\t\t\t\telementChildrens = element.children;\n\t\t\t\t\t\telementChildrensLength = elementChildrens.length;\n\t\n\t\t\t\t\t\tif (elementChildrensLength > 0) {\n\t\t\t\t\t\t\tlastListItem = elementChildrens[elementChildrensLength - 1];\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tscrollBars = scrollView.getElementsByClassName(listviewClasses.uiScrollbar);\n\t\t\t\t\t\tfor (i = 0, scrollBarsLength = scrollBars.length; i < scrollBarsLength; i++) {\n\t\t\t\t\t\t\tscrollBars[i].style.display = \"none\";\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tthis._ui = this._ui || {};\n\t\t\t\t\t\tui = this._ui;\n\t\n\t\t\t\t\t\tui._scrollView = scrollView;\n\t\t\t\t\t\tui._shortcutsContainer = shortcutsContainer;\n\t\t\t\t\t\tui._shortcutsList = shortcutsList;\n\t\t\t\t\t\tui._lastListItem = lastListItem;\n\t\t\t\t\t\tui._popup = fastscrollPopup;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Initialize fastscroll widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._init = function (element) {\n\t\t\t\tvar ui,\n\t\t\t\t\telementChildrens,\n\t\t\t\t\telementChildrensLength,\n\t\t\t\t\tid = this.id;\n\t\t\t\tif (typeof parent_init === 'function') {\n\t\t\t\t\tparent_init.call(this, element);\n\t\t\t\t}\n\n\t\t\t\tif (this.options.fastscroll) {\n\t\t\t\t\tthis._ui = this._ui || {};\n\t\t\t\t\tui = this._ui;\n\t\n\t\t\t\t\tui._scrollView = selectors.getClosestByClass(element, Tabbar.classes.uiScrollviewClip);\n\t\t\t\t\tui._shortcutsContainer = document.getElementById(id + '-shortcutscontainer');\n\t\t\t\t\tui._shortcutsList = document.getElementById(id + '-shortcutslist');\n\t\t\t\t\tui._popup = document.getElementById(id + '-fastscrollpopup');\n\t\n\t\t\t\t\telementChildrens = element.children;\n\t\t\t\t\telementChildrensLength = elementChildrens.length;\n\t\n\t\t\t\t\tif (elementChildrensLength > 0) {\n\t\t\t\t\t\tui._lastListItem = elementChildrens[elementChildrensLength - 1];\n\t\t\t\t\t}\n\t\n\t\t\t\t\telement.classList.add(listviewClasses.uiFastscrollTarget);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Binds fastscroll widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._bindEvents = function (element) {\n\t\t\t\tvar pageParent = selectors.getParentsByClass(element, Page.classes.uiPage)[0],\n\t\t\t\t\tshortcutsList = this._ui._shortcutsList;\n\n\t\t\t\tthis._uiPageParent = pageParent;\n\n\t\t\t\tif (typeof parent_bindEvents === 'function') {\n\t\t\t\t\tparent_bindEvents.call(this, element);\n\t\t\t\t}\n\n\t\t\t\tif (this.options.fastscroll !== true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._onPageshowBound = onPageshow.bind(null, this);\n\t\t\t\tthis._onRefreshBound = refresh.bind(null, this);\n\t\t\t\tthis._onShortcutsListMouseOverBound = onShortcutsListMouseOver.bind(null, this);\n\t\t\t\tthis._onShortcutsListMouseOutBound = onShortcutsListMouseOut.bind(null, this);\n\n\t\t\t\tif (pageParent) {\n\t\t\t\t\tpageParent.addEventListener('pageshow', this._onPageshowBound, true);\n\t\t\t\t}\n\n\t\t\t\telement.addEventListener('updatelayout', this._onRefreshBound, false);\n\t\t\t\twindow.addEventListener('resize', this._onRefreshBound, false);\n\t\t\t\twindow.addEventListener('orientationchange', this._onRefreshBound, false);\n\n\t\t\t\tif (shortcutsList) {\n\t\t\t\t\tshortcutsList.addEventListener('vmousedown', this._onShortcutsListMouseOverBound, false);\n\t\t\t\t\tshortcutsList.addEventListener('vmousemove', this._onShortcutsListMouseOverBound, false);\n\t\t\t\t\tshortcutsList.addEventListener('vmouseover', this._onShortcutsListMouseOverBound, false);\n\t\n\t\t\t\t\tshortcutsList.addEventListener('vmouseup', this._onShortcutsListMouseOutBound, false);\n\t\t\t\t\tshortcutsList.addEventListener('vmouseout', this._onShortcutsListMouseOutBound, false);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Unbinds fastscroll widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tpageParent = this._uiPageParent,\n\t\t\t\t\tshortcutsList = this._ui._shortcutsList,\n\t\t\t\t\tshortcutsListItems,\n\t\t\t\t\tlistItem,\n\t\t\t\t\tshortcutsListItemsLength,\n\t\t\t\t\ti;\n\t\t\t\tif (typeof parent_destroy === 'function') {\n\t\t\t\t\tparent_destroy.call(this);\n\t\t\t\t}\n\n\t\t\t\tif (pageParent) {\n\t\t\t\t\tpageParent.removeEventListener('pageshow', this._onPageshowBound);\n\t\t\t\t}\n\n\t\t\t\telement.removeEventListener('updatelayout', this._onRefreshBound);\n\t\t\t\twindow.removeEventListener('resize', this._onRefreshBound);\n\t\t\t\twindow.removeEventListener('orientationchange', this._onRefreshBound);\n\n\t\t\t\tif (shortcutsList) {\n\t\t\t\t\tshortcutsList.removeEventListener('vmousedown', this._onShortcutsListMouseOverBound);\n\t\t\t\t\tshortcutsList.removeEventListener('vmousemove', this._onShortcutsListMouseOverBound);\n\t\t\t\t\tshortcutsList.removeEventListener('vmouseover', this._onShortcutsListMouseOverBound);\n\n\t\t\t\t\tshortcutsList.removeEventListener('vmouseup', this._onShortcutsListMouseOutBound);\n\t\t\t\t\tshortcutsList.removeEventListener('vmouseout', this._onShortcutsListMouseOutBound);\n\n\t\t\t\t\tshortcutsListItems = shortcutsList.getElementsByTagName('li');\n\n\t\t\t\t\tfor (i = 0, shortcutsListItemsLength = shortcutsListItems.length; i < shortcutsListItemsLength; i++) {\n\t\t\t\t\t\tlistItem = shortcutsListItems[i];\n\t\t\t\t\t\tlistItem.removeEventListener('vmousedown', this._onListItemVMouseDownBound);\n\t\t\t\t\t\tlistItem.removeEventListener('vmouseup', this._onListItemVMouseUpBound);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tevents.trigger(element, 'destroyed', {\n\t\t\t\t\twidget: \"Fastscroll\",\n\t\t\t\t\tparent: pageParent\n\t\t\t\t});\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_createDividerMap","tags":[{"type":"method","string":"_createDividerMap"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Creates map of deviders</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._createDividerMap = function () {\n\t\t\t\tvar primaryCharacterSet = null,\n\t\t\t\t\tsecondCharacterSet = null,\n\t\t\t\t\tnumberSet = \"0123456789\",\n\t\t\t\t\tdividers = this.element.getElementsByClassName(ns.widget.mobile.Listdivider.classes.uiLiDivider),\n\t\t\t\t\tmap = {},\n\t\t\t\t\tindexChar,\n\t\t\t\t\ti,\n\t\t\t\t\tj,\n\t\t\t\t\tlength,\n\t\t\t\t\tdividersLength = dividers.length;\n\n\t\t\t\tif (primaryCharacterSet === null) {\n\t\t\t\t\tprimaryCharacterSet = \"\";\n\t\t\t\t\tfor (i = 0; i < dividersLength; i++) {\n\t\t\t\t\t\tprimaryCharacterSet = makeCharacterSet(dividers[i], primaryCharacterSet);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0, length = primaryCharacterSet.length; i < length; i++) {\n\t\t\t\t\tindexChar = primaryCharacterSet.charAt(i);\n\t\t\t\t\tfor (j = 0; j < dividersLength; j++) {\n\t\t\t\t\t\tmatchToDivider(dividers[j], indexChar, map);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (secondCharacterSet !== null) {\n\t\t\t\t\tfor (i = 0, length = secondCharacterSet.length; i < length; i++) {\n\t\t\t\t\t\tindexChar = secondCharacterSet.charAt(i);\n\t\t\t\t\t\tfor (j = 0; j < dividersLength; j++) {\n\t\t\t\t\t\t\tmatchToDivider(dividers[j], indexChar, map);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < dividersLength; i++) {\n\t\t\t\t\tif (numberSet.search(dividers[i].innerText) !== -1) {\n\t\t\t\t\t\tmap.number = dividers[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._dividerMap = map;\n\t\t\t\tthis._charSet = primaryCharacterSet + secondCharacterSet;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"targetChar","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_findClosestDivider","tags":[{"type":"method","string":"_findClosestDivider"},{"type":"param","types":"string","name":"targetChar","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Finds closes divider</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._findClosestDivider = function (targetChar) {\n\t\t\t\tvar i,\n\t\t\t\t\tdividerMap = this._dividerMap,\n\t\t\t\t\tcharSet = this._charSet,\n\t\t\t\t\tcharSetLen = charSet.length,\n\t\t\t\t\ttargetIdx = charSet.indexOf(targetChar),\n\t\t\t\t\tlastDivider,\n\t\t\t\t\tsubDivider = null;\n\n\t\t\t\tfor (i = 0; i < targetIdx; ++i) {\n\t\t\t\t\tlastDivider = dividerMap[charSet.charAt(i)];\n\t\t\t\t\tif (lastDivider !== undefined) {\n\t\t\t\t\t\tsubDivider = lastDivider;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!subDivider) {\n\t\t\t\t\tfor (++i; i < charSetLen; ++i) {\n\t\t\t\t\t\tlastDivider = dividerMap[charSet.charAt(i)];\n\t\t\t\t\t\tif (lastDivider !== undefined) {\n\t\t\t\t\t\t\tsubDivider = lastDivider;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn subDivider;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"jumpToDivider","tags":[{"type":"method","string":"jumpToDivider"},{"type":"param","types":"HTMLElement","name":"divider","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Scroll listview to asked divider</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype.jumpToDivider = function (divider) {\n\t\t\t\tvar dividerY = divider.offsetTop,\n\t\t\t\t\tui = this._ui,\n\t\t\t\t\tlastListItem = ui._lastListItem,\n\t\t\t\t\tbottomOffset = lastListItem.offsetHeight + lastListItem.offsetTop,\n\t\t\t\t\tscrollviewHeight = ui._scrollView.offsetHeight,\n\t\t\t\t\tmaxScroll = bottomOffset - scrollviewHeight,\n\t\t\t\t\tscrollViewBinding = engine.getBinding(ui._scrollView);\n\n\t\t\t\tdividerY = (dividerY > maxScroll ? maxScroll : dividerY);\n\n\t\t\t\tdividerY = Math.max(dividerY, 0);\n\n\t\t\t\tscrollViewBinding.scrollTo(0, dividerY, scrollViewBinding.scrollDuration);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"listItem","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_hitItem","tags":[{"type":"method","string":"_hitItem"},{"type":"param","types":"HTMLElement","name":"listItem","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>On fastscroll item pressed</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._hitItem = function (listItem) {\n\t\t\t\tvar popup = this._ui._popup,\n\t\t\t\t\ttext = listItem.innerText,\n\t\t\t\t\tdivider,\n\t\t\t\t\tlistItemClassList = listItem.classList,\n\t\t\t\t\tnextElement = listItem.nextElementSibling,\n\t\t\t\t\tpopupStyles = popup.style;\n\n\n\t\t\t\tif (text === \"#\") {\n\t\t\t\t\tdivider = this._dividerMap.number;\n\t\t\t\t} else {\n\t\t\t\t\tdivider = this._dividerMap[text] || this._findClosestDivider(text);\n\t\t\t\t}\n\n\t\t\t\tif (divider) {\n\t\t\t\t\tthis.jumpToDivider(divider);\n\t\t\t\t}\n\n\t\t\t\tpopup.innerText = text;\n\t\t\t\tpopupStyles.display = \"block\";\n\t\t\t\tpopupStyles.width = popup.offsetHeight + 'px';\n\t\t\t\tpopupStyles.marginLeft = -(popup.offsetWidth / 2);\n\t\t\t\tpopupStyles.marginTop = -(popup.offsetHeight / 2);\n\n\t\t\t\tlistItemClassList.add(listviewClasses.uiFastscrollHover);\n\t\t\t\tif (listItem.previousElementSibling) {\n\t\t\t\t\tlistItemClassList.add(listviewClasses.uiFastscrollHoverFirstItem);\n\t\t\t\t}\n\t\t\t\tif (nextElement) {\n\t\t\t\t\tnextElement.classList.add(listviewClasses.uiFastscrollHoverDown);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"listItem","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_focusItem","tags":[{"type":"method","string":"_focusItem"},{"type":"param","types":"HTMLElement","name":"listItem","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Add focus to shortcut item</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._focusItem = function (listItem) {\n\t\t\t\tthis._onListItemVMouseDownBound = this._onListItemVMouseDownBound || onListItemVMouseDown.bind(null, this);\n\t\t\t\tthis._onListItemVMouseUpBound = this._onListItemVMouseUpBound || onListItemVMouseUp.bind(null, this);\n\t\t\t\tlistItem.addEventListener('vmouseover', this._onListItemVMouseDownBound, false);\n\t\t\t\tlistItem.addEventListener('vmouseout', this._onListItemVMouseUpBound, false);\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"numOfItems","description":"","isOptional":false},{"type":"param","types":"number","name":"maxNumOfItems","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{?Array}"},"name":"_omit","tags":[{"type":"method","string":"_omit"},{"type":"param","types":"number","name":"numOfItems","description":"","isOptional":false},{"type":"param","types":"number","name":"maxNumOfItems","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{?Array}"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>If max number of items is greater then 3 returns array with cout of omited items.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._omit = function (numOfItems, maxNumOfItems) {\n\t\t\t\tvar maxGroupNum = parseInt((maxNumOfItems - 1) / 2, 10),\n\t\t\t\t\tnumOfExtraItems = numOfItems - maxNumOfItems,\n\t\t\t\t\tgroupPos = [],\n\t\t\t\t\tomitInfo = [],\n\t\t\t\t\tgroupPosLength,\n\t\t\t\t\tgroup,\n\t\t\t\t\tsize,\n\t\t\t\t\ti;\n\n\t\t\t\tif ((maxNumOfItems < 3) || (numOfItems <= maxNumOfItems)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif (numOfExtraItems >= maxGroupNum) {\n\t\t\t\t\tsize = 2;\n\t\t\t\t\tgroup = 1;\n\t\t\t\t\tgroupPosLength = maxGroupNum;\n\t\t\t\t} else {\n\t\t\t\t\tsize = maxNumOfItems / (numOfExtraItems + 1);\n\t\t\t\t\tgroup = size;\n\t\t\t\t\tgroupPosLength = numOfExtraItems;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < groupPosLength; i++) {\n\t\t\t\t\tgroupPos.push(parseInt(group, 10));\n\t\t\t\t\tgroup += size;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < maxNumOfItems; i++) {\n\t\t\t\t\tomitInfo.push(1);\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < numOfExtraItems; i++) {\n\t\t\t\t\tomitInfo[groupPos[i % maxGroupNum]]++;\n\t\t\t\t}\n\n\t\t\t\treturn omitInfo;\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"index","description":"","isOptional":false},{"type":"param","types":"number","name":"length","description":"","isOptional":false},{"type":"param","types":"string","name":"primaryCharacterSet","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{string}"},"name":"_makeOmitSet","tags":[{"type":"method","string":"_makeOmitSet"},{"type":"param","types":"number","name":"index","description":"","isOptional":false},{"type":"param","types":"number","name":"length","description":"","isOptional":false},{"type":"param","types":"string","name":"primaryCharacterSet","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{string}"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"}],"example":"","brief":"<p>Creates string containing omited elements. Omits items starting from index.<br />Max number of omited elemets is given as length parameter</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._makeOmitSet = function (index, length, primaryCharacterSet) {\n\t\t\t\tvar count,\n\t\t\t\t\tomitSet = \"\";\n\n\t\t\t\tfor (count = 0; count < length; count++) {\n\t\t\t\t\tomitSet += primaryCharacterSet[index + count];\n\t\t\t\t}\n\n\t\t\t\treturn omitSet;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"indexAlphabet","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{?string}"},"name":"indexString","tags":[{"type":"method","string":"indexString"},{"type":"param","types":"string","name":"indexAlphabet","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.Listview.Fastscroll"},{"type":"returns","string":"{?string}"}],"example":"","brief":"<p>The indexString method is used to get (if no value is defined) or set the string to present the index.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Listview.prototype.indexString = function (indexAlphabet) {\n\t\t\t\tvar characterSet;\n\n\t\t\t\tif (undefined === indexAlphabet) {\n\t\t\t\t\treturn this._primaryLanguage + \":\" + this._secondLanguage;\n\t\t\t\t}\n\n\t\t\t\tcharacterSet = indexAlphabet.split(\":\");\n\t\t\t\tthis._primaryLanguage = characterSet[0];\n\t\t\t\tif (2 === characterSet.length) {\n\t\t\t\t\tthis._secondLanguage = characterSet[1];\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Fastscroll = Listview;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Fastscroll\",\n\t\t\t\t\"[data-role='listview'][data-fastscroll='true'], .ui-fastscroll\",\n\t\t\t\t[\"indexString\"],\n\t\t\t\tListview,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Fieldcontain","authors":[],"extends":"ns.widget.BaseWidget","title":"Field containers","brief":"Fieldcontain widget improves the styling of labels and form elements on wider screens. It aligns the input and associated label side-by-side and breaks to stacked block-level elements below ~480px. Moreover, it adds a thin bottom border to act as a field separator.","description":"<h2>Default selectors</h2>\n\n<p>In default all div or fieldset elements with <em>data-role=fieldcontain</em> are changed to fieldcontain widget.</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of fieldcontain widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar fieldcontain = ns.engine.instanceWidget(document.getElementById('fieldcontain'), 'Fieldcontain');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar fieldcontain = $('#fieldcontain').fieldcontain();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create fieldcontain</h3>\n\n<pre><code>@example\n&lt;div data-role=\"fieldcontain\"&gt;\n    &lt;label for=\"name\"&gt;Text Input:&lt;/label&gt;\n    &lt;input type=\"text\" name=\"name\" id=\"name\" value=\"\" /&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h2>Hiding labels accessibly</h2>\n\n<p>For the sake of accessibility, the framework requires that all form elements be paired with a meaningful label. To hide labels in a way that leaves them visible to assistive technologies — for example, when letting an element's placeholder attribute serve as a label — apply the helper class ui-hidden-accessible to the label itself:</p>\n\n<pre><code>@example\n&lt;label for=\"username\" class=\"ui-hidden-accessible\"&gt;Username:&lt;/label&gt;\n&lt;input type=\"text\" name=\"username\" id=\"username\" value=\"\" placeholder=\"Username\"/&gt;\n</code></pre>\n\n<p>To hide labels within a field container and adjust the layout accordingly, add the class ui-hide-label to the field container as in the following:</p>\n\n<pre><code>@example\n&lt;div data-role=\"fieldcontain\" class=\"ui-hide-label\"&gt;\n    &lt;label for=\"username\"&gt;Username:&lt;/label&gt;\n    &lt;input type=\"text\" name=\"username\" id=\"username\" value=\"\" placeholder=\"Username\"/&gt;\n&lt;/div&gt;\n</code></pre>\n\n<p>While the label will no longer be visible, it will be available to assisitive technologies such as screen readers.</p>\n\n<p>Because radio and checkbox buttons use the label to display the button text you can't use ui-hidden-accessible in this case. However, the class ui-hide-label can be used to hide the legend element:</p>\n\n<pre><code>@example\n&lt;div data-role=\"fieldcontain\" class=\"ui-hide-label\"&gt;\n    &lt;fieldset data-role=\"controlgroup\"&gt;\n        &lt;legend&gt;Agree to the terms:&lt;/legend&gt;\n        &lt;input type=\"checkbox\" name=\"checkbox-agree\" id=\"checkbox-agree\" class=\"custom\" /&gt;\n        &lt;label for=\"checkbox-agree\"&gt;I agree&lt;/label&gt;\n    &lt;/fieldset&gt;\n&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Fieldcontain","tags":[{"type":"method","string":"Fieldcontain"},{"type":"member","string":"ns.widget.Fieldcontain"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias for class ns.widget.Fieldcontain</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var Fieldcontain = function () {\n\t\t\t\t\treturn;\n\t\t\t\t},"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Fieldcontain"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of fieldcontain widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Fieldcontain.prototype._build = function (element) {\n\t\t\t\tvar childNodes = element.childNodes,\n\t\t\t\t\tclassList = element.classList,\n\t\t\t\t\ti = childNodes.length,\n\t\t\t\t\tchildNode,\n\t\t\t\t\tclasses = Fieldcontain.classes;\n\t\t\t\t// adding right classes\n\t\t\t\tclassList.add(classes.uiFieldContain);\n\t\t\t\tclassList.add(classes.uiBody);\n\t\t\t\tclassList.add(classes.uiBr);\n\t\t\t\t// removing whitespace between label and form element\n\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\tchildNode = childNodes[i];\n\t\t\t\t\tif (childNode.nodeType === 3 && !/\\S/.test(childNode.nodeValue)) {\n\t\t\t\t\t\telement.removeChild(childNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Fieldcontain = Fieldcontain;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Fieldcontain\",\n\t\t\t\t\"[data-role='fieldcontain'], .ui-fieldcontain\",\n\t\t\t\t[],\n\t\t\t\tFieldcontain,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.mobile.Controlgroup","authors":[],"extends":"ns.widget.BaseWidget","title":"Controlgroup widget","brief":"Controlgroup widget improves the styling of a group of buttons by grouping them to form a single block.","description":"<h2>Default selectors</h2>\n\n<p>In default all divs with <em>data-role=controlgroup</em> are changed to Controlgroup widget.</p>\n\n<h2>HTML Examples</h2>\n\n<h3>Create Controlgroup</h3>\n\n<pre><code>@example\n&lt;div data-role=\"controlgroup\"&gt;\n    &lt;a href=\"#\" data-role=\"button\"&gt;Yes&lt;/a&gt;\n    &lt;a href=\"#\" data-role=\"button\"&gt;No&lt;/a&gt;\n    &lt;a href=\"#\" data-role=\"button\"&gt;Cancel&lt;/a&gt;\n&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[{"types":"String","defaultValue":"'vertical'","tags":[{"type":"property","string":"{String} [options.type='vertical']"},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"instance","string":""}],"description":"<p>Direction of widget (vertical|horizontal)</p>","isPrivate":false,"name":"data-type"},{"types":"Boolean","defaultValue":"false","tags":[{"type":"property","string":"{Boolean} [options.shadow=false]"},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"instance","string":""}],"description":"<p>Shadow of Controlgroup</p>","isPrivate":false,"name":"data-shadow"},{"types":"Boolean","defaultValue":"false","tags":[{"type":"property","string":"{Boolean} [options.excludeInvisible=false]"},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"instance","string":""}],"description":"<p>Flag specifying exclusion of invisible elements</p>","isPrivate":false,"name":"data-exclude-invisible"},{"types":"Boolean","defaultValue":"false","tags":[{"type":"property","string":"{Boolean} [options.mini=false]"},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"instance","string":""}],"description":"<p>Size of Controlgroup</p>","isPrivate":false,"name":"data-mini"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Controlgroup","tags":[{"type":"method","string":"Controlgroup"},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias for class ns.widget.mobile.Controlgroup</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var Controlgroup = function () {"},{"params":[{"type":"param","types":"Array","name":"elements","description":"Array of Controlgroup elements","isOptional":false},{"type":"param","types":"Array","name":"cornersClasses","description":"Array of css styles for first and last element","isOptional":false,"isLast":true}],"hasParams":true,"name":"flipClasses","tags":[{"type":"method","string":"flipClasses"},{"type":"param","types":"Array","name":"elements","description":"Array of Controlgroup elements","isOptional":false},{"type":"param","types":"Array","name":"cornersClasses","description":"Array of css styles for first and last element","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Controlgroup"}],"example":"","brief":"<p>Applies css styles to Controlgroup elements</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function flipClasses(elements, cornersClasses) {\n\t\t\t\tvar len = elements.length,\n\t\t\t\t\tlastElementClassList,\n\t\t\t\t\tclasses = Controlgroup.classes;\n\n\t\t\t\tif (!len) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telements.forEach(function (element) {\n\t\t\t\t\tvar classList = element.classList;\n\n\t\t\t\t\tclassList.remove(classes.cornerAll);\n\t\t\t\t\tclassList.remove(classes.cornerTop);\n\t\t\t\t\tclassList.remove(classes.cornerBottom);\n\t\t\t\t\tclassList.remove(classes.cornerLeft);\n\t\t\t\t\tclassList.remove(classes.cornerRight);\n\t\t\t\t\tclassList.remove(classes.controlgroupLast);\n\t\t\t\t\tclassList.remove(classes.shadow);\n\t\t\t\t});\n\n\t\t\t\telements[0].classList.add(cornersClasses[0]);\n\t\t\t\tlastElementClassList = elements[len - 1].classList;\n\t\t\t\tlastElementClassList.add(cornersClasses[1]);\n\t\t\t\tlastElementClassList.add(classes.controlGroupLast);\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Controlgroup"},{"type":"instance","string":""}],"example":"","brief":"<p>Builds structure of Controlgroup widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Controlgroup.prototype._build = function (element) {\n\t\t\t\tvar classes = Controlgroup.classes,\n\t\t\t\t\telementClassList = element.classList,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tgroupLegend = selectors.getChildrenByTag(element, 'legend'),\n\t\t\t\t\tgroupHeading = selectors.getChildrenByClass(element, classes.controlGroupLabel),\n\t\t\t\t\tgroupControls,\n\t\t\t\t\tcontrolElements,\n\t\t\t\t\tcontrolElementsLength,\n\t\t\t\t\twidthSize,\n\t\t\t\t\ti,\n\t\t\t\t\tcornersClasses,\n\t\t\t\t\tlegend,\n\t\t\t\t\tcontent;"}]},{"name":"ns.widget.Textinput","authors":[],"extends":"ns.widget.BaseWidget","title":"Textinput Widget","brief":"","description":"<p>Decorator for inputs elements.</p>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\tvar Textinput = function () {","properties":[],"options":[{"types":"string","defaultValue":"\"clear","tags":[{"type":"property","string":"{string} [options.clearSearchButtonText=\"clear text\"] Default text for search field clear text button"},{"type":"property","string":"{boolean} [options.disabled=false] disable widget"},{"type":"property","string":"{?boolean} [options.mini=null] set mini version"},{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"member","string":"ns.widget.Textinput"},{"type":"instance","string":""}],"description":"text\"] Default text for search field clear text button","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tclearSearchButtonText: \"clear text\",\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tmini: null,\n\t\t\t\t\t\ttheme: 's'\n\t\t\t\t\t};\n\t\t\t\t},","name":"data-clear-search-button-text"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{string} [options.clearSearchButtonText=\"clear text\"] Default text for search field clear text button"},{"type":"property","string":"{boolean} [options.disabled=false] disable widget"},{"type":"property","string":"{?boolean} [options.mini=null] set mini version"},{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"member","string":"ns.widget.Textinput"},{"type":"instance","string":""}],"description":"disable widget","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tclearSearchButtonText: \"clear text\",\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tmini: null,\n\t\t\t\t\t\ttheme: 's'\n\t\t\t\t\t};\n\t\t\t\t},","name":"data-disabled"},{"types":"boolean | null","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.clearSearchButtonText=\"clear text\"] Default text for search field clear text button"},{"type":"property","string":"{boolean} [options.disabled=false] disable widget"},{"type":"property","string":"{?boolean} [options.mini=null] set mini version"},{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"member","string":"ns.widget.Textinput"},{"type":"instance","string":""}],"description":"set mini version","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tclearSearchButtonText: \"clear text\",\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tmini: null,\n\t\t\t\t\t\ttheme: 's'\n\t\t\t\t\t};\n\t\t\t\t},","name":"data-mini"},{"types":"string","defaultValue":"'s'","tags":[{"type":"property","string":"{string} [options.clearSearchButtonText=\"clear text\"] Default text for search field clear text button"},{"type":"property","string":"{boolean} [options.disabled=false] disable widget"},{"type":"property","string":"{?boolean} [options.mini=null] set mini version"},{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"member","string":"ns.widget.Textinput"},{"type":"instance","string":""}],"description":"theme of widget","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tclearSearchButtonText: \"clear text\",\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tmini: null,\n\t\t\t\t\t\ttheme: 's'\n\t\t\t\t\t};\n\t\t\t\t},","name":"data-theme"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"member","string":"ns.widget.Textinput"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable textinput</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Textinput.prototype._enable = function () {\n\t\t\t\tvar element = this.element;\n\t\t\t\tif (element) {\n\t\t\t\t\telement.classList.remove(\"ui-disabled\");\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"member","string":"ns.widget.Textinput"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable textinput</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Textinput.prototype._disable = function () {\n\t\t\t\tvar element = this.element;\n\t\t\t\tif (element) {\n\t\t\t\t\telement.classList.add(\"ui-disabled\");\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t//@TODO move to our framework\n//\t\t\tfunction toggleClear(clearbtn, element) {\n//\t\t\t\tsetTimeout(function () {\n//\t\t\t\t\tclearbtn.toggleClass(\"ui-input-clear-hidden\", !element.val());\n//\t\t\t\t}, 0);\n//\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"findLabel","tags":[{"type":"method","string":"findLabel"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Textinput"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Find label tag for element</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function findLabel(element) {\n\t\t\t\tvar elemParent = element.parentNode;\n\t\t\t\treturn elemParent.querySelector('label[for=\"' + element.id + '\"]');\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?HTMLElement"],"description":""},"name":"isEnabledTextInput","tags":[{"type":"method","string":"isEnabledTextInput"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["?HTMLElement"],"description":""},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Textinput"}],"example":"","brief":"<p>return not disabled textinput element which is the closest to element</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function isEnabledTextInput(element) {\n\t\t\t\tif (element.classList.contains(\"ui-input-text\") && !element.classList.contains(\"ui-disabled\")) {\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t\t//return selectors.getClosestBySelector(element, '.ui-input-text:not(.ui-disabled)');\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onFocus","tags":[{"type":"method","string":"onFocus"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Textinput"}],"example":"","brief":"<p>add class ui-focus to target element of event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onFocus(event) {\n\t\t\t\tvar elem = isEnabledTextInput(event.target);\n\t\t\t\tif (elem) {\n\t\t\t\t\telem.classList.add('ui-focus');\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onKeyup","tags":[{"type":"method","string":"onKeyup"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Textinput"}],"example":"","brief":"<p>add event for resize textarea</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onKeyup(event) {\n\t\t\t\tvar element = isEnabledTextInput(event.target);\n\t\t\t\tif (element) {\n\t\t\t\t\t_resize(element);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onBlur","tags":[{"type":"method","string":"onBlur"},{"type":"param","types":"Event","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Textinput"}],"example":"","brief":"<p>remove class ui-focus from target element of event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onBlur(event) {\n\t\t\t\tvar elem = isEnabledTextInput(event.target);\n\t\t\t\tif (elem) {\n\t\t\t\t\telem.classList.remove('ui-focus');\n\t\t\t\t}\n\t\t\t}"},{"params":[],"hasParams":false,"name":"addGlobalEvents","tags":[{"type":"method","string":"addGlobalEvents"},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Textinput"}],"example":"","brief":"<p>add events to all textinputs</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addGlobalEvents() {\n\t\t\t\tif (!eventsAdded) {\n\t\t\t\t\tdocument.addEventListener('focus', onFocus, true);\n\t\t\t\t\tdocument.addEventListener('blur', onBlur, true);\n\t\t\t\t\teventsAdded = true;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"element","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_resize","tags":[{"type":"method","string":"_resize"},{"type":"private","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"member","string":"ns.widget.Textinput"},{"type":"param","types":"element","name":"","description":"","isOptional":false,"isLast":true}],"example":"","brief":"<p>resize textarea</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function _resize(element){\n\t\t\t\tif (element.nodeName.toLowerCase() === \"textarea\") {\n\t\t\t\t\tif(element.clientHeight < element.scrollHeight){\n\t\t\t\t\t\telement.style.height = element.scrollHeight +\" px\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Textinput"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>build Textinput Widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Textinput.prototype._build = function (element) {\n\t\t\t\tvar elementClassList = element.classList,\n\t\t\t\t\tclasses = Textinput.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tthemeclass,\n\t\t\t\t\tlabelFor = findLabel(element);\n\n\t\t\t\toptions.theme = themes.getInheritedTheme(element) || options.theme;\n\t\t\t\tthemeclass  = classes.uiBodyTheme + options.theme;\n\n\t\t\t\tif (labelFor) {\n\t\t\t\t\tlabelFor.classList.add(classes.uiInputText);\n\t\t\t\t}\n\n\t\t\t\telementClassList.add(classes.uiInputText);\n\t\t\t\telementClassList.add(themeclass);\n\n\t\t\t\tswitch (element.type) {\n\t\t\t\tcase \"text\":\n\t\t\t\tcase \"password\":\n\t\t\t\tcase \"number\":\n\t\t\t\tcase \"email\":\n\t\t\t\tcase \"url\":\n\t\t\t\tcase \"tel\":\n\t\t\t\t\telement.setAttribute(\"role\", \"textbox\");\n\t\t\t\t\telement.setAttribute(\"aria-label\", \"Keyboard opened\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (element.tagName.toLowerCase() === \"textarea\") {\n\t\t\t\t\t\telement.setAttribute(\"role\", \"textbox\");\n\t\t\t\t\t\telement.setAttribute(\"aria-label\", \"Keyboard opened\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telement.setAttribute(\"tabindex\", 0);\n\n\t\t\t\t//Autogrow\n\t\t\t\t_resize(element);\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Textinput"},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Textinput.prototype._bindEvents = function (element) {\n\t\t\t\telement.addEventListener('keyup', onKeyup , false);\n\t\t\t\taddGlobalEvents();\n\t\t\t};\n\n\t\t\tns.widget.mobile.Textinput = Textinput;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Textinput\",\n\t\t\t\t\"input[type='text'], input[type='number'], input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='month'], input[type='week'], input[type='datetime-local'], input[type='color'], input:not([type]), .ui-textinput\",\n\t\t\t\t[],\n\t\t\t\tTextinput,\n\t\t\t\t\"mobile\"\n\t\t\t);\n}(window.document, ns));"}]},{"name":"ns.widget.mobile.Popup","authors":["Jadwiga Sosnowska <j.sosnowska@samsung.com>","Maciej Urbanski <m.urbanski@samsung.com>","Piotr Karny <p.karny@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Popup widget","brief":"","description":"<h2>Default selectors</h2>\n\n<p>In default all elements with <em>data-role=popup</em> are changed to Tizen WebUI popups.</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of popup widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar popup = ns.engine.instanceWidget(document.getElementById('popup'), 'Popup');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar popup = $('#popup').popup();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple popup from div</h3>\n\n<pre><code>@example\n&lt;div id=\"popup\" data-role=\"popup\"&gt;\n    &lt;p&gt;This is a completely basic popup, no options set.&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {\n\t\n\t\t\t\tvar Popup = function () {\n\t\t\t\tvar self = this;","properties":[],"options":[{"types":"string","defaultValue":"'s'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"theme of widget","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-theme"},{"types":"string","defaultValue":"''","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"color scheme (swatch) for the popup background","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-overlay-theme"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"Shadow of popup","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-shadow"},{"types":"boolean","defaultValue":"true","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"<p>@property {Object} options Object with default options</p>","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-corners"},{"types":"string","defaultValue":"'none'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"<p>@property {Object} options Object with default options</p>","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-transition"},{"types":"string","defaultValue":"'origin'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"Element relative to which popup is positioned","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-position-to"},{"types":"Object","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"<p>@property {Object} options Object with default options</p>","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-tolerance"},{"types":"Array","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"Array containing directions sorted in by priority.","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-direction-priority"},{"types":"string","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"Selector for buttons in popup","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-close-link-selector"},{"types":"string","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"Element used as reference for relative popup placement","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-link"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.overlayTheme=''] color scheme (swatch) for the popup background"},{"type":"property","string":"{boolean} [options.shadow=true] Shadow of popup"},{"type":"property","string":"{boolean} [options.corners=true]"},{"type":"property","string":"{string} [options.transition='none']"},{"type":"property","string":"{string} [options.positionTo='origin'] Element relative to which popup is positioned"},{"type":"property","string":"{Object} [options.tolerance]"},{"type":"property","string":"{Array} [options.directionPriority] Array containing directions sorted in by priority."},{"type":"First","string":"one has the highest priority, last the lowest. Default to: bottom, top, right, left."},{"type":"property","string":"{string} [options.closeLinkSelector] Selector for buttons in popup"},{"type":"property","string":"{string} [options.link=null] Element used as reference for relative popup placement"},{"type":"property","string":"{boolean} [options.isHardwarePopup=false]"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"description":"<p>@property {Object} options Object with default options</p>","isPrivate":false,"code":"self.options = {\n\t\t\t\t\t\ttheme: null,\n\t\t\t\t\t\toverlayTheme: null,\n\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\tcorners: true,\n\t\t\t\t\t\ttransition: \"pop\",\n\t\t\t\t\t\tpositionTo: \"origin\",\n\t\t\t\t\t\ttolerance: { t: 10, r: 10, b: 10, l: 10 },\n\t\t\t\t\t\tdirectionPriority: [\"bottom\", \"top\", \"right\", \"left\"],\n\t\t\t\t\t\tcloseLinkSelector: \"a[data-rel='back']\",\n\t\t\t\t\t\tlink: null,\n\t\t\t\t\t\tisHardwarePopup: false,\n\t\t\t\t\t\tpositionX: null,\n\t\t\t\t\t\tpositionY: null,\n\t\t\t\t\t\thistory: false\n\t\t\t\t\t};\n\t\t\t\t\tself.defaultOptions = {\n\t\t\t\t\t\ttheme: \"s\"\n\t\t\t\t\t};","name":"data-is-hardware-popup"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"windowCoords","tags":[{"type":"method","string":"windowCoords"},{"type":"return","types":["Object"],"description":""},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return window coordinates</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function windowCoords() {\n\t\t\t\tvar body = window.body;\n\n\t\t\t\treturn {\n\t\t\t\t\tx: body ? (body.scrollLeft || 0) : 0,\n\t\t\t\t\ty: body ? (body.scrollTop || 0) : 0,\n\t\t\t\t\telementWidth: (window.innerWidth || window.width),\n\t\t\t\t\telementHeight: (window.innerHeight || window.height)\n\t\t\t\t};\n\t\t\t}"},{"params":[{"type":"param","types":"Number","name":"winSize","description":"","isOptional":false},{"type":"param","types":"Number","name":"segSize","description":"","isOptional":false},{"type":"param","types":"Number","name":"offset","description":"","isOptional":false},{"type":"param","types":"Number","name":"desired","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Number"],"description":""},"name":"fitSegmentInsideSegment","tags":[{"type":"method","string":"fitSegmentInsideSegment"},{"type":"param","types":"Number","name":"winSize","description":"","isOptional":false},{"type":"param","types":"Number","name":"segSize","description":"","isOptional":false},{"type":"param","types":"Number","name":"offset","description":"","isOptional":false},{"type":"param","types":"Number","name":"desired","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Number"],"description":""},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return size of segment</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function fitSegmentInsideSegment(winSize, segSize, offset, desired) {\n\t\t\t\tvar ret = desired;\n\n\t\t\t\tif (winSize < segSize) {\n\t\t\t\t\t// Center segment if it's bigger than the window\n\t\t\t\t\tret = offset + (winSize - segSize) / 2;\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise center it at the desired coordinate while keeping it completely inside the window\n\t\t\t\t\tret = Math.min(Math.max(offset, desired - segSize / 2), offset + winSize - segSize);\n\t\t\t\t}\n\n\t\t\t\treturn ret;\n\t\t\t}"},{"params":[{"type":"param","types":"string","name":"elementId","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"findPositionToElement","tags":[{"type":"method","string":"findPositionToElement"},{"type":"param","types":"string","name":"elementId","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return element relative to which popup must be positioned</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function findPositionToElement(elementId) {\n\t\t\t\tvar positionToElement;\n\n\t\t\t\tpositionToElement = document.getElementById(elementId);\n\n\t\t\t\t// :visible - in jq (>=1.3.2) an element is visible if its browser-reported offsetWidth or offsetHeight is greater than 0\n\t\t\t\tif (positionToElement && positionToElement.offsetWidth <= 0 && positionToElement.offsetHeight <= 0) {\n\t\t\t\t\tpositionToElement = null;\n\t\t\t\t}\n\n\t\t\t\treturn positionToElement;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"link","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"getOffsetOfElement","tags":[{"type":"method","string":"getOffsetOfElement"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"link","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return offset of element</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function getOffsetOfElement(element, link) {\n\t\t\t\tvar top = element.offsetTop,\n\t\t\t\t\tleft = element.offsetLeft,\n\t\t\t\t\tscrollview;\n\t\t\t\twhile (element.offsetParent) {\n\t\t\t\t\ttop += element.offsetParent.offsetTop;\n\t\t\t\t\tleft += element.offsetParent.offsetLeft;\n\t\t\t\t\tif (element.getAttribute(\"data-role\") === \"page\") {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\telement = element.offsetParent;\n\t\t\t\t}\n\t\t\t\tif (link) {\n\t\t\t\t\tscrollview = selectors.getClosestByClass(document.getElementById(link), scrollviewClipClass);\n\t\t\t\t\ttop -= scrollview ? scrollview.scrollTop : 0;\n\t\t\t\t}\n\n\t\t\t\treturn {top: top, left: left};\n\t\t\t}"},{"params":[],"hasParams":false,"name":"onResize","tags":[{"type":"method","string":"onResize"},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Function fires on window resizing</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onResize(self) {\n\t\t\t\tvar callback,\n\t\t\t\t\toptions;\n\t\t\t\tif (!self._isOpen) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (self._callback) {\n\t\t\t\t\tcallback = self._callback();\n\t\t\t\t\tself._setPosition(callback.x, callback.y);\n\t\t\t\t} else {\n\t\t\t\t\toptions = self.options;\n\t\t\t\t\tself._setPosition(options.positionX, options.positionY);\n\t\t\t\t}\n\t\t\t}"},{"params":[],"hasParams":false,"name":"_eatEventAndClose","tags":[{"type":"method","string":"_eatEventAndClose"},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Function fires on click</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function _eatEventAndClose(self, event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevents.stopPropagation(event);\n\t\t\t\tsetTimeout(self.close.bind(self), 10);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfunction removeProperties(popup) {\n\t\t\t\tvar page = document.getElementsByClassName(pageActiveClass)[0],\n\t\t\t\t\ttabindexElements = page ? page.querySelectorAll(\"[tabindex]\") : null,\n\t\t\t\t\threfElements = page ? page.querySelectorAll(\"[href]\") : null,\n\t\t\t\t\tvalue;\n\n\t\t\t\tif (tabindexElements) {\n\t\t\t\t\ttabindexElements = [].slice.call(tabindexElements);\n\t\t\t\t\ttabindexElements.forEach(function (tabindexElement) {\n\t\t\t\t\t\tif (selectors.getClosestBySelector(tabindexElement, \"[data-role='popup']\") === null) {\n\t\t\t\t\t\t\tvalue = tabindexElement.getAttribute(\"tabindex\");\n\t\t\t\t\t\t\tdoms.setNSData(tabindexElement, \"tabindex\", value);\n\t\t\t\t\t\t\ttabindexElement.removeAttribute(\"tabindex\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (hrefElements) {\n\t\t\t\t\threfElements = [].slice.call(hrefElements);\n\t\t\t\t\threfElements.forEach(function (hrefElement) {\n\t\t\t\t\t\tif (selectors.getClosestBySelector(hrefElement, \"[data-role='popup']\") === null) {\n\t\t\t\t\t\t\tvalue = hrefElement.getAttribute(\"href\");\n\t\t\t\t\t\t\tdoms.setNSData(hrefElement, \"href\", value);\n\t\t\t\t\t\t\threfElement.removeAttribute(\"href\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction restoreProperties(popup) {\n\t\t\t\tvar page = document.getElementsByClassName(ns.widget.mobile.Page.classes.uiPageActive)[0],\n\t\t\t\t\ttabindexElements = page ? selectors.getAllByDataNS(page, \"tabindex\") : null,\n\t\t\t\t\threfElements = page ? page.querySelectorAll(\"[href]\") : null,\n\t\t\t\t\tvalue;\n\n\t\t\t\tif (tabindexElements) {\n\t\t\t\t\tselectors.getAllByDataNS(page, \"tabindex\").forEach(function (tabindexElement) {\n\t\t\t\t\t\tvalue = doms.getNSData(tabindexElement, \"tabindex\");\n\t\t\t\t\t\ttabindexElement.setAttribute(\"tabindex\", value);\n\t\t\t\t\t\tdoms.removeNSData(tabindexElement, \"tabindex\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (hrefElements) {\n\t\t\t\t\tselectors.getAllByDataNS(page, \"href\").forEach(function (hrefElement) {\n\t\t\t\t\t\tvalue = doms.getNSData(hrefElement, \"href\");\n\t\t\t\t\t\threfElement.setAttribute(\"href\", value);\n\t\t\t\t\t\tdoms.removeNSData(hrefElement, \"href\");\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyTheme(element, theme, prefix) {\n\t\t\t\tvar classes = element.classList,\n\t\t\t\t\tclassesLength = classes.length,\n\t\t\t\t\tcurrentTheme = null,\n\t\t\t\t\tmatches,\n\t\t\t\t\ti,\n\t\t\t\t\tregex = new RegExp(\"^ui-\" + prefix + \"-([a-z]+)$\");\n\n\t\t\t\tfor (i = 0; i < classesLength; i++) {\n\t\t\t\t\tmatches = regex.exec(classes[i]);\n\t\t\t\t\tif (matches && matches.length > 1) {\n\t\t\t\t\t\tcurrentTheme = matches[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (theme !== currentTheme) {\n\t\t\t\t\telement.classList.remove(\"ui-\" + prefix + \"-\" + currentTheme);\n\t\t\t\t\tif (theme !== null && theme !== \"none\") {\n\t\t\t\t\t\telement.classList.add(\"ui-\" + prefix + \"-\" + theme);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Function","name":"callback","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"animationComplete","tags":[{"type":"method","string":"animationComplete"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Function","name":"callback","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set events connected with animation</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function animationComplete(element, callback) {\n\t\t\t\tevents.one(element, \"webkitAnimationEnd\", callback);\n\t\t\t\tevents.one(element, \"animationend\", callback);\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of popup widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._build = function (element) {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tpage = selectors.getParentsByClass(element, \"ui-page\")[0] || document.body,\n\t\t\t\t\tuiScreen = document.createElement(\"div\"),\n\t\t\t\t\tuiScreenClasses = uiScreen.classList,\n\t\t\t\t\tuiPlaceholder = document.createElement(\"div\"),\n\t\t\t\t\tuiContainer = document.createElement(\"div\"),\n\t\t\t\t\tuiContainerClasses = uiContainer.classList,\n\t\t\t\t\tuiArrow = document.createElement(\"div\"),\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tmyId = element.id,\n\t\t\t\t\tfragment = document.createDocumentFragment();\n\n\t\t\t\t// init ui elements\n\t\t\t\tuiScreenClasses.add(classes.SCREEN_HIDDEN);\n\t\t\t\tuiScreenClasses.add(classes.uiPopupScreen);\n\t\t\t\tuiPlaceholder.style.display = \"none\";\n\t\t\t\tuiContainerClasses.add(classes.uiPopupContainer);\n\t\t\t\tuiContainerClasses.add(classes.uiSelectmenuHidden);\n\t\t\t\tuiArrow.classList.add(classes.uiArrow);\n\n\t\t\t\t// define the container for navigation event bindings\n\t\t\t\t// TODO this would be nice at the the mobile widget level\n\t\t\t\t//this.options.container = this.options.container || $.mobile.pageContainer;\n\n\t\t\t\tuiScreen.setAttribute(\"id\", myId + \"-screen\");\n\t\t\t\tuiContainer.setAttribute(\"id\", myId + \"-popup\");\n\t\t\t\tuiPlaceholder.setAttribute(\"id\", myId + \"-placeholder\");\n\t\t\t\tuiPlaceholder.innerHTML = \"<!-- placeholder for \" + myId + \" -->\";\n\t\t\t\tuiArrow.setAttribute(\"id\", myId + \"-arrow\");\n\t\t\t\telement.classList.add(classes.uiPopup);\n\n\t\t\t\tdoms.insertNodeAfter(element, uiPlaceholder);\n\t\t\t\tuiContainer.appendChild(element);\n\t\t\t\tuiContainer.appendChild(uiArrow);\n\t\t\t\tfragment.appendChild(uiScreen);\n\t\t\t\tfragment.appendChild(uiContainer);\n\t\t\t\tpage.appendChild(fragment);\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._init = function (element) {\n\t\t\t\tvar id = element.id,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tui;\n\n\t\t\t\t// set options\n\t\t\t\toptions.theme = options.theme || themes.getInheritedTheme(element, this.defaultOptions.theme);\n\n\t\t\t\t// @todo define instance variables\n\t\t\t\tui = {\n\t\t\t\t\tscreen: document.getElementById(id + \"-screen\"),\n\t\t\t\t\tplaceholder: document.getElementById(id + \"-placeholder\"),\n\t\t\t\t\tcontainer: element.parentNode,\n\t\t\t\t\tarrow: document.getElementById(id + \"-arrow\")\n\t\t\t\t};\n\t\t\t\t// if page isn't built, we choose body as page\n\t\t\t\tthis._page = selectors.getParentsByClass(element, \"ui-page\")[0] || document.body;\n\t\t\t\tthis._ui = ui;\n\t\t\t\tthis._isPreOpen = false;\n\t\t\t\tthis._isOpen = false;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setTolerance","tags":[{"type":"method","string":"_setTolerance"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string | Array","name":"value","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set tolerance for widget's position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setTolerance = function (element, value) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\ttolerance = options.tolerance;\n\n\t\t\t\tif (value) {\n\t\t\t\t\tif (typeof value === \"string\") {\n\t\t\t\t\t\tvalue = value.split(\",\");\n\t\t\t\t\t}\n\t\t\t\t\tvalue.forEach(function(val, index){\n\t\t\t\t\t\tvalue[index] = parseInt(val, 10);\n\t\t\t\t\t});\n\t\t\t\t\tswitch (value.length) {\n\t\t\t\t\t\t// All values are to be the same\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tif (!isNaN(value[0])) {\n\t\t\t\t\t\t\t\ttolerance.t = tolerance.r = tolerance.b = tolerance.l = value[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// The first value denotes top/bottom tolerance, and the second value denotes left/right tolerance\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tif (!isNaN(value[0])) {\n\t\t\t\t\t\t\t\ttolerance.t = tolerance.b = value[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!isNaN(value[1])) {\n\t\t\t\t\t\t\t\ttolerance.l = tolerance.r = value[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// The array contains values in the order top, right, bottom, left\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tif (!isNaN(value[0])) {\n\t\t\t\t\t\t\t\ttolerance.t = value[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!isNaN(value[1])) {\n\t\t\t\t\t\t\t\ttolerance.r = value[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!isNaN(value[2])) {\n\t\t\t\t\t\t\t\ttolerance.b = value[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!isNaN(value[3])) {\n\t\t\t\t\t\t\t\ttolerance.l = value[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptions.tolerance = tolerance;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"positionToElement","description":"","isOptional":false},{"type":"param","types":"Number","name":"x","description":"","isOptional":false},{"type":"param","types":"Number","name":"y","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_desiredCoords","tags":[{"type":"method","string":"_desiredCoords"},{"type":"param","types":"HTMLElement","name":"positionToElement","description":"","isOptional":false},{"type":"param","types":"Number","name":"x","description":"","isOptional":false},{"type":"param","types":"Number","name":"y","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return desired coordinates of popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._desiredCoords = function (positionToElement, x, y) {\n\t\t\t\tvar winCoords = windowCoords(),\n\t\t\t\t\toffset;\n\n\t\t\t\tif (positionToElement === \"window\") {\n\t\t\t\t\tx = winCoords.elementWidth / 2 + winCoords.x;\n\t\t\t\t\ty = winCoords.elementHeight / 2 + winCoords.y;\n\t\t\t\t} else if (positionToElement && positionToElement !== \"origin\") {\n\t\t\t\t\toffset = getOffsetOfElement(positionToElement, this.options.link);\n\t\t\t\t\tx = offset.left + positionToElement.offsetWidth / 2;\n\t\t\t\t\ty = offset.top + positionToElement.offsetHeight / 2;\n\t\t\t\t}\n\n\t\t\t\t// Make sure x and y are valid numbers - center over the window\n\t\t\t\tif (typeof x !== \"number\" || isNaN(x)) {\n\t\t\t\t\tx = winCoords.elementWidth / 2 + winCoords.x;\n\t\t\t\t}\n\t\t\t\tif (typeof y !== \"number\" || isNaN(y)) {\n\t\t\t\t\ty = winCoords.elementHeight / 2 + winCoords.y;\n\t\t\t\t}\n\n\t\t\t\treturn {x : x,\n\t\t\t\t\t\ty : y};\n\t\t\t};"},{"params":[{"type":"param","types":"Object","name":"desired","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_placementCoords","tags":[{"type":"method","string":"_placementCoords"},{"type":"param","types":"Object","name":"desired","description":"","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Return placement of popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._placementCoords = function (desired) {\n\t\t\t\t// rectangle within which the popup must fit\n\t\t\t\tvar uiContainer = this._ui.container,\n\t\t\t\t\twinCoords = windowCoords(),\n\t\t\t\t\ttolerance = this.options.tolerance,\n\t\t\t\t\tmaxCoords = {\n\t\t\t\t\t\tx: tolerance.l,\n\t\t\t\t\t\ty: winCoords.y + tolerance.t,\n\t\t\t\t\t\telementWidth: winCoords.elementWidth - tolerance.l - tolerance.r,\n\t\t\t\t\t\telementHeight: winCoords.elementHeight - tolerance.t - tolerance.b\n\t\t\t\t\t},\n\t\t\t\t\tmenuSize,\n\t\t\t\t\tfinalCoords,\n\t\t\t\t\tdocElement = document.documentElement,\n\t\t\t\t\tdocBody = document.body,\n\t\t\t\t\tdocHeight = Math.max(docElement.clientHeight, docBody.scrollHeight, docBody.offsetHeight, docElement.scrollHeight, docElement.offsetHeight);\n\n\t\t\t\t// Clamp the width of the menu before grabbing its size\n\t\t\t\tuiContainer.style.maxWidth = maxCoords.elementWidth;\n\n\t\t\t\tmenuSize = {\n\t\t\t\t\telementWidth: uiContainer.clientWidth,\n\t\t\t\t\telementHeight: uiContainer.clientHeight\n\t\t\t\t};\n\n\t\t\t\t// Center the menu over the desired coordinates, while not going outside\n\t\t\t\t// the window tolerances. This will center wrt. the window if the popup is too large.\n\t\t\t\tfinalCoords = {\n\t\t\t\t\tx: fitSegmentInsideSegment(maxCoords.elementWidth, menuSize.elementWidth, maxCoords.x, desired.x),\n\t\t\t\t\ty: fitSegmentInsideSegment(maxCoords.elementHeight, menuSize.elementHeight, maxCoords.y, desired.y)\n\t\t\t\t};\n\n\t\t\t\t// Make sure the top of the menu is visible\n\t\t\t\tfinalCoords.y = Math.max(0, finalCoords.y);\n\n\t\t\t\t// If the height of the menu is smaller than the height of the document\n\t\t\t\t// align the bottom with the bottom of the document\n\n\t\t\t\tfinalCoords.y -= Math.min(finalCoords.y, Math.max(0, finalCoords.y + menuSize.elementHeight - docHeight));\n\n\t\t\t\tif (this.options.isHardwarePopup) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tleft: tolerance.l,\n\t\t\t\t\t\ttop: maxCoords.elementHeight - menuSize.elementHeight - tolerance.b,\n\t\t\t\t\t\tarrowleft: 0,\n\t\t\t\t\t\tarrowtop: 0\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {left: finalCoords.x, top: finalCoords.y};\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"type","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"positionToElement","description":"","isOptional":false},{"type":"param","types":"number","name":"containerLeft","description":"container's left position","isOptional":false},{"type":"param","types":"number","name":"containerTop","description":"container's top position","isOptional":false},{"type":"param","types":"Object","name":"positionToElementOffset","description":"contains toElement offsets","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_setArrowPosition","tags":[{"type":"method","string":"_setArrowPosition"},{"type":"param","types":"number","name":"type","description":"","isOptional":false},{"type":"param","types":"HTMLElement","name":"positionToElement","description":"","isOptional":false},{"type":"param","types":"number","name":"containerLeft","description":"container's left position","isOptional":false},{"type":"param","types":"number","name":"containerTop","description":"container's top position","isOptional":false},{"type":"param","types":"Object","name":"positionToElementOffset","description":"contains toElement offsets","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set placement of arrow</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setArrowPosition = function (type, positionToElement, containerLeft, containerTop, positionToElementOffset) {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tuiContainer = this._ui.container,\n\t\t\t\t\tuiContainerHeight = uiContainer.clientHeight,\n\t\t\t\t\tuiContainerWidth = uiContainer.clientWidth,\n\t\t\t\t\tarrow = this._ui.arrow,\n\t\t\t\t\tarrowClasses = arrow.classList,\n\t\t\t\t\tarrowStyle = arrow.style,\n\t\t\t\t\t// @TODO this will fail when not all arrow borders are the same\n\t\t\t\t\tarrowBorderWidth = parseInt(doms.getCSSProperty(arrow, \"border-\" + type + \"-width\"), 10) || 0,\n\t\t\t\t\tleft = positionToElement ? getOffsetOfElement(positionToElement, this.options.link).left + positionToElement.clientWidth / 2 - arrowBorderWidth : 0,\n\t\t\t\t\tpositionToElementHeight = positionToElement ? positionToElement.clientHeight : 0,\n\t\t\t\t\tpositionToElementWidth = positionToElement ? positionToElement.clientWidth : 0,\n\t\t\t\t\tcorrectionValue,\n\t\t\t\t\tcontainerHeight = uiContainer.clientHeight,\n\t\t\t\t\tcolor = doms.getCSSProperty(uiContainer.firstChild, \"background-color\");\n\n\t\t\t\tarrow.removeAttribute(\"class\");\n\t\t\t\tarrowClasses.add(classes.uiArrow);\n\n\t\t\t\tarrowClasses.add(classes[type]);\n\n\t\t\t\tarrowStyle.borderColor = \"transparent\";\n\n\t\t\t\tswitch (type) {\n\t\t\t\tcase \"bottom\":\n\t\t\t\t\tarrowClasses.add(classes.bottom);\n\t\t\t\t\tarrowStyle.left = left - containerLeft + \"px\";\n\t\t\t\t\tarrowStyle.top = -arrowBorderWidth * 2 + \"px\";\n\t\t\t\t\tarrowStyle.borderBottomColor = color;\n\t\t\t\t\tcorrectionValue = [0, positionToElementHeight + positionToElementOffset.top - containerTop + arrowBorderWidth];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tarrowStyle.left = -arrowBorderWidth * 2 + 1 + \"px\";\n\t\t\t\t\tarrowStyle.top = uiContainerHeight / 2 - arrowBorderWidth + \"px\";\n\t\t\t\t\tarrowStyle.borderRightColor = color;\n\t\t\t\t\tcorrectionValue = [positionToElementWidth + positionToElementOffset.left, 0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"top\":\n\t\t\t\t\tarrowClasses.add(classes.top);\n\t\t\t\t\tarrowStyle.left = left - containerLeft + \"px\";\n\t\t\t\t\tarrowStyle.top = uiContainerHeight + \"px\";\n\t\t\t\t\tarrowStyle.borderTopColor = color;\n\t\t\t\t\tcorrectionValue = [0, -(containerTop + containerHeight - positionToElementOffset.top + arrowBorderWidth)];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\t// @todo\n\t\t\t\t\tarrowStyle.left = uiContainer.clientWidth + 3 + \"px\";\n\t\t\t\t\tarrowStyle.top = uiContainerHeight / 2 - arrowBorderWidth + \"px\";\n\t\t\t\t\tarrowStyle.borderLeftColor = color;\n\t\t\t\t\tcorrectionValue = [positionToElementOffset.left - uiContainerWidth, 0];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treturn correctionValue;\n\n\t\t\t\t// @todo arrow's positions (in original file, it was in _placementCoords)\n\t\t\t\t// correctionValue = [0, (positionToElement.offsetTop + positionToElement.style.height - y)];\n\t\t\t};"},{"params":[],"hasParams":false,"name":"setPositionCB","tags":[{"type":"method","string":"setPositionCB"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"deprecated","string":""}],"example":"","brief":"<p>Set callback, which fires on 'resize' event.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Popup.prototype.setPositionCB = function (callback) {\n\t\t\t\tthis.setPositionCallback(callback);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"setPositionCallback","tags":[{"type":"method","string":"setPositionCallback"},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"new","string":""}],"example":"","brief":"<p>Set callback, which fires on 'resize' event.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Popup.prototype.setPositionCallback = function (callback) {\n\t\t\t\tthis._callback = callback;\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"top","description":"","isOptional":true},{"type":"param","types":"number","name":"left","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"_setPosition","tags":[{"type":"method","string":"_setPosition"},{"type":"param","types":"number","name":"top","description":"","isOptional":true},{"type":"param","types":"number","name":"left","description":"","isOptional":true,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set position of popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setPosition = function (top, left) {\n\t\t\t\tvar ui = this._ui,\n\t\t\t\t\tuiArrow = ui.arrow,\n\t\t\t\t\tuiContainer = ui.container,\n\t\t\t\t\tuiContainerStyle = uiContainer.style,\n\t\t\t\t\tuiContainerWidth = uiContainer.offsetWidth,\n\t\t\t\t\tuiContainerHeight = uiContainer.offsetHeight,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tpositionToOption = options.positionTo.toLowerCase(),\n\t\t\t\t\tpositionToElement,\n\t\t\t\t\tpositionToElementOffset,\n\t\t\t\t\tdocElement = document.documentElement,\n\t\t\t\t\tdesired,\n\t\t\t\t\tarrowType = \"top\",\n\t\t\t\t\tpositionOffsets,\n\t\t\t\t\tcorrectionValue = [0, 0],\n\t\t\t\t\tarrowDimensions,\n\t\t\t\t\tarrowBorders = {\n\t\t\t\t\t\t\"border-top-width\": 0,\n\t\t\t\t\t\t\"border-right-width\": 0,\n\t\t\t\t\t\t\"border-bottom-width\": 0,\n\t\t\t\t\t\t\"border-left-width\": 0\n\t\t\t\t\t},\n\t\t\t\t\telementDimensions;\n\n\t\t\t\tdoms.extractCSSProperties(uiArrow, arrowBorders);\n\n\t\t\t\tif (typeof top === \"number\" && typeof left === \"number\") {\n\t\t\t\t\tdesired = {\n\t\t\t\t\t\tx: left,\n\t\t\t\t\t\ty: top\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (positionToOption === \"window\") {\n\t\t\t\t\tdesired = this._placementCoords(desired || this._desiredCoords(positionToOption));\n\t\t\t\t\ttop = desired.top;\n\t\t\t\t\tleft = desired.left;\n\t\t\t\t} else if (positionToOption === \"origin\") {\n\t\t\t\t\t// popup with arrow\n\t\t\t\t\tpositionToElement = findPositionToElement(options.link);\n\t\t\t\t\tdesired = this._placementCoords(desired || this._desiredCoords(positionToElement));\n\t\t\t\t\ttop = desired.top;\n\t\t\t\t\tleft = desired.left;\n\n\t\t\t\t\tif (positionToElement) {\n\t\t\t\t\t\tpositionToElementOffset = getOffsetOfElement(positionToElement, options.link);\n\t\t\t\t\t\tpositionOffsets = {\n\t\t\t\t\t\t\t\"top\": positionToElementOffset.top,\n\t\t\t\t\t\t\t\"right\": docElement.clientWidth - (positionToElementOffset.left + doms.getElementWidth(positionToElement)),\n\t\t\t\t\t\t\t\"bottom\": docElement.clientHeight - (positionToElementOffset.top + doms.getElementHeight(positionToElement)),\n\t\t\t\t\t\t\t\"left\": positionToElementOffset.left\n\t\t\t\t\t\t};\n\t\t\t\t\t\telementDimensions = {\n\t\t\t\t\t\t\twidth: uiContainerWidth,\n\t\t\t\t\t\t\theight: uiContainerHeight\n\t\t\t\t\t\t};\n\t\t\t\t\t\tarrowDimensions = {\n\t\t\t\t\t\t\t// For proper results arrow width and height are assumed to be '0'\n\t\t\t\t\t\t\t\"top\": arrowBorders[\"border-top-width\"],\n\t\t\t\t\t\t\t\"right\": arrowBorders[\"border-right-width\"],\n\t\t\t\t\t\t\t\"bottom\": arrowBorders[\"border-bottom-width\"],\n\t\t\t\t\t\t\t\"left\": arrowBorders[\"border-left-width\"]\n\t\t\t\t\t\t};\n\t\t\t\t\t\tarrowType = chooseDirectionByPriority(options.directionPriority, positionOffsets, elementDimensions, arrowDimensions);\n\t\t\t\t\t}\n\t\t\t\t\tif (uiArrow.style.display !== \"none\") {\n\t\t\t\t\t\tcorrectionValue = this._setArrowPosition(arrowType, positionToElement, left, top, positionToElementOffset);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// position to element with options.positionTo id\n\t\t\t\t\tpositionToElement = findPositionToElement(options.positionTo);\n\t\t\t\t\tdesired = this._placementCoords(desired || this._desiredCoords(positionToElement));\n\t\t\t\t\ttop = desired.top;\n\t\t\t\t\tleft = desired.left;\n\t\t\t\t}\n\n\t\t\t\tuiContainerStyle.left = left + correctionValue[0] + \"px\";\n\t\t\t\tuiContainerStyle.top = top + correctionValue[1] + \"px\";\n\t\t\t};"},{"params":[{"type":"param","types":"boolean","name":"popupwindow","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setContextStyle","tags":[{"type":"method","string":"_setContextStyle"},{"type":"param","types":"boolean","name":"popupwindow","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set context style of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setContextStyle = function (popupwindow) {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tui = this._ui,\n\t\t\t\t\tlinkElement = options.link ? document.getElementById(options.link) : null,\n\t\t\t\t\tposition = options.positionTo.toLowerCase(),\n\t\t\t\t\tcontainerList = ui.container.classList;\n\n\t\t\t\tif ((position !== \"window\" && linkElement && linkElement.getAttribute(\"data-position-to\") !== \"window\") || options.isHardwarePopup) {\n\t\t\t\t\tthis.element.classList.add(classes.uiCtxpopup);\n\t\t\t\t\tif (popupwindow) {\n\t\t\t\t\t\tcontainerList.add(classes.uiPopupWindow);\n\t\t\t\t\t\tthis.element.classList.add(classes.uiPopupWindowPadding);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainerList.remove(classes.uiPopupContainer);\n\t\t\t\t\t\tcontainerList.add(classes.uiCtxpopupContainer);\n\t\t\t\t\t}\n\t\t\t\t\tif (position === \"origin\") {\n\t\t\t\t\t\tui.arrow.style.display = \"initial\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tui.arrow.style.display = \"none\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._setOverlayTheme(this.element, \"dim\");\n\t\t\t\t\tui.arrow.style.display = \"none\";\n\t\t\t\t}\n\n\t\t\t\tif (options.isHardwarePopup) {\n\t\t\t\t\tui.arrow.style.display = \"none\";\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setOverlayTheme","tags":[{"type":"method","string":"_setOverlayTheme"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set overlay theme for screen</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setOverlayTheme = function (element, value) {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tscreen = this._ui.screen;\n\n\t\t\t\tapplyTheme(screen, value, \"overlay\");\n\t\t\t\tif (this._isOpen) {\n\t\t\t\t\tscreen.classList.add(classes.IN);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"boolean","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["void"],"description":""},"name":"_setCorners","tags":[{"type":"method","string":"_setCorners"},{"type":"param","types":"boolean","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["void"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set type of corners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._setCorners = function (value) {\n\t\t\t\tvar classes = Popup.classes;\n\t\t\t\tif (value) {\n\t\t\t\t\tthis.element.classList.add(classes.uiCornerAll);\n\t\t\t\t} else {\n\t\t\t\t\tthis.element.classList.remove(classes.uiCornerAll);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_applyTransition","tags":[{"type":"method","string":"_applyTransition"},{"type":"param","types":"string","name":"value","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set transition</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._applyTransition = function (value) {\n\t\t\t\tvar self = this;\n\n\t\t\t\tif (self._fallbackTransition) {\n\t\t\t\t\tself._ui.container.classList.remove(self._fallbackTransition);\n\t\t\t\t}\n\t\t\t\tif (value && value !== \"none\") {\n\t\t\t\t\t// @todo\n\t\t\t\t\t// this._fallbackTransition = $.mobile._maybeDegradeTransition( value );\n\t\t\t\t\tself._fallbackTransition = value;\n\t\t\t\t\tself._ui.container.classList.add(self._fallbackTransition);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"Function","name":"screenPrereq","description":"","isOptional":false},{"type":"param","types":"Function","name":"containerPrereq","description":"","isOptional":false},{"type":"param","types":"Function","name":"whenDone","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_createPrereqs","tags":[{"type":"method","string":"_createPrereqs"},{"type":"param","types":"Function","name":"screenPrereq","description":"","isOptional":false},{"type":"param","types":"Function","name":"containerPrereq","description":"","isOptional":false},{"type":"param","types":"Function","name":"whenDone","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Prepare deferred objects for animation</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._createPrereqs = function (screenPrereq, containerPrereq, whenDone) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tprereqs;\n\n\t\t\t\t// It is important to maintain both the local variable prereqs and self._prereqs. The local variable remains in\n\t\t\t\t// the closure of the functions which call the callbacks passed in. The comparison between the local variable and\n\t\t\t\t// self._prereqs is necessary, because once a function has been passed to .animationComplete() it will be called\n\t\t\t\t// next time an animation completes, even if that's not the animation whose end the function was supposed to catch\n\t\t\t\t// (for example, if an abort happens during the opening animation, the .animationComplete handler is not called for\n\t\t\t\t// that animation anymore, but the handler remains attached, so it is called the next time the popup is opened\n\t\t\t\t// - making it stale. Comparing the local variable prereqs to the widget-level variable self._prereqs ensures that\n\t\t\t\t// callbacks triggered by a stale .animationComplete will be ignored.\n\t\t\t\tprereqs = {\n\t\t\t\t\tscreen: new UtilsDeferred(),\n\t\t\t\t\tcontainer: new UtilsDeferred()\n\t\t\t\t};\n\n\t\t\t\tprereqs.screen.then(function () {\n\t\t\t\t\tif (prereqs === self._prereqs) {\n\t\t\t\t\t\tscreenPrereq();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tprereqs.container.then(function() {\n\t\t\t\t\tif (prereqs === self._prereqs) {\n\t\t\t\t\t\tcontainerPrereq();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tns.utils.deferredWhen(prereqs.screen, prereqs.container).done(function() {\n\t\t\t\t\tif ( prereqs === self._prereqs ) {\n\t\t\t\t\t\tself._prereqs = null;\n\t\t\t\t\t\twhenDone();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself._prereqs = prereqs;\n\t\t\t};"},{"params":[{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"boolean","name":"options.additionalCondition","description":"","isOptional":true},{"type":"param","types":"string","name":"options.transition","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.classToRemove","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.screenClassToAdd","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.containerClassToAdd","description":"","isOptional":true},{"type":"param","types":"boolean","name":"options.applyTransition","description":"","isOptional":true},{"type":"param","types":"Object","name":"options.prereqs","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"_animate","tags":[{"type":"method","string":"_animate"},{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"boolean","name":"options.additionalCondition","description":"","isOptional":true},{"type":"param","types":"string","name":"options.transition","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.classToRemove","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.screenClassToAdd","description":"","isOptional":true},{"type":"param","types":"Array | string","name":"options.containerClassToAdd","description":"","isOptional":true},{"type":"param","types":"boolean","name":"options.applyTransition","description":"","isOptional":true},{"type":"param","types":"Object","name":"options.prereqs","description":"","isOptional":true,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set animation</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._animate = function (options) {\n\t\t\t\tvar ui = this._ui,\n\t\t\t\t\tscreenClasses = ui.screen.classList,\n\t\t\t\t\tcontainer = ui.container,\n\t\t\t\t\tcontainerClasses = container.classList,\n\t\t\t\t\ttransition = options.transition,\n\t\t\t\t\tclassesToRemove = typeof options.classToRemove === \"string\" ? options.classToRemove.split(\" \") : options.classToRemove,\n\t\t\t\t\tclassesToRemoveLen = classesToRemove.length,\n\t\t\t\t\tclasses,\n\t\t\t\t\tclassesLen,\n\t\t\t\t\tlen,\n\t\t\t\t\ti;\n\n\t\t\t\tfor (i = 0; i < classesToRemoveLen; i++) {\n\t\t\t\t\tif (classesToRemove[i]) {\n\t\t\t\t\t\tscreenClasses.remove(classesToRemove[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclasses = typeof options.screenClassToAdd === \"string\" ? options.screenClassToAdd.split(\" \") : options.screenClassToAdd;\n\t\t\t\tclassesLen = classes.length;\n\t\t\t\tfor (i = 0; i < classesLen; i++) {\n\t\t\t\t\tscreenClasses.add(classes[i]);\n\t\t\t\t}\n\n\t\t\t\toptions.prereqs.screen.resolve();\n\n\t\t\t\tif (transition && transition !== \"none\") {\n\t\t\t\t\tif (options.applyTransition) {\n\t\t\t\t\t\tthis._applyTransition(transition);\n\t\t\t\t\t}\n\t\t\t\t\tanimationComplete(container, options.prereqs.container.resolve);\n\t\t\t\t\tclasses = typeof options.containerClassToAdd === \"string\" ? options.containerClassToAdd.split(\" \") : options.containerClassToAdd;\n\t\t\t\t\tclassesLen = classes.length;\n\t\t\t\t\tfor (i = 0; i < classesLen; i++) {\n\t\t\t\t\t\tcontainerClasses.add(classes[i]);\n\t\t\t\t\t}\n\t\t\t\t\tfor (i = 0; i < classesToRemoveLen; i++) {\n\t\t\t\t\t\tif (classesToRemove[i]) {\n\t\t\t\t\t\t\tcontainerClasses.remove(classesToRemove[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (i = 0; i < classesToRemoveLen; i++) {\n\t\t\t\t\t\tif (classesToRemove[i]) {\n\t\t\t\t\t\t\tcontainerClasses.remove(classesToRemove[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\toptions.prereqs.container.resolve();\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_openPrereqsComplete","tags":[{"type":"method","string":"_openPrereqsComplete"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Animation's callback on completed opening</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._openPrereqsComplete = function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tcontainer = self._ui.container;\n\n\t\t\t\tcontainer.classList.add(Popup.classes.uiPopupActive);\n\t\t\t\tself._isOpen = true;\n\t\t\t\tself._isPreOpen = false;\n\n\t\t\t\t// Android appears to trigger the animation complete before the popup\n\t\t\t\t// is visible. Allowing the stack to unwind before applying focus prevents\n\t\t\t\t// the \"blue flash\" of element focus in android 4.0\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\n\t\t\t\t\tcontainer.focus();\n\t\t\t\t\tevents.trigger(self.element, \"popupafteropen\");\n\t\t\t\t});\n\t\t\t},"},{"params":[{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["void"],"description":""},"name":"_open","tags":[{"type":"method","string":"_open"},{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true},{"type":"return","types":["void"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set popup, which will be opened</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._open = function (options, event) {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tposition = doms.getNSData(element, \"position-to\"),\n\t\t\t\t\tclasses = Popup.classes,\n\t\t\t\t\tsavedOptions = this.options,\n\t\t\t\t\telementTheme = savedOptions.theme,\n\t\t\t\t\tui = this._ui,\n\t\t\t\t\tuiContainer = ui.container,\n\t\t\t\t\tuiContainerClasses = uiContainer.classList,\n\t\t\t\t\tlinkElement,\n\t\t\t\t\ttransition,\n\t\t\t\t\ttop,\n\t\t\t\t\tleft;\n\n\t\t\t\tthis._isPreOpen = true;\n\n\t\t\t\toptions = options || {};\n\t\t\t\ttop = savedOptions.positionY = options.positionY;\n\t\t\t\tleft = savedOptions.positionX = options.positionX;\n\t\t\t\ttransition = options.transition || savedOptions.transition;\n\n\t\t\t\tthis._setTolerance(element, options.tolerance);\n\n\t\t\t\t// Give applications a chance to modify the contents of the container before it appears\n\t\t\t\tevents.trigger(this.element, \"beforeposition\");\n\n\n\t\t\t\tif (options.link) {\n\t\t\t\t\tsavedOptions.link = options.link;\n\t\t\t\t\tsavedOptions.positionTo = options.positionTo || position || \"origin\";\n\t\t\t\t} else {\n\t\t\t\t\tif (event) {\n\t\t\t\t\t\tlinkElement = selectors.getClosestBySelector(event.target, \"[data-role='button'],input[type='button']\");\n\t\t\t\t\t\tsavedOptions.link =  linkElement ? linkElement.getAttribute(\"id\") : null;\n\t\t\t\t\t\tsavedOptions.positionTo = options.positionTo || position || \"origin\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (element.classList.contains(classes.uiCtxpopupOptionmenu)) {\n\t\t\t\t\tsavedOptions.isHardwarePopup = true;\n\t\t\t\t}\n\n\t\t\t\tthis._setContextStyle(options.popupwindow);\n\t\t\t\tthis._setPosition(left, top);\n\t\t\t\tthis._setCorners(options.corners || savedOptions.corners);\n\n\n\t\t\t\tthis._createPrereqs(function(){}, function(){}, this._openPrereqsComplete.bind(this));\n\n\t\t\t\tif (transition) {\n\t\t\t\t\tthis._currentTransition = transition;\n\t\t\t\t\tthis._applyTransition(transition);\n\t\t\t\t}\n\n\t\t\t\tif (elementTheme) {\n\t\t\t\t\telement.classList.add(classes.uiBodyPrefix + elementTheme);\n\t\t\t\t}\n\n\t\t\t\tui.screen.classList.remove(classes.SCREEN_HIDDEN);\n\t\t\t\tuiContainerClasses.remove(classes.uiSelectmenuHidden);\n\t\t\t\tthis._page.classList.add(classes.uiPopupOpen);\n\n\t\t\t\tthis._animate({\n\t\t\t\t\tadditionalCondition: true,\n\t\t\t\t\ttransition: transition,\n\t\t\t\t\tclassToRemove: \"\",\n\t\t\t\t\tscreenClassToAdd: classes.IN,\n\t\t\t\t\tcontainerClassToAdd: classes.IN,\n\t\t\t\t\tapplyTransition: false,\n\t\t\t\t\tprereqs: this._prereqs\n\t\t\t\t});\n\n\t\t\t\t// This fix problem with host keyboard\n\t\t\t\tremoveProperties(element);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_closePrereqScreen","tags":[{"type":"method","string":"_closePrereqScreen"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Animation's callback on scren closing</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._closePrereqScreen = function() {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tscreenClasses = this._ui.screen.classList;\n\n\t\t\t\tscreenClasses.remove(classes.OUT);\n\t\t\t\tscreenClasses.add(classes.SCREEN_HIDDEN);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_closePrereqContainer","tags":[{"type":"method","string":"_closePrereqContainer"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Animation's callback on container closing</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._closePrereqContainer = function() {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tcontainer = this._ui.container,\n\t\t\t\t\tcontainerClasses = container.classList;\n\n\t\t\t\tcontainerClasses.remove(classes.REVERSE);\n\t\t\t\tcontainerClasses.remove(classes.OUT);\n\t\t\t\tcontainerClasses.add(classes.uiSelectmenuHidden);\n\t\t\t\tcontainer.removeAttribute(\"style\");\n\t\t\t},"},{"params":[],"hasParams":false,"name":"_closePrereqsDone","tags":[{"type":"method","string":"_closePrereqsDone"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Animation's callbacl on completed closing</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._closePrereqsDone = function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\topts = self.options;\n\n\t\t\t\tself._ui.container.removeAttribute(\"tabindex\");\n\n\t\t\t\t// @todo?\n\t\t\t\t// remove nav bindings if they are still present\n\t\t\t\t//opts.container.unbind( opts.closeEvents );\n\n\t\t\t\t// @todo?\n\t\t\t\t// unbind click handlers added when history is disabled\n\t\t\t\t//self.element.undelegate( opts.closeLinkSelector, opts.closeLinkEvents );\n\n\t\t\t\tns.activePopup = null;\n\t\t\t\tevents.trigger(document, \"activePopup\", null);\n\t\t\t\tevents.trigger(this.element, \"popupafterclose\");\t\t// this event must be triggered after setting mobile.popup.active\n\t\t\t},"},{"params":[],"hasParams":false,"return":{"type":"return","types":["void"],"description":""},"name":"_close","tags":[{"type":"method","string":"_close"},{"type":"return","types":["void"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Set popup, which will be closed</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._close = function (immediate) {\n\t\t\t\tvar classes = Popup.classes,\n\t\t\t\t\tui = this._ui,\n\t\t\t\t\tuiContainer = ui.container,\n\t\t\t\t\tuiContainerClass = uiContainer.classList,\n\t\t\t\t\telement = this.element,\n\t\t\t\t\tinputs = [].slice.call(element.querySelectorAll(\"input\"));\n\n\t\t\t\tuiContainerClass.remove(classes.uiPopupActive);\n\t\t\t\tthis._page.classList.remove(classes.uiPopupOpen);\n\n\t\t\t\tthis._isOpen = false;\n\t\t\t\tthis._isPreOpen = false;\n\n\t\t\t\tinputs.forEach(function(input){\n\t\t\t\t\tinput.blur();\n\t\t\t\t});\n\n\t\t\t\t// Count down to triggering \"popupafterclose\" - we have two prerequisites:\n\t\t\t\t// 1. The popup window reverse animation completes (container())\n\t\t\t\t// 2. The screen opacity animation completes (screen())\n\t\t\t\tthis._createPrereqs(\n\t\t\t\t\tthis._closePrereqScreen.bind(this),\n\t\t\t\t\tthis._closePrereqContainer.bind(this),\n\t\t\t\t\tthis._closePrereqsDone.bind(this));\n\n\t\t\t\tthis._animate( {\n\t\t\t\t\tadditionalCondition: this._ui.screen.classList.contains(\"in\"),\n\t\t\t\t\ttransition: (immediate ? \"none\" : (this._currentTransition || this.options.transition)),\n\t\t\t\t\tclassToRemove: classes.IN,\n\t\t\t\t\tscreenClassToAdd: classes.OUT,\n\t\t\t\t\tcontainerClassToAdd: [classes.REVERSE, classes.OUT],\n\t\t\t\t\tapplyTransition: true,\n\t\t\t\t\tprereqs: this._prereqs\n\t\t\t\t});\n\n\t\t\t\trestoreProperties(element);\n\t\t\t};"},{"params":[{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["void"],"description":""},"name":"open","tags":[{"type":"method","string":"open"},{"type":"param","types":"Object","name":"options","description":"","isOptional":false,"isLast":true},{"type":"return","types":["void"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Open popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype.open = function (options, event) {\n\t\t\t\tvar activePopup = ns.activePopup,\n\t\t\t\t\tclosePopup,\n\t\t\t\t\tstartOpeningCallback = startOpeningPopup.bind(null, this, options, event);\n\n\t\t\t\tif (activePopup === this) {\n\t\t\t\t\treturn;\n\t\t\t\t} else if (activePopup) {\n\t\t\t\t\tevents.one(activePopup.element, \"popupafterclose\", startOpeningCallback);\n\t\t\t\t\tif (activePopup._isOpen) {\n\t\t\t\t\t\tactivePopup.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclosePopup = activePopup.close.bind(activePopup);\n\t\t\t\t\t\tevents.one(activePopup.element, \"popupafteropen\", closePopup);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tstartOpeningCallback();\n\t\t\t\t}\n\t\t\t\tns.activePopup = this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["void"],"description":""},"name":"close","tags":[{"type":"method","string":"close"},{"type":"return","types":["void"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"}],"example":"","brief":"<p>Close popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype.close = function (immediate) {\n\t\t\t\t// @todo define mutex $.mobile.popup.active\n\t\t\t\tif (!ns.activePopup || !this._isOpen) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._close(immediate);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._bindEvents = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tbuttons = self.element.querySelectorAll(self.options.closeLinkSelector),\n\t\t\t\t\ti,\n\t\t\t\t\tbuttonsLen = buttons.length;\n\t\t\t\tself._onClickBound = _eatEventAndClose.bind(null, self);\n\t\t\t\tself._onResizeBound = onResize.bind(null, self);\n\t\t\t\tself._closeOnEvent = self.close.bind(self, true);\n\t\t\t\tself._destroyOnEvent = self.destroy.bind(self, self.element);\n\n\t\t\t\tself._ui.screen.addEventListener(\"vclick\", self._onClickBound, true);\n\t\t\t\twindow.addEventListener(\"throttledresize\", self._onResizeBound, true);\n\t\t\t\tif (buttonsLen) {\n\t\t\t\t\tfor (i = 0; i < buttonsLen; i++) {\n\t\t\t\t\t\tbuttons[i].addEventListener(\"click\", self._closeOnEvent, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself._page.addEventListener(\"pagebeforehide\", self._closeOnEvent, true);\n\t\t\t\tself._page.addEventListener(\"pagedestroy\", self._destroyOnEvent, true);\n\t\t\t\t// @todo\n\t\t\t\t// - orientationchange\n\t\t\t\t// - resize\n\t\t\t\t// - keyup\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Popup"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy popup</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Popup.prototype._destroy = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tclasses = Popup.classes,\n\t\t\t\t\tui = self._ui,\n\t\t\t\t\tuiScreen = ui.screen,\n\t\t\t\t\tuiPlaceholder = ui.placeholder,\n\t\t\t\t\tpage = self._page,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\tbuttons = element.querySelectorAll(self.options.closeLinkSelector),\n\t\t\t\t\ti,\n\t\t\t\t\tbuttonsLen = buttons.length;\n\n\t\t\t\t// When we destroy widget, we close it without animation\n\t\t\t\tself.close(true);\n\n\t\t\t\tuiScreen.removeEventListener(\"vclick\", self._onClickBound, true);\n\t\t\t\twindow.removeEventListener(\"throttledresize\", self._onResizeBound, true);\n\t\t\t\tif (buttonsLen) {\n\t\t\t\t\tfor (i = 0; i < buttonsLen; i++) {\n\t\t\t\t\t\tbuttons[i].removeEventListener(\"click\", self._closeOnEvent, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpage.removeEventListener(\"pagebeforehide\", self._closeOnEvent, true);\n\t\t\t\tpage.removeEventListener(\"pagedestroy\", self._destroyOnEvent, true);\n\n\t\t\t\tdoms.insertNodesBefore(uiPlaceholder, element);\n\t\t\t\telementClasses.remove(classes.uiPopup);\n\t\t\t\telementClasses.remove(classes.uiOverlaryShadow);\n\t\t\t\telementClasses.remove(classes.uiCornerAll);\n\t\t\t\tuiPlaceholder.parentNode.removeChild(uiPlaceholder);\n\t\t\t\tui.arrow.parentNode.removeChild(ui.arrow);\n\t\t\t\tui.container.parentNode.removeChild(ui.container);\n\t\t\t\tuiScreen.parentNode.removeChild(uiScreen);\n\t\t\t};"}]},{"name":"ns.widget.Datetimepicker","authors":[],"extends":"ns.widget.mobile.BaseWidgetMobile","title":"DateTimePicker widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"var Datetimepicker = function () {\n\t\t\t\t\tthis.options = {\n\t\t\t\t\t\ttype: null, // date, time, datetime applicable\n\t\t\t\t\t\tformat: null,\n\t\t\t\t\t\tdate: null\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tBaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tdom = ns.utils.DOM,\n\t\t\t\tglobalize = ns.utils.globalize,\n\t\t\t\tevents = ns.utils.events,\n\t\t\t\trange = ns.utils.array.range,\n\t\t\t\tdaysInMonth = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],\n\t\t\t\tparsePatternRegexp = /\\/|\\s|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|f|gg|g|'[\\w\\W]*'$|[\\w\\W]/g,\n\t\t\t\tfieldRegexp = /ui-datefield-([\\w]*)/;\n\n\t\t\tDatetimepicker.prototype = new BaseWidget();\n\n\t\t\tDatetimepicker.classes = {\n\t\t\t\tuiBtnPicker: 'ui-btn-picker',\n\t\t\t\tuiDatefield: 'ui-datefield',\n\t\t\t\tuiDatefieldPrefix: 'ui-datefield-',\n\t\t\t\tuiDatefieldSelected: 'ui-datefield-selected',\n\t\t\t\tuiDatefieldPeriod: 'ui-datefield-period',\n\t\t\t\tuiLink: 'ui-link',\n\t\t\t\tuiDatetimepickerSelector: 'ui-datetimepicker-selector',\n\t\t\t\tuiDatetimepicker: 'ui-datetimepicker',\n\t\t\t\tuiInputText: 'ui-input-text',\n\t\t\t\tuiBodyPrefix: 'ui-body-',\n\t\t\t\tuiDivider1st: 'ui-divider-1st',\n\t\t\t\tuiDivider2nd: 'ui-divider-2nd',\n\t\t\t\tinClass: 'in',\n\t\t\t\toutClass: 'out',\n\t\t\t\tcurrent: 'current'\n\t\t\t};\n\n\t\t\tfunction getCalendar() {\n\t\t\t\treturn globalize.culture().calendars.standard;\n\t\t\t}\n\n\t\t\tfunction isLeapYear(year) {\n\t\t\t\treturn year % 4 ? 0 : (year % 100 ? 1 : (year % 400 ? 0 : 1));\n\t\t\t}\n\n\t\t\tfunction makeTwoDigits(val) {\n\t\t\t\tvar ret = val.toString(10);\n\t\t\t\tif (val < 10) {\n\t\t\t\t\tret = \"0\" + ret;\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tfunction createDateField(type, pat, container) {\n\t\t\t\tvar span = document.createElement('span'),\n\t\t\t\t\tspanClassList = span.classList,\n\t\t\t\t\tclasses = Datetimepicker.classes;\n\t\t\t\tif (type !== 'seperator' && type !== 'tab') {\n\t\t\t\t\tspanClassList.add(classes.uiBtnPicker);\n\t\t\t\t\tdom.setNSData(span, 'type', type);\n\t\t\t\t}\n\t\t\t\tspanClassList.add(classes.uiDatefieldPrefix + type);\n\t\t\t\tdom.setNSData(span, 'pat', pat);\n\t\t\t\tif (type !== 'seperator' && type !== 'tab') {\n\t\t\t\t\tdom.setNSData(span, 'role', \"button\");\n\t\t\t\t\tdom.setNSData(span, 'inline', \"true\");\n\t\t\t\t\tengine.instanceWidget(span, 'Button');\n\t\t\t\t}\n\t\t\t\tdom.appendNodes(container, span);\n\t\t\t\treturn span;\n\t\t\t}\n\n\t\t\tfunction updateField(self, target, value) {\n\t\t\t\tvar pat,\n\t\t\t\t\thour,\n\t\t\t\t\ttext,\n\t\t\t\t\ttargetClassList,\n\t\t\t\t\tclasses = Datetimepicker.classes;\n\n\t\t\t\tif (!target) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\tvalue = \"0\";\n\t\t\t\t}\n\n\t\t\t\tpat = dom.getNSData(target, 'pat');\n\t\t\t\ttargetClassList = target.classList;\n\n\t\t\t\tswitch (pat) {\n\t\t\t\t\tcase 'H':\n\t\t\t\t\tcase 'HH':\n\t\t\t\t\tcase 'h':\n\t\t\t\t\tcase 'hh':\n\t\t\t\t\t\thour = value;\n\t\t\t\t\t\tif (pat.charAt(0) === 'h') {\n\t\t\t\t\t\t\tif (hour > 12) {\n\t\t\t\t\t\t\t\thour -= 12;\n\t\t\t\t\t\t\t} else if (hour === 0) {\n\t\t\t\t\t\t\t\thour = 12;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\thour = makeTwoDigits(hour);\n\t\t\t\t\t\ttext = hour;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'm':\n\t\t\t\t\tcase 'M':\n\t\t\t\t\tcase 'd':\n\t\t\t\t\tcase 's':\n\t\t\t\t\t\ttext = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mm':\n\t\t\t\t\tcase 'dd':\n\t\t\t\t\tcase 'MM':\n\t\t\t\t\tcase 'ss':\n\t\t\t\t\t\ttext = makeTwoDigits(value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MMM':\n\t\t\t\t\t\ttext = getCalendar().months.namesAbbr[value - 1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MMMM':\n\t\t\t\t\t\ttext = getCalendar().months.names[value - 1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'yy':\n\t\t\t\t\t\ttext = makeTwoDigits(value % 100);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'yyyy':\n\t\t\t\t\t\tif (value < 10) {\n\t\t\t\t\t\t\tvalue = '000' + value;\n\t\t\t\t\t\t} else if (value < 100) {\n\t\t\t\t\t\t\tvalue = '00' + value;\n\t\t\t\t\t\t} else if (value < 1000) {\n\t\t\t\t\t\t\tvalue = '0' + value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttext = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 't':\n\t\t\t\t\tcase 'tt':\n\t\t\t\t\t\ttext = value;\n\t\t\t\t\t\ttarget = target.firstChild.firstChild;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// to avoid reflow where its value isn't out-dated\n\t\t\t\tif (target.innerText !== text) {\n\t\t\t\t\tif (targetClassList.contains(classes.uiDatefieldSelected)) {\n\t\t\t\t\t\ttargetClassList.add(classes.outClass);\n\t\t\t\t\t\tself._new_value = text;","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["BaseWidgetMobile"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\twidgetName;\n\t\t\t\tparent_configure.call(self, definition, element, options);\n\t\t\t\tif (definition) {\n\t\t\t\t\tdefinitionName = definition.name;\n\t\t\t\t\twidgetName = definitionName && definitionName.toLowerCase();"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget, call: #_disable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_disable.apply(self, args);\n\t\t\t\telementClasses.add(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.add(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, true);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_enable.apply(self, args);\n\t\t\t\telementClasses.remove(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.remove(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, false);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true}],"hasParams":true,"name":"raise","tags":[{"type":"method","string":"raise"},{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Throw exception</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.raise = function (msg) {\n\t\t\t\tthrow \"Widget [\" + this.widgetName + \"]: \" + msg;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhanceWithin","tags":[{"type":"method","string":"enhanceWithin"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhanceWithin = function () {\n\t\t\t\tns.log('method enhanceWithin is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhance","tags":[{"type":"method","string":"enhance"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhance = function () {\n\t\t\t\tns.log('method enhance is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"widget","tags":[{"type":"method","string":"widget"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Return element of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.widget = function () {\n\t\t\t\treturn this.element;\n\t\t\t};\n\n\t\t\tBaseWidgetMobile.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.BaseWidgetMobile = BaseWidgetMobile;\n\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.mobile.Slider","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>","Piotr Karny <p.karny@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Slider widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\tvar Slider = function () {\n\t\t\t\tvar self = this;\n\n\t\t\t\t\tself.options = {\n\t\t\t\t\t\ttrackTheme: null,\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tmini: null,\n\t\t\t\t\t\thighlight: true,\n\t\t\t\t\t\tinline: null,\n\t\t\t\t\t\ttheme: null\n\t\t\t\t\t};\n\t\t\t\t\tself._ui = {};\n\t\t\t\t\t//container for slider containing handle.element\n\t\t\t\t\tself.slider = null;\n\t\t\t\t\tself.handle = null;\n\t\t\t\t\t//container background\n\t\t\t\t\tself.valueBackGround = null;\n\t\t\t\t\tself.dragging = false;\n\t\t\t\t\tself.beforeStart = null;\n\t\t\t\t\tself.userModified = false;\n\t\t\t\t\tself.mouseMoved = false;\n\t\t\t\t},\n\t\t\t\tBaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tButton = ns.widget.mobile.Button,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tevents = ns.utils.events,\n\t\t\t\tthemes = ns.theme,\n\t\t\t\tselectors = ns.utils.selectors,\n\t\t\t\tDOMutils = ns.utils.DOM;\n\n\t\t\tSlider.prototype = new BaseWidget();","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Slider"}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Slider.prototype._init = function (element) {\n\t\t\t\tvar elementId = element.id,\n\t\t\t\t\tself = this;\n\n\t\t\t\tself.element = element;\n\t\t\t\tself.slider = document.getElementById(elementId + \"-slider\");\n\t\t\t\tself.handle = document.getElementById(elementId + \"-handle\");\n\t\t\t\tself._ui.container = document.getElementById(elementId + \"-container\") || element;\n\t\t\t\tself._ui.background = self.slider.querySelector('.' + Slider.classes.sliderBg);\n\t\t\t\tself._type = element.tagName.toLowerCase();\n\t\t\t\tself._labels = selectors.getChildrenByClass(self.slider, Slider.classes.sliderLabel);\n\n\t\t\t\trefresh(self, self._getValue());\n\t\t\t};\n\n\t\t\tSlider.prototype._getValue = function () {\n\t\t\t\treturn this._type === \"input\" ? parseFloat(this.element.value) : this.element.selectedIndex;\n\t\t\t};\n\n\t\t\tSlider.prototype._refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (self.value !== self._getValue()) {\n\t\t\t\t\trefresh(self, self._getValue());\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tSlider.prototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\thandle = self.handle,\n\t\t\t\t\ttagName = element.nodeName.toLowerCase(),\n\t\t\t\t\tslider = self.slider;\n\n\t\t\t\telement.addEventListener('change', function () {\n\t\t\t\t\tif (!self.mouseMoved) {\n\t\t\t\t\t\trefresh(self, self._getValue(), true);\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\n\t\t\t\telement.addEventListener('keyup', function () {\n\t\t\t\t\trefresh(self, self._getValue(), true, true);\n\t\t\t\t}, false);\n\n\t\t\t\telement.addEventListener('blur', function () {\n\t\t\t\t\trefresh(self, self._getValue(), true);\n\t\t\t\t}, false);\n\n\t\t\t\thandle.addEventListener('vmousedown', function (event) {\n\t\t\t\t\tevents.trigger(event.target, 'focus');\n\t\t\t\t}, false);\n\t\t\t\thandle.addEventListener('vclick', function (event) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}, false);\n\t\t\t\thandle.addEventListener('keydown', function () {\n\t\t\t\t\t// @todo"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Slider"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable slider</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Slider.prototype._enable = function (element) {\n\t\t\t\tvar btnClasses = Button.classes;\n\n\t\t\t\telement.removeAttribute(\"disabled\");\n\t\t\t\tthis.slider.classList.remove( btnClasses.uiDisabled );\n\t\t\t\tthis.slider.setAttribute(\"aria-disabled\", false);\n\t\t\t\tthis.options.disabled = false;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Slider"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable slider</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Slider.prototype._disable = function (element) {\n\t\t\t\tvar btnClasses = Button.classes;\n\n\t\t\t\telement.setAttribute(\"disabled\", \"disabled\");\n\t\t\t\tthis.slider.classList.add( btnClasses.uiDisabled );\n\t\t\t\tthis.slider.setAttribute( \"aria-disabled\", true );\n\t\t\t\tthis.options.disabled = true;\n\t\t\t};\n\n\t\t\t// @TODO add destroy() method\n\n\t\t\tns.widget.mobile.Slider = Slider;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Slider\",\n\t\t\t\t\"select[data-role='slider'],select[data-type='range']\",\n\t\t\t\t[],\n\t\t\t\tSlider,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Swipe","authors":[],"extends":"ns.widget.BaseWidget","title":"Swipe Widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\tvar Swipe = function () {\n\t\t\t\t\tvar self = this;\n\n\t\t\t\t\tself.options = {\n\t\t\t\t\t\ttheme: null\n\t\t\t\t\t};\n\t\t\t\t\tself._isOpen = false;\n\t\t\t\t},","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Selectmenu","authors":["Damian Osipiuk <d.osipiuk@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Selectmenu widget","brief":"","description":"<h2>Default selectors</h2>\n\n<p>In default all elements with <em>data-role=select</em> are changed to Tizen WebUI selectmenu.<br />Additionally elements with <em>data-native-menu=false</em> will use custom popups for option selection</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of selectmenu widget you can use constructor of widget:</p>\n\n<h2>Examples</h2>\n\n<h4>Build widget from JavaScript</h4>\n\n<pre><code>    @example\n    var element = document.getElementById('id'),\n        ns.engine.instanceWidget(element, 'Selectmenu');\n</code></pre>\n\n<h4>Build widget from jQuery</h4>\n\n<pre><code>    @example\n    var element = $('#id').selectmenu();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple selectmenu from div</h3>\n\n<pre><code>    @example\n    &lt;select id=\"selectmenu\" data-native-menu=\"false\"&gt;\n        &lt;option value=\"1\"&gt;The 1st Option&lt;/option&gt;\n        &lt;option value=\"2\"&gt;The 2nd Option&lt;/option&gt;\n        &lt;option value=\"3\"&gt;The 3rd Option&lt;/option&gt;\n        &lt;option value=\"4\"&gt;The 4th Option&lt;/option&gt;\n    &lt;/select&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"String","name":"id","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"markLabelAsSelectmenu","tags":[{"type":"method","string":"markLabelAsSelectmenu"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"String","name":"id","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Add class to label marked for select</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function markLabelAsSelectmenu(element, id) {\n\t\t\t\tvar classes = Selectmenu.classes,\n\t\t\t\t\tchildren,\n\t\t\t\t\ti,\n\t\t\t\t\tl;\n\t\t\t\t\t\n\t\t\t\tchildren = selectors.getChildrenBySelector(element, '[for=' + id + ']');\n\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tchildren[i].classList.add(classes.uiSelect);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"String","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"findOptionByValue","tags":[{"type":"method","string":"findOptionByValue"},{"type":"param","types":"Object","name":"options","description":"","isOptional":false},{"type":"param","types":"String","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Find select option by provided value</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function findOptionByValue(options, value) {\n\t\t\t\treturn (options[0] && options[0].parentNode.querySelector('option[value=\"' + value + '\"]')) || null;\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"isNative","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"updateButtonText","tags":[{"type":"method","string":"updateButtonText"},{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"isNative","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Update text of a select button</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function updateButtonText(element, isNative) {\n\t\t\t\tvar selectOptions = element.options,\n\t\t\t\t\tselectButtonText,\n\t\t\t\t\tbuttonText,\n\t\t\t\t\ti,\n\t\t\t\t\tl;\n\n\t\t\t\tif (isNative) {\n\t\t\t\t\tselectButtonText = element.parentNode.querySelector(\"span > span\");\n\t\t\t\t} else {\n\t\t\t\t\tselectButtonText = element.parentNode.querySelector(\"a > span > span\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (i = 0, l = selectOptions.length; i < l; i++) {\n\t\t\t\t\tif (selectOptions[i].selected) {\n\t\t\t\t\t\tif (buttonText) {\n\t\t\t\t\t\t\tbuttonText = buttonText + ', ' + selectOptions[i].text;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuttonText = selectOptions[i].text;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tselectButtonText.innerHTML = buttonText;\n\t\t\t}"},{"params":[],"hasParams":false,"name":"open","tags":[{"type":"method","string":"open"},{"type":"public","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>No-op function placeholder for native support</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Selectmenu.prototype.open = function() {\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"close","tags":[{"type":"method","string":"close"},{"type":"public","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>No-op function placeholder for native support</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Selectmenu.prototype.close = function() {\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Set widget state to disabled</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._disable = function() {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tclasses = Selectmenu.classes,\n\t\t\t\t\tparentElement = element.parentNode,\n\t\t\t\t\tbutton;\n\n\t\t\t\tif (options.nativeElement === false) {\n\t\t\t\t\toptions.disabled = true;\n\t\t\t\t\telement.setAttribute('disabled', 'disabled');\n\t\t\t\t\tbutton = parentElement.querySelector('a');\n\t\t\t\t\tif (button) {\n\t\t\t\t\t\tbutton.setAttribute('aria-disabled', 'true');\n\t\t\t\t\t\tbutton.classList.add(classes.uiDisabled);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Set widget state to enabled</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._enable = function() {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tclasses = Selectmenu.classes,\n\t\t\t\t\tparentElement = element.parentNode,\n\t\t\t\t\tbutton;\n\n\t\t\t\tif (options.nativeElement === false) {\n\t\t\t\t\toptions.disabled = false;\n\t\t\t\t\telement.removeAttribute('disabled');\n\t\t\t\t\tbutton = parentElement.querySelector('a');\n\t\t\t\t\tif (button) {\n\t\t\t\t\t\tbutton.setAttribute('aria-disabled', 'false');\n\t\t\t\t\t\tbutton.classList.remove(classes.uiDisabled);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_buildList","tags":[{"type":"method","string":"_buildList"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Build custom select popup list structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._buildList = function () {\n\t\t\t\tvar classes = Selectmenu.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\telement = this.element,\n\t\t\t\t\twrapper = element.parentNode,\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\n\t\t\t\t\tpopupDiv,\n\t\t\t\t\tpopupHeader,\n\t\t\t\t\tpopupHeaderClassList,\n\t\t\t\t\tpopupHeaderTitle,\n\t\t\t\t\tpopupHeaderButton,\n\t\t\t\t\tpopupContent,\n\t\t\t\t\telementLabel,\n\n\t\t\t\t\tlistView,\n\t\t\t\t\tselectOption,\n\t\t\t\t\tselectOptionGroup,\n\t\t\t\t\tselectOptionGroupClassList,\n\t\t\t\t\toptGroup,\n\t\t\t\t\tselectOptionParent,\n\t\t\t\t\tselectLink,\n\t\t\t\t\tselectOptions,\n\t\t\t\t\toptLabel,\n\t\t\t\t\tselectCheckbox;\n\n\t\t\t\tpopupDiv = document.createElement('div');\n\n\t\t\t\tpopupHeader = document.createElement('div');\n\t\t\t\tpopupHeaderClassList = popupHeader.classList;\n\t\t\t\tpopupHeaderClassList.add(classes.uiBar + options.theme);\n\t\t\t\tpopupHeaderClassList.add(classes.uiHeader);\n\n\t\t\t\tpopupHeaderTitle = document.createElement('div');\n\t\t\t\tpopupHeaderTitle.classList.add(classes.uiTitle);\n\t\t\t\tpopupHeader.appendChild(popupHeaderTitle);\n\t\t\t\tpopupHeader.setAttribute(\"data-role\", \"header\");\n\t\t\t\tpopupDiv.appendChild(popupHeader);\n\n\t\t\t\tselectOptions = element.options;\n\n\t\t\t\tlistView = document.createElement('ul');\n\t\t\t\tlistView.setAttribute('id', element.id + '-menu');\n\t\t\t\tlistView.setAttribute(\"data-role\", \"listview\");\n\t\t\t\tlistView.setAttribute(\"aria-labelledby\", element.id);\n\n\t\t\t\t// If too many elements - should be display as dialog\n\t\t\t\tif (options.isDialog) {\n\t\t\t\t\tpopupDiv.setAttribute(\"data-role\", \"dialog\");\n\t\t\t\t\telementLabel = document.querySelector('[for=\"' + element.id + '\"]');\n\t\t\t\t\tif (elementLabel) {\n\t\t\t\t\t\tpopupHeaderTitle.appendChild( document.createTextNode( elementLabel.innerText ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpopupHeaderTitle.appendChild( document.createTextNode( '' ) );\n\t\t\t\t\t}\n\t\t\t\t\tpopupContent = document.createElement('div');\n\t\t\t\t\tpopupContent.setAttribute(\"data-role\", \"content\");\n\t\t\t\t\tpopupContent.appendChild(listView);\n\t\t\t\t\tpopupDiv.appendChild(popupContent);\n\t\t\t\t} else {\n\t\t\t\t\tpopupDiv.setAttribute(\"data-role\", \"popup\");\n\t\t\t\t\tpopupHeaderClassList.add(classes.uiScreenHidden);\n\t\t\t\t\tpopupHeaderClassList.add(classes.uiPopupTitle);\n\t\t\t\t\tpopupDiv.classList.add(classes.uiSelectMenu);\n\n\t\t\t\t\tif (options.multiple) {\n\t\t\t\t\t\tpopupHeaderButton = document.createElement('a');\n\t\t\t\t\t\tpopupHeaderButton.setAttribute(\"data-role\", \"button\");\n\t\t\t\t\t\tpopupHeaderButton.setAttribute(\"data-rel\", \"back\");\n\t\t\t\t\t\tpopupHeader.appendChild(popupHeaderButton);\n\t\t\t\t\t\tengine.instanceWidget(popupHeaderButton, \"Button\", {\n\t\t\t\t\t\t\ticon: 'delete',\n\t\t\t\t\t\t\tinline: true,\n\t\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tpopupDiv.appendChild(listView);\n\t\t\t\t}\n\n\t\t\t\twrapper.appendChild(popupDiv);\n\n\t\t\t\tfor (i = 0, l = selectOptions.length; i < l; i++) {\n\t\t\t\t\tif (selectOptions[i].text) {\n\t\t\t\t\t\tselectOption = document.createElement('li');\n\n\t\t\t\t\t\t// Are we inside an optgroup?\n\t\t\t\t\t\tselectOptionParent = selectOptions[i].parentNode;\n\t\t\t\t\t\tif ( selectOptionParent !== element && selectOptionParent.nodeName.toLowerCase() === \"optgroup\" ) {\n\t\t\t\t\t\t\toptLabel = selectOptionParent.getAttribute('label');\n\t\t\t\t\t\t\tif ( optLabel !== optGroup ) {\n\t\t\t\t\t\t\t\tselectOptionGroup = document.createElement('li');\n\t\t\t\t\t\t\t\tselectOptionGroup.setAttribute( \"data-role\", 'list-divider' );\n\t\t\t\t\t\t\t\tselectOptionGroup.setAttribute( \"role\", 'heading' );\n\t\t\t\t\t\t\t\tselectOptionGroupClassList = selectOptionGroup.classList;\n\t\t\t\t\t\t\t\tselectOptionGroupClassList.add(classes.uiLiDivider);\n\t\t\t\t\t\t\t\tselectOptionGroupClassList.add(classes.uiBar + options.theme);\n\t\t\t\t\t\t\t\tselectOptionGroup.appendChild( document.createTextNode( optLabel ) );\n\t\t\t\t\t\t\t\tlistView.appendChild( selectOptionGroup );\n\t\t\t\t\t\t\t\toptGroup = optLabel;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (selectOptions[i].getAttribute(\"data-placeholder\") || !selectOptions[i].getAttribute(\"value\")) {\n\t\t\t\t\t\t\tpopupHeaderTitle.appendChild(document.createTextNode(selectOptions[i].text));\n\t\t\t\t\t\t\tpopupHeader.classList.remove(classes.uiScreenHidden);\n\t\t\t\t\t\t\tselectOption.classList.add(classes.uiSelectmenuPlaceholder);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (selectOptions[i].getAttribute(\"disabled\")) {\n\t\t\t\t\t\t\tselectOption.appendChild(document.createTextNode(selectOptions[i].text));\n\t\t\t\t\t\t\tselectOption.classList.add(classes.uiDisabled);\n\t\t\t\t\t\t\t// Is multiple ?\n\t\t\t\t\t\t} else if (element.getAttribute(\"multiple\")) {\n\t\t\t\t\t\t\tselectLink = document.createElement('a');\n\t\t\t\t\t\t\tselectCheckbox = document.createElement('input');\n\t\t\t\t\t\t\tselectCheckbox.setAttribute(\"value\", selectOptions[i].value);\n\t\t\t\t\t\t\tselectCheckbox.setAttribute(\"type\", \"checkbox\");\n\t\t\t\t\t\t\tselectCheckbox.setAttribute(\"data-style\", \"check\");\n\t\t\t\t\t\t\tselectLink.appendChild(selectCheckbox);\n\t\t\t\t\t\t\tselectLink.appendChild(document.createTextNode(selectOptions[i].text));\n\t\t\t\t\t\t\tselectOption.appendChild(selectLink);\n\t\t\t\t\t\t\tif (selectOptions[i].selected) {\n\t\t\t\t\t\t\t\tselectCheckbox.setAttribute('checked', 'checked');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectLink = document.createElement('a');\n\t\t\t\t\t\t\tselectLink.setAttribute(\"data-rel\", \"back\");\n\t\t\t\t\t\t\tselectLink.appendChild(document.createTextNode(selectOptions[i].text));\n\t\t\t\t\t\t\tselectOption.setAttribute(\"data-option-index\", i);\n\t\t\t\t\t\t\tselectOption.setAttribute(\"role\", 'option');\n\t\t\t\t\t\t\tselectOption.appendChild(selectLink);\n\t\t\t\t\t\t\tif (selectOptions[i].selected) {\n\t\t\t\t\t\t\t\tselectOption.classList.add(classes.uiBtnActive);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistView.appendChild(selectOption);\n\t\t\t\t\t\tif (selectCheckbox) {\n\t\t\t\t\t\t\tengine.instanceWidget(selectCheckbox, \"Checkboxradio\", {\n\t\t\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tselectCheckbox = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tengine.instanceWidget(listView, \"Listview\", {\n\t\t\t\t\ttheme: options.theme\n\t\t\t\t});\n\n\t\t\t\tif (options.isDialog) {\n\t\t\t\t\tengine.instanceWidget(popupDiv, \"Dialog\", {\n\t\t\t\t\t\tshadow: options.shadow,\n\t\t\t\t\t\tcorners: options.corners,\n\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tengine.instanceWidget(popupDiv, \"Popup\", {\n\t\t\t\t\t\tshadow: options.shadow,\n\t\t\t\t\t\tcorners: options.corners,\n\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\twrapper.firstChild.setAttribute('href', '#' + popupDiv.id);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"protected","string":""},{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Build widget structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._build = function (element) {\n\t\t\t\tvar classes = Selectmenu.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\twrapper,\n\t\t\t\t\tselectParent,\n\t\t\t\t\tselectButton,\n\t\t\t\t\tselectOptionClassList;\n\n\t\t\t\tthis.element = element;\n\n\t\t\t\tcheckIsNative(element, options);\n\n\t\t\t\tif (!options.nativeElement) {\n\t\t\t\t\tselectParent = element.parentNode;\n\t\t\t\t\tselectParent.removeChild(element);\n\t\t\t\t\tmarkLabelAsSelectmenu(selectParent, element.id);\n\n\t\t\t\t\twrapper = document.createElement('div');\n\t\t\t\t\twrapper.classList.add(classes.uiSelect);\n\t\t\t\t\tselectParent.appendChild(wrapper);\n\n\t\t\t\t\tif (options.nativeMenu) {\n\t\t\t\t\t\tselectButton = document.createElement('div');\n\t\t\t\t\t\tselectButton.appendChild(document.createTextNode(' '));\n\t\t\t\t\t\t// data-theme attribute is not set when widget instance is created (Test #24)\n\t\t\t\t\t\tselectButton.setAttribute('data-theme', options.theme);\n\t\t\t\t\t\twrapper.appendChild(selectButton);\n\t\t\t\t\t\tengine.instanceWidget(selectButton, \"Button\", {\n\t\t\t\t\t\t\ticonpos: options.iconpos,\n\t\t\t\t\t\t\ticon: options.icon,\n\t\t\t\t\t\t\tmini: options.mini,\n\t\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t\t});\n\t\t\t\t\t\tselectButton.appendChild(element);\n\t\t\t\t\t\tupdateButtonText(element, options.nativeMenu);\n\n\t\t\t\t\t\t// fix for test #31 - weird that classes must be overritten\n\t\t\t\t\t\tselectOptionClassList = element.options[element.selectedIndex].classList;\n\t\t\t\t\t\tif (selectOptionClassList.length > 0) {\n\t\t\t\t\t\t\tselectButton.firstChild.firstChild.setAttribute('class', selectOptionClassList);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectButton = document.createElement('a');\n\t\t\t\t\t\tselectButton.appendChild(document.createTextNode(' '));\n\t\t\t\t\t\t// Fix for bad looking buttons in current theme - to be removed\n\t\t\t\t\t\tselectButton.classList.add('ui-btn-box-' + options.theme);\n\t\t\t\t\t\t// data-theme attribute is not set when widget instance is created (Test #24)\n\t\t\t\t\t\tselectButton.setAttribute('data-theme', options.theme);\n\t\t\t\t\t\tif (options.isDialog) {\n\t\t\t\t\t\t\tselectButton.setAttribute('data-rel', 'dialog');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectButton.setAttribute('data-rel', 'popup');\n\t\t\t\t\t\t}\n\t\t\t\t\t\twrapper.appendChild(selectButton);\n\t\t\t\t\t\tengine.instanceWidget(selectButton, \"Button\", {\n\t\t\t\t\t\t\ticonpos: options.iconpos,\n\t\t\t\t\t\t\ticon: options.icon,\n\t\t\t\t\t\t\tinline: options.inline,\n\t\t\t\t\t\t\tmini: options.mini,\n\t\t\t\t\t\t\ttheme: options.theme\n\t\t\t\t\t\t});\n\t\t\t\t\t\twrapper.appendChild(element);\n\t\t\t\t\t\tupdateButtonText(element, options.nativeMenu);\n\t\t\t\t\t\tthis._buildList();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"protected","string":""},{"type":"param","types":"HTMLSelectElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Configure widget options</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._configure = function (element) {\n\t\t\t\tvar classes = Selectmenu.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ti,\n\t\t\t\t\tl;\n\n\t\t\t\t// If all options are empty  - whole widget should stay native (test #27)\n\t\t\t\tfor (i = 0, l = element.options.length; i < l; i++) {\n\t\t\t\t\tif (element.options[i].text) {\n\t\t\t\t\t\toptions.nativeElement = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!options.nativeElement) {\n\t\t\t\t\toptions.multiple = !!element.getAttribute(\"multiple\");\n\t\t\t\t\toptions.disabled = !!element.getAttribute(\"disabled\");\n\t\t\t\t\toptions.theme = themes.getInheritedTheme(element);\n\n\t\t\t\t\tcheckIsNative(element, options);\n\t\t\t\t\tif (!options.nativeMenu) {\n\t\t\t\t\t\toptions.isDialog = element.options.length >= options.elementsToDialog;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Bind widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._bindEvents = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tclasses = Selectmenu.classes,\n\t\t\t\t\teventHandlers = this._eventHandlers,\n\t\t\t\t\telementParent = element.parentNode,\n\t\t\t\t\tpopup,\n\t\t\t\t\tpopupContent,\n\t\t\t\t\tpopupScreen,\n\t\t\t\t\tpopupId;\n\n\t\t\t\tif (options.isDialog) {\n\t\t\t\t\tpopupId = selectors.getChildrenByTag(element.parentNode, 'a')[0].getAttribute('href').slice(1);\n\t\t\t\t\tpopup = document.getElementById(popupId);\n\t\t\t\t\tpopupContent = selectors.getChildrenByClass(popup.firstChild, 'ui-content')[0];\n\t\t\t\t} else {\n\t\t\t\t\tpopupId = elementParent.lastElementChild.id.replace('placeholder', '');\n\t\t\t\t\tpopupScreen = document.getElementById(popupId + 'screen');\n\t\t\t\t\tpopup = document.querySelector('[aria-labelledby=\"' + element.id + '\"]');\n\t\t\t\t}\n\n\t\t\t\teventHandlers.dialogButtonClick = dialogButtonClickHandler.bind(null, element, popup);\n\t\t\t\teventHandlers.selectItemClick = selectItemClickHandler.bind(null, element, options, classes);\n\t\t\t\teventHandlers.selectItemChange = selectItemChangeHandler.bind(null, element, options);\n\t\t\t\teventHandlers.nativeSelectMouseDown = nativeSelectMouseDownHandler.bind(null, options);\n\t\t\t\teventHandlers.nativeSelectMouseUp = nativeSelectMouseUpHandler.bind(null, options);\n\t\t\t\teventHandlers.nativeSelectChange = nativeSelectChangeHandler.bind(null, element, options, classes);\n\t\t\t\teventHandlers.popupScreenClick = popupScreenClickHandler.bind(null, element);\n\t\t\t\teventHandlers.popupAfterOpen = popupAfterOpenHandler.bind(null, popup);\n\n\t\t\t\tif (!options.nativeElement) {\n\t\t\t\t\tif (options.nativeMenu) {\n\t\t\t\t\t\telement.parentNode.addEventListener('vmousedown', eventHandlers.nativeSelectMouseDown, false);\n\t\t\t\t\t\telement.parentNode.addEventListener('mouseup', eventHandlers.nativeSelectMouseUp, false);\n\t\t\t\t\t\telement.addEventListener('change', eventHandlers.nativeSelectChange, false);\n\t\t\t\t\t} else if (options.isDialog) {\n\t\t\t\t\t\telementParent.addEventListener('click', eventHandlers.dialogButtonClick, false);\n\t\t\t\t\t\tpopupContent.addEventListener('click', eventHandlers.selectItemClick, false);\n\t\t\t\t\t\tpopupContent.addEventListener('change', eventHandlers.selectItemChange, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpopup.addEventListener('click', eventHandlers.selectItemClick, false);\n\t\t\t\t\t\tpopup.addEventListener('change', eventHandlers.selectItemChange, false);\n\t\t\t\t\t\tpopupScreen.addEventListener('vclick', eventHandlers.popupScreenClick, false);\n\t\t\t\t\t\tpopup.parentNode.addEventListener('popupafteropen', eventHandlers.popupAfterOpen, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tSelectmenu.prototype._init = function (element) {\n\t\t\t\tvar options = this.options;\n\n\t\t\t\tcheckIsNative(element, options);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Refresh structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._refresh = function () {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\telement = this.element,\n\t\t\t\t\telementParent = element.parentNode,\n\t\t\t\t\tpopupPlaceholder,\n\t\t\t\t\tpopupId,\n\t\t\t\t\tpopupScreen,\n\t\t\t\t\tpopup;\n\n\t\t\t\tif (options.nativeElement === false) {\n\t\t\t\t\tif (!options.nativeMenu) {\n\t\t\t\t\t\tif (options.isDialog) {\n\t\t\t\t\t\t\tpopupId = selectors.getChildrenByTag(element.parentNode, 'a')[0].hash.slice(1);\n\t\t\t\t\t\t\tpopup = document.getElementById(popupId);\n\t\t\t\t\t\t\tpopup.parentNode.removeChild(popup);\n\t\t\t\t\t\t\tthis._buildList();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpopupPlaceholder = elementParent.lastChild;\n\t\t\t\t\t\t\telementParent.removeChild(popupPlaceholder);\n\t\t\t\t\t\t\tpopupId = popupPlaceholder.id.replace('placeholder', '');\n\t\t\t\t\t\t\tpopupScreen = document.getElementById(popupId + 'screen');\n\t\t\t\t\t\t\tpopupScreen.parentNode.removeChild(popupScreen);\n\t\t\t\t\t\t\tpopup = document.querySelector('[id = ' + popupId + 'popup]');\n\t\t\t\t\t\t\tpopup.parentNode.removeChild(popup);\n\t\t\t\t\t\t\tthis._buildList();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tupdateButtonText(element, options.nativeMenu);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Selectmenu"}],"example":"","brief":"<p>Destroy widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Selectmenu.prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tparentNode = element.parentNode,\n\t\t\t\t\teventHandlers = this._eventHandlers,\n\t\t\t\t\tpopup,\n\t\t\t\t\tpopupId,\n\t\t\t\t\tpopupScreen;\n\n\t\t\t\tif (!options.nativeElement) {\n\t\t\t\t\tif (options.nativeMenu) {\n\t\t\t\t\t\tparentNode.removeEventListener('vmousedown', eventHandlers.nativeSelectMouseDown, false);\n\t\t\t\t\t\tparentNode.removeEventListener('mouseup', eventHandlers.nativeSelectMouseUp, false);\n\t\t\t\t\t\telement.removeEventListener('change', eventHandlers.nativeSelectChange, false);\n\t\t\t\t\t} else if (options.isDialog) {\n\t\t\t\t\t\tparentNode.removeEventListener('click', eventHandlers.dialogButtonClick, false);\n\t\t\t\t\t\tpopupId = selectors.getChildrenByTag(parentNode, 'a')[0].hash.slice(1);\n\t\t\t\t\t\tpopup = selectors.getChildrenByClass(document.getElementById(popupId).firstChild, 'ui-content')[0];\n\t\t\t\t\t\tpopup.removeEventListener('click', eventHandlers.selectItemClick, false);\n\t\t\t\t\t\tpopup.removeEventListener('change', eventHandlers.selectItemChange, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpopupId = parentNode.lastChild.id.replace('placeholder', '');\n\t\t\t\t\t\tpopupScreen = document.getElementById(popupId + 'screen');\n\t\t\t\t\t\tpopup = document.querySelector('[aria-labelledby=\"' + element.id + '\"]');\n\t\t\t\t\t\tpopup.removeEventListener('click', eventHandlers.selectItemClick, false);\n\t\t\t\t\t\tpopup.removeEventListener('change', eventHandlers.selectItemChange, false);\n\t\t\t\t\t\tpopupScreen.removeEventListener('click', eventHandlers.popupScreenClick, false);\n\t\t\t\t\t\tpopup.parentNode.removeEventListener('afteropen', eventHandlers.popupAfterOpen, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents.trigger(document, 'destroyed', {\n\t\t\t\t\twidget: \"Selectmenu\",\n\t\t\t\t\tparent: parentNode\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Selectmenu = Selectmenu;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"SelectMenu\",\n\t\t\t\t\"select:not([data-role='select']), .ui-selectmenu\",\n\t\t\t\t['open', 'close'],\n\t\t\t\tSelectmenu,\n\t\t\t\t'mobile'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.Progress","authors":[],"extends":"ns.widget.BaseWidget","title":"Progress widget","brief":"","description":"<h2>Manual constructor</h2>\n\n<p>For manual creation of progress widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar progress = ns.engine.instanceWidget(document.getElementById('foo'), 'progress');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar progress = $('#foo').progress();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple progress pending from div using data-role:</h3>\n\n<pre><code>@example\n&lt;div data-role=\"progress\" data-style=\"pending\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h3>Create simple progress circle from div using data-role:</h3>\n\n<pre><code>@example\n&lt;div data-role=\"progress\" data-style=\"circle\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h2>Using in javascript</h2>\n\n<h3>Show the progress</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).show();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progress('show');\n</code></pre>\n\n<h3>Hide the progress</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).hide();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progress('hide');\n</code></pre>\n\n<h3>Run the progress</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).running(true);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progress('running', true);\n</code></pre>\n\n<h3>Stop the progress</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).running(true);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progress('running', false);\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (window, ns) {","properties":[],"options":[{"types":"string","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.style=null]"},{"type":"member","string":"ns.widget.Progress"},{"type":"instance","string":""}],"description":"<p>style of button (\"circle\" or \"pending\")</p>","isPrivate":false,"name":"data-style"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Progress","tags":[{"type":"method","string":"Progress"},{"type":"member","string":"ns.widget.Progress"},{"type":"private","string":""}],"example":"","brief":"<p>Alias for class ns.widget.Progress</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Progress = function () {\n\t\t\t\t\tthis.action = \"\";\n\t\t\t\t\tthis.label = null;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Progress"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of progress widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progress.prototype._build = function (element) {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Progress"}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progress.prototype._init = function (element) {\n\t\t\t\tif (this._uiProgress === null) {\n\t\t\t\t\tthis._uiProgress = element.querySelector(Progress.classes.uiProgressPrefix + this.options.style);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"boolean","name":"flag","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{boolean}"},"name":"running","tags":[{"type":"method","string":"running"},{"type":"param","types":"boolean","name":"flag","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Progress"},{"type":"returns","string":"{boolean}"},{"type":"instance","string":""}],"example":"","brief":"<p>Running the progress</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Progress.prototype.running = function (flag) {\n\t\t\t\tif (typeof flag === \"boolean\") {\n\t\t\t\t\tthis._setRunning(flag);\n\t\t\t\t}\n\t\t\t\treturn this.options.running;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"Show","tags":[{"type":"method","string":"Show"},{"type":"member","string":"ns.widget.Progress"},{"type":"instance","string":""}],"example":"","brief":"<p>Show progress</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Progress.prototype.show = function () {\n\t\t\t\tthis.element.style.display = \"\";\n\t\t\t};"},{"params":[],"hasParams":false,"name":"hide","tags":[{"type":"method","string":"hide"},{"type":"member","string":"ns.widget.Progress"},{"type":"instance","string":""}],"example":"","brief":"<p>Hide progress</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Progress.prototype.hide = function () {\n\t\t\t\tthis.element.style.display = \"none\";\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"member","string":"ns.widget.Progress"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh progress</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progress.prototype._refresh = function () {\n\t\t\t\tif (this.options.running) {\n\t\t\t\t\tthis._start();\n\t\t\t\t} else {\n\t\t\t\t\tthis._stop();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Progress = Progress;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Progress\",\n\t\t\t\t\"[data-role='progress'], .ui-progress\",\n\t\t\t\t[\n\t\t\t\t\t'running',\n\t\t\t\t\t'show',\n\t\t\t\t\t'hide'\n\t\t\t\t],\n\t\t\t\tProgress,\n\t\t\t\t'tizen'\n\t\t\t);\n\n}(window.document, ns));"}]},{"name":"ns.widget.Navbar","authors":["Maciej Moczulski <m.moczulski@samsung.com>","Maciej Urbanski <m.urbanski@samsung.com>","Piotr Karny <p.karny@samsung.com>","Krzysztof Antoszek <k.antoszek@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Navbar widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (ns) {\n\t\n\t\t\t\tvar engine = ns.engine,\n\t\t\t\tgrid = ns.utils.grid,\n\t\t\t\tselectors = ns.utils.selectors,\n\t\t\t\tbuttonActiveClass = ns.widget.mobile.Button.classes.uiBtnActive,\n\t\t\t\tslice = [].slice,\n\t\t\t\t// basic options set for navbar buttons\n\t\t\t\tbuttonOptions = {\n\t\t\t\t\tcorners: false,\n\t\t\t\t\tshadow: false,\n\t\t\t\t\tinline: true,\n\t\t\t\t\ticonpos: null,\n\t\t\t\t\ttheme: 's'\n\t\t\t\t},\n\t\t\t\tNavbar = function () {","properties":[{"types":"function(NodeList,","tags":[{"type":"property","string":"{function(NodeList, Event)} _callbacks.buttonClick vclick listener callback attached to the navbar"},{"type":"member","string":"ns.widget.Navbar"},{"type":"protected","string":""}],"description":"_callbacks.buttonClick vclick listener callback attached to the navbar","isPrivate":false,"code":"this._callbacks = {\n\t\t\t\t\t\tbuttonClick: null\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tproto = new ns.widget.mobile.BaseWidgetMobile();\n\n\t\t\t// Handler for button clicks\n\t\t\t// @function\n\t\t\t// @param {NodeList} button\n\t\t\t// @param {Event} event\n\t\t\tfunction vclickHandler(buttons, event) {\n\t\t\t\tvar button = event.target,\n\t\t\t\t\tbuttonIndex = buttons.indexOf(button),\n\t\t\t\t\ti = buttons.length;\n\n\t\t\t\tif (buttonIndex > -1) { // detect click on button\n\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\tif (i === buttonIndex) {\n\t\t\t\t\t\t\tbuttons[i].classList.add(buttonActiveClass);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuttons[i].classList.remove(buttonActiveClass);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}","name":"Event)}"},{"types":"string","defaultValue":"'ui-navbar'","tags":[{"type":"property","string":"{string} [classes.uiNavbar='ui-navbar'] Navbar core class"},{"type":"property","string":"{string} [classes.uiMini='ui-mini'] Navbar mini class"},{"type":"member","string":"ns.widget.Navbar"},{"type":"static","string":""},{"type":"readonly","string":""}],"description":"Navbar core class","isPrivate":false,"code":"Navbar.classes = {\n\t\t\t\tuiNavbar: 'ui-navbar',\n\t\t\t\tuiMini: 'ui-mini'\n\t\t\t};","name":"classes.uiNavbar"},{"types":"string","defaultValue":"'ui-mini'","tags":[{"type":"property","string":"{string} [classes.uiNavbar='ui-navbar'] Navbar core class"},{"type":"property","string":"{string} [classes.uiMini='ui-mini'] Navbar mini class"},{"type":"member","string":"ns.widget.Navbar"},{"type":"static","string":""},{"type":"readonly","string":""}],"description":"Navbar mini class","isPrivate":false,"code":"Navbar.classes = {\n\t\t\t\tuiNavbar: 'ui-navbar',\n\t\t\t\tuiMini: 'ui-mini'\n\t\t\t};","name":"classes.uiMini"}],"options":[{"types":"string","defaultValue":"'top'","tags":[{"type":"property","string":"{string} [options.iconpos='top'] Position of the icons inside the navbar widget buttons"},{"type":"property","string":"{(string|null)} [options.grid=null] Type of grid applied to the navbar items"},{"type":"member","string":"ns.widget.Navbar"}],"description":"Position of the icons inside the navbar widget buttons","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\ticonpos : 'top',\n\t\t\t\t\t\tgrid: null\n\t\t\t\t\t};","name":"data-iconpos"},{"types":"(string | null)","defaultValue":"null","tags":[{"type":"property","string":"{string} [options.iconpos='top'] Position of the icons inside the navbar widget buttons"},{"type":"property","string":"{(string|null)} [options.grid=null] Type of grid applied to the navbar items"},{"type":"member","string":"ns.widget.Navbar"}],"description":"Type of grid applied to the navbar items","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\ticonpos : 'top',\n\t\t\t\t\t\tgrid: null\n\t\t\t\t\t};","name":"data-grid"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Navbar"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Builds navbar DOM structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"proto._build = function (element) {\n\n\t\t\t\tvar navClassList = element.classList,\n\t\t\t\t\tclasses = Navbar.classes,\n\t\t\t\t\tlists = element.querySelectorAll('ul'),\n\t\t\t\t\tbuttons = element.getElementsByTagName('a'),\n\t\t\t\t\ti = buttons.length,\n\t\t\t\t\toptions = this.options;\n\n\t\t\t\tbuttonOptions.iconpos = options.iconpos;\n\t\t\t\telement.setAttribute('role', 'navigation');\n\t\t\t\tnavClassList.add(classes.uiNavbar);\n\t\t\t\tnavClassList.add(classes.uiMini);\n\n\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\tengine.instanceWidget(buttons[i], 'Button', buttonOptions);\n\t\t\t\t}\n\n\t\t\t\ti = lists.length;\n\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\tif (selectors.getParentsBySelectorNS(lists[i], 'enhance=false').length === 0) {\n\t\t\t\t\t\tgrid.makeGrid(lists[i], options.grid);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Navbar"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"proto._bindEvents = function (element) {\n\t\t\t\tvar buttons = element.getElementsByTagName('a'),\n\t\t\t\t\tbuttonClick = vclickHandler.bind(null, slice.call(buttons));\n\t\t\t\telement.addEventListener(\"vclick\", buttonClick, false);\n\t\t\t\tthis._callbacks.buttonClick = buttonClick;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"member","string":"ns.widget.Navbar"},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Destroy widget. Removes event listeners from the Navbar buttons.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"proto._destroy = function () {\n\t\t\t\tvar buttonClick = this._callbacks.buttonClick;\n\t\t\t\tif (buttonClick) {\n\t\t\t\t\tthis.element.removeEventListener(\"vclick\", buttonClick, false);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tNavbar.prototype = proto;\n\t\t\tns.widget.mobile.Navbar = Navbar;\n\n\t\t\tengine.defineWidget(\n\t\t\t\t'Navbar',\n\t\t\t\t'[data-role=\"navbar\"], .ui-navbar',\n\t\t\t\t[],\n\t\t\t\tNavbar,\n\t\t\t\t'mobile'\n\t\t\t);\n\n\t\t\t}(ns));"}]},{"name":"ns.widget.mobile.Progressbar","authors":[],"extends":"ns.widget.BaseWidget","title":"Progressbar widget","brief":"","description":"<h2>Manual constructor</h2>\n\n<h3>For manual creation of progressbar widget you can use constructor of widget:</h3>\n\n<pre><code>@example\nvar progressbar = ns.engine.instanceWidget(document.getElementById('foo'), 'progressbar');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar progressbar = $('#foo').progressbar();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple progressbar from div using data-role:</h3>\n\n<pre><code>@example\n&lt;div data-role=\"progressbar\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h2>Using in javascript</h2>\n\n<h3>Set value of the progressbar</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).value(50);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progressbar('value', 50);\n</code></pre>\n\n<h3>Get value of the progressbar</h3>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).value();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$('#foo').progressbar('value');\n</code></pre>\n\n<h2>Using events</h2>\n\n<h3>Change event use</h3>\n\n<p>This event is called when, progressbar value was changed.</p>\n\n<pre><code>@example\ndocument.getElementById(\"foo\").addEventListener(\"change\", function () {\n    console.log(\"change\");\n});\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").bind(\"change\", function () {\n    console.log(\"change\");\n});\n</code></pre>\n\n<h3>Complete event use</h3>\n\n<p>This event is called when, progressbar value was changed to 100%.</p>\n\n<pre><code>@example\ndocument.getElementById(\"foo\").addEventListener(\"complete\", function () {\n    console.log(\"complete\");\n});\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").bind(\"complete\", function () {\n    console.log(\"complete\");\n});\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (window, ns) {\n\t\n\n\n\t\t\tvar BaseWidget = ns.widget.mobile.BaseWidgetMobile,\n\n\n\t\t\t\tevents = ns.utils.events,","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Progressbar"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of progress widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progressbar.prototype._build = function (element) {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{boolean|number}"},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"value","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{boolean|number}"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Progressbar"},{"type":"instance","string":""}],"example":"","brief":"<p>Set progressbar value, return value. Alias method to Progressbar.value()</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progressbar.prototype._setValue = function (element, value) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.options.value = self.value();\n\t\t\t\treturn self.value(value);\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"returns","string":"{boolean|number}"},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"number","name":"value","description":"","isOptional":false,"isLast":true},{"type":"returns","string":"{boolean|number}"},{"type":"member","string":"ns.widget.mobile.Progressbar"},{"type":"instance","string":""}],"example":"","brief":"<p>Set progressbar value, return value</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Progressbar.prototype.value = function (value) {\n\t\t\t\tvar options = this.options;\n\t\t\t\tif (typeof value === 'number') {\n\t\t\t\t\tvalue = Math.min(options.max, Math.max(options.min, value));\n\t\t\t\t\tif (value !== options.value) {\n\t\t\t\t\t\tevents.trigger(this.element, \"change\");\n\t\t\t\t\t\toptions.value = value;\n\t\t\t\t\t\tthis._refresh();\n\t\t\t\t\t}\n\t\t\t\t\tif (value === options.max) {\n\t\t\t\t\t\tevents.trigger(this.element, \"complete\");\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn options.value;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"member","string":"ns.widget.mobile.Progressbar"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh progressbar</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Progressbar.prototype._refresh = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\telementChild = element.firstElementChild.firstElementChild;\n\n\t\t\t\telement.setAttribute(\"aria-valuenow\", options.value);\n\t\t\t\telementChild.style.display = '';\n\t\t\t\telementChild.style.width = options.value + \"%\";\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Progressbar = Progressbar;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Progressbar\",\n\t\t\t\t\"[data-role='progressbar'], .ui-progressbar\",\n\t\t\t\t[\"value\"],\n\t\t\t\tProgressbar,\n\t\t\t\t\"tizen\"\n\t\t\t);\n\n}(window.document, ns));"}]},{"name":"ns.widget.MultimediaView","authors":["Maciej Urbanski <m.urbanski@samsung.com>","Tomasz Lukawski <t.lukawski@samsung.com>"],"extends":"ns.widget.mobile.BaseWidgetMobile","title":"MultimediaView widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (window, document, ns) {","properties":[{"types":"Function","tags":[{"type":"property","string":"{Function} BaseWidgetMobile Alias for {@link ns.widget.mobile.BaseWidgetMobile}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.widget.mobile.BaseWidgetMobile}","isPrivate":false,"code":"var BaseWidget = ns.widget.mobile.BaseWidgetMobile,","name":"BaseWidgetMobile"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.engine}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.engine}","isPrivate":false,"code":"engine = ns.engine,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.utils.events}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.events}","isPrivate":false,"code":"events = ns.utils.events,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.utils}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils}","isPrivate":false,"code":"utils = ns.utils,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} engine Alias for {@link ns.theme}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.theme}","isPrivate":false,"code":"utilsTheme = ns.theme,","name":"engine"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsDOM Alias for {@link ns.utils.object}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.object}","isPrivate":false,"code":"utilsObject = ns.utils.object,","name":"utilsDOM"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsDOM Alias for {@link ns.utils.DOM.*}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.DOM.*}","isPrivate":false,"code":"utilsDOM = ns.utils.DOM,","name":"utilsDOM"},{"types":"Object","tags":[{"type":"property","string":"{Object} utilsSelectors Alias for {@link ns.utils.selectors}"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"description":"Alias for {@link ns.utils.selectors}","isPrivate":false,"code":"utilsSelectors = ns.utils.selectors,","name":"utilsSelectors"},{"types":"ns.widget.mobile.BaseWidgetMobile","tags":[{"type":"property","string":"{ns.widget.mobile.BaseWidgetMobile} MultimediaViewPrototype"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"private","string":""},{"type":"static","string":""}],"description":"<p>Local variable for MultimediaView prototype object</p>","isPrivate":false,"code":"MultimediaViewPrototype = new BaseWidget(),","name":"MultimediaViewPrototype"}],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["BaseWidgetMobile"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\twidgetName;\n\t\t\t\tparent_configure.call(self, definition, element, options);\n\t\t\t\tif (definition) {\n\t\t\t\t\tdefinitionName = definition.name;\n\t\t\t\t\twidgetName = definitionName && definitionName.toLowerCase();"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget, call: #_disable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_disable.apply(self, args);\n\t\t\t\telementClasses.add(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.add(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, true);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_enable.apply(self, args);\n\t\t\t\telementClasses.remove(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.remove(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, false);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true}],"hasParams":true,"name":"raise","tags":[{"type":"method","string":"raise"},{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Throw exception</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.raise = function (msg) {\n\t\t\t\tthrow \"Widget [\" + this.widgetName + \"]: \" + msg;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhanceWithin","tags":[{"type":"method","string":"enhanceWithin"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhanceWithin = function () {\n\t\t\t\tns.log('method enhanceWithin is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhance","tags":[{"type":"method","string":"enhance"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhance = function () {\n\t\t\t\tns.log('method enhance is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"widget","tags":[{"type":"method","string":"widget"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Return element of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.widget = function () {\n\t\t\t\treturn this.element;\n\t\t\t};\n\n\t\t\tBaseWidgetMobile.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.BaseWidgetMobile = BaseWidgetMobile;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"static","string":""},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice,\n\n\t\t\t\tPOINTER_CLICK_EVENT = 'vclick',\n\t\t\t\tPOINTER_MOVE_EVENT = 'vmousemove',\n\t\t\t\tPOINTER_DOWN_EVENT = 'vmousedown',\n\t\t\t\tPOINTER_UP_EVENT = 'vmouseup',\n\t\t\t\tMEDIA_POSITION_CHANGE_TIMEOUT = 200, //[ms]\n\t\t\t\tFULLSCREEN_DELAY = 300, //[]ms\n\n\t\t\t\tMultimediaView = function () {\n\t\t\t\t\tvar self = this;"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_createControl","tags":[{"type":"method","string":"_createControl"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method builds HTML structure of control panel</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._createControl = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element,\n\t\t\t\t\tcontrol = document.createElement('span'),\n\t\t\t\t\tplaypauseButton = control.cloneNode(),\n\t\t\t\t\tseekBar = control.cloneNode(),\n\t\t\t\t\ttimestampLabel = control.cloneNode(),\n\t\t\t\t\tdurationLabel = control.cloneNode(),\n\t\t\t\t\tvolumeButton = control.cloneNode(),\n\t\t\t\t\tvolumeControl = control.cloneNode(),\n\t\t\t\t\tvolumeBar = control.cloneNode(),\n\t\t\t\t\tfullscreenButton = control.cloneNode(),\n\t\t\t\t\tdurationBar = control.cloneNode();\n\n\t\t\t\tvolumeBar.innerHTML = '<input type=\"range\" value=\"25\" min=\"0\" max=\"100\" data-highlight=\"true\" >';\n\t\t\t\tvolumeBar = volumeBar.childNodes[0];\n\n\t\t\t\tself.ui = utilsObject.merge(self.ui, {\n\t\t\t\t\tcontrol: control,\n\t\t\t\t\tplaypauseButton: playpauseButton,\n\t\t\t\t\tseekBar: seekBar,\n\t\t\t\t\ttimestampLabel: timestampLabel,\n\t\t\t\t\tdurationLabel: durationLabel,\n\t\t\t\t\tvolumeButton: volumeButton,\n\t\t\t\t\tvolumeControl: volumeControl,\n\t\t\t\t\tvolumeBar: volumeBar,\n\t\t\t\t\tfullscreenButton: fullscreenButton,\n\t\t\t\t\tdurationBar: durationBar\n\t\t\t\t});\n\n\t\t\t\ttimestampLabel.innerHTML = '<p>00:00:00</p>';\n\t\t\t\tdurationLabel.innerHTML = '<p>00:00:00</p>';\n\n\t\t\t\tcontrol.classList.add(classes.CONTROL, 'fade-out');\n\n\t\t\t\tdurationLabel.classList.add(classes.DURATION_LABEL);\n\t\t\t\tplaypauseButton.classList.add(classes.PLAY_PAUSE);\n\t\t\t\tplaypauseButton.classList.add(classes.BUTTON);\n\t\t\t\tplaypauseButton.classList.add(classes.PLAY_ICON);\n\t\t\t\tseekBar.classList.add(classes.SEEK_BAR);\n\t\t\t\tseekBar.classList.add(classes.BAR);\n\t\t\t\ttimestampLabel.classList.add(classes.TIMESTAMP_LABEL);\n\t\t\t\tdurationLabel.classList.add(classes.DURATION_LABEL);\n\t\t\t\tvolumeButton.classList.add(classes.VOLUME_BUTTON);\n\t\t\t\tvolumeButton.classList.add(classes.BUTTON);\n\t\t\t\tvolumeControl.classList.add(classes.VOLUME_CONTROL);\n\t\t\t\tvolumeBar.classList.add(classes.VOLUME_BAR);\n\t\t\t\tvolumeBar.classList.add(classes.BAR);\n\t\t\t\tfullscreenButton.classList.add(classes.FULLSCREEN_BUTTON);\n\t\t\t\tfullscreenButton.classList.add(classes.BUTTON);\n\t\t\t\tdurationBar.classList.add(classes.DURATION);\n\n\t\t\t\tseekBar.appendChild(durationBar);\n\t\t\t\tseekBar.appendChild(durationLabel);\n\t\t\t\tseekBar.appendChild(timestampLabel);\n\n\t\t\t\tvolumeButton.classList.add(view.muted ? classes.MUTE_ICON : classes.VOLUME_ICON);\n\n\t\t\t\tvolumeControl.appendChild(volumeBar);\n\n\t\t\t\tcontrol.appendChild(playpauseButton);\n\t\t\t\tcontrol.appendChild(seekBar);\n\t\t\t\tcontrol.appendChild(volumeControl);\n\t\t\t\tcontrol.appendChild(volumeButton);\n\n\t\t\t\tif (self._isVideo) {\n\t\t\t\t\tfullscreenButton.classList.add(classes.FULLSCREEN_ON);\n\t\t\t\t\tcontrol.appendChild(fullscreenButton);\n\t\t\t\t}\n\n\t\t\t\tslice.call(control.querySelectorAll(selectors.BUTTONS), 0).forEach(function (element) {\n\t\t\t\t\telement.classList.add(classes.SHADOW);\n\t\t\t\t\telement.classList.add(classes.BUTTON_CORNER_ALL);\n\t\t\t\t});\n\n\t\t\t\treturn control;\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"value","description":"","defaultValue":"undefined","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number","null"],"description":"width Width value or null if fullScreen option is enabled"},"name":"width","tags":[{"type":"method","string":"width"},{"type":"param","types":"number","name":"value","description":"","defaultValue":"undefined","isOptional":true,"isLast":true},{"type":"return","types":["number","null"],"description":"width Width value or null if fullScreen option is enabled"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The width method is used to get (if no value is defined)<br /> or set the multimedia view widget width</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype.width = function (value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview,\n\t\t\t\t\twrap;\n\n\t\t\t\tif (self.options.fullScreen) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tview = self.element;\n\t\t\t\twrap = self.ui.wrap;\n\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\treturn utilsDOM.getElementWidth(view);\n\t\t\t\t}\n\n\t\t\t\tif (!self._isVideo) {\n\t\t\t\t\twrap.style.width = value + 'px';\n\t\t\t\t}\n\n\t\t\t\tview.style.width = value + 'px';\n\t\t\t\tself._resize();\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"value","description":"","defaultValue":"undefined","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["number","null"],"description":"height Height value or null if fullScreen option is enabled or element is not video"},"name":"height","tags":[{"type":"method","string":"height"},{"type":"param","types":"number","name":"value","description":"","defaultValue":"undefined","isOptional":true,"isLast":true},{"type":"return","types":["number","null"],"description":"height Height value or null if fullScreen option is enabled or element is not video"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The height method is used to get (if no value is defined)<br /> or set the multimedia view widget height</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype.height = function (value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element;\n\n\t\t\t\tif (!self._isVideo || self.options.fullScreen) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\treturn view.getElementHeight();\n\t\t\t\t}\n\n\t\t\t\tview.style.height = value + 'px';\n\t\t\t\tself._resize();\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["boolean"],"description":""},"name":"fullScreen","tags":[{"type":"method","string":"fullScreen"},{"type":"return","types":["boolean"],"description":""},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Resize view</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._resize = function () {\n\t\t\t\tthis._resizeControl();\n\t\t\t\tthis.trigger('updatelayout');\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method builds HTML structure of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = element || self.element,\n\t\t\t\t\tviewClasslist = view.classList,\n\t\t\t\t\tisVideo = (view.nodeName === VIDEO_TAG_NAME),\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tparentTheme = utilsTheme.getInheritedTheme(view, utilsTheme.theme),\n\t\t\t\t\ttheme = options.theme || parentTheme,\n\t\t\t\t\twrap = null,\n\t\t\t\t\tcontrol = null;\n\n\t\t\t\t// The creating of object that contains aliases for widget's HTML elements\n\t\t\t\tself.ui = {\n\t\t\t\t\twrap: null,\n\t\t\t\t\tcontrol: null\n\t\t\t\t};\n\t\t\t\tself.element = element;\n\t\t\t\tself._isVideo = isVideo;\n\n\t\t\t\tviewClasslist.add(classes.VIEW);\n\n\t\t\t\tcontrol = self._createControl();\n\t\t\t\t// on build stage control panel is hidden,\n\t\t\t\t// control is showing on event \"onLoadedMetadata\"\n\t\t\t\tcontrol.style.opacity = 0;\n\t\t\t\tself.ui.control = control;\n\n\n\t\t\t\twrap = document.createElement('div');\n\t\t\t\twrap.classList.add(classes.WRAP);\n\t\t\t\twrap.classList.add(classes.THEME_PREFIX + theme);\n\t\t\t\tview.parentNode.replaceChild(wrap, view);\n\t\t\t\twrap.appendChild(view);\n\t\t\t\twrap.appendChild(control);\n\t\t\t\tself.ui.wrap = wrap;\n\n\t\t\t\tengine.instanceWidget(self.ui.volumeBar, 'Slider');\n\t\t\t\tengine.instanceWidget(self.ui.durationBar, 'Progressbar');\n\n\t\t\t\t// customizing\n\t\t\t\t// progressBar\n\t\t\t\tself.ui.durationBar.classList.remove(progressbarClasses.uiProgressbar);\n\t\t\t\t//-- binding\n\t\t\t\tself.ui.progressBar = self.ui.durationBar.querySelector(selectors.PROGRESS_BAR_BG);\n\n\t\t\t\tif (isVideo) {\n\t\t\t\t\tcontrol.classList.add(classes.VIDEO);\n\t\t\t\t} else {\n\t\t\t\t\tself.options.fullScreen = false;\n\t\t\t\t}\n\n\t\t\t\tif (options.controls && utilsDOM.getNSData(view, 'controls')) {\n\t\t\t\t\tutilsDOM.removeNSData(view, 'controls');\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_initControl","tags":[{"type":"method","string":"_initControl"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method initializing widget properties</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._initControl = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tcontrol = self.ui.control;\n\t\t\t\t// @todo: check binding;\n\t\t\t\tself.ui = utilsObject.merge(self.ui, {\n\t\t\t\t\tplaypauseButton: control.querySelector('.' + classes.PLAY_PAUSE),\n\t\t\t\t\tseekBar: control.querySelector('.' + classes.SEEK_BAR),\n\t\t\t\t\ttimestampLabel: control.querySelector('.' + classes.TIMESTAMP_LABEL),\n\t\t\t\t\tdurationLabel: control.querySelector('.' + classes.DURATION_LABEL),\n\t\t\t\t\tvolumeButton: control.querySelector('.' + classes.VOLUME_BUTTON),\n\t\t\t\t\tvolumeControl: control.querySelector('.' + classes.VOLUME_CONTROL),\n\t\t\t\t\tvolumeBar: control.querySelector('.' + classes.VOLUME_BAR),\n\t\t\t\t\tfullscreenButton: control.querySelector('.' + classes.FULLSCREEN_BUTTON),\n\t\t\t\t\tdurationBar: control.querySelector('.' + classes.DURATION),\n\t\t\t\t});\n\t\t\t\tself.ui.progressBar = self.ui.durationBar.querySelector(selectors.PROGRESS_BAR_BG);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method initializing widget properties</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (self.ui === undefined) {\n\t\t\t\t\tself.element = element;\n\t\t\t\t\tself.ui = {};\n\t\t\t\t\tself.ui.wrap = utilsSelectors.getParentsBySelector(element, selectors.WRAP);\n\t\t\t\t\tself.ui.control = utilsSelectors.getParentsBySelector(element, selectors.CONTROL);\n\t\t\t\t\tself._isVideo = (element.nodeName === VIDEO_TAG_NAME);\n\t\t\t\t\tself.options.fullScreen = false;\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method configuring base options of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._configure = function (element) {\n\t\t\t\t// @todo: make body of method;\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method destroy widget and unbinds event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._destroy = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tself._unbindEvents();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_resizeControl","tags":[{"type":"method","string":"_resizeControl"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Resizing of controlBar</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._resizeControl = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element,\n\t\t\t\t\tisVideo = self._isVideo,\n\t\t\t\t\twrap = self.ui.wrap,\n\t\t\t\t\tcontrol = self.ui.control,\n\t\t\t\t\tbuttons = slice.call(control.querySelectorAll(selectors.BUTTONS), 0),\n\t\t\t\t\tplaypauseButton = self.ui.playpauseButton,\n\t\t\t\t\tseekBar = self.ui.seekBar,\n\t\t\t\t\tdurationLabel = self.ui.durationLabel,\n\t\t\t\t\ttimestampLabel = self.ui.timestampLabel,\n\t\t\t\t\tvolumeControl = self.ui.volumeControl,\n\t\t\t\t\tvolumeBar = self.ui.volumeBar,\n\n\t\t\t\t\twidth = isVideo ? utilsDOM.getElementWidth(view) : utilsDOM.getElementWidth(wrap),\n\t\t\t\t\toffset = utilsDOM.getElementOffset(view),\n\t\t\t\t\tbuttonWidth,\n\t\t\t\t\tavailableWidth = 0;\n\n\t\t\t\tif (control) {\n\t\t\t\t\tif (isVideo) {\n\t\t\t\t\t\tcontrol.style.left = offset.left + 'px';\n\t\t\t\t\t}\n\t\t\t\t\tcontrol.style.width = width + 'px';\n\t\t\t\t}\n\n\t\t\t\tif (seekBar) {\n\t\t\t\t\tbuttonWidth = utilsDOM.getElementWidth(buttons[0], 'outer', false, true);\n\t\t\t\t\tavailableWidth = utilsDOM.getElementWidth(control) - (buttonWidth * buttons.length);\n\t\t\t\t\tif (!self.isVolumeHide) {\n\t\t\t\t\t\tavailableWidth -= utilsDOM.getElementWidth(volumeControl, 'outer', false, true);\n\t\t\t\t\t}\n\t\t\t\t\tavailableWidth -= utilsDOM.getCSSProperty(seekBar, 'margin-left', 0, \"integer\");\n\t\t\t\t\tseekBar.style.width = availableWidth + 'px';\n\t\t\t\t}\n\n\t\t\t\tif (durationLabel && !isNaN(view.duration)) {\n\t\t\t\t\tdurationLabel.querySelector(DURATION_LABEL_TAG_NAME).innerHTML = convertTimeFormat(view.duration);\n\t\t\t\t}\n\n\t\t\t\tif (view.autoplay && view.paused === false) {\n\t\t\t\t\tplaypauseButton.classList.remove(classes.PLAY_ICON);\n\t\t\t\t\tplaypauseButton.classList.add(classes.PAUSE_ICON);\n\t\t\t\t}\n\n\t\t\t\tif (utilsDOM.getElementWidth(seekBar) < (utilsDOM.getElementWidth(volumeBar) + utilsDOM.getElementWidth(timestampLabel) + utilsDOM.getElementWidth(durationLabel))) {\n\t\t\t\t\tdurationLabel.classList.add('hidden');\n\t\t\t\t} else {\n\t\t\t\t\tdurationLabel.classList.remove('hidden');\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"systime","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["string"],"description":"time time as format HH:mm:ss"},"name":"convertTimeFormat","tags":[{"type":"method","string":"convertTimeFormat"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"param","types":"number","name":"systime","description":"","isOptional":false,"isLast":true},{"type":"return","types":["string"],"description":"time time as format HH:mm:ss"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Convert time format, from timestamp [s] to string</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function convertTimeFormat(systime) {\n\t\t\t\tif (!utils.isNumber(systime)) {\n\t\t\t\t\treturn \"Playback Error\";\n\t\t\t\t}\n\n\t\t\t\tvar ss = parseInt(systime % 60, 10).toString(),\n\t\t\t\t\tmm = parseInt((systime / 60) % 60, 10).toString(),\n\t\t\t\t\thh = parseInt(systime / 3600, 10).toString(),\n\t\t\t\t\ttime = ((hh.length < 2) ? \"0\" + hh : hh) + \":\" +\n\t\t\t\t\t\t\t((mm.length < 2) ? \"0\" + mm : mm) + \":\" +\n\t\t\t\t\t\t\t((ss.length < 2) ? \"0\" + ss : ss);\n\n\t\t\t\treturn time;\n\t\t\t}"},{"params":[],"hasParams":false,"name":"_updateSeekBar","tags":[{"type":"method","string":"_updateSeekBar"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Update the position of progress Bar</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._updateSeekBar = function (currenttime) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element,\n\t\t\t\t\tdurationBarWidget = engine.getBinding(self.ui.durationBar),\n\t\t\t\t\tduration = view.duration,\n\t\t\t\t\ttimestampLabel = self.ui.timestampLabel;\n\n\t\t\t\tif (currenttime === undefined) {\n\t\t\t\t\tcurrenttime = view.currentTime;\n\t\t\t\t}\n\t\t\t\tdurationBarWidget.value(currenttime / duration * 100);\n\t\t\t\ttimestampLabel.querySelector(DURATION_LABEL_TAG_NAME).innerHTML = convertTimeFormat(currenttime);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_updateVolumeBarState","tags":[{"type":"method","string":"_updateVolumeBarState"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Update the position of Volume Bar eg. after volume change on VIDEO element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._updateVolumeBarState = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tvolume = engine.getBinding(self.ui.volumeBar);\n\t\t\t\tvolume.element.value = self.element.volume * 100;\n\t\t\t\tvolume.refresh();\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method binding event handlers to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._bindEvents = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element,\n\t\t\t\t\tcontrol = self.ui.control,\n\t\t\t\t\tseekBar = self.ui.seekBar,\n\t\t\t\t\tvolumeBar = self.ui.volumeBar,\n\t\t\t\t\tprogressBarBackgruond = self.ui.progressBar;\n\n\t\t\t\tevents.on(\n\t\t\t\t\tview,\n\t\t\t\t\t[\"loadedmetadata\", \"timeupdate\", \"play\", \"pause\", \"volumechange\", \"durationchange\", POINTER_CLICK_EVENT, \"multimediaviewinit\"],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tevents.on(\n\t\t\t\t\tprogressBarBackgruond,\n\t\t\t\t\t[POINTER_MOVE_EVENT, POINTER_DOWN_EVENT, POINTER_UP_EVENT],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tevents.on(\n\t\t\t\t\tcontrol,\n\t\t\t\t\t[POINTER_CLICK_EVENT, POINTER_DOWN_EVENT, POINTER_UP_EVENT],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tseekBar.addEventListener(POINTER_CLICK_EVENT, self, true);\n\t\t\t\tvolumeBar.addEventListener('change', self, true);\n\t\t\t\twindow.addEventListener('resize', self, true);\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_unbindEvents","tags":[{"type":"method","string":"_unbindEvents"},{"type":"member","string":"ns.widget.MultimediaView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>The method unbinds event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"MultimediaViewPrototype._unbindEvents = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tview = self.element,\n\t\t\t\t\tcontrol = self.ui.control,\n\t\t\t\t\tseekBar = self.ui.seekBar,\n\t\t\t\t\tvolumeBar = self.ui.volumeBar,\n\t\t\t\t\tprogressBarBackgruond = self.ui.progressBar;\n\n\t\t\t\tevents.off(\n\t\t\t\t\tview,\n\t\t\t\t\t[\"loadedmetadata\", \"timeupdate\", \"play\", \"pause\", \"volumechange\", \"durationchange\", POINTER_CLICK_EVENT, \"multimediaviewinit\"],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tevents.off(\n\t\t\t\t\tprogressBarBackgruond,\n\t\t\t\t\t[POINTER_MOVE_EVENT, POINTER_DOWN_EVENT, POINTER_UP_EVENT],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tevents.off(\n\t\t\t\t\tcontrol,\n\t\t\t\t\t[POINTER_CLICK_EVENT, POINTER_DOWN_EVENT, POINTER_UP_EVENT],\n\t\t\t\t\tself,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tseekBar.removeEventListener(POINTER_CLICK_EVENT, self, true);\n\t\t\t\tvolumeBar.removeEventListener('change', self, true);\n\n\t\t\t\twindow.addEventListener('resize', self, true);\n\t\t\t};\n\n\t\t\tMultimediaView.prototype = MultimediaViewPrototype;\n\n\t\t\tns.widget.mobile.MultimediaView = MultimediaView;\n\t\t\tengine.defineWidget(\n\t\t\t\t'MultimediaView',\n\t\t\t\t'video, audio, .ui-multimediaview',\n\t\t\t\t['width', 'height', 'fullScreen'],\n\t\t\t\tMultimediaView,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.Tokentextarea","authors":["Kamil Stepczuk <k.stepczuk@samsung.com>"],"extends":"ns.widget.BaseWidget","title":"Tokentextarea widget","brief":"","description":"<p>##Manual constuctor</p>\n\n<h3>For manual creation of progressbar widget you can use constructor of widget:</h3>\n\n<pre><code>@example\nvar tokentextarea = ns.engine.instanceWidget(document.getElementById('foo'), 'Tokentextarea');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar tokentextarea = $('#foo').tokentextarea();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create simple Tokentextarea from div using data-role:</h3>\n\n<pre><code>@example\n&lt;div data-role=\"tokentextarea\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h3>HTML attributes</h3>\n\n<h4>data-link</h4>\n\n<p>Represents the id of the page or the URL of other HTML file.<br />The page contains data for the user, for example, an address book.<br />If the value is null, anchor button doesn't work. (Default : null)</p>\n\n<pre><code>@example\n&lt;div data-role=\"tokentextarea\" data-link=\"bar.html\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h4>data-label</h4>\n\n<p>Provide a label for a user-guide. (Default : 'To : ')</p>\n\n<pre><code>@example\n&lt;div data-role=\"tokentextarea\" data-label=\"Send to: \"&gt;&lt;/div&gt;\n</code></pre>\n\n<h4>data-description</h4>\n\n<p>This attribute is managing message format.<br />This message is displayed when widget status was changed to 'focusout'. (Default : '+ {0}')</p>\n\n<pre><code>@example\n&lt;div data-role=\"tokentextarea\" data-description=\"bar + {0}\"&gt;&lt;/div&gt;\n</code></pre>\n\n<h3>Javascript API</h3>\n\n<h4>inputText ( [string ] )</h4>\n\n<p>If artument is not exist, will get a string from inputbox.<br />If argument is exist, will set a string in inputbox.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).inputText(\"bar\");\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").inputText(\"bar\");\n</code></pre>\n\n<h4>select ( [number] )</h4>\n\n<p>If argument is not exist, will get a string from the selected block, if any block isn't selected, will get 'null' value.<br />If argument is exist, will select the block which is matched with the argument.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).select(1);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").select(1);\n</code></pre>\n\n<h4>add ( text, [number] )</h4>\n\n<p>If secound argument is not exsit, will insert to a new block at last position.<br />If secound arbument is exist, will insert to a new block at indexed position.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).add(\"bar\", 2);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").add(\"bar\", 2);\n</code></pre>\n\n<h4>remove ( [number] )</h4>\n\n<p>If argument is not exist, will delete all blocks.<br />If argument is exist, will delete block at indexed position.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).remove(1);\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").remove(1);\n</code></pre>\n\n<h4>length ( void )</h4>\n\n<p>Get a number of widget.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).length;\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").length();\n</code></pre>\n\n<h4>focusIn ( void )</h4>\n\n<p>This method change status to 'focus in'.<br />This status is able to manege a widget.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).focusIn();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").focusIn();\n</code></pre>\n\n<h4>focusOut ( void )</h4>\n\n<p>This method change status to 'focus out'.<br />This status is unable to menage a widget.<br />All block that contained id the widget are hidden and summarized message is displayed</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).focusOut();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").focusOut();\n</code></pre>\n\n<h4>destroy ( void )</h4>\n\n<p>Remove all of the DOM elements for the widget.</p>\n\n<pre><code>@example\nns.engine.instanceWidget(document.getElementById(\"foo\")).destroy();\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\n$(\"#foo\").destroy();\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (window, ns) {","properties":[{"types":"string","defaultValue":"''","tags":[{"type":"property","string":"{string} [options.label='To : ']"},{"type":"property","string":"{string} [link='']"},{"type":"property","string":"{string} [description='+ {0}']"},{"type":"member","string":"ns.widget.Tokentextarea"}],"description":"<p>@property {Object} options Tokentextarea widget options</p>","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tlabel: \"To : \",\n\t\t\t\t\t\tlink: \"\",\n\t\t\t\t\t\tdescription: \"+ {0}\"\n\t\t\t\t\t};","name":"link"},{"types":"string","defaultValue":"'+","tags":[{"type":"property","string":"{string} [options.label='To : ']"},{"type":"property","string":"{string} [link='']"},{"type":"property","string":"{string} [description='+ {0}']"},{"type":"member","string":"ns.widget.Tokentextarea"}],"description":"{0}']","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tlabel: \"To : \",\n\t\t\t\t\t\tlink: \"\",\n\t\t\t\t\t\tdescription: \"+ {0}\"\n\t\t\t\t\t};","name":"description"}],"options":[{"types":"string","defaultValue":"'To","tags":[{"type":"property","string":"{string} [options.label='To : ']"},{"type":"property","string":"{string} [link='']"},{"type":"property","string":"{string} [description='+ {0}']"},{"type":"member","string":"ns.widget.Tokentextarea"}],"description":": ']","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\tlabel: \"To : \",\n\t\t\t\t\t\tlink: \"\",\n\t\t\t\t\t\tdescription: \"+ {0}\"\n\t\t\t\t\t};","name":"data-label"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Tokentextarea","tags":[{"type":"method","string":"Tokentextarea"},{"type":"private","string":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Local constructor function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Tokentextarea = function () {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Build widget structure</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Tokentextarea.prototype._build = function (element) {\n\t\t\t\tvar classes = Tokentextarea.classes,\n\t\t\t\t\tstrings = Tokentextarea.strings,\n\t\t\t\t\toption = this.options,\n\t\t\t\t\tmoreBlockClasses,\n\t\t\t\t\tinputBox,\n\t\t\t\t\tinputBoxClasses,\n\t\t\t\t\tinputArea,\n\t\t\t\t\tlabelTag,\n\t\t\t\t\tmoreBlock;\n\n\t\t\t\tinputBox = document.createElement(\"input\");\n\t\t\t\tlabelTag = document.createElement(\"span\");\n\t\t\t\tmoreBlock = document.createElement(\"a\");\n\t\t\t\tinputArea = document.createElement(\"div\");\n\n\t\t\t\tinputBoxClasses = inputBox.classList;\n\n\t\t\t\tinputArea.classList.add(classes.uiTokentextareaInputArea);\n\t\t\t\telement.classList.add(classes.uiTokentextarea);\n\n\t\t\t\tinputBox.style.minWidth = 3 + \"rem\";\n\t\t\t\tinputBox.style.width    = 100 +\"%\";\n\n\t\t\t\tlabelTag.textContent = option.label;\n\t\t\t\tlabelTag.classList.add(classes.uiTokentextareaLabel);\n\t\t\t\tlabelTag.tabIndex = 0;\n\t\t\t\telement.appendChild(labelTag);\n\n\n\t\t\t\tinputBoxClasses.add(classes.uiTokentextareaInput);\n\t\t\t\tinputBoxClasses.add(classes.uiTokentextareaInputVisible);\n\t\t\t\tinputBoxClasses.add(classes.uiinputText);\n\t\t\t\tinputBoxClasses.add(classes.uiBodyS);\n\n\t\t\t\tinputBox.setAttribute(\"role\", \"textbox\");\n\t\t\t\tinputArea.appendChild(inputBox);\n\t\t\t\tengine.instanceWidget(moreBlock, \"Button\", {\n\t\t\t\t\tinline: true,\n\t\t\t\t\ticon: \"plus\",\n\t\t\t\t\tstyle: \"circle\"\n\t\t\t\t});\n\n\t\t\t\tmoreBlockClasses = moreBlock.classList;\n\n\t\t\t\tmoreBlock.href = option.link;\n\t\t\t\tmoreBlock.tabIndex = 0;\n\t\t\t\tmoreBlockClasses.add(classes.uiTokentextareaLinkBase);\n\t\t\t\tmoreBlockClasses.add(classes.uiBtnBoxS);\n\t\t\t\tmoreBlock.firstChild.firstChild.textContent = strings.addRecipient;\n\t\t\t\tinputArea.appendChild(moreBlock);\n\t\t\t\telement.appendChild(inputArea);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"messages","description":"","isOptional":false},{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"add","tags":[{"type":"method","string":"add"},{"type":"param","types":"string","name":"messages","description":"","isOptional":false},{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function add block</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.add = function (messages, blockIndex) {\n\t\t\t\tvar focusStatus = this._focusStatus,\n\t\t\t\t\telement = this.element;\n\t\t\t\tif (focusStatus) {\n\t\t\t\t\t_addTextBlock(element, messages, blockIndex);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"remove","tags":[{"type":"method","string":"remove"},{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function delete element; delete all elements with out parameter</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.remove = function (blockIndex) {\n\t\t\t\tvar focusStatus = this._focusStatus,\n\t\t\t\t\telement = this.element;\n\t\t\t\tif (focusStatus) {\n\t\t\t\t\t_removeTextBlock(element, blockIndex);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["number"],"description":""},"name":"length","tags":[{"type":"method","string":"length"},{"type":"return","types":["number"],"description":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function return blocks count</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.length = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tclasses = Tokentextarea.classes;\n\t\t\t\treturn element.getElementsByClassName(classes.uiTokentextareaSpanBlock).length;\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?string"],"description":""},"name":"select","tags":[{"type":"method","string":"select"},{"type":"param","types":"number","name":"blockIndex","description":"","isOptional":false,"isLast":true},{"type":"return","types":["?string"],"description":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function select element; return selected element with out parameter</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.select = function (blockIndex) {\n\t\t\t\tvar focusStatus = this._focusStatus,\n\t\t\t\t\telement = this.element,\n\t\t\t\t\tclasses = Tokentextarea.classes,\n\t\t\t\t\tblock,\n\t\t\t\t\tsBlock;\n\n\t\t\t\tif (focusStatus) {\n\t\t\t\t\tblock = element.getElementsByClassName(classes.uiTokentextareaSpanBlock);\n\t\t\t\t\tsBlock = element.getElementsByClassName(classes.uiTokentextareaSblock);\n\n\t\t\t\t\tif (blockIndex !== undefined && blockIndex < block.length) {\n\t\t\t\t\t\tif (sBlock.length === 1) {\n\t\t\t\t\t\t\t_unselectBlock(sBlock[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_selectBlock(block[blockIndex]);\n\t\t\t\t\t} else if (block.length !== 0) {\n\t\t\t\t\t\tif (sBlock[0]) {\n\t\t\t\t\t\t\treturn sBlock[0].textContent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"focusIn","tags":[{"type":"method","string":"focusIn"},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function ungroup elements and set focus to input</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.focusIn = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tclasses = Tokentextarea.classes,\n\t\t\t\t\telementClasses,\n\t\t\t\t\tlabel,\n\t\t\t\t\tsBlock,\n\t\t\t\t\tsBlockClasses,\n\t\t\t\t\tinput,\n\t\t\t\t\tinputClasses,\n\t\t\t\t\tbutton,\n\t\t\t\t\thiddenBlocksCount,\n\t\t\t\t\thiddenBlocks,\n\t\t\t\t\thiddenBlocksLength,\n\t\t\t\t\ti;\n\n\t\t\t\tif (this._focusStatus) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlabel = element.getElementsByClassName(classes.uiTokentextareaLabel)[0];\n\t\t\t\thiddenBlocksCount = element.getElementsByClassName(classes.uiTokentextareaDesclabel)[0];\n\t\t\t\tif (hiddenBlocksCount) {\n\t\t\t\t\telement.removeChild(hiddenBlocksCount);\n\t\t\t\t\thiddenBlocks = element.getElementsByClassName(classes.uiTokentextareaInvisible);\n\t\t\t\t\thiddenBlocksLength = hiddenBlocks.length;\n\t\t\t\t\tfor (i = hiddenBlocksLength - 1; i >= 0; i--) {\n\t\t\t\t\t\thiddenBlocks[i].classList.remove(classes.uiTokentextareaInvisible);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tinput = element.getElementsByTagName(\"input\")[0];\n\t\t\t\tinputClasses = input.classList;\n\t\t\t\tbutton = element.getElementsByTagName(\"a\")[0];\n\t\t\t\telementClasses = element.classList;\n\n\t\t\t\tlabel.tabIndex = 0;\n\t\t\t\tlabel.style.display = \"\";\n\n\n\t\t\t\tsBlock = element.getElementsByClassName(classes.uiTokentextareaSblock)[0];\n\t\t\t\tif (sBlock !== undefined) {\n\t\t\t\t\tsBlockClasses = sBlock.classList;\n\t\t\t\t\tsBlockClasses.remove(classes.uiTokentextareaSblock);\n\t\t\t\t\tsBlockClasses.add(classes.uiTokentextareaBlock);\n\t\t\t\t}\n\t\t\t\tinputClasses.remove(classes.uiTokentextareaInputInvisible);\n\t\t\t\tinputClasses.add(classes.uiTokentextareaInputVisible);\n\t\t\t\tinput.tabIndex = 0;\n\t\t\t\tbutton.tabIndex = 0;\n\t\t\t\tbutton.style.display = \"\";\n\n\t\t\t\t// change focus state.\n\t\t\t\tthis._focusStatus = true;\n\t\t\t\telementClasses.remove(classes.uiTokentextareaFocusout);\n\t\t\t\telementClasses.add(classes.uiTokentextareaFocusin);\n\t\t\t\telement.removeAttribute(\"tabindex\");\n\t\t\t\tinput.focus();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"focusOut","tags":[{"type":"method","string":"focusOut"},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Function group elements and hide input</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Tokentextarea.prototype.focusOut = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tclasses = Tokentextarea.classes,\n\t\t\t\t\tstrings = Tokentextarea.strings,\n\t\t\t\t\tdescription = this.options.description,\n\t\t\t\t\telementClasses,\n\t\t\t\t\telementWidth,\n\t\t\t\t\tblockWidthSum = 0,\n\t\t\t\t\tlabel,\n\t\t\t\t\tinput,\n\t\t\t\t\tinputClasses,\n\t\t\t\t\tbutton,\n\t\t\t\t\tblocks,\n\t\t\t\t\tblocksLenght,\n\t\t\t\t\thiddenBlocksCount = 0,\n\t\t\t\t\tdescLabel,\n\t\t\t\t\tdescLabel1stChild,\n\t\t\t\t\tdescLabel2ndChild,\n\t\t\t\t\ti;\n\n\t\t\t\tif (!this._focusStatus) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tblocks = element.getElementsByClassName(classes.uiTokentextareaSpanBlock);\n\t\t\t\tblocksLenght =  blocks.length;\n\t\t\t\tlabel = element.getElementsByClassName(classes.uiTokentextareaLabel)[0];\n\t\t\t\tinput = element.getElementsByTagName(\"input\")[0];\n\t\t\t\tinputClasses = input.classList;\n\t\t\t\tbutton = element.getElementsByTagName(\"a\")[0];\n\n\t\t\t\tlabel.removeAttribute(\"tabindex\");\n\t\t\t\tinputClasses.remove(classes.uiTokentextareaInputVisible);\n\t\t\t\tinputClasses.add(classes.uiTokentextareaInputInvisible);\n\t\t\t\tinput.removeAttribute(\"tabindex\");\n\t\t\t\tbutton.removeAttribute(\"tabindex\");\n\t\t\t\tbutton.style.display = \"none\";\n\n\t\t\t\telementWidth = element.offsetWidth;\n\t\t\t\tblockWidthSum += _getElementWidth(label);\n\t\t\t\tfor (i = 0; i <=  blocksLenght - 1; i++) {\n\t\t\t\t\tblockWidthSum += _getElementWidth(blocks[i]);\n\t\t\t\t\tif (blockWidthSum >= elementWidth) {\n\t\t\t\t\t\thiddenBlocksCount++;\n\t\t\t\t\t\tblocks[i].classList.add(classes.uiTokentextareaInvisible);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._focusStatus = false;\n\t\t\t\telementClasses = element.classList;\n\t\t\t\telementClasses.remove(classes.uiTokentextareaFocusin);\n\t\t\t\telementClasses.add(classes.uiTokentextareaFocusout);\n\t\t\t\telement.tabIndex = 0;\n\n\t\t\t\tif (hiddenBlocksCount !== 0) {\n\t\t\t\t\tdescLabel = document.createElement(\"div\");\n\t\t\t\t\tdescLabel1stChild = document.createElement(\"div\");\n\t\t\t\t\tdescLabel2ndChild = document.createElement(\"div\");\n\n\t\t\t\t\tdescLabel.classList.add(classes.uiTokentextareaDesclabel);\n\t\t\t\t\tdescLabel.setAttribute(\"aria-label\", strings.moreDoubleTapToEdit);\n\t\t\t\t\tdescLabel.tabIndex = -1;\n\n\t\t\t\t\tdescLabel1stChild.setAttribute(\"aria-hidden\", \"true\");\n\t\t\t\t\tdescLabel1stChild.textContent = description.replace(\"{0}\", hiddenBlocksCount);\n\n\t\t\t\t\tdescLabel2ndChild.setAttribute(\"aria-label\", \"and\");\n\t\t\t\t\tdescLabel2ndChild.style.visibility = \"hidden\";\n\t\t\t\t\tdescLabel2ndChild.textContent = hiddenBlocksCount;\n\n\t\t\t\t\tdescLabel.appendChild(descLabel1stChild);\n\t\t\t\t\tdescLabel.appendChild(descLabel2ndChild);\n\t\t\t\t\telement.insertBefore(descLabel, input.parentNode);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Bind widget events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Tokentextarea.prototype._bindEvents = function (element) {\n\t\t\t\tthis.inputKeyUp = inputKeyUp.bind(null, element);\n\t\t\t\telement.getElementsByTagName(\"input\")[0].addEventListener(\"keyup\", this.inputKeyUp, false);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Tokentextarea"}],"example":"","brief":"<p>Destroy widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Tokentextarea.prototype._destroy = function () {\n\t\t\t\tvar element = this.element,\n\t\t\t\t\tclasses = Tokentextarea.classes,\n\t\t\t\t\telementCilds,\n\t\t\t\t\telementCildsLength,\n\t\t\t\t\tinput,\n\t\t\t\t\tblock,\n\t\t\t\t\tblockLength,\n\t\t\t\t\ti;\n\n\t\t\t\tinput = element.getElementsByTagName(\"input\")[0];\n\t\t\t\tblock = element.getElementsByClassName(classes.uiTokentextareaSpanBlock);\n\t\t\t\tblockLength = block.length;\n\t\t\t\tfor (i = blockLength - 1; i >= 0; i--) {\n\t\t\t\t\tblock[i].removeEventListener(\"vclick\", blockClick, false);\n\t\t\t\t}\n\t\t\t\tinput.removeEventListener(\"keyup\", this.inputKeyUp, false);\n\t\t\t\telementCilds = element.childNodes;\n\t\t\t\telementCildsLength = elementCilds.length;\n\t\t\t\tfor (i =  elementCildsLength - 1; i >= 0; i--) {\n\t\t\t\t\telement.removeChild(elementCilds[i]);\n\t\t\t\t}\n\t\t\t\telement.classList.remove(classes.uiTokentextarea);\n\t\t\t\telement.removeAttribute(\"data-ns-built\");\n\t\t\t\telement.removeAttribute(\"data-ns-binding\");\n\t\t\t\telement.removeAttribute(\"data-ns-name\");\n\t\t\t\telement.removeAttribute(\"data-ns-selector\");\n\t\t\t\telement.removeAttribute(\"aria-disabled\");\n\t\t\t\telement.removeAttribute(\"data-ns-bound\");\n\t\t\t\treturn;\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Tokentextarea = Tokentextarea;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Tokentextarea\",\n\t\t\t\t\"[data-role='tokentextarea'], .ui-tokentextarea\",\n\t\t\t\t[\n\t\t\t\t\t\"add\",\n\t\t\t\t\t\"remove\",\n\t\t\t\t\t\"length\",\n\t\t\t\t\t\"inputText\",\n\t\t\t\t\t\"select\",\n\t\t\t\t\t\"focusIn\",\n\t\t\t\t\t\"focusOut\"\n\t\t\t\t],\n\t\t\t\tTokentextarea,\n\t\t\t\t'tizen'\n\t\t\t);\n\n}(window.document, ns));"}]},{"name":"ns.widget.Notification","authors":[],"extends":"ns.widget.BaseWidget","title":"Notification widget","brief":"The Notification widget shows a popup on the screen to provide notifications.","description":"<h2>Default selectors</h2>\n\n<p>In all elements with <em>data-role=notification</em>. Use <em>p</em> tag for messages and <em>img</em> tag for icon.</p>\n\n<h2>Manual constructor</h2>\n\n<p>For manual creation of notification widget you can use constructor of widget:</p>\n\n<pre><code>@example\nvar notification = ns.engine.instanceWidget(document.getElementById('notification'), 'Notification');\n</code></pre>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<pre><code>@example\nvar notification = $('#notification').notification();\n</code></pre>\n\n<h2>HTML Examples</h2>\n\n<h3>Create notification smallpoup</h3>\n\n<p>Smallpoup has only one line of message and is positioned to the bottom of the active page. It's default type of notification widget.</p>\n\n<pre><code>@example\n&lt;div data-role=\"notification\" id=\"notification\" data-type=\"smallpoup\"&gt;\n    &lt;p&gt;Line of message&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h3>Create notification ticker</h3>\n\n<p>Notification ticker has maximum two lines of message, other messages will be hidden. Additionaly you can set an icon. Notification ticker is default positioned to the top of the page.</p>\n\n<pre><code>@example\n&lt;div data-role=\"notification\" id=\"notification\" data-type=\"ticker\"&gt;\n    &lt;p&gt;First line of message&lt;/p&gt;\n    &lt;p&gt;Second line of message&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h3>Create notification wih interval</h3>\n\n<p>Interval defines time to showing notification widget, after this it will close automatically. Values of <em>data-interval</em> is a positive <strong>number of miliseconds</strong>, e.g. <em>data-interval=\"2000\"</em> (sets to close widget after 2 seconds). Otherwise widget will show infinietely.</p>\n\n<pre><code>@example\n&lt;div data-role=\"notification\" id=\"notification\" data-type=\"ticker\" data-interval=\"4000\"&gt;\n    &lt;img src=\"icon.png\"&gt;\n    &lt;p&gt;First line of message&lt;/p&gt;\n    &lt;p&gt;Second line of message&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n\n<h3>Create notification ticker with icon</h3>\n\n<p>Icon is only supported with notification ticker.</p>\n\n<pre><code>@example\n&lt;div data-role=\"notification\" id=\"notification\" data-type=\"ticker\"&gt;\n    &lt;img src=\"icon.png\"&gt;\n    &lt;p&gt;First line of message&lt;/p&gt;\n    &lt;p&gt;Second line of message&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[{"types":"string","defaultValue":"'0'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.type='smallpopup'] type of widget"},{"type":"property","string":"{string} [interval='0'] interval value in milliseconds of widget. 0 - show widget infinitely"},{"type":"member","string":"ns.widget.Notification"},{"type":"protected","string":""}],"description":"interval value in milliseconds of widget. 0 - show widget infinitely","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\ttheme: 's',\n\t\t\t\t\t\ttype: 'smallpopup',\n\t\t\t\t\t\tinterval: '0'\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\tNotification.prototype = new BaseWidget();","name":"interval"}],"options":[{"types":"string","defaultValue":"'s'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.type='smallpopup'] type of widget"},{"type":"property","string":"{string} [interval='0'] interval value in milliseconds of widget. 0 - show widget infinitely"},{"type":"member","string":"ns.widget.Notification"},{"type":"protected","string":""}],"description":"theme of widget","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\ttheme: 's',\n\t\t\t\t\t\ttype: 'smallpopup',\n\t\t\t\t\t\tinterval: '0'\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\tNotification.prototype = new BaseWidget();","name":"data-theme"},{"types":"string","defaultValue":"'smallpopup'","tags":[{"type":"property","string":"{string} [options.theme='s'] theme of widget"},{"type":"property","string":"{string} [options.type='smallpopup'] type of widget"},{"type":"property","string":"{string} [interval='0'] interval value in milliseconds of widget. 0 - show widget infinitely"},{"type":"member","string":"ns.widget.Notification"},{"type":"protected","string":""}],"description":"type of widget","isPrivate":false,"code":"this.options = {\n\t\t\t\t\t\ttheme: 's',\n\t\t\t\t\t\ttype: 'smallpopup',\n\t\t\t\t\t\tinterval: '0'\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\tNotification.prototype = new BaseWidget();","name":"data-type"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Notification","tags":[{"type":"method","string":"Notification"},{"type":"member","string":"ns.widget.Notification"},{"type":"private","string":""}],"example":"","brief":"<p>Alias for class ns.widget.Notification</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Notification = function () {"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"private","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of notification widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Notification.prototype._build = function (element) {\n\t\t\t\tvar wrapperTag = \"div\",\n\t\t\t\t\ttextTag = \"p\",\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tclasses = Notification.classes,\n\t\t\t\t\tuiElements = this._ui,\n\t\t\t\t\tnotifyBtnWrapper,\n\t\t\t\t\tnotifyWrapper,\n\t\t\t\t\tcloseButton,\n\t\t\t\t\tnodeList,\n\t\t\t\t\ttexts,\n\t\t\t\t\ti,\n\t\t\t\t\tl;\n\n\t\t\t\t//Set theme\n\t\t\t\toptions.theme = themes.getInheritedTheme(element) || options.theme;\n\n\t\t\t\t//Wrap it!\n\t\t\t\tnotifyWrapper = document.createElement(wrapperTag);\n\t\t\t\tuiElements.wrapper = notifyWrapper;\n\n\t\t\t\tnodeList = element.childNodes;\n\t\t\t\twhile (nodeList.length > 0) {\n\t\t\t\t\tnotifyWrapper.appendChild(nodeList[0]);\n\t\t\t\t}\n\n\t\t\t\t//Get texts\n\t\t\t\ttexts = notifyWrapper.getElementsByTagName(textTag);\n\n\t\t\t\t//Add elements if is lower than 2\n\t\t\t\tl = texts.length;\n\t\t\t\tfor (i = l; i < 2; i++) {\n\t\t\t\t\tnotifyWrapper.appendChild(document.createElement(textTag));\n\t\t\t\t}\n\n\t\t\t\t//Hide not visible elements\n\t\t\t\tl = texts.length; //Update length\n\t\t\t\tfor (i = 2; i < l; i++) {\n\t\t\t\t\ttexts[i].style.display = 'none';\n\t\t\t\t}\n\n\t\t\t\tif (options.type === 'ticker') {\n\t\t\t\t\t//Create elements\n\t\t\t\t\tnotifyBtnWrapper = document.createElement(wrapperTag);\n\t\t\t\t\tcloseButton = document.createElement(wrapperTag);\n\n\t\t\t\t\t//Create skeleton\n\t\t\t\t\tnotifyBtnWrapper.appendChild(closeButton);\n\t\t\t\t\tnotifyWrapper.appendChild(notifyBtnWrapper);\n\n\t\t\t\t\t//Add classes\n\t\t\t\t\tnotifyWrapper.className = classes.uiTicker;\n\t\t\t\t\tnotifyBtnWrapper.className = classes.uiTickerBtn;\n\n\t\t\t\t\t//Instance Button widget\n\t\t\t\t\tcloseButton.innerText = 'Close';\n\t\t\t\t\tengine.instanceWidget(closeButton, \"Button\", {\n\t\t\t\t\t\ttheme: options.theme,\n\t\t\t\t\t\tinline: true\n\t\t\t\t\t});\n\n\t\t\t\t\t//Add clases to elements\n\t\t\t\t\ttexts[0].classList.add(classes.uiTickerText1Bg);\n\t\t\t\t\ttexts[1].classList.add(classes.uiTickerText2Bg);\n\n\t\t\t\t} else {\n\t\t\t\t\t//Add classes\n\t\t\t\t\tnotifyWrapper.className = classes.uiSmallpopup;\n\n\t\t\t\t\t//Add clases to element and hide second element\n\t\t\t\t\ttexts[0].classList.add(classes.uiSmallpopupTextBg);\n\t\t\t\t\ttexts[1].style.display = 'none';\n\n\t\t\t\t\tthis._setPosition();\n\t\t\t\t}\n\t\t\t\telement.appendChild(notifyWrapper);\n\t\t\t\tuiElements.texts = texts;\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._init = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tclasses = Notification.classes,\n\t\t\t\t\tuiElements = this._ui,\n\t\t\t\t\ticonImg,\n\t\t\t\t\ticonImgLength,\n\t\t\t\t\twrapper,\n\t\t\t\t\ti;\n\n\t\t\t\t//Set widget wrapper\n\t\t\t\tuiElements.wrapper = element.firstChild;\n\t\t\t\twrapper = uiElements.wrapper;\n\n\t\t\t\t//Set theme\n\t\t\t\toptions.theme = themes.getInheritedTheme(element) || options.theme;\n\n\t\t\t\t//Set texts\n\t\t\t\tuiElements.texts[0] = wrapper.getElementsByClassName(classes.uiTickerText1Bg)[0];\n\t\t\t\tuiElements.texts[1] = wrapper.getElementsByClassName(classes.uiTickerText2Bg)[0];\n\n\t\t\t\t//Get icons\n\t\t\t\ticonImg = element.getElementsByTagName('img');\n\t\t\t\ticonImgLength = iconImg.length;\n\t\t\t\tfor (i = 0; i < iconImgLength; i++) {\n\t\t\t\t\ticonImg[i].classList.add(classes.uiTickerIcon);\n\t\t\t\t\t//Hide unused icons\n\t\t\t\t\tif (i > 1) {\n\t\t\t\t\t\ticonImg[i].style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tuiElements.iconImg = iconImg;\n\n\t\t\t\t//fix for compare tests\n\t\t\t\tthis.type = options.type;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._bindEvents = function (element) {\n\t\t\t\tif (!this._eventsAdded) {\n\t\t\t\t\t// Is it needed, that closeButton should has click event binded with self.close() too?\n\t\t\t\t\telement.addEventListener('vmouseup', this.close.bind(this), true);\n\t\t\t\t\tthis._eventsAdded = true;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable notification</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._enable = function () {\n\t\t\t\tthis._ui.wrapper.style.display = '';\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable notification</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._disable = function () {\n\t\t\t\tthis._ui.wrapper.style.display = 'none';\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"member","string":"ns.widget.Notification"},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh notification</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Notification.prototype._refresh = function () {\n\t\t\t\tvar wrapperClassList = this._ui.wrapper.classList,\n\t\t\t\t\tclasses = Notification.classes;\n\t\t\t\twrapperClassList.add(classes.uiNotificationFix);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationHide);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationShow);\n\t\t\t\tthis._setCloseInterval();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_setPosition","tags":[{"type":"method","string":"_setPosition"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Set widget position.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._setPosition = function () {\n\t\t\t\tvar pages = document.body.getElementsByClassName(Page.classes.uiPageActive),\n\t\t\t\t\tfooters,\n\t\t\t\t\tfooterHeight = 0,\n\t\t\t\t\twrapper = this._ui.wrapper;\n\n\t\t\t\tif (typeof pages[0] === 'object') {\n\t\t\t\t\tfooters = selectors.getChildrenByClass(pages[0], 'ui-footer');\n\t\t\t\t\tif (typeof footers[0] === 'object') {\n\t\t\t\t\t\tfooterHeight = footers[0].offsetHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twrapper.style.bottom = footerHeight + (footerHeight > 0 ? 'px' : '');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"open","tags":[{"type":"method","string":"open"},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Open widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Notification.prototype.open = function () {\n\t\t\t\tvar wrapperClassList = this._ui.wrapper.classList,\n\t\t\t\t\tclasses = Notification.classes;\n\n\t\t\t\tif (this.running === true) {\n\t\t\t\t\tthis.refresh();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (this.options.type !== 'ticker') {\n\t\t\t\t\tthis._setPosition();\n\t\t\t\t}\n\n\t\t\t\twrapperClassList.add(classes.uiNotificationShow);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationHide);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationFix);\n\t\t\t\tthis._setCloseInterval();\n\t\t\t\tthis.running = true;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"close","tags":[{"type":"method","string":"close"},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Close widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Notification.prototype.close = function () {\n\t\t\t\tvar wrapperClassList = this._ui.wrapper.classList,\n\t\t\t\t\tclasses = Notification.classes;\n\n\t\t\t\tif (this.running !== true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twrapperClassList.add(classes.uiNotificationHide);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationShow);\n\t\t\t\twrapperClassList.remove(classes.uiNotificationFix);\n\t\t\t\tclearInterval(this.interval);\n\t\t\t\tthis.running = false;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"src","description":"icon source URL","isOptional":false,"isLast":true}],"hasParams":true,"name":"icon","tags":[{"type":"method","string":"icon"},{"type":"param","types":"string","name":"src","description":"icon source URL","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Sets icon</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Notification.prototype.icon = function (src) {\n\t\t\t\tvar uiElements = this._ui,\n\t\t\t\t\ticonImg = uiElements.iconImg,\n\t\t\t\t\tclasses = Notification.classes;\n\n\t\t\t\tif (src) {\n\t\t\t\t\t//Remove all elements from NodeList\n\t\t\t\t\twhile (iconImg.length > 0 && iconImg[0].remove) {\n\t\t\t\t\t\ticonImg[0].remove();\n\t\t\t\t\t}\n\n\t\t\t\t\ticonImg[0] = document.createElement('img');\n\t\t\t\t\ticonImg[0].className = classes.uiTickerIcon;\n\t\t\t\t\ticonImg[0].setAttribute('src', src);\n\n\t\t\t\t\t//Append icon\n\t\t\t\t\tuiElements.wrapper.appendChild(iconImg[0]);\n\t\t\t\t\tuiElements.iconImg = iconImg;\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"text0","description":"first line of text","isOptional":false},{"type":"param","types":"string","name":"text1","description":"second line of text","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["?Array"],"description":"widget text if no param given"},"name":"text","tags":[{"type":"method","string":"text"},{"type":"param","types":"string","name":"text0","description":"first line of text","isOptional":false},{"type":"param","types":"string","name":"text1","description":"second line of text","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.Notification"},{"type":"return","types":["?Array"],"description":"widget text if no param given"}],"example":"","brief":"<p>Set widget texts</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Notification.prototype.text = function (text0, text1) {\n\n\t\t\t\tif (text0 === undefined && text1 === undefined) {\n\t\t\t\t\treturn this._getText();\n\t\t\t\t}\n\n\t\t\t\tthis._setText(text0, text1);\n\t\t\t\treturn null;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"text0","description":"first line of text","isOptional":false},{"type":"param","types":"string","name":"text1","description":"second line of text","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setText","tags":[{"type":"method","string":"_setText"},{"type":"param","types":"string","name":"text0","description":"first line of text","isOptional":false},{"type":"param","types":"string","name":"text1","description":"second line of text","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Set widgets texts</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Notification.prototype._setText = function (text0, text1) {\n\t\t\t\tif (text0 !== undefined) {\n\t\t\t\t\tthis._ui.texts[0].textContent = text0;\n\t\t\t\t}\n\t\t\t\tif (text1 !== undefined) {\n\t\t\t\t\tthis._ui.texts[1].textContent = text1;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Array"],"description":"widget texts"},"name":"_getText","tags":[{"type":"method","string":"_getText"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"},{"type":"return","types":["Array"],"description":"widget texts"}],"example":"","brief":"<p>Get widget texts</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._getText = function () {\n\t\t\t\tvar ui = this._ui,\n\t\t\t\t\ttexts = [null, null];\n\n\t\t\t\tif (this.options.type === 'ticker') {\n\t\t\t\t\ttexts[0] = ui.texts[0] && ui.texts[0].textContent;\n\t\t\t\t\ttexts[1] = ui.texts[1] && ui.texts[1].textContent;\n\t\t\t\t} else {\n\t\t\t\t\ttexts[0] = ui.texts[0] && ui.texts[0].textContent;\n\t\t\t\t}\n\n\t\t\t\treturn texts;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_setCloseInterval","tags":[{"type":"method","string":"_setCloseInterval"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Sets interval</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._setCloseInterval = function () {\n\t\t\t\t//Clear current interval\n\t\t\t\tclearInterval(this.interval);\n\n\t\t\t\tif (this.options.interval > 0) {\n\t\t\t\t\t//Create new interval\n\t\t\t\t\tthis.interval = setInterval(this.close.bind(this), this.options.interval);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"base element for destroy widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"param","types":"HTMLElement","name":"element","description":"base element for destroy widget","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.Notification"}],"example":"","brief":"<p>Destroy widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Notification.prototype._destroy = function (element) {\n\t\t\t\tvar wrapper = this._ui.wrapper,\n\t\t\t\t\tnodeList;\n\t\t\t\tif (element) {\n\t\t\t\t\twrapper = element.firstChild;\n\t\t\t\t} else {\n\t\t\t\t\telement = this.element;\n\t\t\t\t}\n\t\t\t\tnodeList = wrapper.childNodes;\n\t\t\t\twhile (nodeList.length > 0) {\n\t\t\t\t\telement.appendChild(nodeList[0]);\n\t\t\t\t}\n\t\t\t\telement.removeChild(wrapper);\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.Notification = Notification;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Notification\",\n\t\t\t\t\"[data-role='notification'], .ui-notification\",\n\t\t\t\t[\"open\", \"close\", \"icon\", \"text\"],\n\t\t\t\tNotification,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]},{"name":"ns.widget.mobile.Gallery","authors":[],"extends":"ns.widget.BaseWidget","title":"Gallery widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {","properties":[],"options":[{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{boolean} [options.flicking=false]"},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"description":"<p>flicking</p>","isPrivate":false,"name":"data-flicking"},{"types":"number","defaultValue":"500","tags":[{"type":"property","string":"{number} [options.duration=500]"},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"description":"<p>duration</p>","isPrivate":false,"name":"data-duration"}],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"Gallery","tags":[{"type":"method","string":"Gallery"},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"private","string":""}],"example":"","brief":"<p>Alias for class ns.widget.mobile.Gallery</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"Gallery = function () {"},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"example":"","brief":"<p>Configure gallery widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Gallery.prototype._configure = function () {\n\t\t\t\tvar options = this.options;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"example":"","brief":"<p>Build structure of gallery widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Gallery.prototype._build = function (element) {\n\t\t\t\tvar classes = Gallery.classes,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\timages,\n\t\t\t\t\timage,\n\t\t\t\t\tindex,\n\t\t\t\t\ti,\n\t\t\t\t\tlength;\n\n\t\t\t\timages = selectors.getChildrenByTag(element, \"img\");\n\t\t\t\tfor (i = 0, length = images.length; i < length; i++) {\n\t\t\t\t\timage = images[i];\n\t\t\t\t\tdoms.wrapInHTML(image, \"<div class='\" + classes.uiGalleryBg + \"'></div>\");\n\t\t\t\t}\n\t\t\t\tif (element.children.length) {\n\t\t\t\t\tdoms.wrapInHTML(element.children, \"<div class='\" + classes.uiGallery + \"'></div>\");\n\t\t\t\t} else {\n\t\t\t\t\telement.innerHTML = \"<div class='\" + classes.uiGallery + \"'></div>\";\n\t\t\t\t}\n\t\t\t\tindex = parseInt(doms.getNSData(element, \"index\"), 10);\n\t\t\t\tif (!index) {\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t\tif (index < 0) {\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t\tif (index >= length) {\n\t\t\t\t\tindex = length - 1;\n\t\t\t\t}\n\n\t\t\t\tthis.index = index;\n\t\t\t\toptions.verticalAlign = doms.getNSData(element, \"vertical-align\");\n\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"example":"","brief":"<p>Init widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Gallery.prototype._init = function (element) {\n\t\t\t\tvar images = element.getElementsByTagName(\"img\"),\n\t\t\t\t\tclasses = Gallery.classes;\n\t\t\t\tthis.container = selectors.getChildrenByClass(element, classes.uiGallery)[0];\n\t\t\t\tthis._detachAll(images);\n\n\t\t\t\t// for 'compare' test\n\t\t\t\tthis.max_width = this.maxImageWidth;\n\t\t\t\tthis.max_height = this.maxImageHeight;\n\t\t\t\tthis.org_x = this.orgX;\n\t\t\t\tthis.org_time = this.orgTime;\n\t\t\t\tthis.prev_img = this.previousImage;\n\t\t\t\tthis.cur_img = this.currentImage;\n\t\t\t\tthis.next_img = this.nextImage;\n\t\t\t\tthis.images_hold = this.imagesHold;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"example":"","brief":"<p>Bind events to widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Gallery.prototype._bindEvents = function (element) {\n\t\t\t\t//todo\n\t\t\t\t//galleryorientationchanged\n\n\t\t\t\tvar container = this.container,\n\t\t\t\t\tpage = selectors.getClosestBySelectorNS(element, \"role=page\");\n\n\t\t\t\tthis.vmousemoveHandler = vmousemoveEvent.bind(null, this);\n\t\t\t\tthis.vmousedownHandler = vmousedownEvent.bind(null, this);\n\t\t\t\tthis.vmouseupHandler =  vmouseupEvent.bind(null, this);\n\t\t\t\tthis.vmouseoutHandler = vmouseoutEvent.bind(null, this);\n\t\t\t\tthis.pageShowHandler = this.show.bind(this);\n\t\t\t\tthis.throttledresizeHandler = this.refresh.bind(this);\n\n\t\t\t\twindow.addEventListener(\"throttledresize\", this.throttledresizeHandler, false);\n\t\t\t\tpage.addEventListener(\"pageshow\", this.pageShowHandler, false);\n\n\t\t\t\tcontainer.addEventListener(\"vmousemove\", this.vmousemoveHandler, false);\n\t\t\t\tcontainer.addEventListener(\"vmousedown\", this.vmousedownHandler, false);\n\t\t\t\tcontainer.addEventListener(\"vmouseup\", this.vmouseupHandler, false);\n\t\t\t\tcontainer.addEventListener(\"vmouseout\", this.vmouseoutHandler, false);\n\t\t\t};\n\n\t\t\tGallery.prototype._align = function (index, container) {\n\t\t\t\tvar image = this.images[index],\n\t\t\t\t\timageTop = 0,\n\t\t\t\t\talign = this.options.verticalAlign;\n\n\t\t\t\tif (container) {\n\t\t\t\t\tif (align === \"middle\") {\n\t\t\t\t\t\timageTop = (this.maxImageHeight - image.clientHeight) / 2;\n\t\t\t\t\t} else if (align === \"bottom\") {\n\t\t\t\t\t\timageTop = this.maxImageHeight - image.clientHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\timageTop = 0;\n\t\t\t\t\t}\n\t\t\t\t\tcontainer.style.top = imageTop + \"px\";\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tGallery.prototype._moveLeft = function (imageContainer, value, duration) {\n\t\t\t\tvar transition = \"\";\n\n\t\t\t\tif (imageContainer) {\n\t\t\t\t\tif (duration !== undefined) {\n\t\t\t\t\t\ttransition =  \"-webkit-transform \" + (duration / 1000) + \"s ease\";\n\t\t\t\t\t\timageContainer.style.webkitTransition = transition;\n\t\t\t\t\t}\n\t\t\t\t\timageContainer = setTranslatePosition(imageContainer, value);\n\t\t\t\t}\n\t\t\t\treturn imageContainer;\n\t\t\t};\n\n\t\t\tGallery.prototype._attach = function (index, container) {\n\t\t\t\tif (container && index >= 0 && this.images.length && index < this.images.length) {\n\t\t\t\t\tcontainer.style.display = \"block\";\n\t\t\t\t\tcontainer.appendChild(this.images[index]);\n\t\t\t\t\tloading(this, index, container);\n\t\t\t\t}\n\t\t\t};\n\n\n\t\t\tGallery.prototype.show = function () {\n\t\t\t\tvar classes = Gallery.classes,\n\t\t\t\t\tindex = this.index,\n\t\t\t\t\telement = this.element,\n\t\t\t\t\tpreviousImage,\n\t\t\t\t\tnextImage,\n\t\t\t\t\tcurrentImage;"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Gallery"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy gallery</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Gallery.prototype._destroy = function () {\n\t\t\t\tthis.unbind();\n\t\t\t\tthis._deleteEvents();\n\t\t\t};"}]},{"name":"ns.widget.mobile.VirtualListview","authors":["Michał Szepielak <m.szepielak@samsung.com>","Mateusz Ciepliński <m.cieplinski@samsung.com> [add jQuery template functionality]","Piotr Karny <p.karny@samsung.com>"],"extends":"ns.widget.mobile.Listview","title":"VirtualList Widget","brief":"","description":"<p>In the Web environment, it is challenging to display a large amount of data in a list, such as<br />displaying a contact list of over 1000 list items. It takes time to display the entire list in<br />HTML and the DOM manipulation is complex.</p>\n\n<p>The virtual list widget is used to display a list of unlimited data elements on the screen<br />for better performance. This widget provides easy access to databases to retrieve and display data.<br />It based on <strong>result set</strong> which is fixed size defined by developer by data-row attribute. Result<br />set should be <strong>at least 3 times bigger</strong> then size of clip (number of visible elements).</p>\n\n<p>For now Virtual Lists are based on the <strong>jQuery.template plugin</strong> as described in the jQuery documentation<br />for jQuery.template plugin - but it will change some day...</p>\n\n<h2>Default selectors</h2>\n\n<p>In <em>ul</em> elements with <em>data-role=virtuallistview</em> or <em>data-role=virtuallist</em>.</p>\n\n<h2>Make it work</h2>\n\n<p>To active and configure virtual list widget with application follow these steps:</p>\n\n<h4>1. Create template and place widget element</h4>\n\n<p>@example<br />   <script id=\"tmp-3-2-7\" type=\"text/x-jquery-tmpl\"><br />           <li class=\"ui-li-3-2-7\"><br />           <span class=\"ui-li-text-main\">${NAME}</span><br />               <img src=\"00_winset_icon_favorite_on.png\" class=\"ui-li-icon-sub\"/><br />               <span class=\"ui-li-text-sub\">${ACTIVE}</span><br />               <span class=\"ui-li-text-sub2\">${FROM}</span><br />           </li><br />       </script><br />       <ul id=\"vlist\" data-role=\"virtuallistview\" data-template=\"tmp-3-2-7\" data-row=\"100\"></ul></p>\n\n<p><strong>NOTE:</strong> Tizen Web UI's data-dbtable attribute and functionality is not supported.</p>\n\n<h4>2. Create template and place widget element</h4>\n\n<p>Run {@link ns.widget.mobile.VirtualListview#create .create} method to configure iteration function and<br />declare total number of items.</p>\n\n<p>@example<br />   virtuallistview.create({<br />        //Configure iteration function<br />        itemData: function ( idx ) {<br />            return myDATA[idx];<br />        },<br />        //Declare total number of items<br />        numItemData: myDATA.length<br />    });</p>\n\n<h2>Manual constructor</h2>\n\n<p>To construct VirtualListview widget manually you can use constructor of the widget:</p>\n\n<p>@example<br />   var virtuallistview = ns.engine.instanceWidget(document.getElementById('virtuallistview'), 'VirtualListview');</p>\n\n<p>If jQuery library is loaded, its method can be used:</p>\n\n<p>@example<br />   var virtuallistview = $('#virtuallistview').virtuallistview();</p>\n\n<p><strong>NOTE:</strong> after construct of widget should be create method called with proper parameters.</p>","isPrivate":false,"isInternal":false,"properties":[{"types":"HTMLElement | null","defaultValue":"null","tags":[{"type":"property","string":"{?HTMLElement} [ui.scrollview=null] Reference to associated"},{"type":"{link","string":"ns.widget.mobile.Scrollview Scrollview widget}"},{"type":"property","string":"{number} [ui.itemSize=0] Size of list element in piksels. If scrolling is"},{"type":"vertically","string":"it's item width in other case it's height of item element"},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Reference to associated","isPrivate":false,"code":"self.ui = {\n\t\t\t\t\tscrollview: null,\n\t\t\t\t\titemSize: 0\n\t\t\t\t};","name":"ui.scrollview"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{?HTMLElement} [ui.scrollview=null] Reference to associated"},{"type":"{link","string":"ns.widget.mobile.Scrollview Scrollview widget}"},{"type":"property","string":"{number} [ui.itemSize=0] Size of list element in piksels. If scrolling is"},{"type":"vertically","string":"it's item width in other case it's height of item element"},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Size of list element in piksels. If scrolling is","isPrivate":false,"code":"self.ui = {\n\t\t\t\t\tscrollview: null,\n\t\t\t\t\titemSize: 0\n\t\t\t\t};","name":"ui.itemSize"},{"types":"Array","defaultValue":"0,0,0,0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Holds current direction of scrolling.","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.direction"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Last scroll position from top in pixels.","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.lastPositionX"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Last scroll position from left in pixels.","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.lastPositionY"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Difference between last and current","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.lastJumpX"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Difference between last and current","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.lastJumpY"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Width of clip - visible area for user.","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.clipWidth"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{Array} [_scroll.direction=[0,0,0,0]] Holds current direction of scrolling."},{"type":"Indexes","string":"suit to following order: [up, left, down, right]"},{"type":"property","string":"{number} [_scroll.lastPositionX=0] Last scroll position from top in pixels."},{"type":"property","string":"{number} [_scroll.lastPositionY=0] Last scroll position from left in pixels."},{"type":"property","string":"{number} [_scroll.lastJumpX=0] Difference between last and current"},{"type":"position","string":"of horizontal scroll."},{"type":"property","string":"{number} [_scroll.lastJumpY=0] Difference between last and current"},{"type":"position","string":"of vertical scroll."},{"type":"property","string":"{number} [_scroll.clipWidth=0] Width of clip - visible area for user."},{"type":"property","string":"{number} [_scroll.clipHeight=0] Height of clip - visible area for user."},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"description":"Height of clip - visible area for user.","isPrivate":false,"code":"self._scroll = {\n\t\t\t\t\tdirection: [0, 0, 0, 0],\n\t\t\t\t\tlastPositionX: 0,\n\t\t\t\t\tlastPositionY: 0,\n\t\t\t\t\tlastJumpX: 0,\n\t\t\t\t\tlastJumpY: 0,\n\t\t\t\t\t//@TODO: what if there is another element in scroll view? what size of clip should be?\n\t\t\t\t\tclipWidth: 0,\n\t\t\t\t\tclipHeight: 0\n\t\t\t\t};","name":"_scroll.clipHeight"}],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"VirtualListview","tags":[{"type":"method","string":"VirtualListview"},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Local constructor function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"VirtualListview = function () {\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tprototype = new Listview(),\n\t\t\t\tclasses = {\n\t\t\t\t\tCONTAINER: \"ui-virtual-list-container\"\n\t\t\t\t};\n\n\n\t\t\tVirtualListview.prototype = prototype;"},{"params":[{"type":"param","types":"number","name":"idx","description":"Index of data set.","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"","tags":[{"type":"method","string":""},{"type":"param","types":"number","name":"idx","description":"Index of data set.","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Method which returns list item value at specified index from database.<br /><strong>Method should overrided by developer using {@link ns.widget.mobile.VirtualListview#create .create} method.</strong></p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"self.itemData = function () {\n\t\t\t\t\treturn null;\n\t\t\t\t};"},{"params":[{"type":"param","types":"ns.widget.mobile.VirtualListview","name":"self","description":"VirtualListview widget reference","isOptional":false,"isLast":true}],"hasParams":true,"name":"_updateList","tags":[{"type":"method","string":"_updateList"},{"type":"param","types":"ns.widget.mobile.VirtualListview","name":"self","description":"VirtualListview widget reference","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Check if scrolling position is changed and updates list if it needed.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function _updateList(self) {\n\t\t\t\tvar _scroll = self._scroll;\n\n\t\t\t\tself._updateScrollInfo();\n\n\t\t\t\tif (_scroll.lastJumpY > 0 || _scroll.lastJumpX > 0) {\n\t\t\t\t\tif (!blockEvent) {\n\t\t\t\t\t\t_orderElements(self);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"argumentsArray","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_configureList","tags":[{"type":"method","string":"_configureList"},{"type":"protected","string":""},{"type":"param","types":"Object","name":"argumentsArray","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Configures list. Sets data source and iterator behavior.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._configureList = function (argumentsArray) {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\targs = argumentsArray[0];\n\n\t\t\t\tif (typeof args.itemData === \"function\" && (typeof args.numItemData === \"function\" || typeof args.numItemData === \"number\")) {\n\t\t\t\t\tif (typeof args.numItemData === \"function\") {\n\t\t\t\t\t\toptions.numItemData = args.numItemData();\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.numItemData = args.numItemData <= 0 ? 0 : args.numItemData;\n\t\t\t\t\t}\n\t\t\t\t\tself.itemData = args.itemData;\n\t\t\t\t}\n\n\t\t\t\t// @TODO set minimum set size depending on current screen size\n\t\t\t\toptions.row = Math.max(20, options.row);\n\n\t\t\t\tself._buildList();\n\n\t\t\t\t//Update scroll info: scroll position etc...\n\t\t\t\tself._updateScrollInfo();\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Initialize list on an element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tdirection,\n\t\t\t\t\tscrollviewInstance;\n\n\t\t\t\t// scrollview may be set while widget is created with standalone option\n\t\t\t\tif (!ui.scrollview) {\n\t\t\t\t\t//Get Scrollview widget instance\n\t\t\t\t\t// @TODO make this asynchrous, it's currently possible that a child widget will be built before scrollview (for example VirtualGrid)\n\t\t\t\t\t// @TODO this will fail also if data-scroll is set to none on target scrollable element\n\t\t\t\t\tscrollviewInstance = engine.getBinding(utilsSelectors.getClosestByClass(element, 'ui-scrollview-clip'));\n\t\t\t\t\tui.scrollview = scrollviewInstance;\n\t\t\t\t} else {\n\t\t\t\t\tscrollviewInstance = ui.scrollview;\n\t\t\t\t}\n\n\t\t\t\t//@TODO JQUERY!\n\t\t\t\tui.$jqTmpl = $(document.getElementById(self.options.template));\n\n\t\t\t\toptions.row = parseInt(options.row, 10);\n\n\t\t\t\t//Set direction, default vertical scrolling is allowed\n\t\t\t\tdirection = (options.direction.toLowerCase() === HORIZONTAL) ? HORIZONTAL : VERTICAL;\n\t\t\t\toptions.direction = direction;\n\n\t\t\t\t// Prepare view\n\t\t\t\tif (options.direction === HORIZONTAL) {\n\t\t\t\t\tscrollviewInstance.ui.view.style.height = \"100%\";\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_buildList","tags":[{"type":"method","string":"_buildList"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Builds list items</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._buildList = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tlistItem,\n\t\t\t\t\tlist = self.element,\n\t\t\t\t\tchildElementType = (list.tagName === \"UL\" || list.tagName === \"OL\") ? \"li\" : \"div\",\n\t\t\t\t\tnumberOfItems = self.options.row,\n\t\t\t\t\tdocumentFragment = document.createDocumentFragment(),\n\t\t\t\t\tdirection = self.options.direction,\n\t\t\t\t\ti;\n\n\t\t\t\tfor (i = 0; i < numberOfItems; ++i) {\n\t\t\t\t\tlistItem = document.createElement(childElementType);\n\n\t\t\t\t\tif (direction === HORIZONTAL) {\n\t\t\t\t\t\t// TODO: check if whiteSpace: nowrap is better for vertical listes\n\t\t\t\t\t\t// NOTE: after rebuild this condition check possible duplication from _init method\n\t\t\t\t\t\tlistItem.style.float = 'left';\n\t\t\t\t\t}\n\n\t\t\t\t\tself._updateListItem(listItem, i);\n\t\t\t\t\tdocumentFragment.appendChild(listItem);\n\t\t\t\t}\n\n\t\t\t\tlist.appendChild(documentFragment);\n\t\t\t\tself._refresh();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"member","string":"ns.widget.mobile.VirtualListview"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refresh = function (create) {\n\t\t\t\t//Set default value of variable create\n\t\t\t\tcreate = create === undefined ? false : create;\n\t\t\t\t//Set default value of variable create\n\t\t\t\tthis._refreshItems(this.element, create);\n\t\t\t\tthis._refreshScrollbar();\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"index","description":"Index of first row","isOptional":false,"isLast":true}],"hasParams":true,"name":"_loadData","tags":[{"type":"method","string":"_loadData"},{"type":"protected","string":""},{"type":"param","types":"number","name":"index","description":"Index of first row","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Loads data from specefied index to result set size.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._loadData = function (index) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tchildren = self.element.firstElementChild;\n\n\t\t\t\tif (self._currentIndex !== index) {\n\t\t\t\t\tself._currentIndex = index;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tself._updateListItem(children, index);\n\t\t\t\t\t\t++index;\n\t\t\t\t\t\tchildren = children.nextElementSibling;\n\t\t\t\t\t} while (children);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refreshScrollbar","tags":[{"type":"method","string":"_refreshScrollbar"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Sets proper scrollbar size: height (vertical), width (horizontal)</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refreshScrollbar = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tnewViewSize = self._computeAvgSize() * options.numItemData,\n\t\t\t\t\tscrollviewInstance = self.ui.scrollview,\n\t\t\t\t\t// Get scrollview view element (child)\n\t\t\t\t\t// @TODO remove fetching first child after createing ui.view property inside Scrollview widget\n\t\t\t\t\tscrollviewView = (scrollviewInstance.ui && scrollviewInstance.ui.view) || scrollviewInstance.element.firstElementChild;\n\n\t\t\t\tif (options.direction === VERTICAL) {\n\t\t\t\t\tscrollviewView.style.height = newViewSize + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tscrollviewView.style.width = newViewSize + \"px\";\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Binds VirtualListview events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._bindEvents = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tscrollEventBound = _updateList.bind(null, self),\n\t\t\t\t\tscrollviewClip = self.ui.scrollview && self.ui.scrollview.element;\n\n\t\t\t\tif (scrollviewClip) {\n\t\t\t\t\tscrollviewClip.addEventListener(\"scroll\", scrollEventBound, false);\n\t\t\t\t\tself._scrollEventBound = scrollEventBound;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Cleans widget's resources</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._destroy = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tscrollview = self.ui.scrollview,\n\t\t\t\t\tscrollviewClip = scrollview.element,\n\t\t\t\t\tscrollviewParent = scrollviewClip.parentElement,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementStyle = element.style,\n\t\t\t\t\tlistItem;\n\n\t\t\t\t// Restore start position\n\t\t\t\telementStyle.position = \"static\";\n\t\t\t\tif (self.options.direction === VERTICAL) {\n\t\t\t\t\telementStyle.top = \"\";\n\t\t\t\t} else {\n\t\t\t\t\telementStyle.left = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (scrollviewClip) {\n\t\t\t\t\tscrollviewClip.removeEventListener(\"scroll\", self._scrollEventBound, false);\n\t\t\t\t}\n\n\t\t\t\t// In case we have a standalone version move element to parent of scrollview\n\t\t\t\t// call destroy and remove it from DOM\n\t\t\t\tif (self.options.standalone) {\n\t\t\t\t\tscrollviewParent.appendChild(self.element);\n\t\t\t\t\tscrollview.destroy();\n\n\t\t\t\t\tscrollviewParent.removeChild(scrollviewClip);\n\n\t\t\t\t\tself.ui.scrollview = null;\n\t\t\t\t}\n\n\t\t\t\t//Remove li elements.\n\t\t\t\t// @TODO innerHTML = \"\" could be faster\n\t\t\t\twhile (element.firstElementChild) {\n\t\t\t\t\tlistItem = element.firstElementChild;\n\t\t\t\t\telement.removeChild(listItem);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"create","tags":[{"type":"method","string":"create"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Sets iterator function and total number of data based on users arguments.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype.create = function () {\n\t\t\t\tthis._configureList(arguments);\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.VirtualListview = VirtualListview;\n\n\t\t\tengine.defineWidget(\n\t\t\t\t\"VirtualListview\",\n\t\t\t\t\"[data-role='virtuallistview'],[data-role='virtuallist'], .ui-virtuallistview\",\n\t\t\t\t[\"create\"],\n\t\t\t\tVirtualListview,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.wearable.ScrollHandler","authors":[],"extends":"ns.widget.mobile.Scrollview","title":"ScrollHandler widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"var ScrollHandler = function () {\n\t\t\t\t\tvar self = this;","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"view","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"makePositioned","tags":[{"type":"method","string":"makePositioned"},{"type":"param","types":"HTMLElement","name":"view","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Changes static position to relative</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function makePositioned(view) {\n\t\t\t\tif (DOMUtils.getCSSProperty(view, \"position\") === \"static\") {\n\t\t\t\t\tview.style.position = \"relative\";\n\t\t\t\t} else {\n\t\t\t\t\tview.style.position = \"absolute\";\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"startTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startX","description":"","isOptional":false},{"type":"param","types":"number","name":"startY","description":"","isOptional":false},{"type":"param","types":"number","name":"translateX","description":"","isOptional":false},{"type":"param","types":"number","name":"translateY","description":"","isOptional":false},{"type":"param","types":"number","name":"endX","description":"","isOptional":false},{"type":"param","types":"number","name":"endY","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"translateTransition","tags":[{"type":"method","string":"translateTransition"},{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"startTime","description":"","isOptional":false},{"type":"param","types":"number","name":"startX","description":"","isOptional":false},{"type":"param","types":"number","name":"startY","description":"","isOptional":false},{"type":"param","types":"number","name":"translateX","description":"","isOptional":false},{"type":"param","types":"number","name":"translateY","description":"","isOptional":false},{"type":"param","types":"number","name":"endX","description":"","isOptional":false},{"type":"param","types":"number","name":"endY","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Translation animation loop</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function translateTransition(state, element, startTime, startX, startY, translateX, translateY, endX, endY, duration) {\n\t\t\t\tvar timestamp = (new Date()).getTime() - startTime,\n\t\t\t\t\tnewX = parseInt(easingUtils.cubicOut(timestamp, startX, translateX, duration), 10),\n\t\t\t\t\tnewY = parseInt(easingUtils.cubicOut(timestamp, startY, translateY, duration), 10);\n\t\t\t\tif (element.scrollLeft !== endX) {\n\t\t\t\t\telement.scrollLeft = newX;\n\t\t\t\t}\n\t\t\t\tif (element.scrollTop !== endY) {\n\t\t\t\t\telement.scrollTop = newY;\n\t\t\t\t}\n\n\t\t\t\tif ((newX !== endX || newY !== endY) &&\n\t\t\t\t\t(newX >= 0 && newY >= 0) &&\n\t\t\t\t\tstate.currentTransition) {\n\t\t\t\t\tutils.requestAnimationFrame(state.currentTransition);\n\t\t\t\t} else {\n\t\t\t\t\tstate.currentTransition = null;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"translate","tags":[{"type":"method","string":"translate"},{"type":"param","types":"Object","name":"state","description":"Scrollview instance state","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"}],"example":"","brief":"<p>Translates scroll posotion directly or with an animation<br />if duration is specified</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function translate(state, element, x, y, duration) {\n\t\t\t\tif (duration) {\n\t\t\t\t\tstate.currentTransition = translateTransition.bind(\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\telement,\n\t\t\t\t\t\t(new Date()).getTime(),\n\t\t\t\t\t\telement.scrollLeft,\n\t\t\t\t\t\telement.scrollTop,\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t\telement.scrollLeft + x,\n\t\t\t\t\t\telement.scrollTop + y,\n\t\t\t\t\t\tduration\n\t\t\t\t\t);\n\t\t\t\t\tutils.requestAnimationFrame(state.currentTransition);\n\t\t\t\t} else {\n\t\t\t\t\tif (x) {\n\t\t\t\t\t\telement.scrollLeft = element.scrollLeft + x;\n\t\t\t\t\t}\n\t\t\t\t\tif (y) {\n\t\t\t\t\t\telement.scrollTop = element.scrollTop + y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction repositionJumps(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\thorizontalJumpButton = ui.jumpHorizontalButton,\n\t\t\t\t\tverticalJumpButton = ui.jumpVerticalButton,\n\t\t\t\t\toffsets = horizontalJumpButton || verticalJumpButton ? DOMUtils.getElementOffset(self.element) : null; // dont calc when not used\n\n\t\t\t\tif (horizontalJumpButton) {\n\t\t\t\t\thorizontalJumpButton.style.left = offsets.left + \"px\";\n\t\t\t\t}\n\n\t\t\t\tif (verticalJumpButton) {\n\t\t\t\t\tverticalJumpButton.style.top = offsets.top + \"px\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tScrollview.classes = classes;\n\n\t\t\tScrollview.prototype = new BaseWidget();"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Builds the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._build = function (element) {\n\t\t\t\t//@TODO wrap element's content with external function\n\t\t\t\tvar self = this,\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\tview = selectors.getChildrenByClass(element, classes.view)[0] || document.createElement('div'),\n\t\t\t\t\tclipStyle = element.style,\n\t\t\t\t\tnode = null,\n\t\t\t\t\tchild = element.firstChild,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tdirection = options.scroll,\n\t\t\t\t\tjumpButton,\n\t\t\t\t\tjumpBackground;\n\t\t\t\tview.className = classes.view;\n\n\t\t\t\twhile (child) {\n\t\t\t\t\tnode = child;\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t\tif (view !== node) {\n\t\t\t\t\t\tview.appendChild(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (view.parentNode !== element) {\n\t\t\t\t\telement.appendChild(view);\n\t\t\t\t}\n\n\t\t\t\t// setting view style\n\t\t\t\tmakePositioned(view);\n\n\t\t\t\telement.classList.add(classes.clip);\n\n\t\t\t\tswitch (direction) {\n\t\t\t\t\tcase \"x\":\n\t\t\t\t\t\tclipStyle.overflowX = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"xy\":\n\t\t\t\t\t\tclipStyle.overflow = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tclipStyle.overflowY = \"scroll\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (options.scrollJump) {\n\t\t\t\t\tif (direction.indexOf(\"x\") > -1) {\n\t\t\t\t\t\tjumpBackground = document.createElement('div');\n\t\t\t\t\t\tjumpBackground.className = classes.jumpLeft;\n\t\t\t\t\t\tjumpButton = document.createElement('div');\n\n\t\t\t\t\t\tjumpBackground.appendChild(jumpButton);\n\t\t\t\t\t\telement.appendChild(jumpBackground);\n\t\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\t\tjumpButton,\n\t\t\t\t\t\t\t\"Button\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"icon\": \"scrollleft\",\n\t\t\t\t\t\t\t\t\"style\": \"box\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tui.jumpHorizontalButton = jumpBackground;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (direction.indexOf(\"y\") > -1) {\n\t\t\t\t\t\tjumpBackground = document.createElement('div');\n\t\t\t\t\t\tjumpBackground.className = classes.jumpTop;\n\t\t\t\t\t\tjumpButton = document.createElement('div');\n\n\t\t\t\t\t\tjumpBackground.appendChild(jumpButton);\n\t\t\t\t\t\telement.appendChild(jumpBackground);\n\t\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\t\tjumpButton,\n\t\t\t\t\t\t\t\"Button\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"icon\": \"scrolltop\",\n\t\t\t\t\t\t\t\t\"style\": \"box\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tui.jumpVerticalButton = jumpBackground;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tui.view = view;\n\t\t\t\t// @TODO\n\t\t\t\t//this._addOverflowIndicator(element);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"instance","string":""}],"example":"","brief":"<p>Inits widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._init = function (element) {\n\t\t\t\tvar ui = this.ui,\n\t\t\t\t\tpage = ui.page;\n\n\t\t\t\tif (!ui.view) {\n\t\t\t\t\tui.view = selectors.getChildrenByClass(element, classes.view)[0];\n\t\t\t\t}\n\n\t\t\t\tif (!page) {\n\t\t\t\t\tpage = selectors.getClosestByClass(element, pageClass);\n\t\t\t\t\tif (page) {\n\t\t\t\t\t\tui.page = page;\n\t\t\t\t\t\tif (page.classList.contains(pageActiveClass) && this.options.scrollJump) {\n\t\t\t\t\t\t\trepositionJumps(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"clip","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_addOverflowIndicator","tags":[{"type":"method","string":"_addOverflowIndicator"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"clip","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Adds overflow indicators</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._addOverflowIndicator = function (clip) {\n\t\t\t\tif ((clip.getAttribute('data-overflow-enable') || 'true') === 'false') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tclip.insertAdjacentHTML('beforeend', '<div class=\"ui-overflow-indicator-top\"></div><div class=\"ui-overflow-indicator-bottom\"></div>');\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"scrollTo","tags":[{"type":"method","string":"scrollTo"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Scrolls to specified position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype.scrollTo = function (x, y, duration) {\n\t\t\t\tvar element = this.element;\n\t\t\t\tthis.translateTo(x - element.scrollLeft, y - element.scrollTop, duration);\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true}],"hasParams":true,"name":"translateTo","tags":[{"type":"method","string":"translateTo"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"number","name":"x","description":"","isOptional":false},{"type":"param","types":"number","name":"y","description":"","isOptional":false},{"type":"param","types":"number","name":"duration","description":"","isOptional":true,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Translates the scroll to specified position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.translateTo = function (x, y, duration) {\n\t\t\t\ttranslate(this.state, this.element, x, y, duration);\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"ensureElementIsVisible","tags":[{"type":"method","string":"ensureElementIsVisible"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Ensures that specified element is visible in the<br />clip area</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.ensureElementIsVisible = function (element) {\n\t\t\t\tvar clip = this.element,\n\t\t\t\t\tclipHeight = DOMUtils.getElementHeight(clip),\n\t\t\t\t\tclipWidth = DOMUtils.getElementWidth(clip),\n\t\t\t\t\tclipTop = 0,\n\t\t\t\t\tclipBottom = clipHeight,\n\t\t\t\t\telementHeight = DOMUtils.getElementHeight(element),\n\t\t\t\t\telementWidth = DOMUtils.getElementWidth(element),\n\t\t\t\t\telementTop = 0,\n\t\t\t\t\telementBottom,\n\t\t\t\t\telementFits = clipHeight >= elementHeight && clipWidth >= elementWidth,\n\t\t\t\t\tanchor,\n\t\t\t\t\tanchorPositionX,\n\t\t\t\t\tanchorPositionY,\n\t\t\t\t\tparent,\n\t\t\t\t\tfindPositionAnchor = function (input) {\n\t\t\t\t\t\tvar id = input.getAttribute(\"id\"),\n\t\t\t\t\t\t\ttagName = input.tagName.toLowerCase();\n\t\t\t\t\t\tif (id && [\"input\", \"textarea\", \"button\"].indexOf(tagName) > -1) {\n\t\t\t\t\t\t\treturn input.parentNode.querySelector(\"label[for=\" + id + \"]\");\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t_true = true;\n\n\t\t\t\tparent = element.parentNode;\n\t\t\t\twhile (parent && parent.node !== clip) {\n\t\t\t\t\telementTop += parent.offsetTop;\n\t\t\t\t\t//elementLeft += parent.offsetLeft;\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\t\t\t\telementBottom = elementTop + elementHeight;\n\t\t\t\t//elementRight = elementLeft + elementWidth;\n\n\t\t\t\tswitch (_true) {\n\t\t\t\t\tcase elementFits && clipTop < elementTop && clipBottom > elementBottom: // element fits in view is inside clip area\n\t\t\t\t\t\t// pass, element position is ok\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase elementFits && clipTop < elementTop && clipBottom < elementBottom: // element fits in view but its visible only at top\n\t\t\t\t\tcase elementFits && clipTop > elementTop && clipBottom > elementBottom: // element fits in view but its visible only at bottom\n\t\t\t\t\tcase elementFits: // element fits in view but is not visible\n\t\t\t\t\t\tthis.centerToElement(element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase clipTop < elementTop && clipBottom < elementBottom: // element visible only at top\n\t\t\t\t\tcase clipTop > elementTop && clipBottom > elementBottom: // element visible only at bottom\n\t\t\t\t\t\t// pass, we cant do anything, if we move the scroll\n\t\t\t\t\t\t// the user could lost view of something he scrolled to\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // element is not visible\n\t\t\t\t\t\tanchor = findPositionAnchor(element);\n\t\t\t\t\t\tif (!anchor) {\n\t\t\t\t\t\t\tanchor = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanchorPositionX = anchor.offsetLeft + DOMUtils.getCSSProperty(anchor, \"margin-left\", 0, \"integer\");\n\t\t\t\t\t\tanchorPositionY = anchor.offsetTop + DOMUtils.getCSSProperty(anchor, \"margin-top\", 0, \"integer\");\n\t\t\t\t\t\tparent = anchor.parentNode;\n\t\t\t\t\t\twhile (parent && parent !== clip) {\n\t\t\t\t\t\t\tanchorPositionX = parent.offsetLeft + DOMUtils.getCSSProperty(parent, \"margin-left\", 0, \"integer\");\n\t\t\t\t\t\t\tanchorPositionY = parent.offsetTop + DOMUtils.getCSSProperty(parent, \"margin-top\", 0, \"integer\");\n\t\t\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.scrollTo(anchorPositionX, anchorPositionY, this.scrollDuration);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"centerToElement","tags":[{"type":"method","string":"centerToElement"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""}],"example":"","brief":"<p>Centers specified element in the clip area</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.centerToElement = function (element) {\n\t\t\t\tvar clip = this.element,\n\t\t\t\t\tdeltaX = parseInt(DOMUtils.getElementWidth(clip) / 2 - DOMUtils.getElementWidth(element) / 2, 10),\n\t\t\t\t\tdeltaY = parseInt(DOMUtils.getElementHeight(clip) / 2 - DOMUtils.getElementHeight(element) / 2, 10),\n\t\t\t\t\telementPositionX = element.offsetLeft,\n\t\t\t\t\telementPositionY = element.offsetTop,\n\t\t\t\t\tparent = element.parentNode;\n\n\t\t\t\twhile (parent && parent !== clip) {\n\t\t\t\t\telementPositionX += parent.offsetLeft + DOMUtils.getCSSProperty(parent, \"margin-left\", 0, \"integer\");\n\t\t\t\t\telementPositionY += parent.offsetTop + DOMUtils.getCSSProperty(parent, \"margin-top\", 0, \"integer\");\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\t\t\t\tthis.scrollTo(elementPositionX - deltaX, elementPositionY - deltaY, this.scrollDuration);\n\t\t\t};"},{"params":[],"hasParams":false,"name":"skipDragging","tags":[{"type":"method","string":"skipDragging"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"deprecated","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>This is just for compatibility</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.skipDragging = function () {\n\t\t\t\tif (window.console) {\n\t\t\t\t\twindow.console.warn(\"ns.widget.mobile.Scrollview: skipDragging is deprecated\");\n\t\t\t\t}\n\t\t\t}; // just for TWEBUIFW compat"},{"params":[],"hasParams":false,"return":{"type":"return","types":["Object"],"description":""},"name":"getScrollPosition","tags":[{"type":"method","string":"getScrollPosition"},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"return","types":["Object"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Returns scroll current position</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"Scrollview.prototype.getScrollPosition = function () {\n\t\t\t\tvar element = this.element;\n\t\t\t\treturn {\n\t\t\t\t\t\"x\": element.scrollLeft,\n\t\t\t\t\t\"y\": element.scrollTop\n\t\t\t\t};\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Scrollview"},{"type":"instance","string":""}],"example":"","brief":"<p>Binds scrollview events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Scrollview.prototype._bindEvents = function (element) {\n\t\t\t\tvar scrollTimer = null,\n\t\t\t\t\tview = element.children[0],\n\t\t\t\t\tlastClipHeight = DOMUtils.getElementHeight(element),\n\t\t\t\t\tlastClipWidth = DOMUtils.getElementWidth(element),\n\t\t\t\t\tnotifyScrolled = function () {\n\t\t\t\t\t\teventUtils.trigger(element, \"scrollstop\");\n\t\t\t\t\t\twindow.clearTimeout(scrollTimer);\n\t\t\t\t\t\tscrollTimer = null;\n\t\t\t\t\t},\n\t\t\t\t\tself = this,\n\t\t\t\t\t//FIXME there should be some other way to get parent container\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tjumpTop = ui.jumpVerticalButton,\n\t\t\t\t\tjumpLeft = ui.jumpHorizontalButton,\n\t\t\t\t\trepositionJumpsCallback,\n\t\t\t\t\tjumpTopCallback,\n\t\t\t\t\tjumpLeftCallback,\n\t\t\t\t\tcallbacks = self._callbacks;\n\n\t\t\t\tif (page) {\n\t\t\t\t\tif (this.options.scrollJump) {\n\t\t\t\t\t\trepositionJumpsCallback = repositionJumps.bind(null, this);\n\t\t\t\t\t\tjumpTopCallback = function () {\n\t\t\t\t\t\t\tself.scrollTo(element.scrollLeft, 0, 250);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tjumpLeftCallback = function () {\n\t\t\t\t\t\t\tself.scrollTo(0, element.scrollTop, 250);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpage.addEventListener(\"pageshow\", repositionJumpsCallback, false);\n\t\t\t\t\t\tif (jumpTop) {\n\t\t\t\t\t\t\tjumpTop.firstChild.addEventListener(\"vclick\", jumpTopCallback, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (jumpLeft) {\n\t\t\t\t\t\t\tjumpLeft.firstChild.addEventListener(\"vclick\", jumpLeftCallback, false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcallbacks.repositionJumps = repositionJumpsCallback;\n\t\t\t\t\t\tcallbacks.jumpTop = jumpTopCallback;\n\t\t\t\t\t\tcallbacks.jumpLeft = jumpLeftCallback;\n\t\t\t\t\t}\n\n\t\t\t\t\telement.addEventListener(\"scroll\", function () {\n\t\t\t\t\t\tif (scrollTimer) {\n\t\t\t\t\t\t\twindow.clearTimeout(scrollTimer);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\teventUtils.trigger(element, \"scrollstart\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscrollTimer = window.setTimeout(notifyScrolled, 50);\n\t\t\t\t\t\teventUtils.trigger(element, \"scrollupdate\");\n\t\t\t\t\t}, false);\n\n\n\t\t\t\t\twindow.addEventListener(\"throttledresize\", function () {\n\t\t\t\t\t\tvar focusedElement = view.querySelector(\".ui-focus\"),\n\t\t\t\t\t\t\tclipWidth,\n\t\t\t\t\t\t\tclipHeight;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tself.ensureElementIsVisible(focusedElement);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclipHeight = DOMUtils.getElementHeight(element);\n\t\t\t\t\t\t\tclipWidth = DOMUtils.getElementWidth(element);\n\t\t\t\t\t\t\tself.translateTo(\n\t\t\t\t\t\t\t\tlastClipWidth - clipWidth,\n\t\t\t\t\t\t\t\tlastClipHeight - clipHeight,\n\t\t\t\t\t\t\t\tself.scrollDuration\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tlastClipHeight = clipHeight;\n\t\t\t\t\t\t\tlastClipWidth = clipWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\n\t\t\t\t\tdocument.addEventListener(\"vmousedown\", function () {\n\t\t\t\t\t\tif (currentTransition) {\n\t\t\t\t\t\t\tcurrentTransition = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tScrollview.prototype._destroy = function () {\n\t\t\t\tvar ui = this.ui,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tscrollJump = this.options.scrollJump,\n\t\t\t\t\tjumpTop = ui.jumpVerticalButton,\n\t\t\t\t\tjumpLeft = ui.jumpHorizontalButton,\n\t\t\t\t\tcallbacks = this._callbacks,\n\t\t\t\t\trepositionJumpsCallback = callbacks.repositionJumps,\n\t\t\t\t\tjumpTopCallback = callbacks.jumpTop,\n\t\t\t\t\tjumpLeftCallback = callbacks.jumpLeft;\n\n\t\t\t\tif (scrollJump) {\n\t\t\t\t\tif (page && repositionJumpsCallback) {\n\t\t\t\t\t\tpage.removeEventListener(\"pageshow\", repositionJumpsCallback, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (jumpTop && jumpTopCallback) {\n\t\t\t\t\t\tjumpTop.firstChild.removeEventListener(\"vclick\", jumpTopCallback, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (jumpLeft && jumpLeftCallback) {\n\t\t\t\t\t\tjumpLeft.firstChild.removeEventListener(\"vclick\", jumpLeftCallback, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tns.widget.mobile.Scrollview = Scrollview;\n\t\t\tengine.defineWidget(\n\t\t\t\t\"Scrollview\",\n\t\t\t\t\"[data-role='content']:not([data-scroll='none']):not([data-handler='true']):not(.ui-scrollview-clip):not(.ui-scrolllistview), [data-scroll]:not([data-scroll='none']):not([data-handler='true']), .ui-scrollview\",\n\t\t\t\t[\n\t\t\t\t\t\"scrollTo\",\n\t\t\t\t\t\"ensureElementIsVisible\",\n\t\t\t\t\t\"centerToElement\",\n\t\t\t\t\t\"getScrollPosition\",\n\t\t\t\t\t\"skipDragging\",\n\t\t\t\t\t\"translateTo\"\n\t\t\t\t],\n\t\t\t\tScrollview,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.VirtualGrid","authors":[],"extends":"ns.widget.mobile.VirtualListview","title":"VirtualGrid widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"VirtualGrid = function () {\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tprototype = new VirtualList();\n\n\t\t\tprototype._configure = function () {\n\t\t\t\tvar self = this;\n\n\t\t\t\t// Call parent _configure\n\t\t\t\tparentPrototype._configure.apply(self, arguments);","properties":[],"options":[],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method building the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.mobile.Listview"},{"type":"private","string":""}],"example":"","brief":"<p>Alias to Array.slice</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"slice = [].slice;\n\n\t\t\tListview.prototype = new BaseWidget();\n\n\t\t\tListview.classes = classes;\n\n\t\t\tListview.prototype._configure = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options || {}, // redeclaration for extendibles :(\n\t\t\t\t\tui = self.ui || {}, // redeclaration for extendibles :/\n\t\t\t\t\tcallbacks = self._callbacks || {};"},{"params":[{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"changeLinksToButton","tags":[{"type":"method","string":"changeLinksToButton"},{"type":"param","types":"HTMLElement","name":"item","description":"","isOptional":false},{"type":"param","types":"Array","name":"links","description":"","isOptional":false},{"type":"param","types":"string","name":"itemTheme","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Change links to button widget</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function changeLinksToButton(item, links, itemTheme) {\n\t\t\t\tvar icon = DOM.getNSData(item, 'icon'),\n\t\t\t\t\tlinkClassList = links[0].classList,\n\t\t\t\t\tlinksLength = links.length,\n\t\t\t\t\tlast = links[linksLength - 1],\n\t\t\t\t\tspan;\n\t\t\t\tDOM.setNSData(item, 'theme', itemTheme);\n\t\t\t\tengine.instanceWidget(\n\t\t\t\t\titem,\n\t\t\t\t\t'Button',\n\t\t\t\t\t{\n\t\t\t\t\t\twrapperEls: 'div',\n\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\ticon: false\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (linksLength === 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasArrow);\n\t\t\t\t\tif (icon !== false) {\n\t\t\t\t\t\titem.classList.add(buttonClasses.uiBtnIconRight);\n\t\t\t\t\t}\n\t\t\t\t} else if (linksLength > 1) {\n\t\t\t\t\titem.classList.add(classes.uiLiHasAlt);\n\t\t\t\t\titem.appendChild(last);\n\t\t\t\t\tlast.classList.add(classes.uiLiLinkAlt);\n\t\t\t\t\tlast.setAttribute('title', last.innerText);\n\t\t\t\t\tlast.innerText = '';\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tlast,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: false,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'right',\n\t\t\t\t\t\t\ticon: false\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.classList.add(buttonClasses.uiBtnIconNotext);\n\n\t\t\t\t\tspan = document.createElement('span');\n\t\t\t\t\tengine.instanceWidget(\n\t\t\t\t\t\tspan,\n\t\t\t\t\t\t'Button',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twrapperEls: 'span',\n\t\t\t\t\t\t\tshadow: true,\n\t\t\t\t\t\t\tcorners: false,\n\t\t\t\t\t\t\ticonpos: 'notext',\n\t\t\t\t\t\t\ticon: 'arrow-r'\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tlast.querySelector('.' + buttonClasses.uiBtnInner).appendChild(span);\n\t\t\t\t}\n\t\t\t\tlinkClassList.remove(classes.uiLink);\n\t\t\t\tlinkClassList.add(classes.uiLinkInherit);\n\n\t\t\t\tselectors.getChildrenByClass(item, buttonClasses.uiBtnInner)\n\t\t\t\t\t.forEach(function (element) {\n\t\t\t\t\t\telement.classList.add(classes.uiLi);\n\t\t\t\t\t});\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClassesToImg","tags":[{"type":"method","string":"addThumbClassesToImg"},{"type":"param","types":"HTMLElement","name":"img","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes img</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClassesToImg(img) {\n\t\t\t\tvar parentNode = selectors.getClosestByTag(img.parentNode, \"li\");\n\t\t\t\timg.classList.add(classes.uiLiThumb);\n\t\t\t\tif (parentNode) {\n\t\t\t\t\tparentNode.classList.add(\n\t\t\t\t\t\timg.classList.contains(classes.uiLiIcon) ?\n\t\t\t\t\t\t\tclasses.uiLiHasIcon :\n\t\t\t\t\t\t\tclasses.uiLiHasThumb\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"addThumbClasses","tags":[{"type":"method","string":"addThumbClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Add thumb classes to first img of container</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addThumbClasses(container) {\n\t\t\t\tvar img;\n\t\t\t\timg = selectors.getChildrenByTag(container, 'img');\n\t\t\t\tif (img.length) {\n\t\t\t\t\taddThumbClassesToImg(img[0]);\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true}],"hasParams":true,"name":"addHeadingClasses","tags":[{"type":"method","string":"addHeadingClasses"},{"type":"param","types":"HTMLElement","name":"container","description":"HTML LI element.","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function add ui-li-heading class to all headings elemenets in list</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function addHeadingClasses(container) {\n\t\t\t\tvar headings = [].slice.call(container.querySelectorAll(\"h1, h2, h3, h4, h5, h6\")),\n\t\t\t\t\ti = headings.length - 1;\n\t\t\t\twhile (i >= 0) {\n\t\t\t\t\theadings[i].classList.add(classes.uiLiHeading);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"contentFill","tags":[{"type":"method","string":"contentFill"},{"type":"param","types":"self","name":"","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Function fires on pageshown event and throttledresize event</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function contentFill(self) {\n\t\t\t\tvar ui = self.ui,\n\t\t\t\t\tscrollview = ui.scrollview,\n\t\t\t\t\tview,\n\t\t\t\t\tviewStyle,\n\t\t\t\t\twidth = 0,\n\t\t\t\t\tnode,\n\t\t\t\t\tscroll,\n\t\t\t\t\tisHorizontal,\n\t\t\t\t\tpage = ui.page,\n\t\t\t\t\tprops = {\n\t\t\t\t\t\t\"margin-left\": 0,\n\t\t\t\t\t\t\"margin-right\": 0,\n\t\t\t\t\t\t\"padding-right\": 0,\n\t\t\t\t\t\t\"padding-left\": 0,\n\t\t\t\t\t\t\"border-right\": 0,\n\t\t\t\t\t\t\"border-left\": 0,\n\t\t\t\t\t\t\"width\": 0\n\t\t\t\t\t};\n\n\t\t\t\tif (scrollview) {\n\t\t\t\t\tview = scrollview.ui.view;\n\t\t\t\t\tviewStyle = view.style;\n\t\t\t\t\tnode = view.firstElementChild;\n\t\t\t\t\tscroll = scrollview.options.scroll;\n\t\t\t\t\tisHorizontal = scroll.indexOf(\"x\") > -1;\n\t\t\t\t\tif (view && !self.scrollviewSetWidth && page && page.classList.contains(Page.classes.uiPageActive)) {\n\t\t\t\t\t\tDOM.extractCSSProperties(view, props);\n\t\t\t\t\t\tif (scroll === 'xy') {"},{"params":[{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_refreshItems","tags":[{"type":"method","string":"_refreshItems"},{"type":"param","types":"HTMLElement","name":"ul","description":"","isOptional":false},{"type":"param","types":"Boolean","name":"create","description":"","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.Listview"}],"example":"","brief":"<p>Refresh items of list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"Listview.prototype._refreshItems = function (ul, create) {\n\t\t\t\tvar items,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\ttheme,\n\t\t\t\t\tlast,\n\t\t\t\t\timgs,\n\t\t\t\t\tdividerTheme;\n\n\t\t\t\teventUtils.trigger(ul, 'beforerefreshitems');\n\t\t\t\titems = selectors.getChildrenByTag(ul, 'li');\n\t\t\t\ttheme = DOM.getNSData(ul, 'theme') || options.theme || 's';\n\t\t\t\tdividerTheme = DOM.getNSData(ul, 'divider-theme') || options.dividerTheme || theme;\n\t\t\t\tlast = items.length - 1;\n\n\t\t\t\t//@todo filter only visible\n\t\t\t\titems.forEach(function (item, index) {\n\t\t\t\t\tvar itemTheme, isDivider, links, link,\n\t\t\t\t\t\titemClassList = item.classList;\n\t\t\t\t\tif (create || !item.classList.contains(classes.uiLi)) {\n\t\t\t\t\t\titemClassList.add(classes.uiLi);\n\t\t\t\t\t\tlinks = selectors.getChildrenByTag(item, 'a');\n\t\t\t\t\t\titemTheme = DOM.getNSData(item, 'theme') || theme;\n\t\t\t\t\t\tisDivider = DOM.getNSData(item, 'role') === 'list-divider';\n\n\t\t\t\t\t\t// check if item has a element with class for count\n\t\t\t\t\t\tif (!!item.querySelector('.' + classes.uiLiCount)) {\n\t\t\t\t\t\t\titemClassList.add(classes.uiLiHasCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isDivider) {\n\t\t\t\t\t\t\tDOM.setNSData(item, 'theme', dividerTheme);\n\t\t\t\t\t\t\tengine.instanceWidget(item, \"Listdivider\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (links.length) {\n\t\t\t\t\t\t\t\tchangeLinksToButton(item, links, itemTheme);\n\t\t\t\t\t\t\t\tlink = links[0];\n\t\t\t\t\t\t\t\taddCheckboxRadioClasses(link);\n\t\t\t\t\t\t\t\taddThumbClasses(link);\n\t\t\t\t\t\t\t\taddRightBtnClasses(link);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titemClassList.add(classes.uiLiStatic);\n\t\t\t\t\t\t\t\titemClassList.add(buttonClasses.uiBtnUpThemePrefix + itemTheme);\n\t\t\t\t\t\t\t\titem.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddHeadingClasses(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taddCheckboxRadioClasses(item);\n\t\t\t\t\taddThumbClasses(item);\n\t\t\t\t\taddRightBtnClasses(item);\n\t\t\t\t\tif (index === last) {\n\t\t\t\t\t\titemClassList.add(classes.uiLiLast);\n\t\t\t\t\t} else {\n\t\t\t\t\t\titemClassList.remove(classes.uiLiLast);\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\timgs = ul.querySelectorAll('.' + classes.uiLinkInherit + ' > img:first-child');\n\t\t\t\tif (imgs.length !== 0) {\n\t\t\t\t\tslice.call(imgs).forEach(function (img) {\n\t\t\t\t\t\taddThumbClassesToImg(img);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis._refreshCorners(ul, create);\n\t\t\t};\n\n\t\t\tListview.prototype.refresh = function () {\n\t\t\t\tthis._refreshItems(this.element, false);\n\t\t\t\teventUtils.trigger(this.element, this.name.toLowerCase() + 'afterrefresh');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"VirtualListview","tags":[{"type":"method","string":"VirtualListview"},{"type":"private","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Local constructor function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"VirtualListview = function () {\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tprototype = new Listview(),\n\t\t\t\tclasses = {\n\t\t\t\t\tCONTAINER: \"ui-virtual-list-container\"\n\t\t\t\t};\n\n\n\t\t\tVirtualListview.prototype = prototype;"},{"params":[{"type":"param","types":"number","name":"idx","description":"Index of data set.","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"","tags":[{"type":"method","string":""},{"type":"param","types":"number","name":"idx","description":"Index of data set.","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Method which returns list item value at specified index from database.<br /><strong>Method should overrided by developer using {@link ns.widget.mobile.VirtualListview#create .create} method.</strong></p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"self.itemData = function () {\n\t\t\t\t\treturn null;\n\t\t\t\t};"},{"params":[{"type":"param","types":"ns.widget.mobile.VirtualListview","name":"self","description":"VirtualListview widget reference","isOptional":false,"isLast":true}],"hasParams":true,"name":"_updateList","tags":[{"type":"method","string":"_updateList"},{"type":"param","types":"ns.widget.mobile.VirtualListview","name":"self","description":"VirtualListview widget reference","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Check if scrolling position is changed and updates list if it needed.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function _updateList(self) {\n\t\t\t\tvar _scroll = self._scroll;\n\n\t\t\t\tself._updateScrollInfo();\n\n\t\t\t\tif (_scroll.lastJumpY > 0 || _scroll.lastJumpX > 0) {\n\t\t\t\t\tif (!blockEvent) {\n\t\t\t\t\t\t_orderElements(self);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"},{"params":[{"type":"param","types":"Object","name":"argumentsArray","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_configureList","tags":[{"type":"method","string":"_configureList"},{"type":"protected","string":""},{"type":"param","types":"Object","name":"argumentsArray","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Configures list. Sets data source and iterator behavior.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._configureList = function (argumentsArray) {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\targs = argumentsArray[0];\n\n\t\t\t\tif (typeof args.itemData === \"function\" && (typeof args.numItemData === \"function\" || typeof args.numItemData === \"number\")) {\n\t\t\t\t\tif (typeof args.numItemData === \"function\") {\n\t\t\t\t\t\toptions.numItemData = args.numItemData();\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.numItemData = args.numItemData <= 0 ? 0 : args.numItemData;\n\t\t\t\t\t}\n\t\t\t\t\tself.itemData = args.itemData;\n\t\t\t\t}\n\n\t\t\t\t// @TODO set minimum set size depending on current screen size\n\t\t\t\toptions.row = Math.max(20, options.row);\n\n\t\t\t\tself._buildList();\n\n\t\t\t\t//Update scroll info: scroll position etc...\n\t\t\t\tself._updateScrollInfo();\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"protected","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Initialize list on an element</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tui = self.ui,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tdirection,\n\t\t\t\t\tscrollviewInstance;\n\n\t\t\t\t// scrollview may be set while widget is created with standalone option\n\t\t\t\tif (!ui.scrollview) {\n\t\t\t\t\t//Get Scrollview widget instance\n\t\t\t\t\t// @TODO make this asynchrous, it's currently possible that a child widget will be built before scrollview (for example VirtualGrid)\n\t\t\t\t\t// @TODO this will fail also if data-scroll is set to none on target scrollable element\n\t\t\t\t\tscrollviewInstance = engine.getBinding(utilsSelectors.getClosestByClass(element, 'ui-scrollview-clip'));\n\t\t\t\t\tui.scrollview = scrollviewInstance;\n\t\t\t\t} else {\n\t\t\t\t\tscrollviewInstance = ui.scrollview;\n\t\t\t\t}\n\n\t\t\t\t//@TODO JQUERY!\n\t\t\t\tui.$jqTmpl = $(document.getElementById(self.options.template));\n\n\t\t\t\toptions.row = parseInt(options.row, 10);\n\n\t\t\t\t//Set direction, default vertical scrolling is allowed\n\t\t\t\tdirection = (options.direction.toLowerCase() === HORIZONTAL) ? HORIZONTAL : VERTICAL;\n\t\t\t\toptions.direction = direction;\n\n\t\t\t\t// Prepare view\n\t\t\t\tif (options.direction === HORIZONTAL) {\n\t\t\t\t\tscrollviewInstance.ui.view.style.height = \"100%\";\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_buildList","tags":[{"type":"method","string":"_buildList"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Builds list items</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._buildList = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tlistItem,\n\t\t\t\t\tlist = self.element,\n\t\t\t\t\tchildElementType = (list.tagName === \"UL\" || list.tagName === \"OL\") ? \"li\" : \"div\",\n\t\t\t\t\tnumberOfItems = self.options.row,\n\t\t\t\t\tdocumentFragment = document.createDocumentFragment(),\n\t\t\t\t\tdirection = self.options.direction,\n\t\t\t\t\ti;\n\n\t\t\t\tfor (i = 0; i < numberOfItems; ++i) {\n\t\t\t\t\tlistItem = document.createElement(childElementType);\n\n\t\t\t\t\tif (direction === HORIZONTAL) {\n\t\t\t\t\t\t// TODO: check if whiteSpace: nowrap is better for vertical listes\n\t\t\t\t\t\t// NOTE: after rebuild this condition check possible duplication from _init method\n\t\t\t\t\t\tlistItem.style.float = 'left';\n\t\t\t\t\t}\n\n\t\t\t\t\tself._updateListItem(listItem, i);\n\t\t\t\t\tdocumentFragment.appendChild(listItem);\n\t\t\t\t}\n\n\t\t\t\tlist.appendChild(documentFragment);\n\t\t\t\tself._refresh();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"member","string":"ns.widget.mobile.VirtualListview"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh list</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refresh = function (create) {\n\t\t\t\t//Set default value of variable create\n\t\t\t\tcreate = create === undefined ? false : create;\n\t\t\t\t//Set default value of variable create\n\t\t\t\tthis._refreshItems(this.element, create);\n\t\t\t\tthis._refreshScrollbar();\n\t\t\t};"},{"params":[{"type":"param","types":"number","name":"index","description":"Index of first row","isOptional":false,"isLast":true}],"hasParams":true,"name":"_loadData","tags":[{"type":"method","string":"_loadData"},{"type":"protected","string":""},{"type":"param","types":"number","name":"index","description":"Index of first row","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Loads data from specefied index to result set size.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._loadData = function (index) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tchildren = self.element.firstElementChild;\n\n\t\t\t\tif (self._currentIndex !== index) {\n\t\t\t\t\tself._currentIndex = index;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tself._updateListItem(children, index);\n\t\t\t\t\t\t++index;\n\t\t\t\t\t\tchildren = children.nextElementSibling;\n\t\t\t\t\t} while (children);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refreshScrollbar","tags":[{"type":"method","string":"_refreshScrollbar"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Sets proper scrollbar size: height (vertical), width (horizontal)</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refreshScrollbar = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tnewViewSize = self._computeAvgSize() * options.numItemData,\n\t\t\t\t\tscrollviewInstance = self.ui.scrollview,\n\t\t\t\t\t// Get scrollview view element (child)\n\t\t\t\t\t// @TODO remove fetching first child after createing ui.view property inside Scrollview widget\n\t\t\t\t\tscrollviewView = (scrollviewInstance.ui && scrollviewInstance.ui.view) || scrollviewInstance.element.firstElementChild;\n\n\t\t\t\tif (options.direction === VERTICAL) {\n\t\t\t\t\tscrollviewView.style.height = newViewSize + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tscrollviewView.style.width = newViewSize + \"px\";\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Binds VirtualListview events</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._bindEvents = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tscrollEventBound = _updateList.bind(null, self),\n\t\t\t\t\tscrollviewClip = self.ui.scrollview && self.ui.scrollview.element;\n\n\t\t\t\tif (scrollviewClip) {\n\t\t\t\t\tscrollviewClip.addEventListener(\"scroll\", scrollEventBound, false);\n\t\t\t\t\tself._scrollEventBound = scrollEventBound;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Cleans widget's resources</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._destroy = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tscrollview = self.ui.scrollview,\n\t\t\t\t\tscrollviewClip = scrollview.element,\n\t\t\t\t\tscrollviewParent = scrollviewClip.parentElement,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementStyle = element.style,\n\t\t\t\t\tlistItem;\n\n\t\t\t\t// Restore start position\n\t\t\t\telementStyle.position = \"static\";\n\t\t\t\tif (self.options.direction === VERTICAL) {\n\t\t\t\t\telementStyle.top = \"\";\n\t\t\t\t} else {\n\t\t\t\t\telementStyle.left = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (scrollviewClip) {\n\t\t\t\t\tscrollviewClip.removeEventListener(\"scroll\", self._scrollEventBound, false);\n\t\t\t\t}\n\n\t\t\t\t// In case we have a standalone version move element to parent of scrollview\n\t\t\t\t// call destroy and remove it from DOM\n\t\t\t\tif (self.options.standalone) {\n\t\t\t\t\tscrollviewParent.appendChild(self.element);\n\t\t\t\t\tscrollview.destroy();\n\n\t\t\t\t\tscrollviewParent.removeChild(scrollviewClip);\n\n\t\t\t\t\tself.ui.scrollview = null;\n\t\t\t\t}\n\n\t\t\t\t//Remove li elements.\n\t\t\t\t// @TODO innerHTML = \"\" could be faster\n\t\t\t\twhile (element.firstElementChild) {\n\t\t\t\t\tlistItem = element.firstElementChild;\n\t\t\t\t\telement.removeChild(listItem);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"create","tags":[{"type":"method","string":"create"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.VirtualListview"}],"example":"","brief":"<p>Sets iterator function and total number of data based on users arguments.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype.create = function () {\n\t\t\t\tthis._configureList(arguments);\n\t\t\t};\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.VirtualListview = VirtualListview;\n\n\t\t\tengine.defineWidget(\n\t\t\t\t\"VirtualListview\",\n\t\t\t\t\"[data-role='virtuallistview'],[data-role='virtuallist'], .ui-virtuallistview\",\n\t\t\t\t[\"create\"],\n\t\t\t\tVirtualListview,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window, window.document, ns));"}]},{"name":"ns.widget.TizenSlider","authors":[],"extends":"ns.widget.BaseWidget","title":"TizenSlider widget","brief":"","description":"","isPrivate":false,"isInternal":false,"code":"TizenSlider = function () {\n\t\t\t\t\t// Some properties for example .popup must be defined once per slider\n\t\t\t\t\t// we need to make a copy of base options, because simple assigment\n\t\t\t\t\t// would create references to a single object\n\t\t\t\t\tthis.options = this.options ? objectUtils.copy(this.options) : {};\n\t\t\t\t\t// Redefine this._ui use instance property not prototype property\n\t\t\t\t\t// in further operations\n\t\t\t\t\tthis._ui = {};\n\t\t\t\t\t// @TODO recheck other properties for potential issues\n\t\t\t\t\t// like this._ui\n\t\t\t\t},\n\t\t\t\tsliderBuild,\n\t\t\t\tsliderInit,\n\t\t\t\tsliderConfigure,\n\t\t\t\tsliderBindEvents,\n\t\t\t\tslider_refresh;\n\n\t\t\tTizenSlider.classes = {\n\t\t\t\tuiSliderPopup: \"ui-slider-popup\",\n\t\t\t\tuiSliderLeftPrefix: \"ui-slider-left-\",\n\t\t\t\tuiSliderRightPrefix: \"ui-slider-right-\",\n\t\t\t\tuiSliderLeftText: \"ui-slider-left-text\",\n\t\t\t\tuiSliderRightText: \"ui-slider-right-text\",\n\t\t\t\tuiSliderHandlePress: \"ui-slider-handle-press\"\n\t\t\t};\n\n\t\t\tTizenSlider.prototype = new Slider();\n\t\t\tsliderConfigure = TizenSlider.prototype._configure;\n\t\t\tsliderBuild = TizenSlider.prototype._build;\n\t\t\tsliderInit = TizenSlider.prototype._init;\n\t\t\tsliderBindEvents = TizenSlider.prototype._bindEvents;\n\t\t\tslider_refresh = TizenSlider.prototype._refresh;\n\n\t\t\tTizenSlider.prototype._configure = function () {\n\t\t\t\tvar options = this.options;\n\n\t\t\t\tif (typeof sliderConfigure === 'function') {\n\t\t\t\t\tsliderConfigure.call(this);\n\t\t\t\t}\n\t\t\t\toptions.popup = true;\n\t\t\t\toptions.icon = \"\";\n\t\t\t\toptions.textLeft = \"\";\n\t\t\t\toptions.textRight = \"\";\n\t\t\t};\n\n\t\t\tfunction getValueLength(value) {\n\t\t\t\treturn (String(value)).length;\n\t\t\t}","properties":[],"options":[],"methods":[{"params":[],"hasParams":false,"name":"slice","tags":[{"type":"method","string":"slice"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"private","string":""},{"type":"static","string":""}],"example":"","brief":"<p>Alias to Array.slice function</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"var slice = [].slice,"},{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of the widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of the widget","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false},{"params":[],"hasParams":false,"name":"_configure","tags":[{"type":"method","string":"_configure"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"template","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Protected method configuring the widget</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":true,"isPublic":false,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\tdefinitionNamespace;"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Object"],"description":""},"name":"_getCreateOptions","tags":[{"type":"method","string":"_getCreateOptions"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false,"isLast":true},{"type":"return","types":["Object"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Read data-* attributes and save to #options object</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getCreateOptions = function (element) {\n\t\t\t\tvar options = this.options,\n\t\t\t\t\tbigRegexp = new RegExp(/[A-Z]/g);\n\t\t\t\tif (options !== undefined) {\n\t\t\t\t\tObject.keys(options).forEach(function (option) {\n\t\t\t\t\t\t// Get value from data-{namespace}-{name} element's attribute\n\t\t\t\t\t\t// based on widget.options property keys\n\t\t\t\t\t\tvar value = domUtils.getNSData(element, (option.replace(bigRegexp, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})));\n\n\t\t\t\t\t\tif (value !== null) {\n\t\t\t\t\t\t\toptions[option] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn options;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":"widget's element"},"name":"build","tags":[{"type":"method","string":"build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":"widget's element"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Build widget. Call #_getCreateOptions, #_build</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tid,\n\t\t\t\t\tnode,\n\t\t\t\t\tdataBuilt = element.getAttribute(engineDataTau.built),\n\t\t\t\t\tdataName = element.getAttribute(engineDataTau.name);\n\n\t\t\t\teventUtils.trigger(element, self.widgetEventPrefix + \"beforecreate\");\n\n\t\t\t\t// Append current widget name to data-tau-built and data-tau-name attributes\n\t\t\t\tdataBuilt = !dataBuilt ? self.name : dataBuilt + engineDataTau.separator + self.name;\n\t\t\t\tdataName = !dataName ? self.name : dataName + engineDataTau.separator + self.name;\n\n\t\t\t\telement.setAttribute(engineDataTau.built, dataBuilt);\n\t\t\t\telement.setAttribute(engineDataTau.name, dataName);\n\n\t\t\t\tid = element.id;\n\t\t\t\tif (id) {\n\t\t\t\t\tself.id = id;\n\t\t\t\t} else {\n\t\t\t\t\telement.id = self.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof self._build === TYPE_FUNCTION) {\n\t\t\t\t\tnode = self._build(element);\n\t\t\t\t} else {\n\t\t\t\t\tnode = element;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method initializing the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"init","tags":[{"type":"method","string":"init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Init widget, call: #_getCreateOptions, #_init</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.init = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tself.id = element.id;\n\n\t\t\t\tif (typeof self._init === TYPE_FUNCTION) {\n\t\t\t\t\tself._init(element);\n\t\t\t\t}\n\n\t\t\t\tif (element.getAttribute(\"disabled\")) {\n\t\t\t\t\tself.disable();\n\t\t\t\t} else {\n\t\t\t\t\tself.enable();\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true}],"hasParams":true,"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of widget","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Bind widget events attached in init mode</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"bindEvents","tags":[{"type":"method","string":"bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"Base element of the widget","isOptional":false},{"type":"param","types":"boolean","name":"onlyBuild","description":"Inform about the type of bindings: build/init","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""},{"type":"internal","string":""}],"example":"","brief":"<p>Bind widget events, call: #_buildBindEvents, #_bindEvents</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.bindEvents = function (element, onlyBuild) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdataBound = element.getAttribute(engineDataTau.bound);\n\n\t\t\t\tif (!onlyBuild) {\n\t\t\t\t\tdataBound = !dataBound ? self.name : dataBound + engineDataTau.separator + self.name;\n\t\t\t\t\telement.setAttribute(engineDataTau.bound, dataBound);\n\t\t\t\t}\n\t\t\t\tif (typeof self._buildBindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._buildBindEvents(element);\n\t\t\t\t}\n\t\t\t\tif (!onlyBuild && typeof self._bindEvents === TYPE_FUNCTION) {\n\t\t\t\t\tself._bindEvents(element);\n\t\t\t\t}\n\n\t\t\t\tself.trigger(self.widgetEventPrefix + \"create\", self);\n\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method destroying the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"destroy","tags":[{"type":"method","string":"destroy"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroy widget, call #_destroy</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.destroy = function (element) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._destroy === TYPE_FUNCTION) {\n\t\t\t\t\tself._destroy(element);\n\t\t\t\t}\n\t\t\t\tif (self.element) {\n\t\t\t\t\tself.trigger(self.widgetEventPrefix + \"destroy\");\n\t\t\t\t}\n\t\t\t\telement = element || self.element;\n\t\t\t\tif (element) {\n\t\t\t\t\tengine.removeBinding(element, self.name);\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method disabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._disable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._disable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method enabling the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tif (typeof self._enable === TYPE_FUNCTION) {\n\t\t\t\t\targs.unshift(element);\n\t\t\t\t\tself._enable.apply(self, args);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method causing the widget to refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"return":{"types":["ns.widget.BaseWidget"],"description":"return this"},"name":"refresh","tags":[{"type":"method","string":"refresh"},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Refresh widget, call: #_refresh</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.refresh = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tif (typeof self._refresh === TYPE_FUNCTION) {\n\t\t\t\t\tself._refresh();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},"name":"option","tags":[{"type":"method","string":"option"},{"type":"param","types":"string | Object","name":"name","description":"name of option","isOptional":true},{"type":"param","types":"*","name":"value","description":"value to set","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":"return value of option or undefined if method is called in setter context"},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set options of the widget.</p>","description":"<p>This method can work in many context.</p>\n\n<p>If first argument is type of object them, methos set values for options given in object. Keys of object are names of options and values from object are values to set.</p>\n\n<p>If you give only one string argument then method return value for given option.</p>\n\n<p>If you give two arguments and first argument will be a string then second argument will be interpetete as valu to set.</p>","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.option = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\targs = slice.call(arguments),\n\t\t\t\t\tfirstArgument = args.shift(),\n\t\t\t\t\tsecondArgument = args.shift(),\n\t\t\t\t\tkey,\n\t\t\t\t\tresult,\n\t\t\t\t\tpartResult,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (typeof firstArgument === \"string\") {\n\t\t\t\t\tresult = self._oneOption(firstArgument, secondArgument);\n\t\t\t\t\tif (firstArgument !== undefined && secondArgument !== undefined) {\n\t\t\t\t\t\trefresh = result;\n\t\t\t\t\t\tresult = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof firstArgument === \"object\") {\n\t\t\t\t\tfor (key in firstArgument) {\n\t\t\t\t\t\tif (firstArgument.hasOwnProperty(key)) {\n\t\t\t\t\t\t\tpartResult = partResult || self._oneOption(key, firstArgument[key]);\n\t\t\t\t\t\t\tif (key !== undefined && firstArgument[key] !== undefined) {\n\t\t\t\t\t\t\t\trefresh = refresh || partResult;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (refresh) {\n\t\t\t\t\tself.refresh();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_oneOption","tags":[{"type":"method","string":"_oneOption"},{"type":"param","types":"string","name":"field","description":"","isOptional":false},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""},{"type":"protected","string":""}],"example":"","brief":"<p>Get/Set option of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._oneOption = function (field, value) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tmethodName,\n\t\t\t\t\trefresh = false;\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tmethodName = '_get' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self[methodName]();\n\t\t\t\t\t}\n\t\t\t\t\treturn self.options[field];\n\t\t\t\t}\n\t\t\t\tmethodName = '_set' + (field[0].toUpperCase() + field.slice(1));\n\t\t\t\tif (typeof self[methodName] === TYPE_FUNCTION) {\n\t\t\t\t\tself[methodName](self.element, value);\n\t\t\t\t} else {\n\t\t\t\t\tself.options[field] = value;\n\t\t\t\t\tif (self.element) {\n\t\t\t\t\t\tself.element.setAttribute('data-' + (field.replace(/[A-Z]/g, function (c) {\n\t\t\t\t\t\t\treturn \"-\" + c.toLowerCase();\n\t\t\t\t\t\t})), value);\n\t\t\t\t\t\trefresh = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn refresh;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if events are bounded"},"name":"isBound","tags":[{"type":"method","string":"isBound"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if events are bounded"}],"example":"","brief":"<p>Checks if the widget has bounded events through the {@link ns.widget.BaseWidget#bindEvents} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBound = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.bound) && element.getAttribute(engineDataTau.bound).indexOf(type) > -1;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if the widget was built"},"name":"isBuilt","tags":[{"type":"method","string":"isBuilt"},{"type":"param","types":"string","name":"type","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""},{"type":"internal","string":""},{"type":"return","types":["boolean"],"description":"true if the widget was built"}],"example":"","brief":"<p>Checks if the widget was built through the {@link ns.widget.BaseWidget#build} method.</p>","description":"","isPrivate":false,"isInternal":true,"isProtected":false,"isPublic":false,"code":"prototype.isBuilt = function (type) {\n\t\t\t\tvar element = this.element;\n\t\t\t\ttype = type || this.name;\n\t\t\t\treturn element && element.hasAttribute(engineDataTau.built) && element.getAttribute(engineDataTau.built).indexOf(type) > -1;\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["*"],"description":""},"name":"_getValue","tags":[{"type":"method","string":"_getValue"},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method getting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"_setValue","tags":[{"type":"method","string":"_setValue"},{"type":"param","types":"*","name":"value","description":"","isOptional":false,"isLast":true},{"type":"return","types":["*"],"description":""},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"template","string":""},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method setting the value of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["*"],"description":""},"name":"value","tags":[{"type":"method","string":"value"},{"type":"param","types":"*","name":"value","description":"","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["*"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Get/Set value of the widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.value = function (value) {\n\t\t\t\tvar self = this;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tif (typeof self._setValue === TYPE_FUNCTION) {\n\t\t\t\t\t\treturn self._setValue(value);\n\t\t\t\t\t}\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tif (typeof self._getValue === TYPE_FUNCTION) {\n\t\t\t\t\treturn self._getValue();\n\t\t\t\t}\n\t\t\t\treturn self;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},"name":"trigger","tags":[{"type":"method","string":"trigger"},{"type":"param","types":"string","name":"eventName","description":"the name of event to trigger","isOptional":false},{"type":"param","types":"*","name":"data","description":"additional object to be carried with the event","isOptional":true},{"type":"param","types":"boolean","name":"bubbles","description":"indicating whether the event bubbles up through the DOM or not","defaultValue":"true","isOptional":true},{"type":"param","types":"boolean","name":"cancelable","description":"indicating whether the event is cancelable","defaultValue":"true","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"return","types":["boolean"],"description":"false, if any callback invoked preventDefault on event object"},{"type":"instance","string":""}],"example":"","brief":"<p>Trigger an event on widget's element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.trigger = function (eventName, data, bubbles, cancelable) {\n\t\t\t\treturn eventUtils.trigger(this.element, eventName, data, bubbles, cancelable);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"on","tags":[{"type":"method","string":"on"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Add event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.on = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOn(this.element, eventName, listener, useCapture);\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true}],"hasParams":true,"name":"off","tags":[{"type":"method","string":"off"},{"type":"param","types":"string","name":"eventName","description":"the name of event","isOptional":false},{"type":"param","types":"Function","name":"listener","description":"function call after event will be trigger","isOptional":false},{"type":"param","types":"boolean","name":"useCapture","description":"useCapture param tu addEventListener","defaultValue":"false","isOptional":true,"isLast":true},{"type":"member","string":"ns.widget.BaseWidget"},{"type":"instance","string":""}],"example":"","brief":"<p>Remove event listener to this.element.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.off = function (eventName, listener, useCapture) {\n\t\t\t\teventUtils.fastOff(this.element, eventName, listener, useCapture);\n\t\t\t};\n\n\t\t\tBaseWidget.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.BaseWidget = BaseWidget;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["ns.widget.Popup"],"description":"reference to new widget instance"},"name":"_createPopup","tags":[{"type":"method","string":"_createPopup"},{"type":"param","types":"HTMLElement","name":"container","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"return","types":["ns.widget.Popup"],"description":"reference to new widget instance"},{"type":"member","string":"ns.widget.TizenSlider"}],"example":"","brief":"<p>Creates popup element and appends it container passed as argument</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"TizenSlider.prototype._createPopup = function (container) {\n\t\t\t\tvar popup,\n\t\t\t\t\tpopupInstance;\n\n\t\t\t\t// Create element and append it to slider\n\t\t\t\tpopup = document.createElement('div');\n\t\t\t\tcontainer.appendChild(popup);\n\t\t\t\t// Create widget instance out of popup element\n\t\t\t\tpopupInstance = engine.instanceWidget(popup, 'Popup', {\n\t\t\t\t\tpositionTo: this.handle.id,\n\t\t\t\t\ttransition: \"none\",\n\t\t\t\t\tdirectionPriority: [\n\t\t\t\t\t\t'top',\n\t\t\t\t\t\t'bottom'\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t\tpopup.classList.add(TizenSlider.classes.uiSliderPopup);\n\n\t\t\t\t// Hide as default\n\t\t\t\tpopupInstance.close();\n\n\t\t\t\treturn popupInstance;\n\t\t\t};\n\n\t\t\tTizenSlider.prototype._updateSlider = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tfont_size,\n\t\t\t\t\tfont_length,\n\t\t\t\t\tfont_top,\n\t\t\t\t\tnewValue,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\thandleTextStyle = self.handleText.style,\n\t\t\t\t\tpopupElement,\n\t\t\t\t\tpopupStyle;\n\n\t\t\t\t// As the options.popup could change\n\t\t\t\t// it may be required to create popup\n\t\t\t\tif (self.options.popup){\n\t\t\t\t\tif (!self.popup) {\n\t\t\t\t\t\tself.popup = self._createPopup(self._ui.container);\n\t\t\t\t\t}\n\n\t\t\t\t\tpopupElement = self.popup.element;\n\t\t\t\t\tpopupStyle = popupElement.style;\n\t\t\t\t}\n\n\t\t\t\tself.handle.removeAttribute('title');\n\n\t\t\t\tnewValue = parseInt(element.value, 10);\n\n\t\t\t\tif (newValue !== self.currentValue) {\n\n\t\t\t\t\tfont_length = getValueLength(newValue);\n\n\t\t\t\t\t// Set proper font-size for popup content\n\t\t\t\t\tif (self.popup && self.popupVisible) {\n\t\t\t\t\t\tswitch (font_length) {\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tfont_size = '1.5rem';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tfont_size = '1rem';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tfont_size = '0.8rem';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpopupStyle.fontSize = font_size;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (font_length) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tfont_size = '0.95rem';\n\t\t\t\t\t\tfont_top = '0';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tfont_size = '0.85rem';\n\t\t\t\t\t\tfont_top = '-0.01rem';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tfont_size = '0.65rem';\n\t\t\t\t\t\tfont_top = '-0.1rem';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tfont_size = '0.45rem';\n\t\t\t\t\t\tfont_top = '-0.15rem';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (font_size !== self.handleText.style.fontSize) {\n\t\t\t\t\t\thandleTextStyle.fontSize = font_size;\n\t\t\t\t\t\thandleTextStyle.top = font_top;\n\t\t\t\t\t\thandleTextStyle.position = 'relative';\n\t\t\t\t\t}\n\n\t\t\t\t\tself.currentValue = newValue;\n\t\t\t\t\tself.handleText.innerText = newValue;\n\n\t\t\t\t\t// Set same value for popup element if it exists\n\t\t\t\t\tif (popupElement) {\n\t\t\t\t\t\tpopupElement.innerHTML = newValue;\n\t\t\t\t\t}\n\n\t\t\t\t\tself._refresh();\n\n\t\t\t\t\tevents.trigger(element, \"update\", newValue);\n\t\t\t\t} else {\n\t\t\t\t\t// If text doesn't change reposition only popup\n\t\t\t\t\t// no need to run full refresh\n\t\t\t\t\tif (self.popup) {\n\t\t\t\t\t\tself.popup.setPosition();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTizenSlider.prototype._showPopup = function () {\n\t\t\t\tvar self = this;\n\n\t\t\t\tif (self.options.popup && !self.popupVisible) {\n\t\t\t\t\tself.popup.open();\n\t\t\t\t\tself.popupVisible = true;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTizenSlider.prototype._hidePopup = function () {\n\t\t\t\tvar self = this;\n\n\t\t\t\tif (self.options.popup && self.popupVisible) {\n\t\t\t\t\tself.popup.close();\n\t\t\t\t\tself.popupVisible = false;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTizenSlider.prototype._setOption = function (key, value) {\n\t\t\t\tvar needToChange = (value !== this.options[key]);\n\n\t\t\t\tif (needToChange) {\n\t\t\t\t\tswitch (key) {\n\t\t\t\t\tcase \"popup\":\n\t\t\t\t\t\tthis.options.popup = value;\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\tthis._updateSlider();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._hidePopup();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tTizenSlider.prototype._closePopup = function () {\n\t\t\t\tevents.trigger(this.slider, \"vmouseup\");\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"private","string":""},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.TizenSlider"}],"example":"","brief":"<p>Build TizenSlider</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"TizenSlider.prototype._build = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tslider,\n\t\t\t\t\ticon = options.icon,\n\t\t\t\t\ttextRight = options.textRight,\n\t\t\t\t\ttextLeft = options.textLeft,\n\t\t\t\t\ttextLength,\n\t\t\t\t\telemLeft,\n\t\t\t\t\telemRight,\n\t\t\t\t\tmarginLeft,\n\t\t\t\t\tmarginRight,\n\t\t\t\t\tsliderContainer,\n\t\t\t\t\tinner,\n\t\t\t\t\tclasses = TizenSlider.classes,\n\t\t\t\t\tbtnClasses = Button.classes,\n\t\t\t\t\tsliderContainerStyle,\n\t\t\t\t\tui = self._ui;\n\n\t\t\t\tself.currentValue = null;\n\n\t\t\t\tsliderBuild.call(self, element);\n\t\t\t\tsliderInit.call(self, element);\n\n\t\t\t\tslider = self.slider;\n\t\t\t\tsliderContainer = ui.container;\n\t\t\t\tsliderContainerStyle = sliderContainer.style;\n\n\t\t\t\t// Create popup for element\n\t\t\t\tif (options.popup) {\n\t\t\t\t\tself.popup = self._createPopup(sliderContainer);\n\t\t\t\t}\n\n\t\t\t\t// Set default visibility for popup\n\t\t\t\t// @TODO  consider removing this property and use popup widget instance\n\t\t\t\t// to determine current popup status\n\t\t\t\tself.popupVisible = false;\n\n\t\t\t\tslider.classList.remove(btnClasses.uiBtnCornerAll);\n\t\t\t\tif (ui && ui.background) {\n\t\t\t\t\tui.background.classList.remove(btnClasses.uiBtnCornerAll);\n\t\t\t\t}\n\t\t\t\tself.handle.classList.remove(btnClasses.uiBtnCornerAll);\n\t\t\t\tslider.querySelector('.' + btnClasses.uiBtnInner).classList.remove(btnClasses.uiBtnCornerAll);\n\n\t\t\t\tswitch (icon) {\n\t\t\t\tcase 'bright':\n\t\t\t\tcase 'volume':\n\t\t\t\t\telemLeft = document.createElement('div');\n\t\t\t\t\telemLeft.classList.add(classes.uiSliderLeftPrefix + icon);\n\n\t\t\t\t\telemRight = document.createElement('div');\n\t\t\t\t\telemRight.classList.add(classes.uiSliderRightPrefix + icon);\n\n\t\t\t\t\tslider.parentNode.insertBefore(elemLeft, slider);\n\t\t\t\t\tslider.parentNode.appendChild(elemRight);\n\n\t\t\t\t\tmarginLeft = (DOM.getElementWidth(elemLeft) + 16) + 'px';\n\t\t\t\t\tmarginRight = (DOM.getElementWidth(elemRight) + 16) + 'px';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'text':\n\t\t\t\t\ttextLeft = (textLeft && textLeft.substring(0, 3)) || '';\n\t\t\t\t\ttextRight = (textRight && textRight.substring(0, 3)) || '';\n\n\t\t\t\t\telemLeft = document.createElement('div');\n\t\t\t\t\telemLeft.classList.add(classes.uiSliderLeftText);\n\n\t\t\t\t\telemRight = document.createElement('div');\n\t\t\t\t\telemRight.classList.add(classes.uiSliderRightText);\n\n\t\t\t\t\ttextLength = Math.max(textLeft.length, textRight.length) + 1;\n\n\t\t\t\t\tmarginLeft = textLength + \"rem\";\n\t\t\t\t\tmarginRight = textLength + \"rem\";\n\n\t\t\t\t\t// Properties set before appending to element in DOM\n\t\t\t\t\telemLeft.style.left = \"-\" + marginLeft;\n\t\t\t\t\telemLeft.style.width = marginLeft;\n\n\t\t\t\t\telemRight.style.right = \"-\" + marginRight;\n\t\t\t\t\telemRight.style.width = marginRight;\n\n\t\t\t\t\tinner = document.createElement('span');\n\t\t\t\t\tinner.style.position = 'relative';\n\t\t\t\t\tinner.style.top = '0.4em';\n\t\t\t\t\tinner.innerHTML = textLeft;\n\n\t\t\t\t\t// Second element is same as first one\n\t\t\t\t\telemLeft.appendChild(inner.cloneNode(true));\n\n\t\t\t\t\tinner.innerHTML = textRight;\n\n\t\t\t\t\telemRight.appendChild(inner);\n\n\t\t\t\t\tslider.parentNode.insertBefore(elemLeft, slider);\n\t\t\t\t\tslider.parentNode.appendChild(elemRight);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (icon) {\n\t\t\t\t\tsliderContainerStyle.marginLeft = marginLeft;\n\t\t\t\t\tsliderContainerStyle.marginRight = marginRight;\n\t\t\t\t}\n\n\t\t\t\tself.handleText = slider.querySelector('.' + btnClasses.uiBtnText);\n\n\t\t\t\tself.element = element;\n\t\t\t\tself._updateSlider(element);\n\n\t\t\t\treturn element;\n\t\t\t};\n\n\t\t\tfunction onChangeHandler(self) {\n\t\t\t\tif (self.popupVisible) {\n\t\t\t\t\tself._updateSlider();\n\t\t\t\t\tself._showPopup();\n\t\t\t\t\tdocument.addEventListener('vmouseup', self.onVmouseUpHandleHandler, false);\n\t\t\t\t} else {\n\t\t\t\t\tself.popupVisible = true;\n\t\t\t\t\tself._updateSlider();\n\t\t\t\t\tself.popupVisible = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onSlideStartHandler(self) {\n\t\t\t\tself._updateSlider();\n\t\t\t\tself._showPopup();\n\t\t\t\tdocument.addEventListener('vmouseup', self.onVmouseUpHandleHandler, false);\n\t\t\t}\n\n\t\t\tfunction onVmouseDownHandler(self) {\n\t\t\t\tself.handle.classList.add(TizenSlider.classes.uiSliderHandlePress);\n\t\t\t\tself._showPopup();\n\t\t\t\tdocument.addEventListener('vmouseup', self.onVmouseUpHandleHandler, false);\n\t\t\t}\n\n\t\t\tfunction onVmouseDownHandleHandler(self) {\n\t\t\t\tself._updateSlider();\n\t\t\t\tself.handle.classList.add(TizenSlider.classes.uiSliderHandlePress);\n\t\t\t\tself._showPopup();\n\t\t\t\tdocument.addEventListener('vmouseup', self.onVmouseUpHandleHandler, false);\n\t\t\t}\n\n\t\t\tfunction onVmouseUpHandleHandler(self, event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tself._hidePopup();\n\t\t\t\tself.handle.classList.remove(TizenSlider.classes.uiSliderHandlePress);\n\t\t\t\tdocument.removeEventListener('vmouseup', self.onVmouseUpHandleHandler, false);\n\t\t\t}\n\n\t\t\tTizenSlider.prototype._bindEvents = function (element) {\n\t\t\t\tsliderBindEvents.call(this, element);\n\t\t\t\tthis.onChangeHandler = onChangeHandler.bind(null, this);\n\t\t\t\tthis.onSlideStartHandler = onSlideStartHandler.bind(null, this);\n\t\t\t\tthis.onVmouseDownHandler = onVmouseDownHandler.bind(null, this);\n\t\t\t\tthis.onVmouseDownHandleHandler = onVmouseDownHandleHandler.bind(null, this);\n\t\t\t\tthis.onVmouseUpHandleHandler = onVmouseUpHandleHandler.bind(null, this);\n\t\t\t\tthis.onOrientationChangeHandler = this._closePopup.bind(this);\n\n\t\t\t\telement.addEventListener('change', this.onChangeHandler, false);\n\t\t\t\telement.addEventListener('slidestart', this.onSlideStartHandler, false);\n\t\t\t\telement.addEventListener('vmousedown', this.onVmouseDownHandler, false);\n\t\t\t\tthis.handle.addEventListener('vmousedown', this.onVmouseDownHandleHandler, false);\n\t\t\t\twindow.addEventListener('orientationchange', this.onOrientationChangeHandler, false);\n\n\t\t\t\treturn element;\n\t\t\t};"}]},{"name":"ns.widget.SplitView","authors":[],"extends":"ns.widget.mobile.BaseWidgetMobile","title":"SplitView Widget","brief":"","description":"<p>SplitView is a widget, which displays two children separated with a movable divider.<br />It allows to change the size ratio of its children and supports two orientations.</p>","isPrivate":false,"isInternal":false,"code":"(function (document, ns) {\n\t\n\t\t\t\tvar BaseWidgetMobile = ns.widget.mobile.BaseWidgetMobile,\n\t\t\t\tengine = ns.engine,\n\t\t\t\tselectors = ns.utils.selectors,\n\t\t\t\tDOM = ns.utils.DOM,\n\t\t\t\tevents = ns.utils.events,\n\t\t\t\tclasses,\n\n\t\t\t\tSplitView = function () {\n\t\t\t\t\tvar self = this;","properties":[{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [movementData.lastX=0] last X movement"},{"type":"property","string":"{number} [movementData.lastY=0] last Y movement"},{"type":"property","string":"{boolean} [movementData.hadMovement=false] indicates whether there was a down event"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"last X movement","isPrivate":false,"code":"self.movementData = {\n\t\t\t\t\t\tlastX : 0,\n\t\t\t\t\t\tlastY : 0,\n\t\t\t\t\t\thadDownEvent : false\n\t\t\t\t\t};","name":"movementData.lastX"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [movementData.lastX=0] last X movement"},{"type":"property","string":"{number} [movementData.lastY=0] last Y movement"},{"type":"property","string":"{boolean} [movementData.hadMovement=false] indicates whether there was a down event"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"last Y movement","isPrivate":false,"code":"self.movementData = {\n\t\t\t\t\t\tlastX : 0,\n\t\t\t\t\t\tlastY : 0,\n\t\t\t\t\t\thadDownEvent : false\n\t\t\t\t\t};","name":"movementData.lastY"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{number} [movementData.lastX=0] last X movement"},{"type":"property","string":"{number} [movementData.lastY=0] last Y movement"},{"type":"property","string":"{boolean} [movementData.hadMovement=false] indicates whether there was a down event"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"indicates whether there was a down event","isPrivate":false,"code":"self.movementData = {\n\t\t\t\t\t\tlastX : 0,\n\t\t\t\t\t\tlastY : 0,\n\t\t\t\t\t\thadDownEvent : false\n\t\t\t\t\t};","name":"movementData.hadMovement"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"the width available for split view","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.containerWidth"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"the height available for split view","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.containerHeight"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"splitter bar size","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.splitterSize"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"splitter touch area size","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.splitterTouchSize"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"splitter handle size","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.splitterHandleSize"},{"types":"Array","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"original ratio set for this split view","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.originalRatio"},{"types":"number","defaultValue":"20","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"minimum size of a pane","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.minPaneSize"},{"types":"number","defaultValue":"0","tags":[{"type":"property","string":"{number} [dimensions.containerWidth=0] the width available for split view"},{"type":"property","string":"{number} [dimensions.containerHeight=0] the height available for split view"},{"type":"property","string":"{number} [dimensions.splitterSize=0] splitter bar size"},{"type":"property","string":"{number} [dimensions.splitterTouchSize=0] splitter touch area size"},{"type":"property","string":"{number} [dimensions.splitterHandleSize=0] splitter handle size"},{"type":"property","string":"{Array} [dimensions.originalRatio] original ratio set for this split view"},{"type":"property","string":"{number} [dimensions.minPaneSize=20] minimum size of a pane"},{"type":"property","string":"{number} [dimensions.maxPaneSize=0] maximum size of a pane"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"maximum size of a pane","isPrivate":false,"code":"self.dimensions = {\n\t\t\t\t\t\tcontainerWidth : 0,\n\t\t\t\t\t\tcontainerHeight : 0,\n\t\t\t\t\t\tsplitterSize : 0,\n\t\t\t\t\t\tsplitterTouchSize : 0,\n\t\t\t\t\t\tsplitterHandleSize : 0,\n\t\t\t\t\t\toriginalRatio : [],\n\t\t\t\t\t\tminPaneSize : 20,\n\t\t\t\t\t\tmaxPaneSize : 0\n\t\t\t\t\t};","name":"dimensions.maxPaneSize"}],"options":[{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{boolean} [options.fixed=false] if true, the divider can't be manipulated"},{"type":"property","string":"{boolean} [options.dividerVertical=false] specifies divider orientation"},{"type":"property","string":"{Array} [options.ratio=[0.5, 0.5]] width/height distribution between panes"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"if true, the divider can't be manipulated","isPrivate":false,"name":"data-fixed"},{"types":"boolean","defaultValue":"false","tags":[{"type":"property","string":"{boolean} [options.fixed=false] if true, the divider can't be manipulated"},{"type":"property","string":"{boolean} [options.dividerVertical=false] specifies divider orientation"},{"type":"property","string":"{Array} [options.ratio=[0.5, 0.5]] width/height distribution between panes"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"specifies divider orientation","isPrivate":false,"name":"data-divider-vertical"},{"types":"Array","defaultValue":"0.5,","tags":[{"type":"property","string":"{boolean} [options.fixed=false] if true, the divider can't be manipulated"},{"type":"property","string":"{boolean} [options.dividerVertical=false] specifies divider orientation"},{"type":"property","string":"{Array} [options.ratio=[0.5, 0.5]] width/height distribution between panes"},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"description":"0.5]] width/height distribution between panes","isPrivate":false,"name":"data-ratio"}],"methods":[{"params":[{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true}],"hasParams":true,"return":{"types":["BaseWidgetMobile"],"description":"return this"},"name":"configure","tags":[{"type":"method","string":"configure"},{"type":"param","types":"Object","name":"definition","description":"","isOptional":false},{"type":"param","types":"string","name":"definition.name","description":"Name of widget","isOptional":false},{"type":"param","types":"string","name":"definition.selector","description":"Selector of widget","isOptional":false},{"type":"param","types":"string","name":"definition.binding","description":"Path to file with widget (without extension)","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Object","name":"options","description":"Configure options","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"chainable","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>configure widget object from definition</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.configure = function (definition, element, options) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdefinitionName,\n\t\t\t\t\twidgetName;\n\t\t\t\tparent_configure.call(self, definition, element, options);\n\t\t\t\tif (definition) {\n\t\t\t\t\tdefinitionName = definition.name;\n\t\t\t\t\twidgetName = definitionName && definitionName.toLowerCase();"},{"params":[],"hasParams":false,"name":"_disable","tags":[{"type":"method","string":"_disable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"disable","tags":[{"type":"method","string":"disable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Disable widget, call: #_disable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.disable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_disable.apply(self, args);\n\t\t\t\telementClasses.add(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.add(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, true);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_enable","tags":[{"type":"method","string":"_enable"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"template","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Protected method to enable widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false},{"params":[],"hasParams":false,"name":"enable","tags":[{"type":"method","string":"enable"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enable widget, call: #_enable</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enable = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.element,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\targs = slice.call(arguments);\n\n\t\t\t\tparent_enable.apply(self, args);\n\t\t\t\telementClasses.remove(self.widgetFullName + \"-disabled\");\n\t\t\t\telementClasses.remove(disableClass);\n\t\t\t\telement.setAttribute(ariaDisabled, false);\n\t\t\t\t// @TODO\n\t\t\t\t//this.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\t//this.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true}],"hasParams":true,"name":"raise","tags":[{"type":"method","string":"raise"},{"type":"param","types":"string","name":"msg","description":"Message of throw","isOptional":false,"isLast":true},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Throw exception</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.raise = function (msg) {\n\t\t\t\tthrow \"Widget [\" + this.widgetName + \"]: \" + msg;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhanceWithin","tags":[{"type":"method","string":"enhanceWithin"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhanceWithin = function () {\n\t\t\t\tns.log('method enhanceWithin is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"name":"enhance","tags":[{"type":"method","string":"enhance"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"instance","string":""}],"example":"","brief":"<p>Enhance all the children of all elements in the set of matched elements.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.enhance = function () {\n\t\t\t\tns.log('method enhance is deprecated');\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"widget","tags":[{"type":"method","string":"widget"},{"type":"member","string":"ns.widget.mobile.BaseWidgetMobile"},{"type":"return","types":["HTMLElement"],"description":""},{"type":"instance","string":""}],"example":"","brief":"<p>Return element of widget</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.widget = function () {\n\t\t\t\treturn this.element;\n\t\t\t};\n\n\t\t\tBaseWidgetMobile.prototype = prototype;\n\n\t\t\t// definition\n\t\t\tns.widget.mobile.BaseWidgetMobile = BaseWidgetMobile;\n\n\t\t\t}(window.document, ns));"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_build","tags":[{"type":"method","string":"_build"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.SplitView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Build the widget. This method performs all required DOM modifications.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._build = function (element) {\n\t\t\t\tvar panes = null,\n\t\t\t\t\tpanesCount = 0,\n\t\t\t\t\tsplitterTouchElement = null,\n\t\t\t\t\tsplitterBar = null,\n\t\t\t\t\thandle = null,\n\t\t\t\t\ti = 0,\n\t\t\t\t\telementClasses = element.classList,\n\t\t\t\t\toptions = this.options,\n\t\t\t\t\tpane = null;\n\n\t\t\t\tpanes = selectors.getChildrenBySelector(element, 'div');\n\t\t\t\tpanesCount = panes.length;\n\t\t\t\tif (panesCount !== 2) {\n\t\t\t\t\tif (panesCount < 2) {\n\t\t\t\t\t\tfor (i = panesCount; i < 2; ++i) {\n\t\t\t\t\t\t\tpane = document.createElement('div');\n\t\t\t\t\t\t\telement.appendChild(pane);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 2; i < panesCount; ++i) {\n\t\t\t\t\t\t\telement.removeChild(panes[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpanes.length = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tpanes = selectors.getChildrenBySelector(element, 'div');\n\t\t\t\t\tpanesCount = panes.length;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < 2; i++) {\n\t\t\t\t\tpanes[i].classList.add(classes.uiPane);\n\t\t\t\t}\n\n\t\t\t\telementClasses.add(classes.uiSplitView);\n\t\t\t\telementClasses.add(options.dividerVertical ? classes.uiDirectionHorizontal : classes.uiDirectionVertical);\n\n\t\t\t\tsplitterTouchElement = document.createElement('a');\n\t\t\t\tsplitterTouchElement.classList.add(classes.uiSplitter);\n\t\t\t\tsplitterBar = document.createElement('div');\n\t\t\t\tsplitterBar.classList.add(classes.uiSplitterBar);\n\t\t\t\thandle = document.createElement('div');\n\t\t\t\thandle.classList.add(classes.uiSplitterHandle);\n\t\t\t\tsplitterBar.appendChild(handle);\n\t\t\t\tif (options.fixed) {\n\t\t\t\t\tsplitterBar.classList.add(classes.uiFixed);\n\t\t\t\t}\n\t\t\t\tDOM.insertNodeAfter(panes[0], splitterTouchElement);\n\t\t\t\tDOM.insertNodeAfter(splitterTouchElement, splitterBar);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_init","tags":[{"type":"method","string":"_init"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.SplitView"},{"type":"protected","string":""},{"type":"instance","string":""}],"example":"","brief":"<p>Init the widget. This is the place where it can init variables not related to DOM modifications.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._init = function (element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tratio = options.ratio;\n\t\t\t\toptions.ratio = convertRatio(ratio);\n\t\t\t\tself.dimensions.originalRatio = options.ratio.slice();\n\t\t\t\tself.panes = selectors.getChildrenByClass(element, classes.uiPane);\n\t\t\t\tself.splitterTouchElement = selectors.getChildrenByTag(element, 'a')[0];\n\t\t\t\tself.splitterBar = selectors.getChildrenByClass(element, classes.uiSplitterBar)[0];\n\t\t\t\tself.splitterHandle = selectors.getChildrenByTag(self.splitterBar, 'div')[0];\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLElement"],"description":""},"name":"_bindEvents","tags":[{"type":"method","string":"_bindEvents"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"return","types":["HTMLElement"],"description":""},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"example":"","brief":"<p>Registers widget's event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._bindEvents = function (element) {\n\t\t\t\tvar eventHandlers = this.eventHandlers,\n\t\t\t\t\tsplitterTouchElement = this.splitterTouchElement,\n\t\t\t\t\tpage = findParentPage(this.element);\n\t\t\t\teventHandlers.onTouchEvent = onTouchEvent.bind(null, this);\n\t\t\t\teventHandlers.onPageShow = onPageShow.bind(null, this);\n\t\t\t\tif (page) {\n\t\t\t\t\tpage.addEventListener(\"pageshow\", eventHandlers.onPageShow, true);\n\t\t\t\t}\n\t\t\t\tsplitterTouchElement.addEventListener(\"vmousedown\", eventHandlers.onTouchEvent, true);\n\t\t\t\treturn element;\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_destroy","tags":[{"type":"method","string":"_destroy"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"example":"","brief":"<p>Destroys the widget and unregisters event listeners</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._destroy = function () {\n\t\t\t\tvar eventHandlers = this.eventHandlers,\n\t\t\t\t\tsplitterTouchElement = this.splitterTouchElement,\n\t\t\t\t\tpage = findParentPage(this.element);\n\t\t\t\tpage.removeEventListener(\"pageshow\", eventHandlers.onPageShow, true);\n\t\t\t\tsplitterTouchElement.removeEventListener(\"vmousedown\", eventHandlers.onTouchEvent, true);\n\t\t\t};"},{"params":[],"hasParams":false,"return":{"type":"return","types":["HTMLElement"],"description":"element's ancestor bounded to a {@link ns.widget.mobile.Page}"},"name":"findParentPage","tags":[{"type":"method","string":"findParentPage"},{"type":"private","string":""},{"type":"static","string":""},{"type":"return","types":["HTMLElement"],"description":"element's ancestor bounded to a {@link ns.widget.mobile.Page}"},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Finds nearest ancestor of given element being a {@link ns.widget.mobile.Page}</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function findParentPage(element) {\n\t\t\t\treturn selectors.getClosestByClass(element, ns.widget.mobile.Page.classes.uiPage);\n\t\t\t}"},{"params":[{"type":"param","types":"SplitView","name":"self","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onPageShow","tags":[{"type":"method","string":"onPageShow"},{"type":"param","types":"SplitView","name":"self","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Called when the page is shown</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onPageShow(self) {\n\t\t\t\tself._refresh();\n\t\t\t}"},{"params":[{"type":"param","types":"SplitView","name":"self","description":"","isOptional":false},{"type":"param","types":"TouchEvent","name":"event","description":"","isOptional":false,"isLast":true}],"hasParams":true,"name":"onTouchEvent","tags":[{"type":"method","string":"onTouchEvent"},{"type":"param","types":"SplitView","name":"self","description":"","isOptional":false},{"type":"param","types":"TouchEvent","name":"event","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Called when a touch or mouse event occured on the splitter. After receiving down event it sets<br />itself as a callback for further events like \"move\" and \"up\".</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function onTouchEvent(self, event) {\n\t\t\t\tvar splitView = self.widget(),\n\t\t\t\t\tmovementData = self.movementData,\n\t\t\t\t\tlocalX = event.clientX,\n\t\t\t\t\tlocalY = event.clientY,\n\t\t\t\t\tshiftX = localX - movementData.lastX,\n\t\t\t\t\tshiftY = localY - movementData.lastY,\n\t\t\t\t\tfixed = self.options.fixed,\n\t\t\t\t\tcanMove = movementData.hadDownEvent,\n\t\t\t\t\tisHorizontal = self.options.dividerVertical,\n\t\t\t\t\tshiftArea = isHorizontal ? self.dimensions.containerWidth : self.dimensions.containerHeight,\n\t\t\t\t\teventListener = self.eventHandlers.onTouchEvent,\n\t\t\t\t\tactiveClass = SplitView.classes.uiSplitterActive,\n\t\t\t\t\tsplitterClasses = self.splitterBar.classList,\n\t\t\t\t\tratio = self.options.ratio,\n\t\t\t\t\tratioDiff = 0;\n\n\t\t\t\tif (fixed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tswitch (event.type) {\n\t\t\t\t\tcase \"vmousedown\":\n\t\t\t\t\t\tmovementData.lastX = localX;\n\t\t\t\t\t\tmovementData.lastY = localY;\n\t\t\t\t\t\tmovementData.hadDownEvent = true;\n\t\t\t\t\t\tsplitView.addEventListener(\"vmousemove\", eventListener, true);\n\t\t\t\t\t\tsplitView.addEventListener(\"vmouseup\", eventListener, true);\n\t\t\t\t\t\tsplitterClasses.add(activeClass);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vmousemove\":\n\t\t\t\t\t\tif (canMove) {\n\t\t\t\t\t\t\tratioDiff = (isHorizontal ? shiftX : shiftY) / shiftArea;\n\t\t\t\t\t\t\tratio.forEach(function(value, i) {\n\t\t\t\t\t\t\t\tvar shiftDirection = (i === 0 ? 1 : -1);\n\t\t\t\t\t\t\t\tratio[i] = value + (ratioDiff * shiftDirection);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tself._layout();\n\t\t\t\t\t\t\tself._refreshChildren();\n\t\t\t\t\t\t\tmovementData.lastX = localX;\n\t\t\t\t\t\t\tmovementData.lastY = localY;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vmouseup\":\n\t\t\t\t\t\tmovementData.hadDownEvent = false;\n\t\t\t\t\t\tsplitView.removeEventListener(\"vmousemove\", eventListener);\n\t\t\t\t\t\tsplitView.removeEventListener(\"vmouseup\", eventListener);\n\t\t\t\t\t\tsplitterClasses.remove(activeClass);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}"},{"params":[],"hasParams":false,"name":"_refresh","tags":[{"type":"method","string":"_refresh"},{"type":"protected","string":""},{"type":"member","string":"ns.widget.SplitView"},{"type":"instance","string":""}],"example":"","brief":"<p>Measures and layouts the children.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refresh = function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\telement = self.widget();\n\n\t\t\t\tself._measureSplitter();\n\t\t\t\tif (self._getContainerSize(element)) {\n\t\t\t\t\tself._layout();\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"the element of SplitView widget","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if container has its dimensions available"},"name":"_getContainerSize","tags":[{"type":"method","string":"_getContainerSize"},{"type":"param","types":"HTMLElement","name":"element","description":"the element of SplitView widget","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"return","types":["boolean"],"description":"true if container has its dimensions available"},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Checks available width and height for splitted views. If the SplitView is wrapped by a {@link=ns.widget.mobile.Scrollview},<br />it will read the height of Scrollview clip.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._getContainerSize = function (element) {\n\t\t\t\tvar dimensions = this.dimensions,\n\t\t\t\t\tparentElement = element.parentElement;\n\n\t\t\t\tdimensions.containerWidth = DOM.getCSSProperty(element, \"width\", 0, \"integer\");\n\t\t\t\tif (hasClass(parentElement, ns.widget.mobile.Scrollview.classes.view) && parentElement.parentElement) {\n\t\t\t\t\tdimensions.containerHeight = DOM.getCSSProperty(parentElement.parentElement, \"height\", 0, \"integer\");\n\t\t\t\t} else {\n\t\t\t\t\tdimensions.containerHeight = DOM.getCSSProperty(element, \"height\", 0, \"integer\");\n\t\t\t\t}\n\t\t\t\treturn dimensions.containerWidth || dimensions.containerHeight;\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"ratio","description":"","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["Array"],"description":"parsed ratio"},"name":"convertRatio","tags":[{"type":"method","string":"convertRatio"},{"type":"param","types":"string","name":"ratio","description":"","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"return","types":["Array"],"description":"parsed ratio"},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>If the ratio is given as a comma separated string, this method will convert it to Array.</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function convertRatio(ratio) {\n\t\t\t\tvar ratioArray = [],\n\t\t\t\t\tlength = 0,\n\t\t\t\t\ti = 0;\n\t\t\t\tif (!Array.isArray(ratio)) {\n\t\t\t\t\tratioArray = ratio.split(',');\n\t\t\t\t\tlength = ratioArray.length;\n\t\t\t\t\tfor (;i < length; i++) {\n\t\t\t\t\t\tratioArray[i] = parseFloat(ratioArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\treturn ratioArray;\n\t\t\t\t}\n\t\t\t\treturn ratio;\n\t\t\t}"},{"params":[{"type":"param","types":"boolean","name":"ignoreMinMax","description":"if set to true, minimum and maximum pane sizes will be ignored","isOptional":false,"isLast":true}],"hasParams":true,"name":"_layout","tags":[{"type":"method","string":"_layout"},{"type":"param","types":"boolean","name":"ignoreMinMax","description":"if set to true, minimum and maximum pane sizes will be ignored","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Layouts child panes basing on th orientation and ratio.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._layout = function(ignoreMinMax) {\n\t\t\t\tvar self = this,\n\t\t\t\t\toptions = self.options,\n\t\t\t\t\tdimensions = self.dimensions,\n\t\t\t\t\tratio = options.ratio,\n\t\t\t\t\tisHorizontal = options.dividerVertical,\n\t\t\t\t\tpanes = self.panes,\n\t\t\t\t\tsplitterTouchElementStyle = self.splitterTouchElement.style,\n\t\t\t\t\tsplitterHandle = self.splitterHandle,\n\t\t\t\t\tsplitterHandleSize = dimensions.splitterHandleSize,\n\t\t\t\t\tsplitterSize = dimensions.splitterSize,\n\t\t\t\t\tpanesCount = panes.length,\n\t\t\t\t\tcurrentAvailable = 0,\n\t\t\t\t\twidth = dimensions.containerWidth,\n\t\t\t\t\theight = dimensions.containerHeight,\n\t\t\t\t\tavailableWidth = Math.floor(isHorizontal ? width - splitterSize :\n\t\t\t\t\t\theight - splitterSize) ;\n\n\t\t\t\tdimensions.maxPaneSize = availableWidth - dimensions.minPaneSize;\n\t\t\t\tcurrentAvailable = availableWidth;\n\t\t\t\tpanes.forEach(function (pane, i) {\n\t\t\t\t\tvar paneWidth = Math.floor(availableWidth * ratio[i]),\n\t\t\t\t\t\tpaneStyle = pane.style;\n\n\t\t\t\t\tcurrentAvailable -= paneWidth;\n\t\t\t\t\tif (i === (panesCount - 1)) {\n\t\t\t\t\t\tpaneWidth = Math.max(Math.min(paneWidth, dimensions.minPaneSize), paneWidth + currentAvailable);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ignoreMinMax || (paneWidth >= dimensions.minPaneSize && paneWidth <= dimensions.maxPaneSize)) {\n\t\t\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t\t\tpaneStyle.width = paneWidth + 'px';\n\t\t\t\t\t\t\tpaneStyle.height = height + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpaneStyle.height = paneWidth + 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tsplitterTouchElementStyle.left = (width * ratio[0] - dimensions.splitterTouchSize / 2) + 'px';\n\t\t\t\t\tsplitterTouchElementStyle.top = 0;\n\t\t\t\t\tsplitterHandle.style.top = ((height - splitterHandleSize) / 2) + 'px';\n\t\t\t\t\tself.splitterBar.style.height = height + 'px';\n\t\t\t\t}else{\n\t\t\t\t\tsplitterTouchElementStyle.left = 0;\n\t\t\t\t\tsplitterTouchElementStyle.top = (height * ratio[0] - dimensions.splitterTouchSize / 2) + 'px';\n\t\t\t\t\tsplitterHandle.style.top = 0;\n\t\t\t\t}\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_refreshChildren","tags":[{"type":"method","string":"_refreshChildren"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Calls refresh() on each child SplitView.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._refreshChildren = function() {\n\t\t\t\tthis.panes.forEach(function(pane) {\n\t\t\t\t\tif (DOM.getNSData(pane, 'role') === 'splitview') {\n\t\t\t\t\t\tengine.getBinding(pane).refresh();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"dividerVertical","description":"if true, the divider will be placed vertically","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setDividerVertical","tags":[{"type":"method","string":"_setDividerVertical"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"dividerVertical","description":"if true, the divider will be placed vertically","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Changes orientation of the SplitView.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._setDividerVertical = function(element, dividerVertical) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tsplitViewClasses = SplitView.classes,\n\t\t\t\t\tclasses = element.classList;\n\t\t\t\tclasses.remove(dividerVertical ? splitViewClasses.uiDirectionVertical : splitViewClasses.uiDirectionHorizontal);\n\t\t\t\tclasses.add(dividerVertical ? splitViewClasses.uiDirectionHorizontal : splitViewClasses.uiDirectionVertical);\n\t\t\t\tself.options.dividerVertical = dividerVertical;\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"fixed","description":"if true, the splitter is locked in its current position","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setFixed","tags":[{"type":"method","string":"_setFixed"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"boolean","name":"fixed","description":"if true, the splitter is locked in its current position","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Changes fixed state of the SplitView.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._setFixed = function(element, fixed) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tclasses = SplitView.classes;\n\t\t\t\tself.options.fixed = fixed;\n\t\t\t\tif (fixed) {\n\t\t\t\t\tself.splitterBar.classList.add(classes.uiFixed);\n\t\t\t\t} else {\n\t\t\t\t\tself.splitterBar.classList.remove(classes.uiFixed);\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Array","name":"ratio","description":"the new ratio to set","isOptional":false,"isLast":true}],"hasParams":true,"name":"_setRatio","tags":[{"type":"method","string":"_setRatio"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"Array","name":"ratio","description":"the new ratio to set","isOptional":false,"isLast":true},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Changes ratio of the SplitView. It will overwrite original ratio set in HTML document,<br />so it will be impossible to revert it back using restore().</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._setRatio = function(element, ratio) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tnewRatio = convertRatio(ratio);\n\t\t\t\tself.options.ratio = newRatio;\n\t\t\t\tself.dimensions.originalRatio = newRatio.slice();\n\t\t\t};"},{"params":[],"hasParams":false,"name":"_measureSplitter","tags":[{"type":"method","string":"_measureSplitter"},{"type":"protected","string":""},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Measures dimensions of the splitter.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":true,"isPublic":false,"code":"prototype._measureSplitter = function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdimensions = self.dimensions,\n\t\t\t\t\tisHorizontal = self.options.dividerVertical;\n\t\t\t\t//clear any previous dynamic height setting\n\t\t\t\tself.splitterBar.style.height = \"\";\n\t\t\t\tdimensions.splitterSize = isHorizontal ? DOM.getElementWidth(self.splitterBar, 'outer') :\n\t\t\t\t\tDOM.getElementHeight(self.splitterBar, 'outer');\n\t\t\t\tdimensions.splitterHandleSize = isHorizontal ? DOM.getElementHeight(self.splitterHandle) :\n\t\t\t\t\tDOM.getElementWidth(self.splitterHandle);\n\t\t\t\tdimensions.splitterTouchSize = isHorizontal ? DOM.getElementWidth(self.splitterTouchElement, 'outer') :\n\t\t\t\t\tDOM.getElementHeight(self.splitterTouchElement, 'outer');\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"id","description":"the id of a pane to maximize","isOptional":false,"isLast":true}],"hasParams":true,"name":"maximize","tags":[{"type":"method","string":"maximize"},{"type":"param","types":"string","name":"id","description":"the id of a pane to maximize","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Maximizes a pane with specified id by setting its ratio to 1.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.maximize = function(id) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tratio = self.options.ratio,\n\t\t\t\t\telement = selectors.getChildrenBySelector(self.widget(), id);\n\n\t\t\t\tif (element) {\n\t\t\t\t\tself.panes.forEach(function(pane, i) {\n\t\t\t\t\t\tif (pane === element[0]) {\n\t\t\t\t\t\t\tratio[i] = 1;\n\t\t\t\t\t\t\tratio[i === 0 ? 1 : 0] = 0;\n\t\t\t\t\t\t\tself._layout(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t};"},{"params":[],"hasParams":false,"name":"restore","tags":[{"type":"method","string":"restore"},{"type":"instance","string":""},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Restores to original ratio set through HTML document or option setter.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.restore = function () {\n\t\t\t\tvar self = this;\n\t\t\t\tself.options.ratio = self.dimensions.originalRatio.slice();\n\t\t\t\tself._layout();\n\t\t\t};"},{"params":[{"type":"param","types":"string","name":"id","description":"the id of a pane to get the content from","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"the new element to be inserted","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["HTMLCollection"],"description":"a collection of pane's child elements"},"name":"pane","tags":[{"type":"method","string":"pane"},{"type":"param","types":"string","name":"id","description":"the id of a pane to get the content from","isOptional":false},{"type":"param","types":"HTMLElement","name":"element","description":"the new element to be inserted","isOptional":false,"isLast":true},{"type":"instance","string":""},{"type":"return","types":["HTMLCollection"],"description":"a collection of pane's child elements"},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Gets element in pane specified by id or replaces it with given element as a second argument.</p>","description":"","isPrivate":false,"isInternal":false,"isProtected":false,"isPublic":true,"code":"prototype.pane = function(id, element) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tclasses = SplitView.classes,\n\t\t\t\t\ttargetPane = selectors.getChildrenBySelector(self.widget(), id)[0],\n\t\t\t\t\ttargetView = null,\n\t\t\t\t\tscollViewClasses = ns.widget.mobile.Scrollview.classes;\n\n\t\t\t\tif (hasClass(targetPane, classes.uiPane)) {\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tif (element.length) {\n\t\t\t\t\t\t\telement = element[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//setter\n\t\t\t\t\t\tif (hasClass(targetPane, scollViewClasses.clip)) {\n\t\t\t\t\t\t\tengine.getBinding(targetPane).scrollTo(0, 0, 0);\n\t\t\t\t\t\t\ttargetView = selectors.getChildrenByClass(targetPane, scollViewClasses.view);\n\t\t\t\t\t\t\tif (targetView.length) {\n\t\t\t\t\t\t\t\ttargetView = targetView[0];\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetView = targetPane;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twhile(targetView.firstChild) {\n\t\t\t\t\t\t\ttargetView.removeChild(targetView.firstChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttargetView.appendChild(element);\n\t\t\t\t\t\tevents.trigger(element, 'create');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//getter\n\t\t\t\t\t\treturn targetPane.children;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};"},{"params":[{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"cls","description":"the class to check","isOptional":false,"isLast":true}],"hasParams":true,"return":{"type":"return","types":["boolean"],"description":"true if given element contains the class"},"name":"hasClass","tags":[{"type":"method","string":"hasClass"},{"type":"param","types":"HTMLElement","name":"element","description":"","isOptional":false},{"type":"param","types":"string","name":"cls","description":"the class to check","isOptional":false,"isLast":true},{"type":"private","string":""},{"type":"static","string":""},{"type":"return","types":["boolean"],"description":"true if given element contains the class"},{"type":"member","string":"ns.widget.SplitView"}],"example":"","brief":"<p>Checks if specified element has given class</p>","description":"","isPrivate":true,"isInternal":false,"isProtected":false,"isPublic":false,"code":"function hasClass(element, cls) {\n\t\t\t\treturn element && element.classList.contains(cls);\n\t\t\t}\n\n\t\t\tSplitView.prototype = prototype;\n\n\t\t\tns.widget.mobile.SplitView = SplitView;\n\t\t\tengine.defineWidget(\n\t\t\t\t'SplitView',\n\t\t\t\t'[data-role=\"splitview\"], .ui-splitview',\n\t\t\t\t['pane', 'restore', 'maximize'],\n\t\t\t\tSplitView,\n\t\t\t\t'tizen'\n\t\t\t);\n\t\t\t}(window.document, ns));"}]}]