Permalink
Browse files

removing php files and using pure html

  • Loading branch information...
1 parent 24026d5 commit 957e3658fddf8c23f48ece888dbb4c94a843004b @fabiomcosta committed Jun 21, 2012
Showing with 316 additions and 314 deletions.
  1. +17 −27 assets/js-spec/Builder.js
  2. +16 −17 index.html
  3. +36 −0 tests/tests.html
  4. +0 −31 tests/tests.php
  5. +247 −0 tests/visual-tests.html
  6. +0 −239 tests/visual-tests.php
View
@@ -1,38 +1,28 @@
/*
Script: Builder.js
- Automatically includes MooTools files right from the project folder.
+ Automatically includes MooTools files right from the project folder.
License:
- MIT-style license.
+ MIT-style license.
Note:
- If you use this script in your own page, you must be out of your mind.
+ If you use this script in your own page, you must be out of your mind.
*/
var Builder = {
- includeFiles: function(path, files){
- if( typeof files == 'object' && files.constructor != Array ){
- for(key in files){
- this.includeFiles(path + key + '/', files[key]);
- }
- }
- else if( typeof files == 'object' && files.constructor == Array ){
- for(var i=0; i< files.length; i++){
- this.includeJs(path + files[i]);
- }
- }
- else if( typeof files == 'string'){
- this.includeJs(path + files);
- }
- },
-
- includeJs: function(filePath){
- document.writeln('<script type="text/javascript" src="' + filePath + '.js?' + new Date().getTime() + '"></script>');
- },
-
- build: function(root, filesTree){
- this.includeFiles(root, filesTree);
- }
+ includeFiles: function(files){
+ for (var i=0; i< files.length; i++){
+ this.includeJs(files[i]);
+ }
+ },
+
+ includeJs: function(filePath){
+ document.writeln('<script type="text/javascript" src="' + filePath + '.js?' + new Date().getTime() + '"></script>');
+ },
+
+ build: function(files){
+ this.includeFiles(files);
+ }
-};
+};
View
@@ -1,17 +1,16 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>meioMask Options</title>
- </head>
- <body>
- <ul>
- <li><a title="visual-tests" href="tests/visual-tests.php">visual-tests jquery-1.2.6</a></li>
- <li><a title="tests" href="tests/tests.php">tests jquery-1.2.6</a></li>
- <li><a title="visual-tests" href="tests/visual-tests.php?version=1.3.2">visual-tests jquery-1.3.2</a></li>
- <li><a title="tests" href="tests/tests.php?version=1.3.2">tests jquery-1.3.2</a></li>
- <li><a title="docs" href="docs/index.php">docs</a></li>
- </ul>
- </body>
-</html>
+<!DOCTYPE HTML>
+
+<html lang="en">
+ <head>
+ <meta charset="utf-8"/>
+ <title>meioMask Options</title>
+ </head>
+ <body>
+ <ul>
+ <li><a title="visual-tests" href="tests/visual-tests.html">visual-tests jquery-1.2.6</a></li>
+ <li><a title="tests" href="tests/tests.html">tests jquery-1.2.6</a></li>
+ <li><a title="visual-tests" href="tests/visual-tests.html?version=1.3.2">visual-tests jquery-1.3.2</a></li>
+ <li><a title="tests" href="tests/tests.html?version=1.3.2">tests jquery-1.3.2</a></li>
+ </ul>
+ </body>
+</html>
View
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html lang="en">
+ <head>
+ <title>MeioMask jQuery Specs</title>
+ <meta charset="utf-8"/>
+
+ <link rel="stylesheet" type="text/css" media="screen" href="../assets/js-spec/Specs.css"/>
+ <script src="../assets/js-spec/JSSpec.js"></script>
+ <script src="../assets/js-spec/DiffMatchPatch.js"></script>
+ <script src="../assets/js-spec/Builder.js"></script>
+
+ <script>
+ (function() {
+ var sources = [
+ '../source/jquery.meio.mask',
+ '../tests/meio/jquery.meio.mask'
+ ];
+
+ var jQueryVersion = location.search.match(/[&?]version=([\d.]+)(?:&|$)/);
+
+ if (!jQueryVersion) {
+ jQueryVersion = '1.2.6';
+ sources.unshift('../assets/jquery/jquery.metadata');
+ } else {
+ jQueryVersion = jQueryVersion[1];
+ }
+
+ sources.unshift('../assets/jquery/jquery-'+ jQueryVersion);
+
+ Builder.build(sources);
+ }());
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
View
@@ -1,31 +0,0 @@
-
-<?php $version = isset($_GET['version'])? $_GET['version']: '1.2.6'; ?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>MeioMask jQuery Specs</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
- <link rel="stylesheet" type="text/css" media="screen" href="../assets/js-spec/Specs.css" />
- <script type="text/javascript" src="../assets/js-spec/JSSpec.js"></script>
- <script type="text/javascript" src="../assets/js-spec/DiffMatchPatch.js"></script>
- <script type="text/javascript" src="../assets/js-spec/Builder.js"></script>
-
- <script type="text/javascript" src="../assets/jquery/jquery-<?php echo $version; ?>.js"></script>
- <?php if ($version=='1.2.6'): ?>
- <script type="text/javascript" src="../assets/jquery/jquery.metadata.js"></script>
- <?php endif; ?>
-
- <script type="text/javascript" charset="utf-8">
- Builder.build('../', {
- source: ['jquery.meio.mask'],
- tests: {
- 'meio': ['jquery.meio.mask']
- }
- });
- </script>
- </head>
- <body>
- </body>
-</html>
Oops, something went wrong.

0 comments on commit 957e365

Please sign in to comment.