Skip to content

Commit c1146d7

Browse files
committed
Follow up on bootstrap.notify, docs and minor issues
1 parent 483b7d5 commit c1146d7

File tree

7 files changed

+39
-32
lines changed

7 files changed

+39
-32
lines changed

admin/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h4>${option.name|encodeForHTML}</h4>
280280
{elseif element.type === "internationalizableText"}
281281
<div class="admin-internationalizable-text-container">
282282
<div class="form-group">
283-
<label for="${configPath|encodeForHTMLAttribute}" class="control-label col-xs-12 col-sm-3 col-md-3">Choose terms and conditions language to change</label>
283+
<label for="${configPath|encodeForHTMLAttribute}" class="control-label col-xs-12 col-sm-3 col-md-3">Choose language to change</label>
284284
<div class="col-xs-12 col-sm-9 col-md-9">
285285
<select class="admin-internationalizabletext-language-picker form-control" id="${configPath|encodeForHTMLAttribute}">
286286
<option value="default">Default</option>

docs/css/doc.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ td form {
108108
padding: 8px 14px;
109109
word-break: break-word;
110110
}
111-
.bs-docs-sidenav > li > a > div {
111+
.bs-docs-sidenav > li > a > span {
112+
display: block;
112113
margin-right: 22px;
113114
}
114115
.bs-docs-sidenav .icon-chevron-right {

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h5>${title}</h5>
3636
<ul class="nav nav-list bs-docs-sidenav">
3737
{for module in modules}
3838
<li data-id="${module}" data-type="${type}">
39-
<a href="/docs/${type}/${module}"><i class="icon-chevron-right pull-right"></i> <div>${module}</div></a>
39+
<a href="/docs/${type}/${module}"><i class="icon-chevron-right pull-right"></i> <span>${module}</span></a>
4040
</li>
4141
{/for}
4242
</ul>

node_modules/oae-core/activity/css/activity.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/oae-core/creatediscussion/creatediscussion.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/oae/api/oae.api.util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ define(['exports', 'require', 'jquery', 'underscore', 'oae.api.config', 'jquery.
310310
* a close button for closing the notification. Notifications can be used as a confirmation message, error message, etc.
311311
*
312312
* This function is mostly just a wrapper around jQuery.bootstrap.notify.js and supports all of the options documented
313-
* at http://nijikokun.github.com/bootstrap-notify/.
313+
* at https://github.com/goodybag/bootstrap-notify.
314314
*
315315
* @param {String} [title] The notification title
316316
* @param {String} message The notification message that will be shown underneath the title. The message should be sanitized by the caller to allow for HTML inside of the notification

shared/vendor/js/bootstrap-plugins/bootstrap.notify.oae-edited.js

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
2-
* bootstrap-notify.js v1.0.0
2+
* bootstrap-notify.js v1.0
33
* --
4-
* Copyright 2012 Nijiko Yonskai <[email protected]>
54
* Copyright 2012 Goodybag, Inc.
65
* --
76
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,61 +16,65 @@
1716
* limitations under the License.
1817
*/
1918

20-
define(['jquery'], function (jQuery) {
2119
(function ($) {
2220
var Notification = function (element, options) {
2321
// Element collection
24-
this.$element = $(element);
25-
this.$note = $('<div class="alert alert-dismissable"></div>');
2622
this.options = $.extend(true, {}, $.fn.notify.defaults, options);
27-
this._link = null;
23+
this.$element = $(element);
24+
this.$note = $('<div class="alert"></div>');
25+
if (this.options.closable) {
26+
this.$note = $('<div class="alert alert-dismissable"></div>');
27+
}
2828

2929
// Setup from options
30-
if (this.options.transition)
31-
if (this.options.transition === 'fade')
30+
if(this.options.transition)
31+
if(this.options.transition == 'fade')
3232
this.$note.addClass('in').addClass(this.options.transition);
3333
else this.$note.addClass(this.options.transition);
3434
else this.$note.addClass('fade').addClass('in');
3535

36-
if (this.options.type)
36+
if(this.options.type)
3737
this.$note.addClass('alert-' + this.options.type);
3838
else this.$note.addClass('alert-success');
3939

40-
if (this.options.message)
41-
if (typeof this.options.message === 'string')
42-
this.$note.html(this.options.message);
43-
else if (typeof this.options.message === 'object')
44-
if (this.options.message.html)
40+
if(!this.options.message && this.$element.data("message") !== '') // dom text
41+
this.$note.html(this.$element.data("message"));
42+
else
43+
if(typeof this.options.message === 'object')
44+
if(this.options.message.html)
4545
this.$note.html(this.options.message.html);
46-
else if (this.options.message.text)
46+
else if(this.options.message.text)
4747
this.$note.text(this.options.message.text);
48+
else
49+
this.$note.html(this.options.message);
4850

49-
if (this.options.closable)
50-
this._link = $('<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times</button>'),
51-
$(this._link).on('click', $.proxy(Notification.onClose, this)),
52-
this.$note.prepend(this._link);
51+
if(this.options.closable)
52+
var link = $('<a class="close pull-right" href="#">&times;</a>');
53+
$(link).on('click', $.proxy(onClose, this));
54+
this.$note.prepend(link);
5355

5456
return this;
5557
};
5658

57-
Notification.onClose = function () {
59+
var onClose = function() {
5860
this.options.onClose();
5961
$(this.$note).remove();
6062
this.options.onClosed();
63+
return false;
6164
};
6265

6366
Notification.prototype.show = function () {
64-
if (this.options.fadeOut.enabled)
65-
this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(Notification.onClose, this));
67+
if(this.options.fadeOut.enabled)
68+
this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(onClose, this));
6669

6770
this.$element.append(this.$note);
6871
this.$note.alert();
6972
};
7073

7174
Notification.prototype.hide = function () {
72-
if (this.options.fadeOut.enabled)
73-
this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(Notification.onClose, this));
74-
else Notification.onClose.call(this);
75+
if(this.options.fadeOut.enabled)
76+
this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(onClose, this));
77+
else onClose.call(this);
7578
};
7679

7780
$.fn.notify = function (options) {
@@ -89,6 +92,5 @@ define(['jquery'], function (jQuery) {
8992
message: null,
9093
onClose: function () {},
9194
onClosed: function () {}
92-
};
95+
}
9396
})(window.jQuery);
94-
});

0 commit comments

Comments
 (0)