Commit 0cb4f3f912ac0755ac4f631c3d840983945c7abf
1 parent
7b538e16
Exists in
master
and in
1 other branch
started to mockup the add watchers form
Showing
2 changed files
with
101 additions
and
0 deletions
Show diff stats
public/javascripts/application.js
| @@ -2,6 +2,17 @@ | @@ -2,6 +2,17 @@ | ||
| 2 | 2 | ||
| 3 | $(function(){ | 3 | $(function(){ |
| 4 | activateTabbedPanels(); | 4 | activateTabbedPanels(); |
| 5 | + | ||
| 6 | + $('#watcher_name').live("click", function() { | ||
| 7 | + $(this).closest('form').find('.show').removeClass('show'); | ||
| 8 | + $('#app_watchers_attributes_0_user_id').addClass('show'); | ||
| 9 | + }); | ||
| 10 | + | ||
| 11 | + $('#watcher_email').live("click", function() { | ||
| 12 | + $(this).closest('form').find('.show').removeClass('show'); | ||
| 13 | + $('#app_watchers_attributes_0_email').addClass('show'); | ||
| 14 | + }); | ||
| 15 | + | ||
| 5 | }); | 16 | }); |
| 6 | 17 | ||
| 7 | function activateTabbedPanels() { | 18 | function activateTabbedPanels() { |
| @@ -0,0 +1,90 @@ | @@ -0,0 +1,90 @@ | ||
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | + <head> | ||
| 4 | + <title> | ||
| 5 | + Errbit — | ||
| 6 | + Add App | ||
| 7 | + </title> | ||
| 8 | + <meta content='text/html; charset=utf-8' http-equiv='content-type'> | ||
| 9 | + <meta name="csrf-param" content="authenticity_token"/> | ||
| 10 | + <meta name="csrf-token" content="2xxr2t/FRsJU1jXFRJYSbR/x7dk4jIPwmEhE2sgrWFA="/> | ||
| 11 | + <script src="/javascripts/jquery.js?1281707549" type="text/javascript"></script> | ||
| 12 | + <script src="/javascripts/rails.js?1281707549" type="text/javascript"></script> | ||
| 13 | + <script src="/javascripts/form.js?1281727831" type="text/javascript"></script> | ||
| 14 | + <script src="/javascripts/application.js?1281707549" type="text/javascript"></script> | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + <link href="/stylesheets/reset.css?1281707549" media="screen" rel="stylesheet" type="text/css" /> | ||
| 18 | + <link href="/stylesheets/application.css?1281730151" media="screen" rel="stylesheet" type="text/css" /> | ||
| 19 | + | ||
| 20 | + <style type="text/css" media="screen"> | ||
| 21 | + #app_watchers_attributes_0_user_id, | ||
| 22 | + #app_watchers_attributes_0_email { | ||
| 23 | + display:none; | ||
| 24 | + } | ||
| 25 | + #app_watchers_attributes_0_user_id.show, | ||
| 26 | + #app_watchers_attributes_0_email.show { | ||
| 27 | + display: block; | ||
| 28 | + } | ||
| 29 | + </style> | ||
| 30 | + | ||
| 31 | + </head> | ||
| 32 | + <body class='new' id='apps'> | ||
| 33 | + <div id='header'> | ||
| 34 | + <div> | ||
| 35 | + <a href="/" id="site-name">Errbit</a> | ||
| 36 | + <ul id='session-links'> | ||
| 37 | + <li><a href="/users/sign_out" id="sign-out">Sign out</a></li> | ||
| 38 | + </ul> | ||
| 39 | + </div> | ||
| 40 | + </div> | ||
| 41 | + <div id='nav-bar'> | ||
| 42 | + <ul> | ||
| 43 | + <!-- /%li= link_to 'Dashboard', admin_dashboard_path, :class => active_if_here(:dashboards) --> | ||
| 44 | + <li class='active apps'><a href="/apps">Apps</a></li> | ||
| 45 | + <li class='errs'><a href="/errs">Errs</a></li> | ||
| 46 | + <li class='users'><a href="/users">Users</a></li> | ||
| 47 | + </ul> | ||
| 48 | + <div class='clear'></div> | ||
| 49 | + </div> | ||
| 50 | + <div id='content-wrapper'> | ||
| 51 | + <div id='content-title'> | ||
| 52 | + <h1>Add App</h1> | ||
| 53 | + <span class='meta'></span> | ||
| 54 | + <div id='action-bar'> | ||
| 55 | + <a href="/apps">cancel</a> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div id='content'> | ||
| 59 | + | ||
| 60 | + <form accept-charset="UTF-8" action="/apps" class="new_app" id="new_app" method="post"><div style="margin:0;padding:0;display:inline"><input name="_snowman" type="hidden" value="☃" /><input name="authenticity_token" type="hidden" value="2xxr2t/FRsJU1jXFRJYSbR/x7dk4jIPwmEhE2sgrWFA=" /></div> | ||
| 61 | + <div class='required'> | ||
| 62 | + <label for="app_name">Name</label> | ||
| 63 | + <input id="app_name" name="app[name]" size="30" type="text" /> | ||
| 64 | + </div> | ||
| 65 | + <div class='checkbox'> | ||
| 66 | + <input name="app[resolve_errs_on_deploy]" type="hidden" value="0" /><input id="app_resolve_errs_on_deploy" name="app[resolve_errs_on_deploy]" type="checkbox" value="1" /> | ||
| 67 | + <label for="app_resolve_errs_on_deploy">Resolve errs on deploy</label> | ||
| 68 | + </div> | ||
| 69 | + <fieldset class='nested-wrapper'> | ||
| 70 | + <legend>Watchers</legend> | ||
| 71 | + <div class='nested'> | ||
| 72 | + <div> | ||
| 73 | + <input type="radio" name="watcher_type" id="watcher_name"/> <label class="inline">Name</label> | ||
| 74 | + <input type="radio" name="watcher_type" id="watcher_email"/> <label class="inline">Email</label><br/><br/> | ||
| 75 | + </div> | ||
| 76 | + <div> | ||
| 77 | + <select id="app_watchers_attributes_0_user_id" name="app[watchers_attributes][0][user_id]"><option value="">-- Select a User --</option> | ||
| 78 | + <option value="4c654f41eacf8d2ae8000001">Errbit Admin</option></select> | ||
| 79 | + <input id="app_watchers_attributes_0_email" name="app[watchers_attributes][0][email]" size="30" type="text" /> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + </fieldset> | ||
| 83 | + <div class='add_app'><input id="app_submit" name="commit" type="submit" value="Add" /></div> | ||
| 84 | + </form> | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + <div id='footer'>Powered by <a href="http://github.com/jdpace/errbit" target="_blank">Errbit</a>: the open source Hoptoad server.</div> | ||
| 88 | + | ||
| 89 | + </body> | ||
| 90 | +</html> | ||
| 0 | \ No newline at end of file | 91 | \ No newline at end of file |