r1328 - in trunk/src/static-site/resources: images images/logos js
Author: tchemit Date: 2012-08-31 12:12:04 +0200 (Fri, 31 Aug 2012) New Revision: 1328 Url: http://nuiton.org/repositories/revision/mavenpom/1328 Log: refs #2241: add logs + push back old js script (for the moment...) Added: trunk/src/static-site/resources/images/logos/ trunk/src/static-site/resources/images/logos/argouml-logo.png trunk/src/static-site/resources/images/logos/jaxx-logo.png trunk/src/static-site/resources/images/logos/jrst-logo.png trunk/src/static-site/resources/images/logos/maven-feather.png trunk/src/static-site/resources/images/logos/restructuredtext-logo.png trunk/src/static-site/resources/images/logos/struts2-logo.png trunk/src/static-site/resources/images/logos/topia-logo.png trunk/src/static-site/resources/images/logos/webstart.gif trunk/src/static-site/resources/js/maven-site-forge.codelutin.com.js Added: trunk/src/static-site/resources/images/logos/argouml-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/argouml-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/jaxx-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/jaxx-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/jrst-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/jrst-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/maven-feather.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/maven-feather.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/restructuredtext-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/restructuredtext-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/struts2-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/struts2-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/topia-logo.png =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/topia-logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/images/logos/webstart.gif =================================================================== (Binary files differ) Property changes on: trunk/src/static-site/resources/images/logos/webstart.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/static-site/resources/js/maven-site-forge.codelutin.com.js =================================================================== --- trunk/src/static-site/resources/js/maven-site-forge.codelutin.com.js (rev 0) +++ trunk/src/static-site/resources/js/maven-site-forge.codelutin.com.js 2012-08-31 10:12:04 UTC (rev 1328) @@ -0,0 +1,85 @@ +/* + * #%L + * EchoBase + * + * $Id: maven-site-forge.codelutin.com.js 536 2012-04-13 00:48:55Z tchemit $ + * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/src/site/resources/maven-s... $ + * %% + * Copyright (C) 2011 - 2012 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 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 Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +$(document).ready(function () { + + var metas = $('#projectMetas'); + var piwikEnabled = metas.attr('piwikEnabled'); + if (piwikEnabled) { + //Piwik Tracking Code + var piwikId = metas.attr('piwikId'); + if (!piwikId) { + + // default piwikId for forge.codelutin.com + piwikId = 4; + } + + console.log("use Piwik with id = " + piwikId); + var pkBaseURL = "https:" == document.location.protocol ? + "https://piwik.codelutin.com/" : + "http://piwik.codelutin.com/"; + $.getScript(pkBaseURL + "piwik.js", function (data, textStatus, jqxhr) { + var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", piwikId); + piwikTracker.trackPageView(); + piwikTracker.enableLinkTracking(); + console.log("piwikTracker loaded = " + piwikTracker); + }); + //Piwik Tracking Code + } + var scmwebeditorenabled = metas.attr('scmwebeditorenabled'); + var scm = metas.attr('scm'); + if (scmwebeditorenabled && scm.indexOf("/trunk") > -1) { + + // allow scmwebeditor is enabled and on trunk + + // remove scm prefix (scm:svn:) + scm = scm.replace('scm:svn:',''); + + var scmurl = metas.attr('scmwebeditorurl'); + var projectId = metas.attr('projectId'); + var siteSourcesType = metas.attr('siteSourcesType'); + var path; + var pathname = document.location.pathname; + if (pathname.indexOf('target/site') > 0) { + path = pathname.substr(pathname.indexOf('/site')). + replace('/site/', ''); + } else { + if (pathname == '/' + projectId + '/') { + // on / page + path = 'index.html'; + } else { + path = pathname.substr(pathname.indexOf('/' + projectId)). + replace('/' + projectId + '/', ''); + } + } + path = path.replace('.html', '.' + siteSourcesType); + var url = scmurl + "?address=" + scm + "/src/site/" + siteSourcesType + "/" + path; + console.log("Add scmwebeditor with url = " + url); + var html = "<li class='pull-right'><a href='" + url + + "'>Éditer la page</a></li>" + + "<li class='divider pull-right'>|</li>"; + var ul = $('#publishDate'); + ul.prepend(html); + + } +}); \ No newline at end of file
participants (1)
-
tchemit@users.nuiton.org