Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ui-branch'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/asset/css/website/_common.scss
#	src/component/jmtoolbar/jmtoolbar.directive.js
#	src/component/jmtoolbar/jmtoolbar.scss
#	src/page/home/home.html
  • Loading branch information
ICELI committed Jun 9, 2017
2 parents 74d0b83 + 01518ac commit a937640
Show file tree
Hide file tree
Showing 211 changed files with 7,115 additions and 7,637 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion dep/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ require('angular-bindonce');
// lib from dep
require('./ng.element');
require('./security');
require('./angular-locale_zh-cn');
require('./angular-locale_zh-cn');
21 changes: 10 additions & 11 deletions dep/jmui/accordion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,42 @@ require('./index.scss');
document.createElement('jm-accordions');
document.createElement('jm-accordion');
angular.module('jmui.accordion', [])
.directive('jmAccordions', function () {
.directive('jmAccordions', function() {
return {
restrict: 'AE',
transclude: true,
replace: true,
template: '<div class="jm-accordions"><ul class="list-unstyled" ng-transclude></ul></div>',
controller: function () {
var accordions = [];
controller: function() {
var accordions = [];
// $scope.open = '123'
this.toggleAccrdion = function (accordion) {
angular.forEach(accordions, function (item) {
this.toggleAccrdion = function(accordion) {
angular.forEach(accordions, function(item) {
if (accordion !== item) {
item.open = false;
}
});
};

this.addAccordions = function (accordion) {
this.addAccordions = function(accordion) {
accordions.push(accordion);
};
},
link: function (scope, ele, attrs) {
}
link: function(scope, ele, attrs) {}
};
})
.directive('jmAccordion', function () {
.directive('jmAccordion', function() {
return {
restrict: 'AE',
require: '^jmAccordions',
template: '<li ng-class="{open: open}" class="jm-accordion" ><div ng-transclude></div></li>',
transclude: true,
replace: true,
compile: function () {
compile: function() {
return function postlink(scope, ele, attrs, ctrl) {
scope.open = false;
ctrl.addAccordions(scope);
scope.toggle = function () {
scope.toggle = function() {
scope.open = !scope.open;
ctrl.toggleAccrdion(scope);
};
Expand Down
57 changes: 38 additions & 19 deletions dep/jmui/accordion/index.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/* 手风琴*/

.jm-accordions {
border:1px solid #c9c9c9;
border: 1px solid #c9c9c9;
}

.jm-accordions .jm-accordion {
background: #fff;



.jm-accordion-title{
.jm-accordion-title {
position: relative;
padding-left: 30px;
}

.jm-icon-enter{
.jm-icon-enter {
position: absolute;
left: 10px;
transition: all .3s linear;
transition: all 0.3s linear;
}
}

.jm-accordions .jm-accordion + .jm-accordion {
border-top:1px solid #c9c9c9;
border-top: 1px solid #c9c9c9;
}

.jm-accordions .jm-accordion-title {
Expand All @@ -32,35 +31,55 @@
.jm-accordions .jm-accordion-content {
// display: none;
overflow: hidden;
border-top:1px solid #c9c9c9;
border-top: 1px solid #c9c9c9;
}

.jm-accordions .jm-accordion-content p {
padding: 20px;
}

.jm-accordions .jm-accordion.open {
.jm-icon-enter{
transform: rotate(90deg);
.jm-icon-enter {
transform: rotate(90deg);
}
}

.jm-accordions .jm-accordion.open .jm-accordion-content {
}
.jm-accordions .jm-accordion.open .jm-accordion-content {}

.jm-accordions.jm-accordions-vertical {
width: 800px;
}

.jm-accordion-content {
transition: all linear 0.3s;
opacity: 1;
height: 200px;
}

.jm-accordion-content.ng-hide {
opacity: 0;
}

.jm-accordion-content.ng-hide {}

.jm-accordion-content.ng-hide-add {
opacity: 1;
height: 200px;
display: block;
}

.jm-accordion-content.ng-hide-add.ng-hide-add-active {
opacity: 0;
height: 0;
}

.jm-accordion-content{ transition:all linear .3s; opacity:1; height: 200px; }
.jm-accordion-content.ng-hide{ opacity:0;}
.jm-accordion-content.ng-hide { }
.jm-accordion-content.ng-hide-add { opacity:1; height: 200px; display: block;}
.jm-accordion-content.ng-hide-add.ng-hide-add-active { opacity:0; height: 0; }
.jm-accordion-content.ng-hide-remove { opacity:0; height: 0; display: block;}
.jm-accordion-content.ng-hide-remove.ng-hide-remove-active {opacity:1; height: 200px; }
.jm-accordion-content.ng-hide-remove {
opacity: 0;
height: 0;
display: block;
}

.jm-accordion-content.ng-hide-remove.ng-hide-remove-active {
opacity: 1;
height: 200px;
}
6 changes: 3 additions & 3 deletions dep/jmui/alert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require("./index.scss");
document.createElement('jm-alert');
// alert 提示框
angular.module('jmui.alert', [])
.directive('jmAlert', function ($animate) {
.directive('jmAlert', function($animate) {
return {
restrict: 'AE',
transclude: true,
Expand All @@ -42,14 +42,14 @@ angular.module('jmui.alert', [])
scope: {
onClose: '&'
},
link: function (scope, element, attrs) {
link: function(scope, element, attrs) {
var type = attrs.type || 'success';
var closeFn = scope.onClose || angular.noop;
// 是否显示关闭按钮
scope.closable = scope.$eval(attrs.closable);
// 根据传入的类型添加相应风格的类
element.addClass('jm-alert-' + type);
scope.close = function ($event) {
scope.close = function($event) {
$animate.leave(element);
// 执行关闭钩子函数
closeFn({
Expand Down
116 changes: 58 additions & 58 deletions dep/jmui/alert/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,80 @@
@import "../style/mixins/_alerts";

.jm-alert {
padding: $alert-padding;
margin-bottom: $line-height-computed;
border: 1px solid transparent;
border-radius: $alert-border-radius;
position: relative;
padding: $alert-padding;
margin-bottom: $line-height-computed;
border: 1px solid transparent;
border-radius: $alert-border-radius;
position: relative;
transition: opacity 0.5s linear;

transition: opacity .5s linear;
&.ng-enter.ng-enter-active,
&.ng-leave {
opacity: 1;
}

&.ng-enter.ng-enter-active,
&.ng-leave{
opacity: 1;
}
&.ng-enter,
&.ng-leave-active {
opacity: 0;
}
// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing $headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}
// Improve alignment and spacing of inner content
> ul,
> p {
margin-bottom: 0;
}

&.ng-enter,
&.ng-leave-active{
opacity: 0;
}
> p + p {
margin-top: 5px;
}

.jm-alert__wrap {
display: table;
}

.jm-alert__content {
display: table-cell;
padding: 0 8px;
}

// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing $headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}
// Improve alignment and spacing of inner content
> p,
> ul {
margin-bottom: 0;
}
> p + p {
margin-top: 5px;
}
.jm-alert__wrap {
display: table;
}
.jm-alert__content {
display: table-cell;
padding: 0 8px;
}
.jm-alert-icon {
display: table-cell;
vertical-align: middle;
font-size: 26px;
}
.jm-alert__close {
font-size: 16px;
color: #fff;
opacity: 1;
top: 12px;
right: 15px;
position: absolute;
cursor: pointer;
}
.jm-alert-icon {
display: table-cell;
vertical-align: middle;
font-size: 26px;
}

.jm-alert__close {
font-size: 16px;
color: #fff;
opacity: 1;
top: 12px;
right: 15px;
position: absolute;
cursor: pointer;
}
}

.jm-alert-success {
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
}

.jm-alert-info {
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
}

.jm-alert-warning {
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
}

.jm-alert-danger {
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
}

Loading

0 comments on commit a937640

Please sign in to comment.