Skip to content

Commit

Permalink
Build for release. 🚢 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
hlfcoding committed May 13, 2015
1 parent 26196fd commit 1e10dc4
Show file tree
Hide file tree
Showing 8 changed files with 589 additions and 616 deletions.
186 changes: 92 additions & 94 deletions release/jquery.extension.hlf.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,28 @@
/*
HLF Core jQuery Extension
=========================
Released under the MIT License
Written with jQuery 1.7.2
*/

(function() {
var slice = [].slice,
hasProp = {}.hasOwnProperty,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

(function(extension) {
if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
return define(['jquery', 'underscore'], extension);
(function(root, factory) {
if (typeof define === 'function' && (define.amd != null)) {
return define(['jquery', 'underscore'], factory);
} else if (typeof exports === 'object') {
return module.exports = factory(require('jquery', require('underscore')));
} else {
return extension(jQuery, _);
return factory(jQuery, _, jQuery.hlf);
}
})(function($, _) {
var _createPluginAPIAdditions, _createPluginInstance, _noConflicts, hlf, safeSet;
})(this, function($, _) {
var _createPluginAPIAdditions, _createPluginInstance, _noConflicts, _safeSet, hlf;
hlf = {
debug: true,
toString: _.memoize(function(context) {
return 'hlf';
})
};
_noConflicts = [];
_.extend(hlf, {
}),
noConflict: function() {
var fn;
return ((function() {
Expand All @@ -38,83 +35,10 @@ Written with jQuery 1.7.2
}
return results;
})()).length;
},
debugLog: hlf.debug === false ? $.noop : (console.log.bind ? console.log.bind(console) : console.log)
});
_createPluginInstance = function($el, options, $context, namespace, apiClass, apiMixins, mixinFilter, createOptions) {
var $root, data, deep, finalOptions, instance, otherMixins;
data = $el.data(namespace.toString('data'));
finalOptions = options;
if ($.isPlainObject(data)) {
finalOptions = $.extend((deep = true), {}, options, data);
$root = $el;
} else if (createOptions.asSharedInstance) {
$root = $context;
} else {
$root = $el;
}
if (apiClass != null) {
instance = new apiClass($el, finalOptions, $context);
if (createOptions.baseMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.baseMixins)));
}
if (createOptions.apiMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.apiMixins)));
}
} else if (apiMixins != null) {
instance = {
$el: $el,
options: finalOptions
};
if (createOptions.baseMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.baseMixins)));
}
hlf.applyMixin(instance, namespace, apiMixins.base);
otherMixins = _.chain(apiMixins).filter(mixinFilter, instance).values().without(apiMixins.base).value();
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(otherMixins)));
}
if (createOptions.compactOptions === true) {
$.extend((deep = true), instance, finalOptions);
delete instance.options;
} else {
if (finalOptions.selectors != null) {
instance.selectors = finalOptions.selectors;
}
if (finalOptions.classNames != null) {
instance.classNames = finalOptions.classNames;
}
}
if (createOptions.autoSelect === true && _.isFunction(instance.select)) {
instance.select();
}
if (instance.cls !== $.noop) {
$root.addClass(instance.cls());
}
if (_.isFunction(instance.init)) {
instance.init();
} else if (apiClass == null) {
hlf.debugLog('ERROR: No `init` method on instance.', instance);
}
return $root.data(instance.attr(), instance);
};
_createPluginAPIAdditions = function(name, namespace) {
return {
evt: _.memoize(function(name) {
return "" + name + (namespace.toString('event'));
}),
attr: _.memoize(function(name) {
name = name != null ? "-" + name : '';
return namespace.toString('data') + name;
}),
cls: namespace.toString('class') === namespace.toString() ? $.noop : _.memoize(function(name) {
name = name != null ? "-" + name : '';
return namespace.toString('class') + name;
}),
debugLog: namespace.debug === false ? $.noop : function() {
return hlf.debugLog.apply(hlf, [namespace.toString('log')].concat(slice.call(arguments)));
}
};
};
hlf.debugLog = hlf.debug === false ? $.noop : (console.log.bind ? console.log.bind(console) : console.log);
_noConflicts = [];
_.extend(hlf, {
createPlugin: function(createOptions) {
var _noConflict, _plugin, apiAdditions, apiClass, apiMixins, deep, mixinFilter, name, namespace, plugin, safeName;
Expand Down Expand Up @@ -201,6 +125,80 @@ Written with jQuery 1.7.2
}
});
_.bindAll(hlf, 'createPlugin');
_createPluginInstance = function($el, options, $context, namespace, apiClass, apiMixins, mixinFilter, createOptions) {
var $root, data, deep, finalOptions, instance, otherMixins;
data = $el.data(namespace.toString('data'));
finalOptions = options;
if ($.isPlainObject(data)) {
finalOptions = $.extend((deep = true), {}, options, data);
$root = $el;
} else if (createOptions.asSharedInstance) {
$root = $context;
} else {
$root = $el;
}
if (apiClass != null) {
instance = new apiClass($el, finalOptions, $context);
if (createOptions.baseMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.baseMixins)));
}
if (createOptions.apiMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.apiMixins)));
}
} else if (apiMixins != null) {
instance = {
$el: $el,
options: finalOptions
};
if (createOptions.baseMixins != null) {
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(createOptions.baseMixins)));
}
hlf.applyMixin(instance, namespace, apiMixins.base);
otherMixins = _.chain(apiMixins).filter(mixinFilter, instance).values().without(apiMixins.base).value();
hlf.applyMixins.apply(hlf, [instance, namespace].concat(slice.call(otherMixins)));
}
if (createOptions.compactOptions === true) {
$.extend((deep = true), instance, finalOptions);
delete instance.options;
} else {
if (finalOptions.selectors != null) {
instance.selectors = finalOptions.selectors;
}
if (finalOptions.classNames != null) {
instance.classNames = finalOptions.classNames;
}
}
if (createOptions.autoSelect === true && _.isFunction(instance.select)) {
instance.select();
}
if (instance.cls !== $.noop) {
$root.addClass(instance.cls());
}
if (_.isFunction(instance.init)) {
instance.init();
} else if (apiClass == null) {
hlf.debugLog('ERROR: No `init` method on instance.', instance);
}
return $root.data(instance.attr(), instance);
};
_createPluginAPIAdditions = function(name, namespace) {
return {
evt: _.memoize(function(name) {
return "" + name + (namespace.toString('event'));
}),
attr: _.memoize(function(name) {
name = name != null ? "-" + name : '';
return namespace.toString('data') + name;
}),
cls: namespace.toString('class') === namespace.toString() ? $.noop : _.memoize(function(name) {
name = name != null ? "-" + name : '';
return namespace.toString('class') + name;
}),
debugLog: namespace.debug === false ? $.noop : function() {
return hlf.debugLog.apply(hlf, [namespace.toString('log')].concat(slice.call(arguments)));
}
};
};
_.extend(hlf, {
applyMixin: function(context, dependencies, mixin) {
var handlerNames, i, len, method, mixinToApply, name, onceMethods, prop;
Expand Down Expand Up @@ -345,7 +343,7 @@ Written with jQuery 1.7.2
}
}
});
safeSet = function(key, toContext, fromContext) {
_safeSet = function(key, toContext, fromContext) {
var _oldValue;
if (toContext == null) {
toContext = $;
Expand All @@ -359,12 +357,12 @@ Written with jQuery 1.7.2
return toContext[key] = _oldValue;
});
};
safeSet('applyMixin');
safeSet('applyMixins');
safeSet('createMixin');
safeSet('createPlugin');
safeSet('mixinOnceNames');
safeSet('mixins');
_safeSet('applyMixin');
_safeSet('applyMixins');
_safeSet('createMixin');
_safeSet('createPlugin');
_safeSet('mixinOnceNames');
_safeSet('mixins');
$.hlf = hlf;
return $.hlf;
});
Expand Down
14 changes: 7 additions & 7 deletions release/jquery.extension.hlf.event.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
/*
HLF Event jQuery Extension
==========================
Released under the MIT License
Written with jQuery 1.7.2
*/

(function() {
var slice = [].slice,
hasProp = {}.hasOwnProperty;

(function(extension) {
if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
return define(['jquery', 'underscore', 'hlf/jquery.extension.hlf.core'], extension);
(function(root, factory) {
if (typeof define === 'function' && (define.amd != null)) {
return define(['jquery', 'underscore', 'hlf/jquery.extension.hlf.core'], factory);
} else if (typeof exports === 'object') {
return module.exports = factory(require('jquery', require('underscore', require('hlf/jquery.extension.hlf.core'))));
} else {
return extension(jQuery, _, jQuery.hlf);
return factory(jQuery, _, jQuery.hlf);
}
})(function($, _, hlf) {
})(this, function($, _, hlf) {
$.extend(true, hlf, {
hoverIntent: {
debug: false,
Expand Down
5 changes: 5 additions & 0 deletions release/jquery.hlf.editable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
HLF Editable jQuery Plugin
==========================
There should be no css output from this file.
*/
14 changes: 7 additions & 7 deletions release/jquery.hlf.editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
/*
HLF Editable jQuery Plugin
==========================
Released under the MIT License
Written with jQuery 1.7.2
*/

(function() {
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

(function(plugin) {
if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
return define(['jquery', 'underscore', 'hlf/jquery.extension.hlf.core'], plugin);
(function(root, factory) {
if (typeof define === 'function' && (define.amd != null)) {
return define(['jquery', 'underscore', 'hlf/jquery.extension.hlf.core'], factory);
} else if (typeof exports === 'object') {
return module.exports = factory(require('jquery', require('underscore', require('hlf/jquery.extension.hlf.core'))));
} else {
return plugin(jQuery, _, jQuery.hlf);
return factory(jQuery, _, jQuery.hlf);
}
})(function($, _, hlf) {
})(this, function($, _, hlf) {
var mixins;
hlf.editable = {
debug: true,
Expand Down
19 changes: 13 additions & 6 deletions release/jquery.hlf.editable.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
HLF Editable jQuery Plugin
==========================
There should be no css output from this file.
*/

%skin-clear {
border-color: transparent;
Expand All @@ -6,6 +11,7 @@
outline-style: none;
}
}

%spacing-none {
margin: 0;
padding: 0;
Expand All @@ -16,10 +22,11 @@ $editable-inline-selectors: (
text:'.js-text',
input:'.js-input input'
);
@mixin editable-inline-skin ($style:clear,
$rule-color:black,
$hover-background-color:rgba(black, 0.1),
$selectors:$editable-inline-selectors)

@mixin editable-inline-skin ($style: clear,
$rule-color: black,
$hover-background-color: rgba(black, 0.1),
$selectors: $editable-inline-selectors)
{
@if $style == clear {
#{map-get($selectors, text)},
Expand All @@ -38,8 +45,8 @@ $editable-inline-selectors: (
}
}

@mixin editable-inline-layout ($width:160px,
$selectors:$editable-inline-selectors)
@mixin editable-inline-layout ($width: 160px,
$selectors: $editable-inline-selectors)
{
#{map-get($selectors, text)},
#{map-get($selectors, input)} {
Expand Down
38 changes: 5 additions & 33 deletions release/jquery.hlf.tip.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
.js-tip {
display: none;
position: absolute;
z-index: 9999; }
.js-tip > .js-tip-inner {
position: relative; }

.js-tip-inner > .js-tip-stem {
border-width: 0;
border-style: solid;
border-color: transparent;
background: none;
position: absolute;
width: 0;
height: 0; }
.js-tip-inner > .js-tip-content {
overflow: hidden;
position: relative; }

.js-tip-right.js-snap-tip-y-side .js-tip-stem, .js-tip-right .js-tip-stem {
left: 0; }
.js-tip-left.js-snap-tip-y-side .js-tip-stem, .js-tip-left .js-tip-stem {
right: 0; }
.js-tip-bottom.js-snap-tip-x-side .js-tip-stem, .js-tip-bottom .js-tip-stem {
top: 0; }
.js-tip-top.js-snap-tip-x-side .js-tip-stem, .js-tip-top .js-tip-stem {
bottom: 0; }
.js-snap-tip-x-side .js-tip-stem {
left: 50%;
border-color: transparent; }
.js-snap-tip-y-side .js-tip-stem {
top: 50%;
border-color: transparent; }
/*
HLF Tip jQuery Plugin
=====================
There should be no css output from this file.
*/
Loading

0 comments on commit 1e10dc4

Please sign in to comment.