From 6b5617e5a4c87afd2c7f2f7b8cb03de2b6735627 Mon Sep 17 00:00:00 2001 From: zachwick Date: Mon, 15 May 2017 09:41:00 -0400 Subject: Marks JS as freely licensed Marking the resulting JS in this way ensures that visitors to the resulting HTML documentation do not have to choose between running non-free JS and experiencing the HTML documentation as it was intended. The JS was already freely licensed, so this change just ensures that the appropriate labelling occurs so that GNU LibreJS [0] parses the JS correctly as freely licensed. [0] https://www.gnu.org/software/librejs/ Signed-off-by: zachwick --- INSTALL | 2 +- jquery/README | 2 +- src/ftvhelp.cpp | 53 +++-- src/htmlgen.cpp | 352 +++++++++++++++-------------- src/index.cpp | 429 +++++++++++++++++++----------------- src/searchindex.cpp | 56 ++--- templates/html/dynsections.js | 27 ++- templates/html/extsearch.js | 26 ++- templates/html/htmlbase.tpl | 14 +- templates/html/htmljsmenudata.tpl | 24 +- templates/html/htmlsearchresult.tpl | 4 + templates/html/jquery.js | 32 ++- templates/html/menu.js | 24 ++ templates/html/navtree.js | 27 ++- templates/html/resize.js | 26 ++- templates/html/search.js | 25 ++- templates/html/svgpan.js | 68 ++++-- vhdlparser/Makefile | 419 +++++++++++++++++++++++++++++++++-- 18 files changed, 1129 insertions(+), 481 deletions(-) diff --git a/INSTALL b/INSTALL index d94748f..ac5d049 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ DOXYGEN -Please read the installation section of the manual +Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- diff --git a/jquery/README b/jquery/README index 21590ff..b8b115a 100644 --- a/jquery/README +++ b/jquery/README @@ -1,6 +1,6 @@ Doxygen's jquery.js script is composed of minified versions of the following packages: -- jquery 1.7.1: http://jquery.com/download/ +- jquery 1.7.1: http://jquery.com/download/ - jquery.ui 1.8.18: https://code.google.com/p/jquery-ui/downloads/list modules required: - jquery.ui.core diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 7249574..66ed971 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -4,8 +4,8 @@ * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -99,11 +99,11 @@ int FTVNode::numNodesAtLevel(int level,int maxLevel) const //---------------------------------------------------------------------------- -/*! Constructs an ftv help object. - * The object has to be \link initialize() initialized\endlink before it can +/*! Constructs an ftv help object. + * The object has to be \link initialize() initialized\endlink before it can * be used. */ -FTVHelp::FTVHelp(bool TLI) +FTVHelp::FTVHelp(bool TLI) { /* initial depth */ m_indentNodes = new QList[MAX_INDENT]; @@ -134,7 +134,7 @@ void FTVHelp::finalize() generateTreeView(); } -/*! Increase the level of the contents hierarchy. +/*! Increase the level of the contents hierarchy. * This will start a new sublist in contents file. * \sa decContentsDepth() */ @@ -204,7 +204,7 @@ void FTVHelp::addContentsItem(bool isDir, QList *pnl = &m_indentNodes[m_indent-1]; newNode->parent = pnl->getLast(); } - + } static QCString node2URL(FTVNode *n,bool overruleFile=FALSE,bool srcLink=FALSE) @@ -385,7 +385,7 @@ void FTVHelp::generateTree(FTextStream &t, const QList &nl,int level,in if (srcRef) { t << "getSourceFileBase() - << Doxygen::htmlFileExtension + << Doxygen::htmlFileExtension << "\">"; } if (n->def && n->def->definitionType()==Definition::TypeGroup) @@ -487,7 +487,7 @@ static QCString convertFileId2Var(const QCString &fileId) return substitute(varId,"-","_"); } -static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t, +static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t, const QList &nl,int level,bool &first) { static QCString htmlOutput = Config_getString(HTML_OUTPUT); @@ -543,7 +543,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t, { fileId+="_"+n->anchor; } - if (dupOfParent(n)) + if (dupOfParent(n)) { fileId+="_dup"; } @@ -553,7 +553,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t, FTextStream tt(&f); tt << "var " << convertFileId2Var(fileId) << " =" << endl; generateJSTree(navIndex,tt,n->children,1,firstChild); - tt << endl << "];"; + tt << endl << "];"; } t << "\"" << fileId << "\" ]"; } @@ -571,7 +571,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t, if (emptySection) t << "null ]"; else - t << endl << indentStr << " ] ]"; + t << endl << indentStr << " ] ]"; } } return found; @@ -588,6 +588,22 @@ static void generateJSNavTree(const QList &nodeList) //tidx << "var NAVTREEINDEX =" << endl; //tidx << "{" << endl; FTextStream t(&f); + t << "/*\n@ @licstart The following is the entire license notice for the\n" + "JavaScript code in this file.\n\nCopyright (C) 1997-2017 by Dimitri van Heesch\n\n" + "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License along\n" + "with this program; if not, write to the Free Software Foundation, Inc.,\n" + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n" + "@licend The above is the entire license notice\n" + "for the JavaScript code in this file\n" + "*/\n"; t << "var NAVTREE =" << endl; t << "[" << endl; t << " [ "; @@ -618,9 +634,9 @@ static void generateJSNavTree(const QList &nodeList) bool first=TRUE; generateJSTree(navIndex,t,nodeList,1,first); - if (first) + if (first) t << "]" << endl; - else + else t << endl << " ] ]" << endl; t << "];" << endl << endl; @@ -660,7 +676,7 @@ static void generateJSNavTree(const QList &nodeList) ++li; if (li.current() && elemCount=maxElemCount) // switch to new sub-index { @@ -678,8 +694,8 @@ static void generateJSNavTree(const QList &nodeList) tsidx << "};" << endl; t << endl << "];" << endl; } - t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';"; - t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';"; + t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';"; + t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';"; } ResourceMgr::instance().copyResource("navtree.js",htmlOutput); } @@ -731,7 +747,7 @@ void FTVHelp::generateTreeViewInline(FTextStream &t) if (depth>1) { t << "
["; - t << theTranslator->trDetailLevel(); + t << theTranslator->trDetailLevel(); t << " "; int i; for (i=1;i<=depth;i++) @@ -779,4 +795,3 @@ void FTVHelp::generateTreeView() generateTreeViewImages(); generateTreeViewScripts(); } - diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 12b71e1..0cb7ab9 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -62,7 +62,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath) t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n"; t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n"; t << " alt=\"\"/>\n"; - t << " trSearch() << "\" accesskey=\"S\"\n"; t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n"; t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n"; @@ -200,7 +200,7 @@ static QCString removeEmptyLines(const QCString &s) { const char *e = p; while (*e==' ' || *e=='\t') e++; - if (*e=='\n') + if (*e=='\n') { p=e; } @@ -279,11 +279,11 @@ static QCString substituteHtmlKeywords(const QCString &s, } } - if (timeStamp) + if (timeStamp) { generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString(PROJECT_NAME))); } - else + else { generatedBy = theTranslator->trGeneratedBy(); } @@ -291,12 +291,14 @@ static QCString substituteHtmlKeywords(const QCString &s, if (treeView) { treeViewCssJs = "\n" - "\n" - "\n" - "\n" - ""; + "\n" + "\n" + "\n" + ""; } if (searchEngine) @@ -313,8 +315,10 @@ static QCString substituteHtmlKeywords(const QCString &s, if (disableIndex || !Config_getBool(HTML_DYNAMIC_MENUS)) { searchCssJs += ""; + "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; + " $(document).ready(function() { init_search(); });\n" + "/* @license-end */\n" + ""; } } else @@ -322,17 +326,19 @@ static QCString substituteHtmlKeywords(const QCString &s, if (disableIndex || !Config_getBool(HTML_DYNAMIC_MENUS)) { searchCssJs += "\n"; + "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n" + " $(document).ready(function() {\n" + " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n" + " });\n" + " /* @license-end */\n" + "\n"; } // OPENSEARCH_PROVIDER { searchCssJs += ""; // OPENSEARCH_PROVIDER } } @@ -341,11 +347,11 @@ static QCString substituteHtmlKeywords(const QCString &s, if (mathJax) { - QCString path = Config_getString(MATHJAX_RELPATH); - if (path.isEmpty() || path.left(2)=="..") // relative path - { - path.prepend(relPath); - } + QCString path = Config_getString(MATHJAX_RELPATH); + if (path.isEmpty() || path.left(2)=="..") // relative path + { + path.prepend(relPath); + } mathJaxJs = "\n"; } //generateDynamicSections(t,relPath); @@ -995,8 +1003,8 @@ void HtmlGenerator::writeStyleInfo(int part) if (Config_getString(HTML_STYLESHEET).isEmpty()) // write default style sheet { //printf("write doxygen.css\n"); - startPlainFile("doxygen.css"); - + startPlainFile("doxygen.css"); + // alternative, cooler looking titles //t << "H1 { text-align: center; border-width: thin none thin none;" << endl; //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl; @@ -1096,7 +1104,7 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f) //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f); if (ref || f) { - if (ref) + if (ref) { t << ""; + t << "\">"; } void HtmlGenerator::endTextLink() @@ -1179,7 +1187,7 @@ void HtmlGenerator::startHtmlLink(const char *url) if (generateTreeView) t << "target=\"top\" "; t << "href=\""; if (url) t << url; - t << "\">"; + t << "\">"; } void HtmlGenerator::endHtmlLink() @@ -1275,7 +1283,7 @@ void HtmlGenerator::docify(const char *str,bool inHtmlComment) else t << "\\"; break; - default: t << c; + default: t << c; } } } @@ -1302,7 +1310,7 @@ static void startSectionHeader(FTextStream &t, "onclick=\"return toggleVisibility(this)\" " "class=\"dynheader closed\" " "style=\"cursor:pointer;\">" << endl; - t << " \"+\"/ "; } else @@ -1390,13 +1398,13 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d, } -void HtmlGenerator::startMemberList() -{ +void HtmlGenerator::startMemberList() +{ DBG_HTML(t << "" << endl) } -void HtmlGenerator::endMemberList() -{ +void HtmlGenerator::endMemberList() +{ DBG_HTML(t << "" << endl) } @@ -1404,8 +1412,8 @@ void HtmlGenerator::endMemberList() // 0 = single column right aligned // 1 = double column left aligned // 2 = single column left aligned -void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId) -{ +void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId) +{ DBG_HTML(t << "" << endl) if (m_emptySection) { @@ -1427,10 +1435,10 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char * } } -void HtmlGenerator::endMemberItem() -{ - t << ""; - t << endl; +void HtmlGenerator::endMemberItem() +{ + t << ""; + t << endl; } void HtmlGenerator::startMemberTemplateParams() @@ -1449,15 +1457,15 @@ void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inher } -void HtmlGenerator::insertMemberAlign(bool templ) -{ +void HtmlGenerator::insertMemberAlign(bool templ) +{ DBG_HTML(t << "" << endl) QCString className = templ ? "memTemplItemRight" : "memItemRight"; - t << " "; + t << " "; } -void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId) -{ +void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId) +{ DBG_HTML(t << "" << endl) if (m_emptySection) { @@ -1469,20 +1477,20 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri { t << " inherit " << inheritId; } - t << "\"> "; + t << "\"> "; } -void HtmlGenerator::endMemberDescription() -{ +void HtmlGenerator::endMemberDescription() +{ DBG_HTML(t << "" << endl) - t << "
" << endl; + t << "
" << endl; } void HtmlGenerator::startMemberSections() { DBG_HTML(t << "" << endl) m_emptySection=TRUE; // we postpone writing until we actually - // write a row to prevent empty tables, which + // write a row to prevent empty tables, which // are not valid XHTML! } @@ -1533,9 +1541,9 @@ void HtmlGenerator::endMemberSubtitle() t << "" << endl; } -void HtmlGenerator::startIndexList() -{ - t << "
" << endl; +void HtmlGenerator::startIndexList() +{ + t << "
" << endl; } void HtmlGenerator::endIndexList() @@ -1543,10 +1551,10 @@ void HtmlGenerator::endIndexList() t << "
" << endl; } -void HtmlGenerator::startIndexKey() -{ +void HtmlGenerator::startIndexKey() +{ // inserted 'class = ...', 02 jan 2002, jh - t << " "; + t << " "; } void HtmlGenerator::endIndexKey() @@ -1554,10 +1562,10 @@ void HtmlGenerator::endIndexKey() t << ""; } -void HtmlGenerator::startIndexValue(bool) -{ +void HtmlGenerator::startIndexValue(bool) +{ // inserted 'class = ...', 02 jan 2002, jh - t << ""; + t << ""; } void HtmlGenerator::endIndexValue(const char *,bool) @@ -1576,7 +1584,7 @@ void HtmlGenerator::endMemberDocList() } void HtmlGenerator::startMemberDoc( const char *clName, const char *memName, - const char *anchor, const char *title, + const char *anchor, const char *title, int memCount, int memTotal, bool showInline) { DBG_HTML(t << "" << endl;) @@ -1610,7 +1618,7 @@ void HtmlGenerator::startMemberDocName(bool /*align*/) DBG_HTML(t << "" << endl;) t << " " << endl; - + t << " " << endl; t << " " << "" << endl; } @@ -2748,4 +2765,3 @@ void HtmlGenerator::addWord(const char *word,bool hiPriority) Doxygen::searchIndex->addWord(word,hiPriority); } } - diff --git a/src/index.cpp b/src/index.cpp index 10c1dcb..921ab51 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -153,17 +153,17 @@ static void startQuickIndexList(OutputList &ol,bool letterTabs=FALSE) { if (letterTabs) { - ol.writeString("
\n"); + ol.writeString("
\n"); } else { - ol.writeString("
\n"); + ol.writeString("
\n"); } - ol.writeString("
"); // the last column may contain less items then the others - //int colsInRow = (i"); ol.writeString("
"; } @@ -1713,8 +1721,8 @@ void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket) t << ""; } -void HtmlGenerator::endMemberDoc(bool hasArgs) -{ +void HtmlGenerator::endMemberDoc(bool hasArgs) +{ DBG_HTML(t << "" << endl;) if (!hasArgs) { @@ -1857,17 +1865,17 @@ void HtmlGenerator::endMemberGroup(bool) { } -void HtmlGenerator::startIndent() -{ +void HtmlGenerator::startIndent() +{ DBG_HTML(t << "" << endl;) t << "
\n"; } -void HtmlGenerator::endIndent() -{ +void HtmlGenerator::endIndent() +{ DBG_HTML(t << "" << endl;) - t << endl << "
" << endl << "" << endl; + t << endl << "" << endl << "" << endl; } void HtmlGenerator::addIndexItem(const char *,const char *) @@ -1941,7 +1949,7 @@ void HtmlGenerator::startSimpleSect(SectionTypes, void HtmlGenerator::endSimpleSect() { - t << ""; + t << ""; } void HtmlGenerator::startParamList(ParamListTypes, @@ -1954,21 +1962,21 @@ void HtmlGenerator::startParamList(ParamListTypes, void HtmlGenerator::endParamList() { - t << ""; + t << ""; } void HtmlGenerator::writeDoc(DocNode *n,Definition *ctx,MemberDef *) { HtmlDocVisitor *visitor = new HtmlDocVisitor(t,m_codeGen,ctx); n->accept(visitor); - delete visitor; + delete visitor; } //---------------- helpers for index generation ----------------------------- static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE) { - if (compact) + if (compact) { if (topLevel) { @@ -1978,9 +1986,9 @@ static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE) { t << "
\n"; } - t << "
    \n"; + t << "
      \n"; } - else + else { t << "
        "; } @@ -1988,12 +1996,12 @@ static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE) static void endQuickIndexList(FTextStream &t,bool compact) { - if (compact) + if (compact) { t << "
      \n"; t << "
\n"; } - else + else { t << "\n"; } @@ -2003,8 +2011,8 @@ static void startQuickIndexItem(FTextStream &t,const char *l, bool hl,bool /*compact*/, const QCString &relPath) { - t << " 0; case LayoutNavEntry::Modules: return documentedGroups>0; case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces; case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces; case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0; case LayoutNavEntry::Classes: return annotatedClasses>0; - case LayoutNavEntry::ClassList: return annotatedClasses>0; - case LayoutNavEntry::ClassIndex: return annotatedClasses>0; + case LayoutNavEntry::ClassList: return annotatedClasses>0; + case LayoutNavEntry::ClassIndex: return annotatedClasses>0; case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0; case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0; case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles; @@ -2107,8 +2115,8 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath, { QCString url = entry->url(); startQuickIndexItem(t,url, - entry==hlEntry && - (entry->children().count()>0 || + entry==hlEntry && + (entry->children().count()>0 || (entry->kind()==kind && !highlightParent) ), TRUE,relPath); @@ -2179,11 +2187,11 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, case HLI_Pages: kind = LayoutNavEntry::Pages; break; case HLI_Examples: kind = LayoutNavEntry::Examples; break; case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break; - case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; + case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; highlightParent = TRUE; break; - case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; + case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; highlightParent = TRUE; break; - case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; + case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; highlightParent = TRUE; break; case HLI_None: break; case HLI_Search: break; @@ -2203,6 +2211,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, t << "" << endl; t << "" << endl; t << "" << endl; t << "
" << endl; } @@ -2235,7 +2246,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, { highlightParent=TRUE; hlEntry = root->children().getFirst(); - if (hlEntry==0) + if (hlEntry==0) { return; // argl, empty index! } @@ -2245,7 +2256,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact, LayoutNavEntry *e = hlEntry->children().getFirst(); if (e) { - hlEntry = e; + hlEntry = e; } } renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search); @@ -2269,23 +2280,25 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa if (generateTreeView) { result = QCString( - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - "\n" - "
\n"); + "
\n" + "
\n" + "
\n" + "
\n" + "
\n" + "
\n" + "
\n" + "
\n" + "
\n" + "\n" + "
\n"); } return result; } @@ -2337,10 +2350,10 @@ void HtmlGenerator::writeSearchPage() t << ");\n\n"; t << "$translator = array(\n"; t << " 'search_results_title' => \"" << theTranslator->trSearchResultsTitle() << "\",\n"; - t << " 'search_results' => array(\n"; - t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n"; - t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n"; - t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n"; + t << " 'search_results' => array(\n"; + t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n"; + t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n"; + t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n"; t << " ),\n"; t << " 'search_matches' => \"" << theTranslator->trSearchMatches() << "\",\n"; t << " 'search' => \"" << theTranslator->trSearch() << "\",\n"; @@ -2361,11 +2374,13 @@ void HtmlGenerator::writeSearchPage() FTextStream t(&f); t << substituteHtmlKeywords(g_header,"Search",""); - t << "" << endl; t << "\n"; if (!Config_getBool(DISABLE_INDEX)) { @@ -2413,11 +2428,13 @@ void HtmlGenerator::writeExternalSearchPage() FTextStream t(&f); t << substituteHtmlKeywords(g_header,"Search",""); - t << "" << endl; t << "\n"; if (!Config_getBool(DISABLE_INDEX)) { @@ -2568,15 +2585,15 @@ void HtmlGenerator::startHeaderSection() t << "
" << endl; } -void HtmlGenerator::startTitleHead(const char *) -{ +void HtmlGenerator::startTitleHead(const char *) +{ t << "
" << endl; - startTitle(); + startTitle(); } -void HtmlGenerator::endTitleHead(const char *,const char *) -{ - endTitle(); +void HtmlGenerator::endTitleHead(const char *,const char *) +{ + endTitle(); t << "
" << endl; } @@ -2672,7 +2689,7 @@ void HtmlGenerator::endLabels() } void HtmlGenerator::writeInheritedSectionTitle( - const char *id, const char *ref, + const char *id, const char *ref, const char *file, const char *anchor, const char *title, const char *name) { @@ -2692,7 +2709,7 @@ void HtmlGenerator::writeInheritedSectionTitle( classLink+=QCString("\">")+convertToHtml(name,FALSE)+""; t << "
" - << "\"-\"/ " + << "\"-\"/ " << theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink) << "
" "" - "" @@ -1993,7 +1993,7 @@ static void writeAlphabeticalClassList(OutputList &ol) ol.writeString("\n"); } ol.writeString("
  "); + "
  "); ol.writeString(QString(QChar(cell->letter())).utf8()); ol.writeString( "  
" "
\n"); - + ol.writeString(alphaLinks); // release the temporary memory @@ -2015,7 +2015,7 @@ static void writeAlphabeticalIndex(OutputList &ol) QCString title = lne ? lne->title() : theTranslator->trCompoundIndex(); bool addToIndex = lne==0 || lne->visible(); - startFile(ol,"classes",0,title,HLI_Classes); + startFile(ol,"classes",0,title,HLI_Classes); startTitle(ol,0); ol.parseText(title); @@ -2023,7 +2023,7 @@ static void writeAlphabeticalIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList->addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE); } ol.startContents(); @@ -2040,7 +2040,7 @@ static void writeAnnotatedIndex(OutputList &ol) //printf("writeAnnotatedIndex: count=%d printed=%d\n", // annotatedClasses,annotatedClassesPrinted); if (annotatedClasses==0) return; - + ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); if (annotatedClassesPrinted==0) @@ -2053,7 +2053,7 @@ static void writeAnnotatedIndex(OutputList &ol) QCString title = lne ? lne->title() : theTranslator->trCompoundList(); bool addToIndex = lne==0 || lne->visible(); - + startFile(ol,"annotated",0,title,HLI_Annotated); startTitle(ol,0); @@ -2081,13 +2081,13 @@ static void writeAnnotatedIndex(OutputList &ol) // --------------- // Hierarchical class index for HTML // --------------- - ol.pushGeneratorState(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); { if (addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,title,0,"annotated",0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,title,0,"annotated",0,TRUE,TRUE); Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); @@ -2106,7 +2106,7 @@ static void writeAnnotatedIndex(OutputList &ol) ol.popGeneratorState(); // ------ - + endFile(ol); // contains ol.endContents() ol.popGeneratorState(); } @@ -2165,9 +2165,9 @@ static void writeMemberList(OutputList &ol,bool useSections,int page, QCString &prevNamespaceName); // each index tab has its own write function - static writeLinkForMember_t writeLinkForMemberMap[3] = - { - &writeClassLinkForMember, + static writeLinkForMember_t writeLinkForMemberMap[3] = + { + &writeClassLinkForMember, &writeFileLinkForMember, &writeNamespaceLinkForMember }; @@ -2192,14 +2192,14 @@ static void writeMemberList(OutputList &ol,bool useSections,int page, for (mli.toFirst();(md=mli.current());++mli) { const char *sep; - bool isFunc=!md->isObjCMethod() && - (md->isFunction() || md->isSlot() || md->isSignal()); + bool isFunc=!md->isObjCMethod() && + (md->isFunction() || md->isSlot() || md->isSignal()); QCString name=md->name(); int startIndex = getPrefixIndex(name); if (QCString(name.data()+startIndex)!=prevName) // new entry { - if ((prevName.isEmpty() || - tolower(name.at(startIndex))!=tolower(prevName.at(0))) && + if ((prevName.isEmpty() || + tolower(name.at(startIndex))!=tolower(prevName.at(0))) && useSections) // new section { if (!firstItem) ol.endItemListItem(); @@ -2267,20 +2267,20 @@ void addClassMemberNameToIndex(MemberDef *md) static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS); ClassDef *cd=0; - - - if (md->isLinkableInProject() && - (cd=md->getClassDef()) && + + + if (md->isLinkableInProject() && + (cd=md->getClassDef()) && cd->isLinkableInProject() && cd->templateMaster()==0) { QCString n = md->name(); int index = getPrefixIndex(n); uint letter = getUtf8CodeToLower(n,index); - if (!n.isEmpty()) + if (!n.isEmpty()) { bool isFriendToHide = hideFriendCompounds && - (QCString(md->typeString())=="friend class" || + (QCString(md->typeString())=="friend class" || QCString(md->typeString())=="friend struct" || QCString(md->typeString())=="friend union"); if (!(md->isFriend() && isFriendToHide) && @@ -2363,12 +2363,12 @@ void addNamespaceMemberNameToIndex(MemberDef *md) documentedNamespaceMembers[NMHL_All]++; } - if (md->isFunction()) + if (md->isFunction()) { g_namespaceIndexLetterUsed[NMHL_Functions].append(letter,md); documentedNamespaceMembers[NMHL_Functions]++; } - else if (md->isVariable()) + else if (md->isVariable()) { g_namespaceIndexLetterUsed[NMHL_Variables].append(letter,md); documentedNamespaceMembers[NMHL_Variables]++; @@ -2412,7 +2412,7 @@ void addFileMemberNameToIndex(MemberDef *md) QCString n = md->name(); int index = getPrefixIndex(n); uint letter = getUtf8CodeToLower(n,index); - if (!n.isEmpty()) + if (!n.isEmpty()) { if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong())) { @@ -2420,12 +2420,12 @@ void addFileMemberNameToIndex(MemberDef *md) documentedFileMembers[FMHL_All]++; } - if (md->isFunction()) + if (md->isFunction()) { g_fileIndexLetterUsed[FMHL_Functions].append(letter,md); documentedFileMembers[FMHL_Functions]++; } - else if (md->isVariable()) + else if (md->isVariable()) { g_fileIndexLetterUsed[FMHL_Variables].append(letter,md); documentedFileMembers[FMHL_Variables]++; @@ -2473,9 +2473,9 @@ static void writeQuickMemberIndex(OutputList &ol, QCString extension=Doxygen::htmlFileExtension; if (!multiPage) anchor="#index_"; - else if (first) + else if (first) anchor=fullName+extension+"#index_"; - else + else anchor=fullName+"_"+letterToLabel(i)+extension+"#index_"; startQuickIndexItem(ol,anchor+is,i==page,TRUE,first); ol.writeString(ci); @@ -2499,11 +2499,11 @@ static const CmhlInfo *getCmhlInfo(int hl) { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - static CmhlInfo cmhlInfo[] = + static CmhlInfo cmhlInfo[] = { CmhlInfo("functions", theTranslator->trAll()), CmhlInfo("functions_func", - fortranOpt ? theTranslator->trSubprograms() : + fortranOpt ? theTranslator->trSubprograms() : vhdlOpt ? VhdlDocGen::trFunctionAndProc() : theTranslator->trFunctions()), CmhlInfo("functions_vars",theTranslator->trVariables()), @@ -2553,7 +2553,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h uint page = ml->letter(); QCString fileName = getCmhlInfo(hl)->fname; if (multiPageIndex) - { + { if (!first) { fileName+="_"+letterToLabel(page); @@ -2645,7 +2645,7 @@ static void writeClassMemberIndex(OutputList &ol) if (documentedClassMembers[CMHL_All]>0 && addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0); + Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0); Doxygen::indexList->incContentsDepth(); } writeClassMemberIndexFiltered(ol,CMHL_All); @@ -2667,7 +2667,7 @@ static void writeClassMemberIndex(OutputList &ol) //---------------------------------------------------------------------------- /** Helper class representing a file member in the navigation menu. */ -struct FmhlInfo +struct FmhlInfo { FmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {} const char *fname; @@ -2678,12 +2678,12 @@ static const FmhlInfo *getFmhlInfo(int hl) { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - static FmhlInfo fmhlInfo[] = + static FmhlInfo fmhlInfo[] = { FmhlInfo("globals", theTranslator->trAll()), FmhlInfo("globals_func", - fortranOpt ? theTranslator->trSubprograms() : - vhdlOpt ? VhdlDocGen::trFunctionAndProc() : + fortranOpt ? theTranslator->trSubprograms() : + vhdlOpt ? VhdlDocGen::trFunctionAndProc() : theTranslator->trFunctions()), FmhlInfo("globals_vars",theTranslator->trVariables()), FmhlInfo("globals_type",theTranslator->trTypedefs()), @@ -2815,7 +2815,7 @@ static void writeFileMemberIndex(OutputList &ol) bool addToIndex = lne==0 || lne->visible(); if (documentedFileMembers[FMHL_All]>0 && addToIndex) { - Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0); + Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0); Doxygen::indexList->incContentsDepth(); } writeFileMemberIndexFiltered(ol,FMHL_All); @@ -2846,7 +2846,7 @@ static const NmhlInfo *getNmhlInfo(int hl) { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - static NmhlInfo nmhlInfo[] = + static NmhlInfo nmhlInfo[] = { NmhlInfo("namespacemembers", theTranslator->trAll()), NmhlInfo("namespacemembers_func", @@ -2986,7 +2986,7 @@ static void writeNamespaceMemberIndex(OutputList &ol) bool addToIndex = lne==0 || lne->visible(); if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex) { - Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0); + Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0); Doxygen::indexList->incContentsDepth(); } //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); @@ -3026,7 +3026,7 @@ static void writeExampleIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE); Doxygen::indexList->incContentsDepth(); } @@ -3082,7 +3082,7 @@ static void countRelatedPages(int &docPages,int &indexPages) { if ( pd->visibleInIndex()) { - indexPages++; + indexPages++; } if ( pd->documentedPage()) { @@ -3129,7 +3129,7 @@ static void writePages(PageDef *pd,FTVHelp *ftv) ftv->addContentsItem( hasSubPages,pageTitle, pd->getReference(),pd->getOutputFileBase(), - 0,hasSubPages,TRUE,pd); + 0,hasSubPages,TRUE,pd); } if (addToIndex && pd!=Doxygen::mainPage) { @@ -3280,7 +3280,7 @@ void writeGraphInfo(OutputList &ol) QCString imgExt = getDotImageExtension(); if (imgExt=="svg" && s!=-1 && e!=-1) { - legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e); + legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e); //printf("legendDocs=%s\n",legendDocs.data()); } FileDef fd("","graph_legend"); @@ -3303,7 +3303,7 @@ void writeGraphInfo(OutputList &ol) static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex) { //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); - //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); + //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); if (level>20) { warn(gd->getDefFileName(),gd->getDefLine(), @@ -3313,7 +3313,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* } /* Some groups should appear twice under different parent-groups. - * That is why we should not check if it was visited + * That is why we should not check if it was visited */ if (/*!gd->visited &&*/ (!gd->isASubGroup() || level>0) && gd->isVisible() && @@ -3347,17 +3347,17 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count()); if (addToIndex) { - Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE); + Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE); Doxygen::indexList->incContentsDepth(); } if (ftv) { ftv->addContentsItem(hasSubGroups,gd->groupTitle(), gd->getReference(),gd->getOutputFileBase(),0, - FALSE,FALSE,gd); + FALSE,FALSE,gd); ftv->incContentsDepth(); } - + //ol.writeListItem(); //ol.startTextLink(gd->getOutputFileBase(),0); //parseText(ol,gd->groupTitle()); @@ -3367,9 +3367,9 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ol.startIndexItem(gd->getReference(),gd->getOutputFileBase()); ol.parseText(gd->groupTitle()); ol.endIndexItem(gd->getReference(),gd->getOutputFileBase()); - if (gd->isReference()) - { - ol.startTypewriter(); + if (gd->isReference()) + { + ol.startTypewriter(); ol.docify(" [external]"); ol.endTypewriter(); } @@ -3421,7 +3421,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ClassDef *cd; for (;(cd=it.current());++it) { - //bool nestedClassInSameGroup = + //bool nestedClassInSameGroup = // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass && // cd->getOuterScope()->partOfGroups()!=0 && cd->getOuterScope()->partOfGroups()->contains(gd); //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",cd->name().data(),cd->isVisible(),nestedClassInSameGroup); @@ -3528,13 +3528,13 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* { writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex); } - endIndexHierarchy(ol,level+1); + endIndexHierarchy(ol,level+1); } } } ol.endIndexListItem(); - + if (addToIndex) { Doxygen::indexList->decContentsDepth(); @@ -3551,7 +3551,7 @@ static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) { if (ftv) { - ol.pushGeneratorState(); + ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); } startIndexHierarchy(ol,0); @@ -3561,10 +3561,10 @@ static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) { writeGroupTreeNode(ol,gd,0,ftv,addToIndex); } - endIndexHierarchy(ol,0); + endIndexHierarchy(ol,0); if (ftv) { - ol.popGeneratorState(); + ol.popGeneratorState(); } } @@ -3573,7 +3573,7 @@ static void writeGroupTree(GroupDef *gd,FTVHelp *ftv,int level,bool addToIndex) { static bool externalGroups = Config_getBool(EXTERNAL_GROUPS); /* Some groups should appear twice under different parent-groups. - * That is why we should not check if it was visited + * That is why we should not check if it was visited */ if ((!gd->isASubGroup() || level>0) && gd->isVisible() && @@ -3582,7 +3582,7 @@ static void writeGroupTree(GroupDef *gd,FTVHelp *ftv,int level,bool addToIndex) { if (ftv) { - ftv->addContentsItem(hasSubGroups,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0); + ftv->addContentsItem(hasSubGroups,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0); ftv->incContentsDepth(); } if (ftv) @@ -3607,8 +3607,8 @@ static void writeGroupTree(FTVHelp *ftv,bool addToIndex) static void writeGroupIndex(OutputList &ol) { - if (documentedGroups==0) return; - ol.pushGeneratorState(); + if (documentedGroups==0) return; + ol.pushGeneratorState(); // 1.{ ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); @@ -3642,13 +3642,13 @@ static void writeGroupIndex(OutputList &ol) // interactive group index for HTML // --------------- // 2.{ - ol.pushGeneratorState(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); { if (addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE); Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); @@ -3677,8 +3677,8 @@ static void writeGroupIndex(OutputList &ol) #if 0 static void writeDirIndex(OutputList &ol) { - if (documentedDirs==0) return; - ol.pushGeneratorState(); + if (documentedDirs==0) return; + ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Dirs); QCString title = lne ? lne->title() : theTranslator->trDirectories(); @@ -3693,7 +3693,7 @@ static void writeDirIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,title,0,"dirs",0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,title,0,"dirs",0,TRUE,TRUE); Doxygen::indexList->incContentsDepth(); } ol.parseText(lne ? lne->intro() : theTranslator->trDirDescription()); @@ -3713,7 +3713,7 @@ static void writeDirIndex(OutputList &ol) QGString outStr; FTextStream t(&outStr); ftv->generateTreeViewInline(t); - ol.pushGeneratorState(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeString(outStr); ol.popGeneratorState(); @@ -3788,7 +3788,7 @@ static void writeIndex(OutputList &ol) //-------------------------------------------------------------------- ol.disableAllBut(OutputGenerator::Html); - QCString defFileName = + QCString defFileName = Doxygen::mainPage ? Doxygen::mainPage->docFile().data() : "[generated]"; int defLine = Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1; @@ -3805,14 +3805,14 @@ static void writeIndex(OutputList &ol) QCString indexName="index"; ol.startFile(indexName,0,title); - + if (Doxygen::mainPage) { if ( (!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0) ) // to avoid duplicate entries in the treeview { - Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); + Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); } if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections()) { @@ -3821,7 +3821,7 @@ static void writeIndex(OutputList &ol) } ol.startQuickIndices(); - if (!Config_getBool(DISABLE_INDEX)) + if (!Config_getBool(DISABLE_INDEX)) { ol.writeQuickLinks(TRUE,HLI_Main,0); } @@ -3858,7 +3858,7 @@ static void writeIndex(OutputList &ol) } ol.startContents(); - if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0) + if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0) { ol.writeQuickLinks(FALSE,HLI_Main,0); } @@ -3879,10 +3879,10 @@ static void writeIndex(OutputList &ol) Doxygen::insideMainPage=FALSE; } - + endFile(ol); ol.disable(OutputGenerator::Html); - + //-------------------------------------------------------------------- // write LaTeX/RTF index //-------------------------------------------------------------------- @@ -3891,7 +3891,7 @@ static void writeIndex(OutputList &ol) ol.startFile("refman",0,0); ol.startIndexSection(isTitlePageStart); - if (!Config_getString(LATEX_HEADER).isEmpty()) + if (!Config_getString(LATEX_HEADER).isEmpty()) { ol.disable(OutputGenerator::Latex); } @@ -3907,7 +3907,7 @@ static void writeIndex(OutputList &ol) if (!Config_getString(PROJECT_NUMBER).isEmpty()) { - ol.startProjectNumber(); + ol.startProjectNumber(); ol.generateDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString(PROJECT_NUMBER),FALSE,FALSE); ol.endProjectNumber(); } @@ -3940,7 +3940,7 @@ static void writeIndex(OutputList &ol) bool first=Doxygen::mainPage==0; for (pdi.toFirst();(pd=pdi.current());++pdi) { - if (!pd->getGroupDef() && !pd->isReference() && + if (!pd->getGroupDef() && !pd->isReference() && (!pd->hasParentPage() || // not inside other page (Doxygen::mainPage==pd->getOuterScope())) // or inside main page ) @@ -4003,7 +4003,7 @@ static void writeIndex(OutputList &ol) { ol.startIndexSection(isClassHierarchyIndex); ol.parseText(/*projPrefix+*/ - (fortranOpt ? theTranslator->trCompoundIndexFortran() : + (fortranOpt ? theTranslator->trCompoundIndexFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : theTranslator->trHierarchicalIndex() )); @@ -4014,7 +4014,7 @@ static void writeIndex(OutputList &ol) ol.startIndexSection(isCompoundIndex); ol.parseText(/*projPrefix+*/ (fortranOpt ? theTranslator->trCompoundIndexFortran() : - vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : + vhdlOpt ? VhdlDocGen::trDesignUnitIndex() : theTranslator->trCompoundIndex() )); ol.endIndexSection(isCompoundIndex); @@ -4103,26 +4103,26 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList0 && addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } @@ -4134,7 +4134,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList0 && addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,"annotated",0); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,"annotated",0); Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } @@ -4161,7 +4161,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList0 && addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } @@ -4201,7 +4201,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QListurl(),"!"); // add ! to relative URL @@ -4229,7 +4229,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QListbaseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref"; - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); } break; case LayoutNavEntry::UserGroup: @@ -4240,7 +4240,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QListaddContentsItem(TRUE,lne->title(),0,0,0,FALSE,FALSE); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0,FALSE,FALSE); } else { @@ -4250,12 +4250,12 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QListbaseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref"; - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); } } - else + else { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); } Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; @@ -4273,10 +4273,10 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QListdecContentsDepth(); break; default: @@ -4293,17 +4293,17 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind) static bool showNamespaces = Config_getBool(SHOW_NAMESPACES); switch (kind) { - case LayoutNavEntry::MainPage: return TRUE; - case LayoutNavEntry::User: return TRUE; - case LayoutNavEntry::UserGroup: return TRUE; + case LayoutNavEntry::MainPage: return TRUE; + case LayoutNavEntry::User: return TRUE; + case LayoutNavEntry::UserGroup: return TRUE; case LayoutNavEntry::Pages: return indexedPages>0; case LayoutNavEntry::Modules: return documentedGroups>0; case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces; case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces; case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0; case LayoutNavEntry::Classes: return annotatedClasses>0; - case LayoutNavEntry::ClassList: return annotatedClasses>0; - case LayoutNavEntry::ClassIndex: return annotatedClasses>0; + case LayoutNavEntry::ClassList: return annotatedClasses>0; + case LayoutNavEntry::ClassIndex: return annotatedClasses>0; case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0; case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0; case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles; @@ -4437,6 +4437,22 @@ static void writeMenuData() if (f.open(IO_WriteOnly)) { FTextStream t(&f); + t << "/*\n@ @licstart The following is the entire license notice for the\n" + "JavaScript code in this file.\n\nCopyright (C) 1997-2017 by Dimitri van Heesch\n\n" + "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + " GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License along\n" + "with this program; if not, write to the Free Software Foundation, Inc.,\n" + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n" + "@licend The above is the entire license notice\n" + "for the JavaScript code in this file\n" + "*/\n"; t << "var menudata={"; bool hasChildren = renderQuickLinksAsJs(t,root,TRUE); if (hasChildren) t << "]"; @@ -4453,4 +4469,3 @@ void writeIndexHierarchy(OutputList &ol) writeIndexHierarchyEntries(ol,lne->children()); } } - diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 18d007f..dadfd6f 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -41,10 +41,10 @@ // file format: (all multi-byte values are stored in big endian format) // 4 byte header // 256*256*4 byte index (4 bytes) -// for each index entry: a zero terminated list of words +// for each index entry: a zero terminated list of words // for each word: a \0 terminated string + 4 byte offset to the stats info // padding bytes to align at 4 byte boundary -// for each word: the number of urls (4 bytes) +// for each word: the number of urls (4 bytes) // + for each url containing the word 8 bytes statistics // (4 bytes index to url string + 4 bytes frequency counter) // for each url: a \0 terminated string @@ -75,7 +75,7 @@ void IndexWord::addUrlIndex(int idx,bool hiPriority) //-------------------------------------------------------------------- -SearchIndex::SearchIndex() : SearchIndexIntf(Internal), +SearchIndex::SearchIndex() : SearchIndexIntf(Internal), m_words(328829), m_index(numIndexEntries), m_url2IdMap(10007), m_urls(10007), m_urlIndex(-1) { int i; @@ -94,13 +94,13 @@ void SearchIndex::setCurrentDoc(Definition *ctx,const char *anchor,bool isSource QCString url=isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase(); url+=Config_getString(HTML_FILE_EXTENSION); QCString baseUrl = url; - if (anchor) url+=QCString("#")+anchor; + if (anchor) url+=QCString("#")+anchor; if (!isSourceFile) baseUrl=url; QCString name=ctx->qualifiedName(); if (ctx->definitionType()==Definition::TypeMember) { MemberDef *md = (MemberDef *)ctx; - name.prepend((md->getLanguage()==SrcLangExt_Fortran ? + name.prepend((md->getLanguage()==SrcLangExt_Fortran ? theTranslator->trSubprogram(TRUE,TRUE) : theTranslator->trMember(TRUE,TRUE))+" "); } @@ -188,7 +188,7 @@ static int charsToIndex(const char *word) //register ushort h=0; //const char *k = word; //ushort mask=0xfc00; - //while ( *k ) + //while ( *k ) //{ // h = (h&mask)^(h<<6)^(*k++); //} @@ -275,7 +275,7 @@ void SearchIndex::write(const char *fileName) IndexWord *iw; for (iwi.toFirst();(iw=iwi.current());++iwi) { - int ws = iw->word().length()+1; + int ws = iw->word().length()+1; size+=ws+4; // word + url info list offset } size+=1; // zero list terminator @@ -295,8 +295,8 @@ void SearchIndex::write(const char *fileName) IndexWord *iw; for (iwi.toFirst();(iw=iwi.current());++iwi) { - offset+= iw->word().length()+1; - offset+=4; // word + offset to url info array + offset+= iw->word().length()+1; + offset+=4; // word + offset to url info array } offset+=1; // zero list terminator } @@ -312,7 +312,7 @@ void SearchIndex::write(const char *fileName) //int statsOffset = size; //IndexWord *iw; int *wordStatOffsets = new int[m_words.count()]; - + int count=0; // third pass: compute offset to stats info for each word @@ -417,7 +417,7 @@ struct SearchDocEntry QCString name; QCString args; QCString extId; - QCString url; + QCString url; GrowBuf importantText; GrowBuf normalText; }; @@ -476,7 +476,7 @@ static QCString definitionToName(Definition *ctx) { switch(ctx->definitionType()) { - case Definition::TypeClass: + case Definition::TypeClass: return ((ClassDef*)ctx)->compoundTypeString(); case Definition::TypeFile: return "file"; @@ -647,23 +647,23 @@ static void addMemberToSearchIndex(MemberDef *md) } } } - else if (isLinkable && - (((nd=md->getNamespaceDef()) && nd->isLinkable()) || + else if (isLinkable && + (((nd=md->getNamespaceDef()) && nd->isLinkable()) || ((fd=md->getFileDef()) && fd->isLinkable()) ) ) { QCString n = md->name(); - if (!n.isEmpty()) + if (!n.isEmpty()) { uint letter = getUtf8CodeToLower(n,0); g_searchIndexInfo[SEARCH_INDEX_ALL].symbolList.append(letter,md); - if (md->isFunction()) + if (md->isFunction()) { g_searchIndexInfo[SEARCH_INDEX_FUNCTIONS].symbolList.append(letter,md); } - else if (md->isVariable()) + else if (md->isVariable()) { g_searchIndexInfo[SEARCH_INDEX_VARIABLES].symbolList.append(letter,md); } @@ -940,18 +940,22 @@ void writeJavascriptSearchIndex() t << "
" << theTranslator->trLoading() << "
" << endl; t << "
" << endl; // here the results will be inserted t << "" << endl; - t << "
" + t << "
" << theTranslator->trSearching() << "
" << endl; t << "
" << theTranslator->trNoMatches() << "
" << endl; t << "" << endl; t << "
" << endl; // SRIndex t << "" << endl; @@ -1074,13 +1078,13 @@ void writeJavascriptSearchIndex() bool found=FALSE; overloadedFunction = ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope) - ) && md && + ) && md && (md->isFunction() || md->isSlot()); QCString prefix; if (md) prefix=convertToXML(md->localName()); if (overloadedFunction) // overloaded member function { - prefix+=convertToXML(md->argsString()); + prefix+=convertToXML(md->argsString()); // show argument list to disambiguate overloaded functions } else if (md) // unique member function @@ -1112,11 +1116,11 @@ void writeJavascriptSearchIndex() } } } - else if (md && (md->getClassDef() || md->getNamespaceDef())) + else if (md && (md->getClassDef() || md->getNamespaceDef())) // member in class or namespace scope { SrcLangExt lang = md->getLanguage(); - name = convertToXML(d->getOuterScope()->qualifiedName()) + name = convertToXML(d->getOuterScope()->qualifiedName()) + getLanguageSpecificSeparator(lang) + prefix; found = TRUE; } @@ -1321,5 +1325,3 @@ void finializeSearchIndexer() { delete Doxygen::searchIndex; } - - diff --git a/templates/html/dynsections.js b/templates/html/dynsections.js index 85e1836..ea0a7b3 100644 --- a/templates/html/dynsections.js +++ b/templates/html/dynsections.js @@ -1,3 +1,26 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); @@ -15,7 +38,7 @@ function toggleVisibility(linkObj) summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } + } return false; } @@ -94,4 +117,4 @@ function toggleInherit(id) $(img).attr('src',src.substring(0,src.length-10)+'open.png'); } } - +/* @license-end */ diff --git a/templates/html/extsearch.js b/templates/html/extsearch.js index 47d2595..22d68f0 100644 --- a/templates/html/extsearch.js +++ b/templates/html/extsearch.js @@ -1,3 +1,26 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ function SearchBox(name, resultsPath, inFrame, label) { this.searchLabel = label; @@ -99,7 +122,7 @@ function searchFor(query,page,count) { { lastPage-=firstPage; firstPage=0; - } + } if (lastPage>data.pages) { lastPage=data.pages; @@ -127,3 +150,4 @@ function searchFor(query,page,count) { } }); } +/* @license-end */ diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl index 2825249..e271d3a 100644 --- a/templates/html/htmlbase.tpl +++ b/templates/html/htmlbase.tpl @@ -16,16 +16,20 @@ {% endif %} {% if not config.DISABLE_INDEX %} {% endif %} {% if config.SEARCHENGINE %} @@ -36,14 +40,18 @@ $(function() { {% if config.SERVER_BASED_SEARCH %} {% else %} {% endif %} {% endif %} @@ -131,7 +139,9 @@ $(function() { {% block search %} {% if config.SEARCHENGINE %} {% endif %} {% endblock %} @@ -160,7 +170,9 @@ var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{
{% endif %} @@ -227,7 +239,7 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix {% else %} {{ tr.generatedBy }} {% endif %} - doxygendoxygen {{ doxygen.version }} {% endif %} diff --git a/templates/html/htmljsmenudata.tpl b/templates/html/htmljsmenudata.tpl index 08d8773..3db8bd4 100644 --- a/templates/html/htmljsmenudata.tpl +++ b/templates/html/htmljsmenudata.tpl @@ -1,3 +1,26 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ var menudata={children:[ {text:'{{ tr.mainPage }}',url:'index{{ config.HTML_FILE_EXTENSION }}'} {% if pageTree.tree %} @@ -49,4 +72,3 @@ var menudata={children:[ ,{text:'{{ tr.examples }}',url:'examples{{ config.HTML_FILE_EXTENSION }}'} {% endif %} ]} - diff --git a/templates/html/htmlsearchresult.tpl b/templates/html/htmlsearchresult.tpl index 2cf45fc..b795743 100644 --- a/templates/html/htmlsearchresult.tpl +++ b/templates/html/htmlsearchresult.tpl @@ -12,15 +12,19 @@
{{ tr.loading }}
{{ tr.searching }}
{{ tr.noMatches }}
diff --git a/templates/html/jquery.js b/templates/html/jquery.js index f5343ed..2771c74 100644 --- a/templates/html/jquery.js +++ b/templates/html/jquery.js @@ -1,3 +1,31 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ /*! * jQuery JavaScript Library v1.7.1 * http://jquery.com/ @@ -53,7 +81,7 @@ (function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! * jQuery hashchange event - v1.3 - 7/21/2010 * http://benalman.com/projects/jquery-hashchange-plugin/ - * + * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ @@ -84,4 +112,4 @@ * * Licensed MIT */ -(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(a){var b=[],e=!!window.createPopup,f=false,d="ontouchstart" in window,h=false,g=window.requestAnimationFrame||function(l){return setTimeout(l,1000/60)},c=window.cancelAnimationFrame||function(l){clearTimeout(l)};function k(m){var n=".smartmenus_mouse";if(!h&&!m){var o=true,l=null;a(document).bind(i([["mousemove",function(s){var t={x:s.pageX,y:s.pageY,timeStamp:new Date().getTime()};if(l){var q=Math.abs(l.x-t.x),p=Math.abs(l.y-t.y);if((q>0||p>0)&&q<=2&&p<=2&&t.timeStamp-l.timeStamp<=300){f=true;if(o){var r=a(s.target).closest("a");if(r.is("a")){a.each(b,function(){if(a.contains(this.$root[0],r[0])){this.itemEnter({currentTarget:r[0]});return false}})}o=false}}}l=t}],[d?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(p){if(j(p.originalEvent)){f=false}}]],n));h=true}else{if(h&&m){a(document).unbind(n);h=false}}}function j(l){return !/^(4|mouse)$/.test(l.pointerType)}function i(l,n){if(!n){n=""}var m={};a.each(l,function(o,p){m[p[0].split(" ").join(n+" ")+n]=p[1]});return m}a.SmartMenus=function(m,l){this.$root=a(m);this.opts=l;this.rootId="";this.accessIdPrefix="";this.$subArrow=null;this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.idInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=false;this.$disableOverlay=null;this.$touchScrollingSub=null;this.cssTransforms3d="perspective" in m.style||"webkitPerspective" in m.style;this.wasCollapsible=false;this.init()};a.extend(a.SmartMenus,{hideAll:function(){a.each(b,function(){this.menuHideAll()})},destroy:function(){while(b.length){b[0].destroy()}k(true)},prototype:{init:function(n){var l=this;if(!n){b.push(this);this.rootId=(new Date().getTime()+Math.random()+"").replace(/\D/g,"");this.accessIdPrefix="sm-"+this.rootId+"-";if(this.$root.hasClass("sm-rtl")){this.opts.rightToLeftSubMenus=true}var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(i([["mouseover focusin",a.proxy(this.rootOver,this)],["mouseout focusout",a.proxy(this.rootOut,this)],["keydown",a.proxy(this.rootKeyDown,this)]],r)).delegate("a",i([["mouseenter",a.proxy(this.itemEnter,this)],["mouseleave",a.proxy(this.itemLeave,this)],["mousedown",a.proxy(this.itemDown,this)],["focus",a.proxy(this.itemFocus,this)],["blur",a.proxy(this.itemBlur,this)],["click",a.proxy(this.itemClick,this)]],r));r+=this.rootId;if(this.opts.hideOnClick){a(document).bind(i([["touchstart",a.proxy(this.docTouchStart,this)],["touchmove",a.proxy(this.docTouchMove,this)],["touchend",a.proxy(this.docTouchEnd,this)],["click",a.proxy(this.docClick,this)]],r))}a(window).bind(i([["resize orientationchange",a.proxy(this.winResize,this)]],r));if(this.opts.subIndicators){this.$subArrow=a("").addClass("sub-arrow");if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText)}}k()}this.$firstSub=this.$root.find("ul").each(function(){l.menuInit(a(this))}).eq(0);this.$firstLink=this.$root.find("a").eq(0);if(this.opts.markCurrentItem){var p=/(index|default)\.[^#\?\/]*/i,m=/#.*/,q=window.location.href.replace(p,""),o=q.replace(m,"");this.$root.find("a").each(function(){var s=this.href.replace(p,""),t=a(this);if(s==q||s==o){t.addClass("current");if(l.opts.markCurrentTree){t.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")})}}})}this.wasCollapsible=this.isCollapsible()},destroy:function(m){if(!m){var n=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(n).undelegate(n);n+=this.rootId;a(document).unbind(n);a(window).unbind(n);if(this.opts.subIndicators){this.$subArrow=null}}this.menuHideAll();var l=this;this.$root.find("ul").each(function(){var o=a(this);if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}if(o.dataSM("shown-before")){if(l.opts.subMenusMinWidth||l.opts.subMenusMaxWidth){o.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap")}if(o.dataSM("scroll-arrows")){o.dataSM("scroll-arrows").remove()}o.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})}if((o.attr("id")||"").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded");this.$root.find("a.has-submenu").each(function(){var o=a(this);if(o.attr("id").indexOf(l.accessIdPrefix)==0){o.removeAttr("id")}}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub");if(this.opts.subIndicators){this.$root.find("span.sub-arrow").remove()}if(this.opts.markCurrentItem){this.$root.find("a.current").removeClass("current")}if(!m){this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}b.splice(a.inArray(this,b),1)}},disable:function(l){if(!this.disabled){this.menuHideAll();if(!l&&!this.opts.isPopup&&this.$root.is(":visible")){var m=this.$root.offset();this.$disableOverlay=a('
').css({position:"absolute",top:m.top,left:m.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(true),opacity:0}).appendTo(document.body)}this.disabled=true}},docClick:function(l){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}if(this.visibleSubMenus.length&&!a.contains(this.$root[0],l.target)||a(l.target).is("a")){this.menuHideAll()}},docTouchEnd:function(m){if(!this.lastTouch){return}if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}var l=this;this.hideTimeout=setTimeout(function(){l.menuHideAll()},350)}this.lastTouch=null},docTouchMove:function(m){if(!this.lastTouch){return}var l=m.originalEvent.touches[0];this.lastTouch.x2=l.pageX;this.lastTouch.y2=l.pageY},docTouchStart:function(m){var l=m.originalEvent.touches[0];this.lastTouch={x1:l.pageX,y1:l.pageY,target:l.target}},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}this.disabled=false}},getClosestMenu:function(m){var l=a(m).closest("ul");while(l.dataSM("in-mega")){l=l.parent().closest("ul")}return l[0]||null},getHeight:function(l){return this.getOffset(l,true)},getOffset:function(n,l){var m;if(n.css("display")=="none"){m={position:n[0].style.position,visibility:n[0].style.visibility};n.css({position:"absolute",visibility:"hidden"}).show()}var o=n[0].getBoundingClientRect&&n[0].getBoundingClientRect(),p=o&&(l?o.height||o.bottom-o.top:o.width||o.right-o.left);if(!p&&p!==0){p=l?n[0].offsetHeight:n[0].offsetWidth}if(m){n.hide().css(m)}return p},getStartZIndex:function(l){var m=parseInt(this[l?"$root":"$firstSub"].css("z-index"));if(!l&&isNaN(m)){m=parseInt(this.$root.css("z-index"))}return !isNaN(m)?m:1},getTouchPoint:function(l){return l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0]||l},getViewport:function(l){var m=l?"Height":"Width",o=document.documentElement["client"+m],n=window["inner"+m];if(n){o=Math.min(o,n)}return o},getViewportHeight:function(){return this.getViewport(true)},getViewportWidth:function(){return this.getViewport()},getWidth:function(l){return this.getOffset(l)},handleEvents:function(){return !this.disabled&&this.isCSSOn()},handleItemEvents:function(l){return this.handleEvents()&&!this.isLinkInMegaMenu(l)},isCollapsible:function(){return this.$firstSub.css("position")=="static"},isCSSOn:function(){return this.$firstLink.css("display")=="block"},isFixed:function(){var l=this.$root.css("position")=="fixed";if(!l){this.$root.parentsUntil("body").each(function(){if(a(this).css("position")=="fixed"){l=true;return false}})}return l},isLinkInMegaMenu:function(l){return a(this.getClosestMenu(l[0])).hasClass("mega-menu")},isTouchMode:function(){return !f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(p,l){var n=p.closest("ul"),q=n.dataSM("level");if(q>1&&(!this.activatedItems[q-2]||this.activatedItems[q-2][0]!=n.dataSM("parent-a")[0])){var m=this;a(n.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(n).each(function(){m.itemActivate(a(this).dataSM("parent-a"))})}if(!this.isCollapsible()||l){this.menuHideSubMenus(!this.activatedItems[q-1]||this.activatedItems[q-1][0]!=p[0]?q-1:q)}this.activatedItems[q-1]=p;if(this.$root.triggerHandler("activate.smapi",p[0])===false){return}var o=p.dataSM("sub");if(o&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){this.menuShow(o)}},itemBlur:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}this.$root.triggerHandler("blur.smapi",l[0])},itemClick:function(o){var n=a(o.currentTarget);if(!this.handleItemEvents(n)){return}if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==n.closest("ul")[0]){this.$touchScrollingSub=null;o.stopPropagation();return false}if(this.$root.triggerHandler("click.smapi",n[0])===false){return false}var p=a(o.target).is("span.sub-arrow"),m=n.dataSM("sub"),l=m?m.dataSM("level")==2:false;if(m&&!m.is(":visible")){if(this.opts.showOnClick&&l){this.clickActivated=true}this.itemActivate(n);if(m.is(":visible")){this.focusActivated=true;return false}}else{if(this.isCollapsible()&&p){this.itemActivate(n);this.menuHide(m);return false}}if(this.opts.showOnClick&&l||n.hasClass("disabled")||this.$root.triggerHandler("select.smapi",n[0])===false){return false}},itemDown:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}l.dataSM("mousedown",true)},itemEnter:function(n){var m=a(n.currentTarget);if(!this.handleItemEvents(m)){return}if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var l=this;this.showTimeout=setTimeout(function(){l.itemActivate(m)},this.opts.showOnClick&&m.closest("ul").dataSM("level")==1?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",m[0])},itemFocus:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(this.focusActivated&&(!this.isTouchMode()||!l.dataSM("mousedown"))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=l[0])){this.itemActivate(l,true)}this.$root.triggerHandler("focus.smapi",l[0])},itemLeave:function(m){var l=a(m.currentTarget);if(!this.handleItemEvents(l)){return}if(!this.isTouchMode()){l[0].blur();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}}l.removeDataSM("mousedown");this.$root.triggerHandler("mouseleave.smapi",l[0])},menuHide:function(m){if(this.$root.triggerHandler("beforehide.smapi",m[0])===false){return}m.stop(true,true);if(m.css("display")!="none"){var l=function(){m.css("z-index","")};if(this.isCollapsible()){if(this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,m,l)}else{m.hide(this.opts.collapsibleHideDuration,l)}}else{if(this.opts.hideFunction){this.opts.hideFunction.call(this,m,l)}else{m.hide(this.opts.hideDuration,l)}}if(m.dataSM("ie-shim")){m.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""})}if(m.dataSM("scroll")){this.menuScrollStop(m);m.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()}m.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false");m.attr({"aria-expanded":"false","aria-hidden":"true"});var n=m.dataSM("level");this.activatedItems.splice(n-1,1);this.visibleSubMenus.splice(a.inArray(m,this.visibleSubMenus),1);this.$root.triggerHandler("hide.smapi",m[0])}},menuHideAll:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}var m=this.opts.isPopup?1:0;for(var l=this.visibleSubMenus.length-1;l>=m;l--){this.menuHide(this.visibleSubMenus[l])}if(this.opts.isPopup){this.$root.stop(true,true);if(this.$root.is(":visible")){if(this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root)}else{this.$root.hide(this.opts.hideDuration)}if(this.$root.dataSM("ie-shim")){this.$root.dataSM("ie-shim").remove()}}}this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=false;this.focusActivated=false;this.zIndexInc=0;this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(n){for(var l=this.activatedItems.length-1;l>=n;l--){var m=this.activatedItems[l].dataSM("sub");if(m){this.menuHide(m)}}},menuIframeShim:function(l){if(e&&this.opts.overlapControlsInIE&&!l.dataSM("ie-shim")){l.dataSM("ie-shim",a("