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

Commit

Permalink
chore(build): Build v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlee44 committed Nov 14, 2014
1 parent ca3b244 commit 8730383
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 3,284 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# v0.5.0 (2014/11/13)
## Bug Fixes
- **core:** Fixed val not getting initialized correctly
([c6eba169](https://github.com/angular-macgyver/MacGyver/commit/c6eba16908a9c73b36b19cf6b909f44af65f41e4))
- **macAutocomplete:** Fixed ng-class getting set to null string when no class is provided
([013111f9](https://github.com/angular-macgyver/MacGyver/commit/013111f905eca1f870f7a5c719be96727c33557d))
- **macPopover:** Fixed compile issue replacing original popover element with comments
([fc84089b](https://github.com/angular-macgyver/MacGyver/commit/fc84089bc2e5fbb2bdd9ecf4ac7391a0d96edcdc))

## Optimizations
- **Mac:** Removed jQuery dependencies
([174d60c1](https://github.com/angular-macgyver/MacGyver/commit/174d60c12326e9385062d656dde88704d346dd2b),
[#7](https://github.com/angular-macgyver/MacGyver/issues/7))
- **MacGyver:** Converted directive templates to html
([ca7d32f8](https://github.com/angular-macgyver/MacGyver/commit/ca7d32f85a31b1956c7485255524b37c23f3b488))
- **macSpinner:** Updated to work without jQuery
([ed6292b3](https://github.com/angular-macgyver/MacGyver/commit/ed6292b31a67f0aae1c46af29c497b18437a364d))
- **macTagAutocomplete:** Removed ng-click on reduce digest cycle
([dc429cb6](https://github.com/angular-macgyver/MacGyver/commit/dc429cb6e3908f159e596a7dce670e1127e47c9f))

## Breaking Changes
- **macDatepicker:** macDatepicker has been moved to a separate module. In order to continue to use macDatepicker, please visit https://github.com/angular-macgyver/macgyver-datepicker
([d9438ec4](https://github.com/angular-macgyver/MacGyver/commit/d9438ec48f35a1b011e8f274673502e13fa68248),
[#6](https://github.com/angular-macgyver/MacGyver/issues/6))


# v0.4.0 (2014/9/29)
## Breaking Changes
- **macTable:** Table view has been removed from core MacGyver In order to continue using table view, please visit: https://github.com/angular-macgyver/macgyver-table
Expand Down
13 changes: 2 additions & 11 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"name": "MacGyver",
"version": "0.4.0",
"version": "0.5.0",
"main": [
"lib/img/ui-bg_flat_0_aaaaaa_40x100.png",
"lib/img/ui-bg_glass_75_ffffff_1x400.png",
"lib/img/ui-icons_222222_256x240.png",
"lib/img/ui-icons_2e83ff_256x240.png",
"lib/img/ui-icons_454545_256x240.png",
"lib/img/ui-icons_888888_256x240.png",
"lib/img/ui-icons_cd0a0a_256x240.png",
"lib/img/ui-icons_f6cf3b_256x240.png",
"lib/macgyver-core.js",
"lib/macgyver-datepicker.js",
"lib/macgyver-filters.js",
"lib/macgyver-string-filter.js",
"lib/macgyver.css",
Expand Down Expand Up @@ -39,4 +30,4 @@
"angular-animate": "~1.2.0",
"underscore.string": "~2.3.3"
}
}
}
52 changes: 35 additions & 17 deletions lib/macgyver-core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* MacGyver v0.4.0
* MacGyver v0.5.0
* @link http://angular-macgyver.github.io/MacGyver
* @license MIT
*/
Expand Down Expand Up @@ -63,10 +63,11 @@ getWindow = function(element) {
};

augmentWidthOrHeight = function(element, name, extra, isBorderBox, styles) {
var i, start, _i;
var i, start, val, _i;
if (extra === (isBorderBox ? "border" : "content")) {
return 0;
}
val = 0;
start = name === "Width" ? 1 : 0;
for (i = _i = start; _i <= 3; i = _i += 2) {
if (extra === "margin") {
Expand Down Expand Up @@ -775,7 +776,7 @@ angular.module("Mac").directive("macAutocomplete", [
"$animate", "$compile", "$filter", "$http", "$parse", "$rootScope", "$timeout", "keys", function($animate, $compile, $filter, $http, $parse, $rootScope, $timeout, keys) {
return {
restrict: "EA",
template: "<input type=\"text\"/>",
template: "<input type=\"text\">",
transclude: true,
replace: true,
require: "ngModel",
Expand Down Expand Up @@ -815,7 +816,7 @@ angular.module("Mac").directive("macAutocomplete", [
};
menuEl = angular.element(document.createElement("mac-menu"));
menuEl.attr({
"ng-class": attrs.macMenuClass || null,
"ng-class": attrs.macMenuClass || "",
"mac-menu-items": "items",
"mac-menu-select": "select(index)",
"mac-menu-index": "index"
Expand Down Expand Up @@ -1129,7 +1130,7 @@ angular.module("Mac").directive("macMenu", [
return {
restrict: "EA",
replace: true,
template: "<div ng-style=\"style\" class=\"mac-menu\"><ul><li mac-menu-transclude=\"mac-menu-transclude\" ng-repeat=\"item in items\" ng-click=\"selectItem($index)\" ng-class=\"{'active': $index == index}\" ng-mouseenter=\"setIndex($index)\" class=\"mac-menu-item\"></li></ul></div>",
template: "<div ng-style=\"style\" class=\"mac-menu\"> <ul> <li class=\"mac-menu-item\" ng-class=\"{'active': $index == index}\" ng-click=\"selectItem($index)\" ng-mouseenter=\"setIndex($index)\" ng-repeat=\"item in items\" mac-menu-transclude=\"mac-menu-transclude\"> </li> </ul></div>",
transclude: true,
controller: angular.noop,
scope: {
Expand Down Expand Up @@ -2072,10 +2073,10 @@ angular.module("Mac").directive("macPopover", [
angular.extend(opts, {
template: element.html()
});
element.replaceWith(document.createComment("macPopover: " + attrs.id));
return function($scope, element, attrs) {
return attrs.$observe("id", function(value) {
return popover.register(value, opts);
popover.register(value, opts);
return element.replaceWith(document.createComment("macPopover: " + attrs.id));
});
};
}
Expand Down Expand Up @@ -2502,8 +2503,9 @@ angular.module("Mac").directive("macSpinner", [
replace: true,
template: "<div class=\"mac-spinner\"></div>",
compile: function(element, attrs) {
var animateCss, bar, degree, delay, i, prefixes, styl, transformCss, vendor, _i;
var animateCss, bar, bars, degree, delay, i, prefixes, styl, transformCss, updateBars, vendor, _i;
prefixes = ["webkit", "Moz", "ms", "O"];
bars = [];
vendor = function(el, name) {
var prefix, _i, _len;
name = util.capitalize(name);
Expand All @@ -2515,28 +2517,44 @@ angular.module("Mac").directive("macSpinner", [
}
return name;
};
updateBars = function(propertyName, value) {
var bar, property, propertyValue, _i, _len, _results;
if (angular.isObject(propertyName)) {
for (property in propertyName) {
propertyValue = propertyName[property];
updateBars(property, propertyValue);
}
return;
}
_results = [];
for (_i = 0, _len = bars.length; _i < _len; _i++) {
bar = bars[_i];
_results.push(bar.style[propertyName] = value);
}
return _results;
};
animateCss = vendor(element[0], "animation");
transformCss = vendor(element[0], "transform");
for (i = _i = 0; _i <= 9; i = ++_i) {
delay = i * 0.1 - 1 + (!i);
degree = i * 36;
styl = {};
bar = angular.element("<div class=\"bar\"></div>");
bars.push(bar[0]);
styl[animateCss] = "fade 1s linear infinite " + delay + "s";
styl[transformCss] = "rotate(" + degree + "deg) translate(0, 130%)";
bar.css(styl);
element.append(bar);
}
return function($scope, element, attrs) {
var bars, defaults, setSpinnerSize;
var defaults, setSpinnerSize;
defaults = {
size: 16,
zIndex: "inherit",
color: "#2f3035"
};
bars = angular.element(element[0].getElementsByClassName("bar"));
setSpinnerSize = function(size) {
bars.css({
updateBars({
height: size * 0.32 + "px",
left: size * 0.445 + "px",
top: size * 0.37 + "px",
Expand Down Expand Up @@ -2569,11 +2587,11 @@ angular.module("Mac").directive("macSpinner", [
if (attrs.macSpinnerColor != null) {
return attrs.$observe("macSpinnerColor", function(value) {
if ((value != null) && value) {
return bars.css("background", value);
return updateBars("background", value);
}
});
} else {
return bars.css("background", defaults.color);
return updateBars("background", defaults.color);
}
};
}
Expand Down Expand Up @@ -2630,7 +2648,7 @@ angular.module("Mac").directive("macTagAutocomplete", [
"$parse", "$timeout", "keys", "util", function($parse, $timeout, keys, util) {
return {
restrict: "E",
template: "<div ng-click=\"focusTextInput()\" class=\"mac-tag-autocomplete\"><ul class=\"mac-tag-list\"><li ng-repeat=\"tag in selected\" class=\"mac-tag mac-label\"><div ng-click=\"selected.splice($index, 1)\" class=\"mac-tag-close\">&times;</div><span class=\"tag-label\">{{getTagLabel(tag)}}</span></li><li ng-class=\"{'fullwidth': !selected.length}\" class=\"mac-tag mac-input-tag\"><mac-autocomplete ng-model=\"textInput\" mac-autocomplete-disabled=\"disabled\" mac-autocomplete-on-select=\"onSelect(selected)\" mac-autocomplete-on-success=\"onSuccess(data)\" mac-placeholder=\"autocompletePlaceholder\" ng-keydown=\"onKeyDown($event)\" class=\"text-input mac-autocomplete\"></mac-autocomplete></li></ul></div>",
template: "<div class=\"mac-tag-autocomplete\"> <ul class=\"mac-tag-list\"> <li ng-repeat=\"tag in selected\" class=\"mac-tag mac-label\"> <div ng-click=\"selected.splice($index, 1)\" class=\"mac-tag-close\">&times;</div> <span class=\"tag-label\">{{getTagLabel(tag)}}</span> </li> <li ng-class=\"{'fullwidth': !selected.length}\" class=\"mac-tag mac-input-tag\"> <mac-autocomplete class=\"text-input mac-autocomplete\" ng-keydown=\"onKeyDown($event)\" ng-model=\"textInput\" mac-autocomplete-disabled=\"disabled\" mac-autocomplete-on-select=\"onSelect(selected)\" mac-autocomplete-on-success=\"onSuccess(data)\" mac-placeholder=\"autocompletePlaceholder\"></mac-autocomplete> </li> </ul></div>",
replace: true,
priority: 800,
scope: {
Expand Down Expand Up @@ -2682,11 +2700,11 @@ angular.module("Mac").directive("macTagAutocomplete", [
return $scope.textInput = value;
});
}
$scope.focusTextInput = function() {
element.bind("click", function() {
var textInputDOM;
textInputDOM = element[0].getElementsByClassName("mac-autocomplete");
return textInputDOM[0].focus();
};
});
$scope.getTagLabel = function(tag) {
if (labelKey) {
return labelGetter(tag);
Expand Down Expand Up @@ -2885,7 +2903,7 @@ angular.module("Mac").directive("macTime", [
restrict: "E",
require: "ngModel",
replace: true,
template: "<input type=\"text\" maxlength=\"8\" class=\"mac-date-time\"/>",
template: "<input class=\"mac-date-time\" type=\"text\" maxlength=\"8\">",
link: function($scope, element, attrs, ngModelCtrl) {
var getSelection, incrementHour, incrementMinute, initializeTime, opts, selectHours, selectMeridian, selectMinutes, selectNextSection, selectPreviousSection, selectRange, setMeridian, time, timeValidator, toggleMeridian, updateInput, updateTime;
opts = util.extendAttributes("macTime", defaults, attrs);
Expand Down
2 changes: 1 addition & 1 deletion lib/macgyver-filters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* MacGyver v0.4.0
* MacGyver v0.5.0
* @link http://angular-macgyver.github.io/MacGyver
* @license MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/macgyver-string-filter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* MacGyver v0.4.0
* MacGyver v0.5.0
* @link http://angular-macgyver.github.io/MacGyver
* @license MIT
*/
Expand Down
Loading

0 comments on commit 8730383

Please sign in to comment.