Sha256: 3bff6b3595f43cbb5f06aa4ea8ef599c60405957f1ef2afd185f13026f809cb1

Contents?: true

Size: 1.45 KB

Versions: 8

Compression:

Stored size: 1.45 KB

Contents

'use strict';define(['jquery'],function($){return function EditController(){var OXYGEN='https://www.oxygenxml.com/oxygen-xml-web-author/app/oxygen.html';var PROJECT_BASE='github://getFileContent/dita-ot/docs/';var PROJECT_MAP='userguide-book.ditamap';var PROJECT_BRANCH='develop';return{createEditLink:createEditLink};function createEditLink(){var $link=$('#editLink');if(location.pathname.indexOf('/dev/')!=-1&&$('.generated').length===0){var url=void 0;if(document.querySelector('.generated')){url=getEditURL(PROJECT_BRANCH,PROJECT_MAP);}else{var htmlURL=location.pathname.substring(location.pathname.indexOf('/dev/'));var file=htmlURL.endsWith('.html')?htmlURL.slice('/dev/'.length,htmlURL.length-'.html'.length)+'.dita':htmlURL.slice('/dev/'.length,htmlURL.length)+'index.dita';if(file.indexOf('/first-build-')!=-1){file=file.replace('first-build-','');}if(file.indexOf('/build-')!=-1){file=file.replace('build-','');}url=getEditURL(PROJECT_BRANCH,file,PROJECT_MAP);}if($link.length===0){$link=$('<a class="btn btn-success pull-right" id="editLink" target="_blank" title="Edit this page on GitHub to help improve the docs"><span class="glyphicon glyphicon-pencil"></span> Edit this page</a>');$('.dev-docs-banner').append($link);}$link.attr('href',url);}else{$link.remove();}}function getEditURL(branch,file,map){var url=OXYGEN+'?url='+encodeURIComponent(PROJECT_BASE+branch+'/'+file);if(map){url=url+'&ditamap='+encodeURIComponent(PROJECT_BASE+branch+'/'+map);}return url;}};});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cms-dita-jekyll-theme-0.1.7 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.6 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.5 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.4 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.3 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.2 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.1 assets/js/lib/EditController.js
cms-dita-jekyll-theme-0.1.0 assets/js/lib/EditController.js