Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5405210582 for ; Tue, 29 Oct 2013 14:40:01 +0000 (UTC) Received: (qmail 31986 invoked by uid 500); 29 Oct 2013 14:38:39 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 31099 invoked by uid 500); 29 Oct 2013 14:37:51 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 29546 invoked by uid 99); 29 Oct 2013 14:35:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Oct 2013 14:35:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4E1C888AE02; Tue, 29 Oct 2013 14:35:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mmocny@apache.org To: commits@cordova.apache.org Date: Tue, 29 Oct 2013 14:35:39 -0000 Message-Id: <8b76b35dd7b84b86ab31ad61b909125c@git.apache.org> In-Reply-To: <07d364da931f4e2486436d5987e03ac7@git.apache.org> References: <07d364da931f4e2486436d5987e03ac7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/26] Adds an oppinionated plugin testing method http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/6984ce60/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/main.js ---------------------------------------------------------------------- diff --git a/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/main.js b/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/main.js new file mode 100755 index 0000000..6dcdbd8 --- /dev/null +++ b/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/main.js @@ -0,0 +1,44 @@ +window.onload = function(){ + var showCodeDivs = document.getElementsByClassName('showcode'); + for (var i = showCodeDivs.length - 1; i >= 0; i--) { + showCodeDivs[i].firstChild.onclick = function(e) { + var element = e.target.parentNode.nextSibling.nextSibling; + var style = window.getComputedStyle(element); + if(style.getPropertyValue('display') == 'none'){ + e.target.innerHTML = 'Hide code snippets'; + element.style.display = 'block'; + } else { + e.target.innerHTML = 'Show code snippets'; + element.style.display = 'none'; + } + return false; + }; + }; + var slideMenuButton = document.getElementById('slide-menu-button'); + slideMenuButton.onclick = function(e) { + var site = document.getElementById('site'); + var cl = site.classList; + if (cl.contains('open')) { + cl.remove('open'); + } else { + cl.add('open'); + } + }; + var docNavs = document.getElementsByClassName('docNav'); + for (var j = docNavs.length - 1; j >= 0; j--) { + docNavs[j].onchange = function(e){ + window.location.href = e.target[e.target.selectedIndex].value; + }; + }; + var pageNav = document.getElementById('pageNav'); + var pageLinks = pageNav.getElementsByTagName('a'); + for (var k = pageLinks.length - 1; k >= 0; k--) { + pageLinks[k].onclick = function(e) { + var site = document.getElementById('site'); + var cl = site.classList; + if (cl.contains('open')) { + cl.remove('open'); + } + }; + }; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/6984ce60/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/rainbow-custom.min.js ---------------------------------------------------------------------- diff --git a/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/rainbow-custom.min.js b/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/rainbow-custom.min.js new file mode 100755 index 0000000..a25e178 --- /dev/null +++ b/cordova-app-test-harness/www/assets/topcoat-0.7.5/demo/js/rainbow-custom.min.js @@ -0,0 +1,11 @@ +/* Rainbow v1.2 rainbowco.de | included languages: html, css */ +window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b=f[d][c])delete f[d][c],delete j[d][c];if(a>=c&&ac&&b'+b+""}function s(a,b,c,i){var e=a.exec(c);if(e){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=e[0],g=e.index,u=e[0].length+g,h=function(){function e(){s(a,b,c,i)}t%100>0?e():setTimeout(e,0)};if(C(g,u))h();else{var m=v(b.matches),l=function(a,c,i){if(a>=c.length)i(k);else{var d=e[c[a]];if(d){var g=b.matches[c[a]],f=g.language,h=g.name&&g.matches? +g.matches:g,j=function(b,d,g){var f;f=0;var h;for(h=1;h/g,">").replace(/&(?![\w\#]+;)/g, +"&"),b,c)}function o(a,b,c){if(b