* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since 2.9
*/
-define(['core/yui', 'jquery', 'theme_bootstrapbase/bootstrap', 'core/log'],
-function(Y, $, bootstrap, log) {
+define(['core/yui', 'jquery', 'core/log'],
+function(Y, $, log) {
var notificationModule = {
types: {
'success': 'core/notification_success',
}
require(['core/templates'], function(templates) {
templates.render(template, variables)
- .done(function(html) {
+ .done(function(html, js) {
$('#' + notificationModule.fieldName).prepend(html);
+ templates.runTemplateJS(js);
})
.fail(notificationModule.exception)
;
// Setup the message target region if it isn't setup already
notificationModule.setupTargetRegion();
- // Setup closing of bootstrap alerts.
- $().alert();
-
// Add provided notifications.
notificationModule.addNotifications(notifications);
{{# closebutton }}<button type="button" class="close" data-dismiss="alert">×</button>{{/ closebutton }}
{{{ message }}}
</div>
+{{# js }}
+require(['jquery', 'theme_bootstrapbase/bootstrap'], function($) {
+ // Setup closing of bootstrap alerts.
+ $().alert();
+});
+{{/ js }}
{{# closebutton }}<button type="button" class="close" data-dismiss="alert">×</button>{{/ closebutton }}
{{{ message }}}
</div>
+{{# js }}
+require(['jquery', 'theme_bootstrapbase/bootstrap'], function($) {
+ // Setup closing of bootstrap alerts.
+ $().alert();
+});
+{{/ js }}
{{# closebutton }}<button type="button" class="close" data-dismiss="alert">×</button>{{/ closebutton }}
{{{ message }}}
</div>
+{{# js }}
+require(['jquery', 'theme_bootstrapbase/bootstrap'], function($) {
+ // Setup closing of bootstrap alerts.
+ $().alert();
+});
+{{/ js }}
{{# closebutton }}<button type="button" class="close" data-dismiss="alert">×</button>{{/ closebutton }}
{{{ message }}}
</div>
+{{# js }}
+require(['jquery', 'theme_bootstrapbase/bootstrap'], function($) {
+ // Setup closing of bootstrap alerts.
+ $().alert();
+});
+{{/ js }}