-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
33 changed files
with
383 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../node_modules/edx-ui-toolkit/src/js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 26 additions & 26 deletions
52
common/static/common/js/components/views/feedback_notification.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
;(function (define) { | ||
;(function(define) { | ||
'use strict'; | ||
define(["jquery", "underscore", "underscore.string", "common/js/components/views/feedback"], | ||
define(['jquery', 'underscore', 'underscore.string', 'common/js/components/views/feedback'], | ||
function($, _, str, SystemFeedbackView) { | ||
|
||
var Notification = SystemFeedbackView.extend({ | ||
options: $.extend({}, SystemFeedbackView.prototype.options, { | ||
type: "notification", | ||
closeIcon: false | ||
}) | ||
}); | ||
|
||
// create Notification.Warning, Notification.Confirmation, etc | ||
var capitalCamel, intents; | ||
capitalCamel = _.compose(str.capitalize, str.camelize); | ||
intents = ["warning", "error", "confirmation", "announcement", "step-required", "help", "mini"]; | ||
_.each(intents, function(intent) { | ||
var subclass; | ||
subclass = Notification.extend({ | ||
options: $.extend({}, Notification.prototype.options, { | ||
intent: intent | ||
var Notification = SystemFeedbackView.extend({ | ||
options: $.extend({}, SystemFeedbackView.prototype.options, { | ||
type: 'notification', | ||
closeIcon: false | ||
}) | ||
}); | ||
Notification[capitalCamel(intent)] = subclass; | ||
}); | ||
|
||
// set more sensible defaults for Notification.Mini views | ||
var miniOptions = Notification.Mini.prototype.options; | ||
miniOptions.minShown = 1250; | ||
miniOptions.closeIcon = false; | ||
// create Notification.Warning, Notification.Confirmation, etc | ||
var capitalCamel, intents; | ||
capitalCamel = _.compose(str.capitalize, str.camelize); | ||
intents = ['warning', 'error', 'confirmation', 'announcement', 'step-required', 'help', 'mini']; | ||
_.each(intents, function(intent) { | ||
var subclass; | ||
subclass = Notification.extend({ | ||
options: $.extend({}, Notification.prototype.options, { | ||
intent: intent | ||
}) | ||
}); | ||
Notification[capitalCamel(intent)] = subclass; | ||
}); | ||
|
||
// set more sensible defaults for Notification.Mini views | ||
var miniOptions = Notification.Mini.prototype.options; | ||
miniOptions.minShown = 1250; | ||
miniOptions.closeIcon = false; | ||
|
||
return Notification; | ||
}); | ||
return Notification; | ||
}); | ||
}).call(this, define || RequireJS.define); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../node_modules/edx-pattern-library/pattern-library/js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../node_modules/edx-ui-toolkit/src/js/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.