Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Retire "Upload to Aggregate" form #326

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions public/javascripts/data-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ var dataNS = odkmaker.namespace.load('odkmaker.data');
error: function(request, status, error)
{
console.log("Could not open the form, error: " + error);
if (error == "Not Found")

if (error == "Not Found")
{
var msg = '<p>Error: No form selected.</p>'
} else
} else
{
var msg = '<p>Could not open the form. See browser console log for a detailed error message.</p>';
}
Expand All @@ -52,7 +52,7 @@ var dataNS = odkmaker.namespace.load('odkmaker.data');
odkmaker.application.newForm();
else
odkmaker.application.confirm('Are you sure? You will lose unsaved changes to the current form.', odkmaker.application.newForm);

});
$('.menu .saveLink').click(function(event)
{
Expand Down Expand Up @@ -270,6 +270,7 @@ var dataNS = odkmaker.namespace.load('odkmaker.data');
$form.submit();
});

/* #322 remove aggregate */
$('.aggregateDialog .aggregateExportButton').click(function(event)
{
event.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions public/javascripts/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ var modalsNS = odkmaker.namespace.load('odkmaker.modals');
},
aggregateDialog: function($dialog)
{
/* #322 remove aggregate */
$dialog.removeClass('exporting');
},
formPropertiesDialog: function($dialog)
Expand Down
3 changes: 2 additions & 1 deletion public/stylesheets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,7 @@ body > .control.last .controlFlowArrow,
float: right;
}

/* #322 remove aggregate */
.aggregateDialog .aggregateInstanceName
{
width: calc(100% - 7.6em);
Expand Down Expand Up @@ -1475,7 +1476,7 @@ body > .control.last .controlFlowArrow,
padding-left: 15em;
}

.hidden
.hidden
{
display: none;
}
Expand Down
5 changes: 3 additions & 2 deletions server/odkbuild_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ class OdkBuild < Sinatra::Application

# bounce a payload through to a local build2xlsform instance for dev env. in prod, this ought
# to be done at the apache/nginx/etc level via proxypass.
# The host and port for the build2xlsform service are parameterised to allow
# both a source install (localhost:8686) and docker-compose install (build2xls:8686).
# The host and port for the build2xlsform service are parameterised to allow
# both a source install (localhost:8686) and docker compose install (build2xls:8686).
post '/convert' do
srv = ENV['B2X_HOST'] || 'localhost'
prt = ENV['B2X_PORT'] || '8686'
Expand All @@ -247,6 +247,7 @@ class OdkBuild < Sinatra::Application
return res.body
end

# #322 remove aggregate
# bounce a payload through the server to aggregate
post '/aggregate/post' do
# make sure we're good to go
Expand Down
5 changes: 5 additions & 0 deletions server/views/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
<li><a href="#saveLocally" class="saveLocallyLink">Save Form to File...</a></li>
<li><a href="#loadLocallyDialog" rel="modal" class="destructive">Load Form from File...</a></li>
<li class="divider"></li>
<!-- #322 remove aggregate -->
<li><a href="#aggregateDialog" id="aggregateLink" rel="modal">Upload Form to Aggregate...</a></li>
<!-- #227 upload to central
<li><a href="#centralDialog" id="centralLink" rel="modal">Upload Form to Central...</a></li>
-->
<li><a href="#exportDialog" id="exportLink" rel="modal">Export to XML...</a></li>
<li><a href="#xlsformExport" id="xlsformLink">Export to XLSForm</a></li>
</ul>
Expand Down Expand Up @@ -453,6 +457,7 @@
</div>
</div>

<!-- #322 remove aggregate -->
<div class="modal narrowModal aggregateDialog">
<h3>Upload Form to Aggregate</h3>
<div class="modalContents">
Expand Down