Permalink
Browse files

2.1.1

  • Loading branch information...
1 parent 2a0a44e commit a47c646df8a4764fc0cb8d53aa7610a4691012c0 @WolfieZero committed Aug 10, 2012
Showing with 691 additions and 5,979 deletions.
  1. +82 −0 CHANGELOG.md
  2. +0 −63 README.md
  3. +6 −0 TODO.md
  4. +7 −13 index.html
  5. +32 −16 script/lib/dialog.js
  6. +0 −5,670 script/lib/leaflet.js
  7. +0 −76 script/lib/map.js
  8. +0 −7 script/main.js
  9. +301 −0 style-test.html
  10. +26 −23 style/css/main.css
  11. +69 −21 style/less/lib/config.less
  12. +23 −19 style/less/main.less
  13. +35 −0 style/less/scaffold/layout.less
  14. +110 −71 style/less/scaffold/normalize.less
View
@@ -0,0 +1,82 @@
+Change Log
+==========
+
+** v2.1.1 - 02/08/12 **
+
+* Removed leaflet.js and map.js
+* Changed `img` element in normalize.less to now resize on `max-width: 100%;`
+* Moved the changes to CHANGELOG.md
+* Made the button group a bit prettier again
+* That base.less really couldn't stick, went for layout.less for high-up layout stuffs
+
+
+** v2.1 - 08/06/12 **
+
+* Added base.less to scaffold to serve as a "go-to" .less file
+
+
+** v2.0 - 08/06/12 **
+
+* Re-throught the CSS system so it's stripped down to a customised [Normalize.css](http://necolas.github.com/normalize.css/) decleration
+* Added some standardised CSS/LESS documentation (based on [CSS_doc](https://github.com/imedo/css_doc) and a number of other languages documentation style)
+ * Use `/** ... */` for CSS with each line starting with ` *` (note the space)
+ * Use `/// ... //` for LESS with each new line starting with `//` (supresses it from CSS view)
+** Will provide a detailed document later on
+* Added `additional` folder into the `less` folder that's used for tranferable scripts such as for JS libraries
+* Kept the custom dialog boxes
+* Removed a lot of the boilerplate stuff as it is easier to add then to remove
+
+
+*******************************************************************************
+
+
+** v1.1.1 - 14/05/12 **
+
+* Moved dialog function to it's own file
+* Split out the dialog object to prototype objects for better performance - http://net.tutsplus.com/tutorials/javascript-ajax/stop-nesting-functions-but-not-all-of-them/
+* Moved some of the code in index.html around for better performace
+
+
+** v1.1 - 24/04/12 **
+
+* Removed `functions.js` as it seems pointless
+* Removed the `isset()` function as that also seems pointless and annoying when out of scope
+* Moved the `console` debugger to the index.html page as we want this globally avaliable
+* Made some major changes to the less/element/form.less as it
+* Added custom dialog boxes (need more felixablity these days)
+
+
+** v1.0.3 - 01/03/12 **
+
+* Added CodeKit import statement in main.js
+* CSS files compressed using YUI Compressor - http://developer.yahoo.com/yui/compressor/
+
+
+** v1.0.2 - 28/02/12 **
+
+* Changed the order some tags in the `head` of index.html for a better code flow
+* Added detail to the `isset()` function
+* Added jQuery check and local file (for check fails)
+* Renamed function.js => functions.js
+* Renamed image.less => images.less
+* Renamed tpyographical.less = > basic.less
+* Renamed base.less => init.less
+* Removed root slash from humans.txt file path
+* Removed author meta tag
+
+
+** v1.0.1 - 27/02/12 **
+
+* Added some extra definitions to `nav` to remove style by default
+
+
+** v1.0 - 27/02/12 **
+
+* The first full official release of Templatie.
+* Started logging changes
+* Officially released as v1
+* Improved the Scaffold structure
+* Started use of variable and function file to be include where needed (keeping it DRY)
+* Change some of the default type styles
+* Removed reliance on PHP for JavaScript pulling (simply HTML commenting used)
+* Added a JS script to make `console.log` safe for all browser us also globally switch on/off
View
@@ -1,76 +1,13 @@
Templatie
=========
-
-
Templatie is a boilerplate for HTML and CSS using LESS that will allow for
quicker development of projects with a few presets
Read more about Templatie at http://templatie.info/ (site needs updating).
-Changes
--------
-
-**v2.0 - 08/06/12**
-* Re-throught the CSS system so it's stripped down to a customised [Normalize.css](http://necolas.github.com/normalize.css/) decleration
-* Added some standardised CSS/LESS documentation (based on [CSS_doc](https://github.com/imedo/css_doc) and a number of other languages documentation style)
-** Use `/** ... */` for CSS with each line starting with ` *` (note the space)
-** Use `/// ... //` for LESS with each new line starting with `//` (supresses it from CSS view)
-** Will provide a detailed document later on
-* Added `additional` folder into the `less` folder that's used for tranferable scripts such as for JS libraries
-* Kept the custom dialog boxes
-* Removed a lot of the boilerplate stuff as it is easier to add then to remove
-
-
-**v1.1.1 - 14/05/12**
-* Moved dialog function to it's own file
-* Split out the dialog object to prototype objects for better performance - http://net.tutsplus.com/tutorials/javascript-ajax/stop-nesting-functions-but-not-all-of-them/
-* Moved some of the code in index.html around for better performace
-
-
-**v1.1 - 24/04/12**
-* Removed `functions.js` as it seems pointless
-* Removed the `isset()` function as that also seems pointless and annoying when out of scope
-* Moved the `console` debugger to the index.html page as we want this globally avaliable
-* Made some major changes to the less/element/form.less as it
-* Added custom dialog boxes (need more felixablity these days)
-
-
-**v1.0.3 - 1/03/12**
-* Added CodeKit import statement in main.js
-* CSS files compressed using YUI Compressor - http://developer.yahoo.com/yui/compressor/
-
-
-**v1.0.2 - 28/02/12**
-* Changed the order some tags in the `head` of index.html for a better code flow
-* Added detail to the `isset()` function
-* Added jQuery check and local file (for check fails)
-* Renamed function.js => functions.js
-* Renamed image.less => images.less
-* Renamed tpyographical.less = > basic.less
-* Renamed base.less => init.less
-* Removed root slash from humans.txt file path
-* Removed author meta tag
-
-
-**v1.0.1 - 27/02/12**
-* Added some extra definitions to `nav` to remove style by default
-
-
-**v1.0 - 27/02/12**
-* The first full official release of Templatie.
-* Started logging changes
-* Officially released as v1
-* Improved the Scaffold structure
-* Started use of variable and function file to be include where needed (keeping it DRY)
-* Change some of the default type styles
-* Removed reliance on PHP for JavaScript pulling (simply HTML commenting used)
-* Added a JS script to make `console.log` safe for all browser us also globally switch on/off
-
-
-
Useful Tools (for non node.js users)
-------------------------------------
- [CodeKit](http://incident57.com/codekit/) ( Mac )
View
@@ -0,0 +1,6 @@
+To Do
+=====
+
+* Add a correctly defined CSS/LSS documenting system
+
+* Build and minify script
View
@@ -15,41 +15,35 @@
<title></title>
<meta name="description" content="" />
</head>
-<body class="home">
-
+<body class="">
+ <!-- Main HTML -->
+
+
<!-- Inline JS -->
<script>
var jsDebugging = true,
_gaq = [['_setAccount','UA-XXXXX-X'],['_trackPageview']];
- /**
- * Console Debugging - to use console.* set `jsDebugging` to true
- */
+ // Console Debugging - to use console.* set `jsDebugging` to true
if (typeof console === 'undefined' || typeof jsDebugging === 'undefined') {
var console = { log: function() {} };
}else if (!jsDebugging || typeof console.log == "undefined") {
console.log = function() {};
}
</script>
- <!-- Define Javascript Libraries -->
+
+ <!-- Javascript -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script src="script/lib/dialog.js"></script>
- <!-- Define jQuery Plugins -->
-
-
-
- <!-- Define our CTA script -->
-
<script src="script/main.js"></script>
-
<!-- Asynchronous Google Analytics snippet - mathiasbynens.be/notes/async-analytics-snippet -->
<script>
(function(d,t){
View
@@ -8,10 +8,9 @@
*
* Usage
* -----
- * The first use, pass the function Dialog into a variable such as `dialog` (I
- * personally assign it globally).
*
- * `var dialog = new Dialog();`
+ * Once jQuery has been loaded the dialog box will initilise itself under the
+ * global varaible 'dialog'.
*
* Then you can call each function by doing the following commands.
*
@@ -25,34 +24,46 @@
* callbacks for the confirmation dialog (one for a positive answer and one for
* negative).
*
- *
+ *
+ * Requires
+ * --------
+ *
+ * - jQuery
*
*
* License
* -------
*
* Licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
- * (http://creativecommons.org/licenses/by-sa/3.0/)
+ * http://creativecommons.org/licenses/by-sa/3.0/
*/
-function Dialog() {
+/**
+ * Default constructor
+ */
+Dialog = function() {
this._body = $('body');
-
-}
+};
/*****************************************************************************/
/**
- * Alert Front End
- * Replacement alert box for the front end
+ * Alert box for the front end
* @param {object} obj The options for the alert box
* @return {bool} Returns true to show message was sent
*/
Dialog.prototype.alert = function(obj, callback) {
+ // if `obj` is a string then we need to make it an object again
+ if (obj.split) {
+ var message = obj;
+ obj = {};
+ obj.message = message;
+ }
+
if (obj.message === undefined) obj.message = 'Something happened';
if (obj.response === undefined) obj.response = 'Okay';
if (obj.type === undefined) obj.type = 'default';
@@ -70,7 +81,8 @@ Dialog.prototype.alert = function(obj, callback) {
this._body.append(html);
- fixPosition();
+ // Make sure the box is central
+ self.fixPosition();
$('.dialog-box').find('.btn').focus().on('click', function(e) {
e.preventDefault();
@@ -81,7 +93,7 @@ Dialog.prototype.alert = function(obj, callback) {
});
window.onresize = function() {
- fixPosition();
+ self.fixPosition();
};
};
@@ -91,8 +103,7 @@ Dialog.prototype.alert = function(obj, callback) {
/**
- * Custom ConfirmDialog
- * Replacement confirmation box for the front end
+ * Confirmation box for the front end
* @param {string} message The question to show
* @return {bool} Returns true or false depending on answer
*/
@@ -116,8 +127,11 @@ Dialog.prototype.confirm = function(obj, posCallback, negCallback) {
html += '</div></div>';
this._body.append(html);
+
+ // Focus on the button by default
$('input[tabindex=1]').focus();
+ // Make sure the box is central
fixPosition();
// What to do when the user picks an option
@@ -145,7 +159,6 @@ Dialog.prototype.confirm = function(obj, posCallback, negCallback) {
/**
- * Fix Position
* Fixes the dialog box's position on a page so that it appear central
* @return {bool} Return true
*/
@@ -156,4 +169,7 @@ Dialog.prototype.fixPosition = function() {
.css('left', parseInt( (window.innerWidth / 2) - (dialogBox.width()/2) - 20, 10) +'px')
.css('top', parseInt( (window.innerHeight / 2) - (dialogBox.height()/2) - 20, 10) +'px');
return true;
-};
+};
+
+
+/*****************************************************************************/
Oops, something went wrong.

0 comments on commit a47c646

Please sign in to comment.