diff options
author | Sam | 2013-05-17 22:30:11 +0000 |
---|---|---|
committer | Sam | 2013-05-17 22:30:11 +0000 |
commit | 66e8d76ea34b6784a451abe3223eb13107d4307f (patch) | |
tree | 7f0591f40adfef6e2027b59fa28a79ed117b2fd6 /wqflask/wqflask | |
parent | f259acbe4792e8a10a5fea40262c644108f58eba (diff) | |
download | genenetwork2-66e8d76ea34b6784a451abe3223eb13107d4307f.tar.gz |
Simplification of modal code
Created css file to hold modal padding
Diffstat (limited to 'wqflask/wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/css/main.css | 4 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/login.coffee | 20 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/login.js | 19 | ||||
-rw-r--r-- | wqflask/wqflask/templates/base.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/security/_macros.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/security/login_user.html | 3 | ||||
-rw-r--r-- | wqflask/wqflask/templates/security/register_user.html | 2 |
7 files changed, 16 insertions, 36 deletions
diff --git a/wqflask/wqflask/static/new/css/main.css b/wqflask/wqflask/static/new/css/main.css new file mode 100644 index 00000000..017bbdb8 --- /dev/null +++ b/wqflask/wqflask/static/new/css/main.css @@ -0,0 +1,4 @@ +.security_box { + padding-left: 30px; + padding-right: 30px; +} diff --git a/wqflask/wqflask/static/new/javascript/login.coffee b/wqflask/wqflask/static/new/javascript/login.coffee index 658fd48d..c49353d5 100644 --- a/wqflask/wqflask/static/new/javascript/login.coffee +++ b/wqflask/wqflask/static/new/javascript/login.coffee @@ -1,21 +1,7 @@ $ -> - #$(".modalize").colorbox( - # onComplete: -> - # $(".focused").focus() - # ) - $(".modalize").on("click", (event) -> - console.log("modalizing!!!") - event.preventDefault() - $.colorbox( - href: $(this).attr("href") - onComplete: -> - $(".focused").focus() - ) - - ) - modal_replace = (event) -> + modalize = (event) -> event.preventDefault() console.log("in modal_replace:", $(this).attr("href")) $.colorbox( @@ -24,11 +10,11 @@ $ -> onComplete: -> $(".focused").focus() ) - return false - $(document).on("click", ".modal_replace", modal_replace) + + $(document).on("click", ".modalize", modalize) form_success = (data) -> $.colorbox( diff --git a/wqflask/wqflask/static/new/javascript/login.js b/wqflask/wqflask/static/new/javascript/login.js index d7a89f01..6c6120ec 100644 --- a/wqflask/wqflask/static/new/javascript/login.js +++ b/wqflask/wqflask/static/new/javascript/login.js @@ -2,30 +2,19 @@ (function() { $(function() { - var form_success, modal_replace, submit_form; - $(".modalize").on("click", function(event) { - console.log("modalizing!!!"); - event.preventDefault(); - return $.colorbox({ - href: $(this).attr("href"), - onComplete: function() { - return $(".focused").focus(); - } - }); - }); - modal_replace = function(event) { + var form_success, modalize, submit_form; + modalize = function(event) { event.preventDefault(); console.log("in modal_replace:", $(this).attr("href")); - $.colorbox({ + return $.colorbox({ open: true, href: this.href, onComplete: function() { return $(".focused").focus(); } }); - return false; }; - $(document).on("click", ".modal_replace", modal_replace); + $(document).on("click", ".modalize", modalize); form_success = function(data) { return $.colorbox({ open: true, diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 2fdfbd11..bdb1c362 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -18,6 +18,8 @@ <![endif]--> <link rel="stylesheet" type="text/css" href="/static/packages/colorbox/example4/colorbox.css" /> + <link rel="stylesheet" type="text/css" href="/static/new/css/main.css" /> + {% block css %} {% endblock %} diff --git a/wqflask/wqflask/templates/security/_macros.html b/wqflask/wqflask/templates/security/_macros.html index c2d8ad71..ee662ae6 100644 --- a/wqflask/wqflask/templates/security/_macros.html +++ b/wqflask/wqflask/templates/security/_macros.html @@ -22,7 +22,7 @@ <p>You must confirm your email address before signing in.</p> <p>Check your email for confirmation instructions.</p> <p>Can't find the email? Check your spam folder.</p> - <p>Still can't find it? <a class="modal_replace" href="/confirm"> + <p>Still can't find it? <a class="modalize" href="/confirm"> Click here to resend.</a></p> </div> {% else %} diff --git a/wqflask/wqflask/templates/security/login_user.html b/wqflask/wqflask/templates/security/login_user.html index e1f5970b..bee4e824 100644 --- a/wqflask/wqflask/templates/security/login_user.html +++ b/wqflask/wqflask/templates/security/login_user.html @@ -2,12 +2,11 @@ {% include "security/_messages.html" %} <div class="security_box"> - {{ g.identity}} <h4>Don't have an account?</h4> <center> - <a href="/register" class="btn btn-info modal_replace">Create a new account</a> + <a href="/register" class="btn btn-info modalize">Create a new account</a> </center> <hr /> diff --git a/wqflask/wqflask/templates/security/register_user.html b/wqflask/wqflask/templates/security/register_user.html index 9bbcd29f..3cd021b0 100644 --- a/wqflask/wqflask/templates/security/register_user.html +++ b/wqflask/wqflask/templates/security/register_user.html @@ -6,7 +6,7 @@ <center> <a href="/login" - class="btn btn-info modal_replace">Sign in using existing account</a> + class="btn btn-info modalize">Sign in using existing account</a> </center> <hr /> |