Commit e07f7213 authored by Leigh B Stoller's avatar Leigh B Stoller

Address Eric's nits in issue #189. This closes issue #189.

parent 70954aec
...@@ -66,6 +66,8 @@ $(function () ...@@ -66,6 +66,8 @@ $(function ()
disabled: window.DISABLED, disabled: window.DISABLED,
withpublishing: window.WITHPUBLISHING, withpublishing: window.WITHPUBLISHING,
}); });
show_html = aptforms.FormatFormFieldsHorizontal(show_html,
{"wide" : true});
$('#page-body').html(show_html); $('#page-body').html(show_html);
$('#waitwait_div').html(waitwaitString); $('#waitwait_div').html(waitwaitString);
......
...@@ -149,6 +149,7 @@ echo "<script src='js/lib/codemirror-min.js'></script>\n"; ...@@ -149,6 +149,7 @@ echo "<script src='js/lib/codemirror-min.js'></script>\n";
REQUIRE_UNDERSCORE(); REQUIRE_UNDERSCORE();
REQUIRE_SUP(); REQUIRE_SUP();
REQUIRE_MOMENT(); REQUIRE_MOMENT();
REQUIRE_APTFORMS();
REQUIRE_MARKED(); REQUIRE_MARKED();
SPITREQUIRE("js/show-profile.js", SPITREQUIRE("js/show-profile.js",
"<script src='js/lib/jquery-ui.js'></script>\n". "<script src='js/lib/jquery-ui.js'></script>\n".
......
...@@ -88,71 +88,69 @@ ...@@ -88,71 +88,69 @@
col-xs-12'> col-xs-12'>
<div class='panel panel-default'> <div class='panel panel-default'>
<div class='panel-body'> <div class='panel-body'>
<div class='panel-body'> <form id="profile-form" class='form-horizontal' role='form'
<table class='table nospaceafter border-none'> data-format="wide">
<tr> <fieldset>
<td>Topology:</td> <div class="form-group">
<td> <div class='format-me'
<button class='btn btn-primary btn-xs data-key='profile_rspec' data-label='Topology'>
type='button' <div class='row'>
style='margin-right: 10px;' <div class='col-xs-12'>
id='edit_topo_modal_button'> <button class='btn btn-primary btn-xs'
Visualize</button> type='button'
<button class='btn btn-primary btn-xs' style='margin-right: 10px;'
type='button' id='edit_topo_modal_button'>
style='margin-right: 10px;' Visualize</button>
id='show_source_modal_button'> <button class='btn btn-primary btn-xs'
Source</button> type='button'
<button class='btn btn-primary btn-xs hidden' style='margin-right: 10px;'
type='button' id='show_source_modal_button'>
style='margin-right: 10px;' Source</button>
id='show_xml_modal_button'> <button class='btn btn-primary btn-xs hidden'
XML</button> type='button'
</td> style='margin-right: 10px;'
</tr> id='show_xml_modal_button'>
<tr> XML</button>
<td>Description:</td> </div>
<td>
<div style='border: solid #000 1px;'>
<div id='profile_description'
style='padding-left: 2px; padding-right: 2px;'>
</div> </div>
</div> </div>
</td> </div>
</tr> <div class="form-group">
<tr> <div class='form-control format-me'
<td>Instructions:</td> id="profile_description"
<td> data-key='profile_description' data-label='Description'>
<div style='border: solid #000 1px;'>
<div id='profile_instructions'
style='padding-left: 2px; padding-right: 2px;'>
</div>
</div> </div>
</td> </div>
</tr> <div class="form-group">
</table> <div class='form-control format-me'
<% if (!disabled) { %> id="profile_instructions"
<button class='btn btn-primary btn-sm pull-right' data-key='profile_instructions' data-label='Instructions'>
</div>
</div>
</fieldset>
</form>
<% if (!disabled) { %>
<button class='btn btn-primary btn-xs pull-right'
id='profile_instantiate_button' id='profile_instantiate_button'
style='margin-right: 10px;' style='margin-right: 10px;'
name='create'>Instantiate name='create'>Instantiate
</button> </button>
<a class='btn btn-primary btn-sm pull-right' <a class='btn btn-primary btn-xs pull-right'
style='margin-right: 10px;' style='margin-right: 10px;'
type='button' type='button'
href='manage_profile.php?action=copy&uuid=<%= version_uuid %>'> href='manage_profile.php?action=copy&uuid=<%= version_uuid %>'>
Copy Copy
</a> </a>
<% } %> <% } %>
<% if (canedit) { %> <% if (canedit) { %>
<a class='btn btn-primary btn-sm pull-right' <a class='btn btn-primary btn-xs pull-right'
style='margin-right: 10px;' style='margin-right: 10px;'
type='button' type='button'
href='manage_profile.php?action=edit&uuid=<%= version_uuid %>'> href='manage_profile.php?action=edit&uuid=<%= version_uuid %>'>
Edit Edit
</a> </a>
<% } %> <% } %>
<% if (!disabled) { %> <% if (!disabled) { %>
<span class='pull-right'' <span class='pull-right''
data-toggle='popover' data-toggle='popover'
data-delay='{"hide":1500, "show":250}' data-delay='{"hide":1500, "show":250}'
...@@ -160,7 +158,7 @@ ...@@ -160,7 +158,7 @@
data-content="Share this profile with other users by data-content="Share this profile with other users by
sending them a link to instantiate it. sending them a link to instantiate it.
Click for more info."> Click for more info.">
<button class='btn btn-info btn-sm' <button class='btn btn-info btn-xs'
id='profile_share_button' id='profile_share_button'
data-toggle='modal' data-target='#share_profile_modal' data-toggle='modal' data-target='#share_profile_modal'
style='margin-right: 10px;' style='margin-right: 10px;'
...@@ -168,33 +166,32 @@ ...@@ -168,33 +166,32 @@
Share Share
</button> </button>
</span> </span>
<% } %> <% } %>
</div>
</div> </div>
</div> </div>
<textarea name="formfields[profile_rspec]"
id='profile_rspec_textarea'
class='form-control hidden'
type='textarea'
data-key='profile_rspec'
rows=5><%- fields.profile_rspec %></textarea>
<textarea name="formfields[profile_script]"
id='profile_script_textarea'
class='form-control hidden'
type='textarea'
data-key='profile_script'
rows=5><%- fields.profile_script %></textarea>
</div> </div>
<!-- place to hang the modals --> <textarea name="formfields[profile_rspec]"
<div id='showtopomodal_div'></div> id='profile_rspec_textarea'
<div id='editmodal_div'></div> class='form-control hidden'
<div id='waitwait_div'></div> type='textarea'
<div id='imaging_div'></div> data-key='profile_rspec'
<div id='renderer_div'></div> rows=5><%- fields.profile_rspec %></textarea>
<div id='oops_div'></div> <textarea name="formfields[profile_script]"
<div id='guest_div'></div> id='profile_script_textarea'
<div id='publish_div'></div> class='form-control hidden'
<div id='instantiate_div'></div> type='textarea'
<div id='rspectext_div'></div> data-key='profile_script'
<div id='share_div'> rows=5><%- fields.profile_script %></textarea>
</div> </div>
<!-- place to hang the modals -->
<div id='showtopomodal_div'></div>
<div id='editmodal_div'></div>
<div id='waitwait_div'></div>
<div id='imaging_div'></div>
<div id='renderer_div'></div>
<div id='oops_div'></div>
<div id='guest_div'></div>
<div id='publish_div'></div>
<div id='instantiate_div'></div>
<div id='rspectext_div'></div>
<div id='share_div'>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment