Skip to content

Commit 14a4088

Browse files
author
Matteo Rossi
committed
v0.2.7
v0.2.7 In notification theme hide header if close=false
1 parent 4713c82 commit 14a4088

7 files changed

+22
-12
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# mrFeedback - 0.2.6
1+
# mrFeedback - 0.2.7
22

33
`mrFeedback` - Create box feedback for your Angular App: simple, complete, personalized. With this plugin you can create and show a "box feedback" to the user. You can set "title" and "message" to show, add buttons that run connected functions when clicked, ecc... With new theme "notification" you could use it for real time notification too!
44

55
## Installation
6-
* Download the latest release: [v0.2.6](https://github.com/teorossi82/mrFeedback/archive/master.zip)
6+
* Download the latest release: [v0.2.7](https://github.com/teorossi82/mrFeedback/archive/master.zip)
77
* Clone the repository: `git clone https://github.com/teorossi82/mrFeedback.git`
88
* Install with [Bower](http://bower.io): `bower install mrFeedback`
99

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mrFeedback",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"homepage": "http://teorossi82.github.io/mrFeedback/",
55
"authors": [
66
"Matteo Rossi <teorossi82@yahoo.it>"

build/mrFeedback.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
mrFeedback v0.2.4
2+
mrFeedback v0.2.7
33
(c) 2010-2016 Matteo Rossi, https://it.linkedin.com/in/matteorossi2,
44
License: MIT
55
*/
@@ -71,7 +71,7 @@
7171
'<i class="fa fa-exclamation-triangle"></i>' +
7272
'</div>' +
7373
'<div class="box-content">' +
74-
'<div class="box-header">' +
74+
'<div class="box-header" ng-if="mrFeedback.showHeader">' +
7575
'<div class="title">' +
7676
'{{mrFeedback.feedback.title}}' +
7777
'</div>' +
@@ -191,6 +191,11 @@
191191
};
192192
var animation = vm.feedback && vm.feedback.animation ? "animation-" + vm.feedback.animation : "animation-fade";
193193
vm.notificationType = vm.feedback && vm.feedback.theme === "notification" ? vm.feedback.notificationType || "" : "";
194+
var detectShowHeader = function(){
195+
var show = vm.feedback && vm.feedback.theme === "notification" ? vm.feedback.close ? true : false : true;
196+
return show;
197+
};
198+
vm.showHeader = detectShowHeader();
194199
vm.close = function(){
195200
if(vm.feedback.fnClose){
196201
var params = vm.feedback.fnClose.params;
@@ -255,6 +260,11 @@
255260
}
256261
//}
257262
});
263+
$scope.$watch("mrFeedback.feedback.close",function(newVal,oldVal){
264+
if(newVal!== oldVal){
265+
vm.showHeader = detectShowHeader();
266+
}
267+
});
258268
render();
259269
}
260270
})();

build/mrFeedback.less

+4-4
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,16 @@
550550
}
551551
}
552552
&.warning{
553-
background: @warning-color;
553+
background: fade(@warning-color,70%);
554554
}
555555
&.danger{
556-
background: @danger-color;
556+
background: fade(@danger-color,70%);
557557
}
558558
&.info{
559-
background: @info-color;
559+
background: fade(@info-color,70%);
560560
}
561561
&.success{
562-
background: @success-color;
562+
background: fade(@success-color,70%);
563563
}
564564
}
565565
}

dist/mrFeedback.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mrFeedback.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mr-feedback",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "is a component which you can create and show a 'box feedback' to the user. You can set 'title' and 'message' to show, add button that clicked trigger function that you pass it, ecc...",
55
"main": "dist/mrFeedback.js",
66
"scripts": {

0 commit comments

Comments
 (0)