Skip to content

Commit 3e17ebe

Browse files
committed
Dependencies: Adding toaster notification library.
1 parent 926595f commit 3e17ebe

6 files changed

Lines changed: 17 additions & 21 deletions

File tree

Gruntfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = function (grunt) {
1313
'/* https://github.com/evoluteur/evolutility */\n',
1414

1515
bannerDependencies: '/*\n <%= pkg.name %> v<%= pkg.version %> dependencies: \n' +
16-
' bootstrap 3.3.4, jquery 2.1.4, backbone 1.1.2, backbone.localStorage v1.1.7, underscore 1.8.3, d3 3.5.5, bootstrap-datepicker" 1.4.0, select2 3.5.2. \n*/\n',
16+
' bootstrap 3.3.4, jquery 2.1.4, backbone 1.1.2, backbone.localStorage v1.1.7, underscore 1.8.3, d3 3.5.5, bootstrap-datepicker" 1.4.0, select2 3.5.2, toastr 2.1.1. \n*/\n',
1717

1818
// *************************************************************************************
1919
// CONCAT
@@ -49,7 +49,8 @@ module.exports = function (grunt) {
4949

5050
// Widgets
5151
'bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js',
52-
'bower_components/select2/select2.js'
52+
'bower_components/select2/select2.js',
53+
'bower_components/toastr/toastr.js'
5354
],
5455
dest: '<%= pkg.target %>/dependencies.js'
5556
},

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ More Views will be added in the future (thinking of Summary, Import, Mass update
161161

162162
## UI-model
163163

164-
Views are not defined in templates but configured with a UI-model using [vocabulary](http://evoluteur.github.io/evolutility/doc/ui-model.html) with words like "field", "panel" and "tab" rather than "INPUT" and "DIV" to describe UI elements.
164+
Views are not defined in templates but configured with a UI-model using a [vocabulary](http://evoluteur.github.io/evolutility/doc/ui-model.html) with words like "field", "panel" and "tab" rather than "INPUT" and "DIV" to describe UI elements.
165165

166166
Here is the UI-model used to configure all views for the ["Graphic Novels" app demo](http://evoluteur.github.io/evolutility/demo/index.html#comics/cards):
167167

@@ -297,7 +297,8 @@ Javascript, HTML5, CSS3,
297297
[D3.js] (http://d3js.org),
298298
[Bootstrap] (http://getbootstrap.com/),
299299
[Bootstrap-datepicker] (http://eternicode.github.io/bootstrap-datepicker/),
300-
[Select2] (http://ivaynberg.github.io/select2/).
300+
[Select2] (http://ivaynberg.github.io/select2/),
301+
[Toastr] (https://github.com/CodeSeven/toastr).
301302

302303
Note: For convenience, all dependencies are minified together in a single file "dependencies.min.js". The dependencies list is specified in "Gruntfile.js".
303304

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"d3": "3.5.5",
1616
"bootstrap": "3.3.4",
1717
"bootstrap-datepicker": "1.4.0",
18-
"select2": "3.5.2"
18+
"select2": "3.5.2",
19+
"toastr": "2.1.1"
1920
},
2021
"repository": {
2122
"type": "git",

doc/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ <h3>Code</h3>
113113
<a href="http://jquery.com" target="jq">jQuery</a>,
114114
<a href="http://d3js.org" target="d3">D3.js</a>,
115115
<a href="http://getbootstrap.com/" target="b">Bootstrap</a>,
116-
and some UI widgets: <a href="http://ivaynberg.github.io/select2/" target="s2">Select2</a>,
117-
<a href="http://eternicode.github.io/bootstrap-datepicker/" target="bdp">bootstrap-datepicker</a>.
116+
and a few UI widgets: <a href="http://ivaynberg.github.io/select2/" target="s2">Select2</a>,
117+
<a href="http://eternicode.github.io/bootstrap-datepicker/" target="bdp">bootstrap-datepicker</a>,
118+
<a href="https://github.com/CodeSeven/toastr" target="toast">toastr</a>.
118119
</p>
119120

120121
<p>The code is available at <a href="https://github.com/evoluteur/evolutility" target="download">GitHub</a> under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="agpl">AGPL V3</a> license.</p>

js/dico/toolbar.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -761,15 +761,8 @@ return Backbone.View.extend({
761761
},
762762

763763
setMessage: function(title, content, style){
764-
var $msg=this.$('[data-id="msg"]');
765-
if($msg.length){
766-
$msg.attr('class', 'evo-msg alert alert-'+style+' alert-dismissable');
767-
$msg.find('>strong').text(title);
768-
$msg.find('>span').eq(0).html(content); //TODO text ?
769-
$msg.show();
770-
}else{
771-
$(eUI.HTMLMsg(title, ' '+content, style)).insertAfter(this.$el.children()[0]);
772-
}
764+
toastr.options.closeButton = true;
765+
toastr[style](content, title);
773766
return this;
774767
},
775768

less/dependencies.less

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
/*!
2-
* evolutility dependencies:
3-
* bootstrap v3.3.4, bootstrap-datepicker v1.4.0, select2 v3.5.2.
4-
*/
1+
// evolutility dependencies:
2+
// bootstrap v3.3.4, bootstrap-datepicker v1.4.0, select2 v3.5.2, toastr 2.1.1.
53

64
//Bootstrap customized
75

@@ -58,8 +56,9 @@
5856

5957
// Widgets
6058
@import '../bower_components/bootstrap-datepicker/less/datepicker3';
59+
@import '../bower_components/toastr/toastr';
6160
@import (less) '../bower_components/select2/select2.css';
6261
@import (less) '../bower_components/select2/select2-bootstrap.css';
63-
// for select2 v4.0 use the line below instead of the line above.
62+
// if select2 v4.0 use the line below instead of the line above.
6463
// @import (less) '../bower_components/select2/dist/css/select2.css';
6564

0 commit comments

Comments
 (0)