Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #59 from chrishumboldt/dev-chris
Browse files Browse the repository at this point in the history
Dev chris
  • Loading branch information
Chris Humboldt authored and Chris Humboldt committed Oct 1, 2014
2 parents bfe374a + 5efbd38 commit ba8c41a
Show file tree
Hide file tree
Showing 47 changed files with 606 additions and 1,311 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Webplate",
"version": "2.5.3",
"version": "2.5.4",
"homepage": "https://getwebplate.com",
"authors": [
"Chris Humboldt <chrismodem@gmail.com>"
Expand Down
67 changes: 33 additions & 34 deletions core/build/gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,55 +46,55 @@ module.exports = function(grunt) {
stack: {
files: {
'../../stack.js': [
'../js/web-engine.js'
'../js/engine.js'
]
}
},
// Imports
imports: {
files: {
'../js/min/web-imports.min.js': [
'../js/web-jquery.js',
'../js/web-modernizr.js',
'../js/web-hammer.js',
'../js/web-hammer-jquery.js',
'../js/web-velocity.js',
'../js/web-tools.js',
'../js/web-buttonplate.js',
'../js/web-formplate.js',
'../js/web-modalplate.js'
'../js/min/webplate.min.js': [
'../js/jquery.js',
'../js/modernizr.js',
'../js/hammer.js',
'../js/hammer-jquery.js',
'../js/velocity.js',
'../js/tools.js',
'../js/buttonplate.js',
'../js/formplate.js',
'../js/modalplate.js'
]
}
},
// Touch
touch: {
files: {
'../js/min/web-touch.min.js': [
'../js/web-fastclick.js'
'../js/min/touch.min.js': [
'../js/fastclick.js'
],
}
},
// LESS
less: {
files: {
'../js/min/web-less.min.js': [
'../js/web-less.js'
'../js/min/less.min.js': [
'../js/less.js'
],
}
},
// Flickerplate
flickerplate: {
files: {
'../js/min/web-flickerplate.min.js': [
'../js/web-flickerplate.js'
'../js/min/flickerplate.min.js': [
'../js/flickerplate.js'
],
}
},
// Penplate
penplate: {
files: {
'../js/min/web-penplate.min.js': [
'../js/web-penplate.js'
'../js/min/penplate.min.js': [
'../js/penplate.js'
],
}
},
Expand Down Expand Up @@ -135,40 +135,39 @@ module.exports = function(grunt) {
// End of CSS
// Scripts
stack: {
files: ['../js/web-engine.js'],
files: ['../js/engine.js'],
tasks: ['uglify:stack']
},
imports: {
files: [
'../js/web-jquery.js',
'../js/web-modernizr.js',
'../js/web-hammer.js',
'../js/web-hammer-jquery.js',
'../js/web-velocity.js',
'../js/web-tools.js',
'../js/web-buttonplate.js',
'../js/web-formplate.js',
'../js/web-modalplate.js'
'../js/jquery.js',
'../js/modernizr.js',
'../js/hammer.js',
'../js/hammer-jquery.js',
'../js/velocity.js',
'../js/tools.js',
'../js/buttonplate.js',
'../js/formplate.js',
'../js/modalplate.js'
],
tasks: ['uglify:imports']
},
touch: {
files: [
'../js/web-fastclick.js',
'../js/web-jquery-finger.js'
'../js/fastclick.js'
],
tasks: ['uglify:touch']
},
less: {
files: ['../js/web-less.js'],
files: ['../js/less.js'],
tasks: ['uglify:less']
},
flickerplate: {
files: ['../js/web-flickerplate.js'],
files: ['../js/flickerplate.js'],
tasks: ['uglify:flickerplate']
},
penplate: {
files: ['../js/web-penplate.js'],
files: ['../js/penplate.js'],
tasks: ['uglify:penplate']
},
project: {
Expand Down
2 changes: 1 addition & 1 deletion core/build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Webplate",
"version": "2.5.3",
"version": "2.5.4",
"description": "An awesome front-end javascript bootstrap that lets you stay focused on building your site or app all the while remaining really easy to use.",
"main": "../../index.html",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion core/css/webplate.css

Large diffs are not rendered by default.

Binary file removed core/img/flickerplate/arrow-left-dark.png
Binary file not shown.
Binary file removed core/img/flickerplate/arrow-left-light.png
Binary file not shown.
Binary file removed core/img/flickerplate/arrow-right-dark.png
Binary file not shown.
Binary file removed core/img/flickerplate/arrow-right-light.png
Binary file not shown.
Binary file removed core/img/flickerplate/arrows.png
Binary file not shown.
Binary file removed core/img/penplate/image.png
Binary file not shown.
Binary file removed core/img/penplate/link.png
Binary file not shown.
Binary file removed core/img/penplate/quote.png
Binary file not shown.
108 changes: 108 additions & 0 deletions core/js/buttonplate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* jQuery File: buttonplate.js
* Type: plugin
* Author: Chris Humboldt
* Last Edited: 1 October 2014
*/


// Plugin
;(function($, window, document, undefined)
{
// Plugin setup & settings
var $plugin_name = 'buttonplate', $defaults =
{
};

// The actual plugin constructor
function Plugin($element, $options)
{
this.element = $element;
this.settings = $.extend({}, $defaults, $options);
this._defaults = $defaults;
this._name = $plugin_name;

// Initilize plugin
this.init();
}

// Plugin
// ---------------------------------------------------------------------------------------
Plugin.prototype =
{
init : function()
{
// Variables
// ---------------------------------------------------------------------------------------
var $this = this;
var $settings = $this.settings;
var $button = $($this.element);


// Execute
// ---------------------------------------------------------------------------------------
fc_button_setup();


// Functions
// ---------------------------------------------------------------------------------------
// Button drop size
function fc_button_setup()
{
if($button.find('ul').length > 0)
{
$button.addClass('button-drop-down');
}
};
}
};


// Global calls
// ---------------------------------------------------------------------------------------
// On click show
$(document).on('click', '.button-drop-down', function()
{
var $button = $(this);
var $button_w = $button.outerWidth();

// Show drop down
$button.find('ul').width($button_w).fadeIn('fast', function()
{
$button.addClass('button-drop-down-open');
});
});

// Close drop-downs
$(document).on('click', function(){

$('.button-drop-down-open').removeClass('button-drop-down-open').find('ul').hide();
});

// On resize
$(window).resize(function()
{
$('.button-drop-down-open').removeClass('button-drop-down-open').find('ul').hide();
});


// Plugin wrapper
// ---------------------------------------------------------------------------------------
$.fn[$plugin_name] = function($options)
{
var $plugin;

this.each(function()
{
$plugin = $.data(this, 'plugin_' + $plugin_name);

if(!$plugin)
{
$plugin = new Plugin(this, $options);
$.data(this, 'plugin_' + $plugin_name, $plugin);
}
});

return $plugin;
};
})(jQuery, window, document);
2 changes: 1 addition & 1 deletion core/js/web-engine.js → core/js/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var $ar_extra_js = [];
// ---------------------------------------------------------------------------------------
yepnope([
{
load : $js_path + 'min/web-imports.min.js',
load : $js_path + 'min/webplate.min.js',
complete : function()
{
// DOM edits
Expand Down
File renamed without changes.
File renamed without changes.
65 changes: 34 additions & 31 deletions core/js/web-formplate.js → core/js/formplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery File: formplate.js
* Type: plugin
* Author: Chris Humboldt
* Last Edited: 23 September 2014
* Last Edited: 1 October 2014
*/


Expand Down Expand Up @@ -90,25 +90,6 @@
// Add handle to togglers
$('.fp-toggler').prepend('<span class="handle"></span>');

// Toggle on change
$('.formplate .fp-checkbox, .formplate .fp-toggler').on('click', function()
{
var $checkbox = $(this).find('input[type="checkbox"]');

// Check current state
if($(this).hasClass('checked'))
{
$checkbox.removeAttr('checked');
}
else
{
$checkbox.attr('checked', 'checked');
}

// Toggle the class
$(this).toggleClass('checked');
});

// Radio inputs
$('.formplate input[type="radio"]').each(function()
{
Expand All @@ -122,17 +103,6 @@
}
});

// Execute on change
$('.formplate input[type="radio"]').change(function()
{
// Check for all other similarly named elements
var $radio_name = $(this).attr('name');
$('input[name="'+ $radio_name +'"]').parents('.fp-radio').removeClass('checked');

// Check current one
$(this).parents('.fp-radio').toggleClass('checked');
});

// Drop-down selects
$('.formplate select').each(function()
{
Expand All @@ -143,6 +113,39 @@
};


// Global calls
// ---------------------------------------------------------------------------------------
// Change events
$(document).on('change', '.formplate input[type="radio"]', function()
{
// Check for all other similarly named elements
var $radio_name = $(this).attr('name');
$('input[name="'+ $radio_name +'"]').parents('.fp-radio').removeClass('checked');

// Check current one
$(this).parents('.fp-radio').toggleClass('checked');
});

// Click events
$(document).on('click', '.formplate .fp-checkbox, .formplate .fp-toggler', function()
{
var $checkbox = $(this).find('input[type="checkbox"]');

// Check current state
if($(this).hasClass('checked'))
{
$checkbox.removeAttr('checked');
}
else
{
$checkbox.attr('checked', 'checked');
}

// Toggle the class
$(this).toggleClass('checked');
});


// Plugin wrapper
// ---------------------------------------------------------------------------------------
$.fn[$plugin_name] = function($options)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion core/js/min/web-imports.min.js → core/js/min/webplate.min.js
100755 → 100644

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ba8c41a

Please sign in to comment.