diff --git a/static/js/templates.min.js b/static/js/templates.min.js
index ee4351c..fd70f5a 100644
--- a/static/js/templates.min.js
+++ b/static/js/templates.min.js
@@ -1 +1 @@
-(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.course=a(function(a,b,c,d,e){function l(a,b){return'\n \n \n Archive Done \n \n \n \n Edit Course \n \n \n \n Add Assignment \n \n '}function m(a,b){var d="",e,f;return d+='\n
',f=c.details,f?e=f.call(a,{hash:{}}):(e=a.details,e=typeof e===i?e():e);if(e||e===0)d+=e;return d+="
\n ",d}function o(a,b){return"\n \n\n
\n \n \n\n
\n ",g=b.title,h=c.keyword,g=h?h.call(b,g,{hash:{}}):l.call(b,"keyword",g,{hash:{}});if(g||g===0)f+=g;f+=" ",h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=j(g)+' \n \n \n\n
\n ',g=b.date,h=c.format_date,g=h?h.call(b,g,{hash:{}}):l.call(b,"format_date",g,{hash:{}});if(g||g===0)f+=g;f+='\n \n\n
\n ',g=b.details,g=c["if"].call(b,g,{hash:{},inverse:k.program(5,o,e),fn:k.program(3,n,e)});if(g||g===0)f+=g;return f+='\n \n\n
\n \n \n \n ',f}),b.date_assignment=a(function(a,b,c,d,e){function m(a,b){return" checked "}function n(a,b){var d="",e,f;d+='\n
Show details \n
',f=c.details,f?e=f.call(a,{hash:{}}):(e=a.details,e=typeof e===i?e():e);if(e||e===0)d+=e;return d+="
\n ",d}function o(a,b){return"\n
No additional information \n "}c=c||a.helpers;var f="",g,h,i="function",j=this,k=c.helperMissing,l=this.escapeExpression;f+='
\n
\n ',g=b.title,h=c.keyword,g=h?h.call(b,g,{hash:{}}):k.call(b,"keyword",g,{hash:{}});if(g||g===0)f+=g;f+=" ",h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=l(g)+' \n \n \n
\n ',h=c.course,h?g=h.call(b,{hash:{}}):(g=b.course,g=typeof g===i?g():g),f+=l(g)+' \n \n \n
',g=b.date,h=c.format_date,g=h?h.call(b,g,{hash:{}}):k.call(b,"format_date",g,{hash:{}});if(g||g===0)f+=g;f+=' \n\n
\n ',g=b.details,g=c["if"].call(b,g,{hash:{},inverse:j.program(5,o,e),fn:j.program(3,n,e)});if(g||g===0)f+=g;return f+='\n \n\n
\n \n \n \n ',f}),b.dates=a(function(a,b,c,d,e){function m(a,b){var d="",e;d+="\n ",e=a.show_archive_button,e=c["if"].call(a,e,{hash:{},inverse:i.noop,fn:i.program(2,n,b)});if(e||e===0)d+=e;return d+="\n ",d}function n(a,b){var d="",e;d+='\n
\n \n Archive Done \n \n ',d}function o(a,b){return"disabled"}function p(a,b){return'\n
\n \n Add Assignment \n \n '}function q(a,b){var d="",e,f;return d+='\n
\n
',f=c.exclamation,f?e=f.call(a,{hash:{}}):(e=a.exclamation,e=typeof e===j?e():e),d+=k(e)+" No work to do here! \n
\n
\n Go outside and play or something.\n
\n
\n ",d}function r(a,b){return'\n
\n \n \n Done \n Title \n Course \n Due Date \n Details \n Edit \n \n \n \n \n
\n '}c=c||a.helpers;var f="",g,h,i=this,j="function",k=this.escapeExpression,l=c.helperMissing;f+='
\n\n ',h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===j?g():g),f+=k(g)+" ",g=b.range,h=c.range_date,g=h?h.call(b,g,{hash:{}}):l.call(b,"range_date",g,{hash:{}});if(g||g===0)f+=g;f+=" \n ",g=b.empty,g=c.unless.call(b,g,{hash:{},inverse:i.noop,fn:i.program(1,m,e)});if(g||g===0)f+=g;f+="\n ",g=b.show_archive_button,g=c["if"].call(b,g,{hash:{},inverse:i.noop,fn:i.program(5,p,e)});if(g||g===0)f+=g;f+="\n \n ",g=b.empty,g=c["if"].call(b,g,{hash:{},inverse:i.program(9,r,e),fn:i.program(7,q,e)});if(g||g===0)f+=g;return f+="\n ",f}),b.edit_assignment=a(function(a,b,c,d,e){function m(a,b){var d="",e;d+="\n ",e=a.details,e=c["if"].call(a,e,{hash:{},inverse:i.noop,fn:i.program(2,n,b)});if(e||e===0)d+=e;return d+="\n ",d}function n(a,b){return'\n
\n note: This assignment came from the school website, so it contains HTML (a computer language). I didn't convert it to "normal text" because formatting would be lost. Feel free to replace it.\n \n '}function o(a,b){return'\n
\n '}function p(a,b){var d="",e,f;d+='\n
\n
Course \n
\n \n ',e=a.course,f=c.course_options,e=f?f.call(a,e,{hash:{}}):j.call(a,"course_options",e,{hash:{}});if(e||e===0)d+=e;return d+="\n \n
\n
\n ",d}c=c||a.helpers;var f="",g,h,i=this,j=c.helperMissing,k="function",l=this.escapeExpression;f+='
',f}),b.edit_course=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression;return f+='
\n \n \n
Title\n \n
\n \n \n
\n
\n \n
Teacher\n \n
\n \n \n
\n
\n \n
\n
Uh oh! Something went wrong, lol.
\n
\n
\n \n ',f}),b.home=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
\n
Miss me? \n
\n ',h=c.personalize,g=h?h.call(b,"You know the drill %n, just click on a link to the left.",{hash:{}}):i.call(b,"personalize","You know the drill %n, just click on a link to the left.",{hash:{}}),f+=j(g)+"\n
\n
← \n
",f}),b.settings=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression;return f+='
\n \n \n
Nickname \n
\n \n This doesn’t affect anything other than your ego. \n
\n
\n \n ',f}),b.sidebar_courses=a(function(a,b,c,d,e){function k(a,b){var d="",e,f;return d+='\n
\n ',f=c.title,f?e=f.call(a,{hash:{}}):(e=a.title,e=typeof e===h?e():e),d+=i(e)+" \n \n",d}c=c||a.helpers;var f="",g,h="function",i=this.escapeExpression,j=this;f+='\n',g=b.courses,g=c.each.call(b,g,{hash:{},inverse:j.noop,fn:j.program(1,k,e)});if(g||g===0)f+=g;return f+='\n
\n \n Add \n ',f}),b.sidebar_dates=a(function(a,b,c,d,e){function l(a,b){var d="",e,f,g;d+='\n
\n ',e=a.end,f=a.start,g=c.remaining,e=g?g.call(a,f,e,{hash:{}}):j.call(a,"remaining",f,e,{hash:{}});if(e||e===0)d+=e;return d+=" ",g=c.name,g?e=g.call(a,{hash:{}}):(e=a.name,e=typeof e===h?e():e),d+=i(e)+" \n \n",d}c=c||a.helpers;var f="",g,h="function",i=this.escapeExpression,j=c.helperMissing,k=this;f+='\n',g=b.dates,g=c.each.call(b,g,{hash:{},inverse:k.noop,fn:k.program(1,l,e)});if(g||g===0)f+=g;return f}),b.status=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='
',f=c.link_text,f?e=f.call(a,{hash:{}}):(e=a.link_text,e=typeof e===i?e():e),d+=j(e),d}function n(a,b){return'\n × \n '}c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression,k=c.helperMissing,l=this;f+='
\n ',h=c.heading,h?g=h.call(b,{hash:{}}):(g=b.heading,g=typeof g===i?g():g),f+=j(g)+" \n ",g=b.message,h=c.personalize,g=h?h.call(b,g,{hash:{}}):k.call(b,"personalize",g,{hash:{}});if(g||g===0)f+=g;f+=" ",g=b.addable,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(1,m,e)});if(g||g===0)f+=g;f+=" \n ",g=b.closable,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(3,n,e)});if(g||g===0)f+=g;return f+="\n
",f})})()
\ No newline at end of file
+(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b.course=a(function(a,b,c,d,e){function l(a,b){return'\n
\n \n Archive Done \n \n
\n \n Edit Course \n \n
\n \n Add Assignment \n \n '}function m(a,b){var d="",e,f;return d+='\n
\n
',f=c.exclamation,f?e=f.call(a,{hash:{}}):(e=a.exclamation,e=typeof e===i?e():e),d+=j(e)+" No work to do here! \n
\n
\n You've completed ",f=c.archived,f?e=f.call(a,{hash:{}}):(e=a.archived,e=typeof e===i?e():e),d+=j(e)+" assignments in this course to date. Click Options > Show archived to show them.\n \n Or just go outside and play or something.\n
\n
\n ",d}function n(a,b){return'\n
\n \n \n Done \n Title \n Due Date \n Details \n Edit \n \n \n \n \n
\n '}c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression,k=this;f+='
\n\n ',h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=j(g)+' \n \n ',h=c.teacher,h?g=h.call(b,{hash:{}}):(g=b.teacher,g=typeof g===i?g():g),f+=j(g)+' \n \n ',g=b.show_archive_button,g=c["if"].call(b,g,{hash:{},inverse:k.noop,fn:k.program(1,l,e)});if(g||g===0)f+=g;f+="\n \n ",g=b.empty,g=c["if"].call(b,g,{hash:{},inverse:k.program(5,n,e),fn:k.program(3,m,e)});if(g||g===0)f+=g;return f+="\n ",f}),b.course_assignment=a(function(a,b,c,d,e){function m(a,b){return" checked "}function n(a,b){var d="",e,f;d+='\n
Show details \n
',f=c.details,f?e=f.call(a,{hash:{}}):(e=a.details,e=typeof e===i?e():e);if(e||e===0)d+=e;return d+="
\n ",d}function o(a,b){return"\n
No additional information \n "}c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression,k=this,l=c.helperMissing;f+='
\n\n
\n \n \n\n
\n ",g=b.title,h=c.keyword,g=h?h.call(b,g,{hash:{}}):l.call(b,"keyword",g,{hash:{}});if(g||g===0)f+=g;f+=" ",h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=j(g)+' \n \n \n\n
\n ',g=b.date,h=c.format_date,g=h?h.call(b,g,{hash:{}}):l.call(b,"format_date",g,{hash:{}});if(g||g===0)f+=g;f+='\n \n\n
\n ',g=b.details,g=c["if"].call(b,g,{hash:{},inverse:k.program(5,o,e),fn:k.program(3,n,e)});if(g||g===0)f+=g;return f+='\n \n\n
\n \n \n \n ',f}),b.date_assignment=a(function(a,b,c,d,e){function m(a,b){return" checked "}function n(a,b){var d="",e,f;d+='\n
Show details \n
',f=c.details,f?e=f.call(a,{hash:{}}):(e=a.details,e=typeof e===i?e():e);if(e||e===0)d+=e;return d+="
\n ",d}function o(a,b){return"\n
No additional information \n "}c=c||a.helpers;var f="",g,h,i="function",j=this,k=c.helperMissing,l=this.escapeExpression;f+='
\n
\n ',g=b.title,h=c.keyword,g=h?h.call(b,g,{hash:{}}):k.call(b,"keyword",g,{hash:{}});if(g||g===0)f+=g;f+=" ",h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===i?g():g),f+=l(g)+' \n \n \n
\n ',h=c.course,h?g=h.call(b,{hash:{}}):(g=b.course,g=typeof g===i?g():g),f+=l(g)+' \n \n \n
',g=b.date,h=c.format_date,g=h?h.call(b,g,{hash:{}}):k.call(b,"format_date",g,{hash:{}});if(g||g===0)f+=g;f+=' \n\n
\n ',g=b.details,g=c["if"].call(b,g,{hash:{},inverse:j.program(5,o,e),fn:j.program(3,n,e)});if(g||g===0)f+=g;return f+='\n \n\n
\n \n \n \n ',f}),b.dates=a(function(a,b,c,d,e){function m(a,b){var d="",e;d+="\n ",e=a.show_archive_button,e=c["if"].call(a,e,{hash:{},inverse:i.noop,fn:i.program(2,n,b)});if(e||e===0)d+=e;return d+="\n ",d}function n(a,b){var d="",e;d+='\n
\n \n Archive Done \n \n ',d}function o(a,b){return"disabled"}function p(a,b){return'\n
\n \n Add Assignment \n \n '}function q(a,b){var d="",e,f;return d+='\n
\n
',f=c.exclamation,f?e=f.call(a,{hash:{}}):(e=a.exclamation,e=typeof e===j?e():e),d+=k(e)+" No work to do here! \n
\n
\n Go outside and play or something.\n
\n
\n ",d}function r(a,b){return'\n
\n \n \n Done \n Title \n Course \n Due Date \n Details \n Edit \n \n \n \n \n
\n '}c=c||a.helpers;var f="",g,h,i=this,j="function",k=this.escapeExpression,l=c.helperMissing;f+='
\n\n ',h=c.title,h?g=h.call(b,{hash:{}}):(g=b.title,g=typeof g===j?g():g),f+=k(g)+" ",g=b.range,h=c.range_date,g=h?h.call(b,g,{hash:{}}):l.call(b,"range_date",g,{hash:{}});if(g||g===0)f+=g;f+=" \n ",g=b.empty,g=c.unless.call(b,g,{hash:{},inverse:i.noop,fn:i.program(1,m,e)});if(g||g===0)f+=g;f+="\n ",g=b.show_archive_button,g=c["if"].call(b,g,{hash:{},inverse:i.noop,fn:i.program(5,p,e)});if(g||g===0)f+=g;f+="\n \n ",g=b.empty,g=c["if"].call(b,g,{hash:{},inverse:i.program(9,r,e),fn:i.program(7,q,e)});if(g||g===0)f+=g;return f+="\n ",f}),b.edit_assignment=a(function(a,b,c,d,e){function m(a,b){var d="",e;d+="\n ",e=a.details,e=c["if"].call(a,e,{hash:{},inverse:i.noop,fn:i.program(2,n,b)});if(e||e===0)d+=e;return d+="\n ",d}function n(a,b){return'\n
\n note: This assignment came from the school website, so it contains HTML (a computer language). I didn't convert it to "normal text" because formatting would be lost. Feel free to replace it.\n \n '}function o(a,b){return'\n
\n '}function p(a,b){var d="",e,f;d+='\n
\n
Course \n
\n \n ',e=a.course,f=c.course_options,e=f?f.call(a,e,{hash:{}}):j.call(a,"course_options",e,{hash:{}});if(e||e===0)d+=e;return d+="\n \n
\n
\n ",d}c=c||a.helpers;var f="",g,h,i=this,j=c.helperMissing,k="function",l=this.escapeExpression;f+='
\n \n \n \n
Details \n
\n ',h=c.details,h?g=h.call(b,{hash:{}}):(g=b.details,g=typeof g===k?g():g),f+=l(g)+" \n ",g=b.jbha_id,g=c["if"].call(b,g,{hash:{},inverse:i.program(4,o,e),fn:i.program(1,m,e)});if(g||g===0)f+=g;f+="\n
\n
\n ",g=b.hard_course,g=c.unless.call(b,g,{hash:{},inverse:i.noop,fn:i.program(6,p,e)});if(g||g===0)f+=g;return f+='\n \n \n ',f}),b.edit_course=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression;return f+='
\n \n \n
Title\n \n
\n \n \n
\n
\n \n
Teacher\n \n
\n \n \n
\n
\n \n
\n
Uh oh! Something went wrong, lol.
\n
\n
\n \n ',f}),b.home=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=c.helperMissing,j=this.escapeExpression;return f+='
\n
Miss me? \n
\n ',h=c.personalize,g=h?h.call(b,"You know the drill %n, just click on a link to the left.",{hash:{}}):i.call(b,"personalize","You know the drill %n, just click on a link to the left.",{hash:{}}),f+=j(g)+"\n
\n
← \n
",f}),b.nickname=a(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression;return f+='
\n \n \n
Nickname \n
\n \n This doesn’t affect anything other than your ego. \n
\n
\n \n ',f}),b.sidebar_courses=a(function(a,b,c,d,e){function k(a,b){var d="",e,f;return d+='\n
\n ',f=c.title,f?e=f.call(a,{hash:{}}):(e=a.title,e=typeof e===h?e():e),d+=i(e)+" \n \n",d}c=c||a.helpers;var f="",g,h="function",i=this.escapeExpression,j=this;f+='\n',g=b.courses,g=c.each.call(b,g,{hash:{},inverse:j.noop,fn:j.program(1,k,e)});if(g||g===0)f+=g;return f+='\n
\n \n Add \n ',f}),b.sidebar_dates=a(function(a,b,c,d,e){function l(a,b){var d="",e,f,g;d+='\n
\n ',e=a.end,f=a.start,g=c.remaining,e=g?g.call(a,f,e,{hash:{}}):j.call(a,"remaining",f,e,{hash:{}});if(e||e===0)d+=e;return d+=" ",g=c.name,g?e=g.call(a,{hash:{}}):(e=a.name,e=typeof e===h?e():e),d+=i(e)+" \n \n",d}c=c||a.helpers;var f="",g,h="function",i=this.escapeExpression,j=c.helperMissing,k=this;f+='\n',g=b.dates,g=c.each.call(b,g,{hash:{},inverse:k.noop,fn:k.program(1,l,e)});if(g||g===0)f+=g;return f}),b.status=a(function(a,b,c,d,e){function m(a,b){var d="",e,f;return d+='
',f=c.link_text,f?e=f.call(a,{hash:{}}):(e=a.link_text,e=typeof e===i?e():e),d+=j(e),d}function n(a,b){return'\n × \n '}c=c||a.helpers;var f="",g,h,i="function",j=this.escapeExpression,k=c.helperMissing,l=this;f+='
\n ',h=c.heading,h?g=h.call(b,{hash:{}}):(g=b.heading,g=typeof g===i?g():g),f+=j(g)+" \n ",g=b.message,h=c.personalize,g=h?h.call(b,g,{hash:{}}):k.call(b,"personalize",g,{hash:{}});if(g||g===0)f+=g;f+=" ",g=b.addable,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(1,m,e)});if(g||g===0)f+=g;f+=" \n ",g=b.closable,g=c["if"].call(b,g,{hash:{},inverse:l.noop,fn:l.program(3,n,e)});if(g||g===0)f+=g;return f+="\n
",f})})()
\ No newline at end of file
diff --git a/static/js/views.js b/static/js/views.js
index cd2068a..8ab1416 100644
--- a/static/js/views.js
+++ b/static/js/views.js
@@ -57,11 +57,11 @@ StatusView = Backbone.View.extend({
});
// Represents the modal which allows the user
-// to edit their account settings.
-SettingsView = Backbone.View.extend({
+// to edit their nickname
+NicknameModalView = Backbone.View.extend({
- el: $("#settings-modal"),
- template: Handlebars.templates.settings,
+ el: $("#nickname-modal"),
+ template: Handlebars.templates.nickname,
events: {
"click button#save": "save"
@@ -883,7 +883,7 @@ AppView = Backbone.View.extend({
events: {
"click #toggle-details": "toggleDetails",
"click #toggle-archived": "toggleArchived",
- "click #settings": "showSettings",
+ "click #nickname": "showNicknameModal",
"click #shortcuts": "showShortcuts",
"click #add-course": "addCourse",
"click #force-refresh": "forceRefresh",
@@ -894,7 +894,7 @@ AppView = Backbone.View.extend({
var that = this;
// Create models & collections
window.settings = new Settings;
- window.settings_view = new SettingsView({model: settings});
+ window.nickname_modal_view = new NicknameModalView({model: settings});
window.app_status = new Status;
window.status_view = new StatusView({model: app_status});
@@ -964,7 +964,7 @@ AppView = Backbone.View.extend({
_.defer(function () {
$(".btn, input[type='checkbox']").not('.details-show').prop('disabled', true);
});
- $("#force-refresh, #settings, #logout").addClass('disabled-dropdown-item');
+ $("#force-refresh, #nickname, #logout").addClass('disabled-dropdown-item');
},
enableControls: function () {
@@ -973,7 +973,7 @@ AppView = Backbone.View.extend({
_.defer(function () {
$(".btn, input[type='checkbox']").not('.details-show').prop('disabled', false);
});
- $("#force-refresh, #settings, #logout").removeClass('disabled-dropdown-item');
+ $("#force-refresh, #nickname, #logout").removeClass('disabled-dropdown-item');
},
refresh: function () {
@@ -1142,8 +1142,8 @@ AppView = Backbone.View.extend({
return false;
},
- showSettings: function () {
- window.settings_view.show();
+ showNicknameModal: function () {
+ window.nickname_modal_view.show();
$('.dropdown-toggle').dropdown();
return false;
},
diff --git a/views/app.jade b/views/app.jade
index 479723a..e2bba19 100644
--- a/views/app.jade
+++ b/views/app.jade
@@ -43,8 +43,4 @@ block content
window.app.updateUpcoming();
window.app.updateCourses();
- if (settings.get('details') === true) {
- window.app.showDetails()
- }
-
Backbone.history.start({pushState: true, root: "/app/"});
\ No newline at end of file
diff --git a/views/layout-app.jade b/views/layout-app.jade
index f46b189..efe9b3c 100644
--- a/views/layout-app.jade
+++ b/views/layout-app.jade
@@ -13,9 +13,9 @@ block navbar
a#toggle-details(target='_self', href="") Show details
li.divider
li
- a#settings(href="settings", data-bypass)
- i.icon-wrench
- | Settings
+ a#nickname(href="nickname", data-bypass)
+ i.icon-user
+ | Nickname
li
a#shortcuts(href="shortcuts", data-bypass)
i.icon-list-alt
diff --git a/views/modals.jade b/views/modals.jade
index 9b84259..19992fd 100644
--- a/views/modals.jade
+++ b/views/modals.jade
@@ -1,8 +1,8 @@
-#settings-modal.modal.hide.fade
+#nickname-modal.modal.hide.fade
.modal-header
a.close.close-button(data-dismiss="modal") ×
h3
- | Settings
+ | What shall I call you?
.modal-body
.modal-footer
button.btn.btn-primary(href="#", id="save") Save
diff --git a/views/templates/settings.handlebars b/views/templates/nickname.handlebars
similarity index 100%
rename from views/templates/settings.handlebars
rename to views/templates/nickname.handlebars