mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 09:24:59 +08:00
change new results hendlers
This commit is contained in:
parent
81a3cb0a41
commit
070a829c49
2 changed files with 13 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
// New result asset behaviour
|
||||
function initNewResultAsset() {
|
||||
$('#new-result-asset').on('ajax:success', function(e, data) {
|
||||
debugger;
|
||||
var $form = $(data.html);
|
||||
$('#results').prepend($form);
|
||||
|
||||
|
|
|
@ -18,19 +18,28 @@
|
|||
<span class="hidden-xs"><%= t'my_modules.results.add_label' %></span>
|
||||
<% end %>
|
||||
<% if can_create_result_text_in_module(@my_module) %>
|
||||
<a class="btn btn-primary" id="new-result-text" href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>" data-remote="true">
|
||||
<a class="btn btn-primary"
|
||||
id="new-result-text"
|
||||
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
|
||||
href="#">
|
||||
<span class="glyphicon glyphicon-font"></span>
|
||||
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if can_create_result_table_in_module(@my_module) %>
|
||||
<a class="btn btn-primary" id="new-result-table" href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>" data-remote="true">
|
||||
<a class="btn btn-primary"
|
||||
id="new-result-table"
|
||||
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
|
||||
href="#">
|
||||
<span class="glyphicon glyphicon-list-alt"></span>
|
||||
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if can_create_result_asset_in_module(@my_module) %>
|
||||
<a class="btn btn-primary" id="new-result-asset" href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>" data-remote="true">
|
||||
<a class="btn btn-primary"
|
||||
id="new-result-asset"
|
||||
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
|
||||
href="#">
|
||||
<span class="glyphicon glyphicon-picture"></span>
|
||||
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Reference in a new issue