%PDF- %PDF-
Direktori : /home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/skins/flamingo/ |
Current File : //home/waritko/jetty-distribution-9.4.21.v20190926/webapps/ROOT/skins/flamingo/javascript.vm |
## We handle the ability to disable the minification, by choosing the file extension to add to the script paths. #set ($jsExtension = '.min.js') #if (!$services.debug.minify) #set ($jsExtension = '.js') #end ## ## JS Libraries. ## <script type="text/javascript" src="$services.webjars.url('requirejs', "require$jsExtension")" data-wysiwyg="true"></script> ## $xwiki.jsfx.use('js/prototype/prototype.js', {'defer': false})## $xwiki.jsfx.use('js/scriptaculous/effects.js', true)## ## xwiki-min.js and xwiki-min.css aggregate a couple of JavaScript and CSS files that are used on each page. In order to ## help debugging we provide/bundle the individual files also and you can load them instead of the aggregated files by ## passing 'minify=false' in the request query string or setting debug.minify property in xwiki.properties file. #if (!$services.debug.minify) ## entityReferences.js should be loaded first because it is used by xwiki.js $xwiki.jsfx.use('uicomponents/model/entityReference.js', {'defer': false})## $xwiki.jsfx.use('js/xwiki/xwiki.js', {'forceSkinAction': true, 'defer': false})## $xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true)## $xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', {'forceSkinAction' : true, 'colorTheme' : $themeDoc})## $xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true)## $xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', {'forceSkinAction' : true, 'language' : $xcontext.locale})## $xwiki.jsfx.use('uicomponents/widgets/confirmationBox.js', true)## $xwiki.ssfx.use('uicomponents/widgets/confirmationBox.css', true)## $xwiki.jsfx.use('uicomponents/widgets/confirmedAjaxRequest.js', true)## $xwiki.jsfx.use('uicomponents/widgets/notification.js', true)## $xwiki.ssfx.use('uicomponents/widgets/notification.css', true)## $xwiki.jsfx.use('uicomponents/widgets/list/xlist.js')## $xwiki.jsfx.use('uicomponents/suggest/suggest.js', {'forceSkinAction' : true, 'language' : $xcontext.locale})## $xwiki.ssfx.use('uicomponents/suggest/suggest.css', true)## #else $xwiki.jsfx.use('js/xwiki/xwiki-min.js', {'forceSkinAction': true, 'defer': false, 'language': $xcontext.locale})## $xwiki.ssfx.use('css/xwiki-min.css', {'forceSkinAction': true, 'colorTheme': $themeDoc, 'language': $xcontext.locale})## #end $xwiki.jsfx.use("flamingo$jsExtension", {'forceSkinAction' : true, 'language' : $xcontext.locale})## #if($xwiki.exists('XWiki.SearchSuggestConfig')) ## Hook to request the search suggest script if search suggest configuration is present. ## We can't just have it as a always-use SSX yet since we compute a hash to be sure to refresh ## the file when the configuration changes. ## Ideally, this code should be located in a interface extension, in the search application. #set($searchSuggestConfigDocument = $xwiki.getDocument('XWiki.SearchSuggestConfig')) #set($searchSuggestConfigObject = $searchSuggestConfigDocument.getObject('XWiki.SearchSuggestConfig')) #if($searchSuggestConfigObject.getProperty('activated').value == 1) #set($searchSuggestConfigHash = '') #foreach($source in $searchSuggestConfigDocument.getObjects('XWiki.SearchSuggestSourceClass')) #if($source.getValue('activated') == 1) #set($sourceId = "${source.getValue('name')}:${source.getValue('url')}:${source.getValue('highlight')}:${source.getValue('icon')}}") #set($searchSuggestConfigHash = "${searchSuggestConfigHash}|${sourceId}") #end #end $xwiki.jsfx.use('uicomponents/search/searchSuggest.js', { 'forceSkinAction' : true, 'h' : $searchSuggestConfigHash.hashCode() })## $xwiki.ssfx.use('uicomponents/search/searchSuggest.css', true)## #end #end #set($editActions = ['edit', 'inline', 'admin']) #if($editActions.contains($xcontext.action)) $xwiki.jsfx.use('uicomponents/lock/lock.js')## $xwiki.jsfx.use('uicomponents/widgets/validation/livevalidation_prototype.js')## $xwiki.ssfx.use('uicomponents/widgets/validation/livevalidation.css', true)## #end #if($services.async.isEnabled()) $xwiki.jsfx.use("uicomponents/async/async.js", true)## #end ## ## Hooks for inserting JavaScript skin extensions ## #javaScriptExtensionHooks ## ## Compatibility "aspect" file for deprecated code. ## Placed at the very end of the stream so that skin file extensions code can be deprecated easily as well. ## <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/compatibility.js", false)" defer="defer"></script> ## Marker script that signals that all the deferred scripts have indeed been executed, guarding against a premature dom:loaded event <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/markerScript.js", false)" defer="defer"></script> <!--[if lt IE 9]> ## HTML5Shiv enable the compatibility with IE8 <script src="$services.webjars.url('html5shiv', 'html5shiv.min.js')"></script> ## Respond.js implements the CSS 3 media queries for IE8 <script type="text/javascript" src="$services.webjars.url('respond', 'dest/respond.min.js')" defer="defer"></script> <![endif]--> <script type="text/javascript" data-wysiwyg="true"> // <![CDATA[ ## Requirejs will automatically add a ".js" suffix if the generated URL doesn't contain a "?". It happens that we ## don't generate a URL with "?" when we export in HTML for example. In this case we remove the ".js" suffix since ## requirejs will add one... ## Note that we cannot do this generically in the webjars module when exporting in HTML because the webjars module ## provide generic URLs and they don't all go through requirejs... ## Note that this comment and code below are not correctly indentend voluntarily in order to generate nicely formatted ## (and valid) code at runtime! #macro(removeJsSuffix $expr) ## Note that velocity takes argument references by name (see: https://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacros). ## So we set the value of the $expr in the $url variable to not execute $expr multiple times. #set ($url = $expr) #if (!$url.contains('?'))$stringtool.removeEnd($url, '.js')#else$url#{end} #end ## ## Start the requirejs config. ## require.config({ paths: { 'jquery': '#removeJsSuffix($services.webjars.url("jquery", "jquery${jsExtension}"))', 'bootstrap': '#removeJsSuffix($services.webjars.url("bootstrap", "js/bootstrap${jsExtension}"))', 'xwiki-meta': '$stringtool.removeEnd($xwiki.getSkinFile('js/xwiki/meta.js'), '.js')', 'xwiki-events-bridge': "$stringtool.removeEnd($xwiki.getSkinFile('js/xwiki/eventsBridge.js'), '.js')", 'iscroll': '#removeJsSuffix($services.webjars.url('iscroll/5.1.3/build/iscroll-lite.js'))', 'drawer': '#removeJsSuffix($services.webjars.url('drawer', "js/jquery.drawer${jsExtension}"))', 'deferred': "$stringtool.removeEnd($xwiki.getSkinFile('uicomponents/require/deferred.js'), '.js')" }, shim: { 'bootstrap' : ['jquery'], 'drawer': ['jquery', 'iscroll'] }, ## see: http://requirejs.org/docs/jquery.html#noconflictmap to see why this works. map: { '*': { 'jquery': 'jQueryNoConflict' }, 'jQueryNoConflict': { 'jquery': 'jquery' }, } }); define('jQueryNoConflict', ['jquery'], function ($) { return $.noConflict(); }); if (window.Prototype && Prototype.BrowserFeatures.ElementExtensions) { require(['jquery', 'bootstrap'], function ($) { // Fix incompatibilities between BootStrap and Prototype var disablePrototypeJS = function (method, pluginsToDisable) { var handler = function (event) { event.target[method] = undefined; setTimeout(function () { delete event.target[method]; }, 0); }; pluginsToDisable.each(function (plugin) { $(window).on(method + '.bs.' + plugin, handler); }); }, pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'tab', 'popover']; disablePrototypeJS('show', pluginsToDisable); disablePrototypeJS('hide', pluginsToDisable); }); } require(['jquery', 'drawer'], function($) { $(document).ready(function() { $('.drawer-main').closest('body').drawer(); }); }); window.XWiki = window.XWiki || {}; XWiki.webapppath = "${xwiki.webAppPath}"; XWiki.servletpath = "${xwiki.servletPath}"; XWiki.contextPath = "${request.contextPath}"; XWiki.mainWiki = "$!{escapetool.javascript(${xcontext.mainWikiName})}"; // Deprecated: replaced by meta data in the HTML element XWiki.currentWiki = "$!{escapetool.javascript(${xcontext.database})}"; XWiki.currentSpace = "$!{escapetool.javascript($doc.space)}"; XWiki.currentPage = "$!{escapetool.javascript($doc.documentReference.name)}"; XWiki.editor = "$!{escapetool.javascript($editor)}"; XWiki.viewer = "$!{escapetool.javascript($viewer)}"; XWiki.contextaction = "${xcontext.getAction()}"; XWiki.skin = '$escapetool.javascript($xwiki.skin)'; XWiki.docisnew = $!doc.isNew(); XWiki.docsyntax = "$!doc.getSyntax().toIdString()"; XWiki.docvariant = "$!{escapetool.javascript($docvariant.replace('&', '&'))}"; XWiki.blacklistedSpaces = [ #foreach($space in $blacklistedSpaces)#if($velocityCount > 1),#end"$space"#end ]; XWiki.hasEdit = $hasEdit; XWiki.hasProgramming = $hasProgramming; XWiki.hasBackupPackImportRights =#if ($xwiki.package) $xwiki.package.hasBackupPackImportRights()#else false#end; XWiki.hasRenderer = $services.rendering.availableRendererSyntaxes.contains($!doc.getSyntax()); window.docviewurl = "${doc.getURL('view')}"; window.docediturl = "${doc.getURL('edit')}"; window.docsaveurl = "${doc.getURL('save')}"; window.docgeturl = "${doc.getURL('get')}"; // ]]> </script>