diff --git a/app/assets/images/accounts_horiz_v2.png b/app/assets/images/accounts_horiz_v2.png deleted file mode 100644 index 486397a3c..000000000 Binary files a/app/assets/images/accounts_horiz_v2.png and /dev/null differ diff --git a/app/assets/images/rice_logo_4.png b/app/assets/images/rice_logo_4.png deleted file mode 100644 index 3064e9319..000000000 Binary files a/app/assets/images/rice_logo_4.png and /dev/null differ diff --git a/app/assets/javascripts/remote-access/index.coffee b/app/assets/javascripts/remote-access/index.coffee index c8bc3f5f8..8e2d176af 100644 --- a/app/assets/javascripts/remote-access/index.coffee +++ b/app/assets/javascripts/remote-access/index.coffee @@ -1,6 +1,6 @@ -##= require jquery -##= require ./vendor/porthole -##= require_self -##= require_tree . +#= require jquery +#= require ./vendor/porthole +#= require_self +#= require_tree . window.OxAccount ||= {} diff --git a/app/assets/javascripts/signin/index.coffee b/app/assets/javascripts/signin/index.coffee index 86671e610..346c96f86 100644 --- a/app/assets/javascripts/signin/index.coffee +++ b/app/assets/javascripts/signin/index.coffee @@ -1,5 +1,5 @@ -##= require_self -##= require ./login +#= require_self +#= require ./login window.OX ||= {} window.OX.Signin ||= {} diff --git a/app/assets/javascripts/signup/email-value.coffee b/app/assets/javascripts/signup/email-value.coffee deleted file mode 100644 index 35e359246..000000000 --- a/app/assets/javascripts/signup/email-value.coffee +++ /dev/null @@ -1,52 +0,0 @@ -IS_EDU = new RegExp('\.edu\s*$', 'i') - -class OX.Signup.EmailValue - - constructor: -> - _.bindAll(@, 'onChange', 'onSubmit') - @group = $('.email-input-group') - @email = @group.find('#signup_email').show() - @email.change(@onChange) - @group.closest('form').submit(@onSubmit) - @userType = '' - Mailcheck.defaultTopLevelDomains.concat(['pl']) # extend TLDs for our Polish users - - onChange: -> - if @showing_warning - @clearWarnings() - - onSubmit: (ev) -> - if not ((@email.val() == '') or @showing_warning or IS_EDU.test(@email.val())) - if @userType is 'instructor' - @showing_warning = true - @group.addClass('has-error') - @group.find(".errors").empty() - @group.find(".edu.warning").show() - @email.focus() - ev.preventDefault() - else - $("#signup_email").mailcheck( - suggested: (element, suggestion) => - @showing_warning = true - @group.addClass('has-error') - @group.find(".errors").empty() - @group.find("#suggestion").text(suggestion.domain) - @group.find(".mistype.warning").show() - $('#signup_email').focus() - ev.preventDefault() - - empty: (element) -> - $(".mistype.warning").hide() - ) - - clearWarnings: () -> - @group.removeClass('has-error') - @group.find(".edu.warning").hide() - @group.find(".mistype.warning").hide() - @showing_warning = false - - setType: (newUserType) -> - newUserType = if newUserType == "student" then "student" else "instructor" - @group.find("[data-audience=\"#{@userType}\"]").hide() - @userType = newUserType - @group.find("[data-audience=\"#{@userType}\"]").show() diff --git a/app/assets/javascripts/signup/index.js b/app/assets/javascripts/signup/index.js deleted file mode 100644 index 2e79c380c..000000000 --- a/app/assets/javascripts/signup/index.js +++ /dev/null @@ -1,11 +0,0 @@ -//= require ../vendor/underscore -//= require ../vendor/mailcheck -//= require ./namespace -//= require ./type-selector -//= require ./email-value -//= require_self - -$(document).ready(function(){ - $('form:first *:input[type!=hidden]:first').focus(); - OX.Signup.TypeSelector.initialize(); -}); diff --git a/app/assets/javascripts/signup/namespace.coffee b/app/assets/javascripts/signup/namespace.coffee deleted file mode 100644 index 024f43c97..000000000 --- a/app/assets/javascripts/signup/namespace.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# setup some namespaces -window.OX ||= {} -window.OX.Signup ||= {} diff --git a/app/assets/javascripts/signup/phone-number.js b/app/assets/javascripts/signup/phone-number.js deleted file mode 100644 index 94090e7c3..000000000 --- a/app/assets/javascripts/signup/phone-number.js +++ /dev/null @@ -1,200 +0,0 @@ -/* This script is based on the javascript code of Roman Feldblum (web.developer@programmer.net) */ -/* Original script : http://javascript.internet.com/forms/format-phone-number.html */ -/* Original script is revised by Eralper Yilmaz (http://www.eralper.com) */ -/* Revised script : http://www.kodyaz.com */ - -var zChar = new Array(' ', '(', ')', '-', '.'); -var maxphonelength = 13; -var phonevalue1; -var phonevalue2; -var cursorposition; - -function ParseForNumber1(object) { - phonevalue1 = ParseChar(object.value, zChar); -} - -function ParseForNumber2(object) { - phonevalue2 = ParseChar(object.value, zChar); -} - -function isUSA() { - /* Testing for USA because this formatting JS is USA format only. The */ - /* iti__ selector is from the intlTelInput plugin (a coupling) */ - if ( $('#login-signup-form .iti__selected-flag').attr( "title") === "United States: +1" ) { - return true - } - else { - return false - } -} - -function backspacerUP(object, e) { - if ( !isUSA() ) { - return true; - } - - if (e) { - e = e - } else { - e = window.event - } - if (e.which) { - var keycode = e.which - } else { - var keycode = e.keyCode - } - - ParseForNumber1(object) - - if (keycode >= 48) { - ValidatePhone(object) - } -} - -function backspacerDOWN(object, e) { - if ( !isUSA() ) { - return true; - } - - if (e) { - e = e - } else { - e = window.event - } - if (e.which) { - var keycode = e.which - } else { - var keycode = e.keyCode - } - - ParseForNumber2(object) -} - -function GetCursorPosition() { - - var t1 = phonevalue1; - var t2 = phonevalue2; - var bool = false - for (i = 0; i < t1.length; i++) { - if (t1.substring(i, 1) != t2.substring(i, 1)) { - if (!bool) { - cursorposition = i - bool = true - } - } - } -} - -function ValidatePhone(object) { - - var p = phonevalue1 - - p = p.replace(/[^\d]*/gi, "") - - if (p.length < 3) { - object.value = p - } else if (p.length == 3) { - pp = p; - d4 = p.indexOf('(') - d5 = p.indexOf(')') - if (d4 == -1) { - pp = "(" + pp; - } - if (d5 == -1) { - pp = pp + ")"; - } - object.value = pp; - } else if (p.length > 3 && p.length < 7) { - p = "(" + p; - l30 = p.length; - p30 = p.substring(0, 4); - p30 = p30 + ")" - - p31 = p.substring(4, l30); - pp = p30 + p31; - - object.value = pp; - - } else if (p.length >= 7) { - p = "(" + p; - l30 = p.length; - p30 = p.substring(0, 4); - p30 = p30 + ")" - - p31 = p.substring(4, l30); - pp = p30 + p31; - - l40 = pp.length; - p40 = pp.substring(0, 8); - p40 = p40 + "-" - - p41 = pp.substring(8, l40); - ppp = p40 + p41; - - object.value = ppp.substring(0, maxphonelength); - } - - GetCursorPosition() - - if (cursorposition >= 0) { - if (cursorposition == 0) { - cursorposition = 2 - } else if (cursorposition <= 2) { - cursorposition = cursorposition + 1 - } else if (cursorposition <= 5) { - cursorposition = cursorposition + 2 - } else if (cursorposition == 6) { - cursorposition = cursorposition + 2 - } else if (cursorposition == 7) { - cursorposition = cursorposition + 4 - e1 = object.value.indexOf(')') - e2 = object.value.indexOf('-') - if (e1 > -1 && e2 > -1) { - if (e2 - e1 == 4) { - cursorposition = cursorposition - 1 - } - } - } else if (cursorposition < 11) { - cursorposition = cursorposition + 3 - } else if (cursorposition == 11) { - cursorposition = cursorposition + 1 - } else if (cursorposition >= 12) { - cursorposition = cursorposition - } - - if (document.selection) { //IE - var range = object.createTextRange(); - range.moveStart("character", cursorposition); - range.moveEnd("character", cursorposition - object.value.length); - range.select(); - } else if (window.getSelection) { //others - var range = document.createRange(); - range.selectNode(document.getElementById(object.id)); //todo fix this for cursorposition - window.getSelection().addRange(range); - } - } -} - -function ParseChar(sStr, sChar) { - if (sChar.length == null) { - zChar = new Array(sChar); - } else zChar = sChar; - - for (i = 0; i < zChar.length; i++) { - sNewStr = ""; - - var iStart = 0; - var iEnd = sStr.indexOf(sChar[i]); - - while (iEnd != -1) { - sNewStr += sStr.substring(iStart, iEnd); - iStart = iEnd + 1; - iEnd = sStr.indexOf(sChar[i], iStart); - } - sNewStr += sStr.substring(sStr.lastIndexOf(sChar[i]) + 1, sStr.length); - - sStr = sNewStr; - } - - return sNewStr; -} diff --git a/app/assets/javascripts/signup/type-selector.coffee b/app/assets/javascripts/signup/type-selector.coffee deleted file mode 100644 index b5daff026..000000000 --- a/app/assets/javascripts/signup/type-selector.coffee +++ /dev/null @@ -1,18 +0,0 @@ -class OX.Signup.TypeSelector - - @initialize: -> - role = $('#signup_role') - @type_selector = new TypeSelector(role) if role.length - - constructor: (@el) -> - _.bindAll(@, 'onChange') - $("input[type='submit']").attr('disabled', true) - @el.change(@onChange) - @onChange() if @el.val() - - onChange: -> - $("input[type='submit']").attr('disabled', false) - @getEmail().setType(@el.val()) - - getEmail: -> - @_email ||= new OX.Signup.EmailValue() diff --git a/app/assets/stylesheets/section_block.scss b/app/assets/stylesheets/section_block.scss deleted file mode 100644 index 7049d2d8b..000000000 --- a/app/assets/stylesheets/section_block.scss +++ /dev/null @@ -1,32 +0,0 @@ -// May no longer be used, but might be overrides from openstax_utilities <%= section blocks - -@mixin section-block-base($heading_font_size:16px, $heading_color:black, $body_indent:0px, $body_top_margin:8px) { - margin: 10px 0px; - - .section-block-heading { - - color: $heading_color; - font-size: $heading_font_size; - - a { - font-size: $heading_font_size; - } - } - - .section-block-body { - margin: $body_top_margin 0px 0px; - padding: 0px 0px 0px $body_indent; - } -} - -.section-block-section { - @include section-block-base(14px, black, 10px); -} - -.section-block-section.nesting-2 { - @include section-block-base(12px); - - .section-block-heading { - font-style: italic; - } -} diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index ed70d93f0..a6bed4b20 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -13,7 +13,6 @@ admin.css admin.js profile.js - signup.js signin.js faculty_access.js remote-access.js @@ -24,7 +23,6 @@ libphonenumber/utils.js syntax_highlight.css newflow.css - newflow_colors.css newflow.js newflow/educator_signup_email_validations.js )