-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1512 from FusionIIIT/ac-3-final
AC-3 to AC-final
- Loading branch information
Showing
33 changed files
with
2,955 additions
and
1,113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,4 +282,4 @@ | |
|
||
|
||
CORS_ORIGIN_ALLOW_ALL = True | ||
ALLOW_PASS_RESET = True | ||
ALLOW_PASS_RESET = True |
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
4 changes: 4 additions & 0 deletions
4
FusionIIIT/applications/globals/static/globals/js/jquery-3.0.0.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.css
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,69 @@ | ||
.ui-alerts { | ||
position: fixed; | ||
/* width: 360px; */ | ||
z-index: 2060; | ||
padding: 23px; | ||
} | ||
|
||
.ui-alerts.center { | ||
top: 50%; | ||
left: 50%; | ||
margin-top: -100px; | ||
margin-left: -222px; | ||
} | ||
|
||
.ui-alerts.top-right{ | ||
top: 20px; | ||
right: 20px; | ||
} | ||
|
||
.ui-alerts.top-center{ | ||
top: 20px; | ||
margin-left: -222px; | ||
left: 50%; | ||
} | ||
|
||
.ui-alerts.top-left{ | ||
top: 20px; | ||
left: 20px; | ||
} | ||
|
||
.ui-alerts.bottom-right{ | ||
bottom: 0; | ||
right: 20px; | ||
} | ||
.ui-alerts.bottom-center{ | ||
bottom: 0; | ||
margin-left: -222px; | ||
left: 50%; | ||
} | ||
|
||
.ui-alerts.bottom-left{ | ||
bottom: 0; | ||
left: 20px; | ||
} | ||
|
||
.ui-alerts.ui-alerts > .message > .content > .header { | ||
padding-right: 13px; | ||
} | ||
|
||
@media (min-width:320px) { | ||
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ | ||
.ui-alerts.top-center{ | ||
margin-left: -163px; | ||
} | ||
} | ||
@media (min-width:480px) { | ||
/* smartphones, Android phones, landscape iPhone */ | ||
} | ||
@media (min-width:600px) { | ||
/* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ | ||
} | ||
@media (min-width:801px) { | ||
/* tablet, landscape iPad, lo-res laptops ands desktops */ } | ||
@media (min-width:1025px) { | ||
/* big landscape tablets, laptops, and desktops */ | ||
} | ||
@media (min-width:1281px) { | ||
/* hi-res laptops and desktops */ | ||
} |
93 changes: 93 additions & 0 deletions
93
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.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,93 @@ | ||
$.suiAlert = function (permanents) { | ||
var options = $.extend({ | ||
title: 'Semantic UI Alerts', | ||
description: 'semantic ui alerts library', | ||
// alert types 'info, success, error, warning' | ||
type: "error", | ||
time: 5, | ||
position: "top-right", | ||
icon: false, | ||
}, permanents); | ||
|
||
// set alert icon | ||
if (options.icon === false) { | ||
if (options.type == "info") { | ||
// announcement | ||
options.icon = "announcement"; | ||
} else if (options.type == "success") { | ||
// checkmark, checkmark box | ||
options.icon = "checkmark"; | ||
} else if (options.type == "error") { | ||
// ban, remove, remove circle | ||
options.icon = "remove"; | ||
} else if (options.type == "warning") { | ||
// warning sign, warning circle | ||
options.icon = "warning circle"; | ||
} | ||
} | ||
|
||
// set close animation | ||
var close_anim = "drop"; | ||
if (options.position == "top-right") { | ||
close_anim = "fly left"; | ||
} else if (options.position == "top-center") { | ||
close_anim = "fly down"; | ||
} else if (options.position == "top-left") { | ||
close_anim = "fly right"; | ||
} else if (options.position == "bottom-right") { | ||
close_anim = "fly left"; | ||
} else if (options.position == "bottom-center") { | ||
close_anim = "fly up"; | ||
} else if (options.position == "bottom-left") { | ||
close_anim = "fly right"; | ||
} | ||
|
||
// screen size check | ||
var alert_size = ''; | ||
var screen_width = $(window).width(); | ||
if (screen_width < 425) | ||
alert_size = 'mini'; | ||
|
||
var alerts_class = "ui-alerts." + options.position; | ||
if (!$('body > .' + alerts_class).length) { | ||
$('body').append('<div class="ui-alerts ' + options.position + '"></div>'); | ||
} | ||
|
||
var _alert = $('<div class="ui icon floating ' + alert_size + ' message ' + options.type + '" id="alert"> <i class="' + options.icon + ' icon"></i> <i class="close icon" id="alertclose"></i> <div class="content"> <div class="header">' + options.title + '</div> <p>' + options.description + '</p> </div> </div>'); | ||
$('.' + alerts_class).prepend(_alert); | ||
|
||
_alert.transition('pulse'); | ||
|
||
/** | ||
* Close the alert | ||
*/ | ||
$('#alertclose').on('click', function () { | ||
$(this).closest('#alert').transition({ | ||
animation: close_anim, | ||
onComplete: function () { | ||
_alert.remove(); | ||
} | ||
}); | ||
}); | ||
|
||
var timer = 0; | ||
$(_alert).mouseenter(function () { | ||
clearTimeout(timer); | ||
}).mouseleave(function () { | ||
alertHide(); | ||
}); | ||
|
||
alertHide(); | ||
|
||
function alertHide() { | ||
timer = setTimeout(function () { | ||
_alert.transition({ | ||
animation: close_anim, | ||
duration: '2s', | ||
onComplete: function () { | ||
_alert.remove(); | ||
} | ||
}); | ||
}, (options.time * 1000)); | ||
} | ||
}; |
1 change: 1 addition & 0 deletions
1
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.min.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
FusionIIIT/applications/globals/static/semantic/dist/components/semantic-ui-alerts.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.