Skip to content

Commit

Permalink
merging master into local, application-area branch, #33
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Jun 18, 2019
2 parents 407d485 + c73318f commit 4ecb4fe
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ define([

Workflow.apply(this, [params]);

this.updateState = function(activeStep) {
var previousStep = self.previousStep();
if (previousStep) {
self.state.steps[ko.unwrap(previousStep.name)] = previousStep.stateProperties();
self.state.activestep = activeStep._index;
self.state.previousstep = previousStep._index;
self.updateUrl();
}
self.previousStep(activeStep);
};

self.activeStep.subscribe(this.updateState);

self.ready(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define([
'viewmodels/workflow',
'viewmodels/workflow-step'
], function(ko, Workflow, Step) {
return ko.components.register('add-consultation', {
return ko.components.register('consultation-workflow', {
viewModel: function(params) {

var self = this;
Expand Down Expand Up @@ -147,6 +147,6 @@ define([

self.ready(true);
},
template: { require: 'text!templates/views/components/plugins/add-consultation.htm' }
template: { require: 'text!templates/views/components/plugins/consultation-workflow.htm' }
});
});
29 changes: 0 additions & 29 deletions consultations_prj/media/js/views/components/plugins/site-visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,37 +195,8 @@ define([

Workflow.apply(this, [params]);

this.updateState = function(val) {
var activeStep = val;
var previousStep = self.previousStep();
if (previousStep) {
self.state.steps[ko.unwrap(previousStep.name)] = previousStep.stateProperties();
self.state.activestep = val._index;
self.state.previousstep = previousStep._index;
self.updateUrl();
}
// if (ko.unwrap(activeStep.name) === 'assignaddress') {
// activeStep.requirements = self.state.steps.assignaddress;
// }
// if (ko.unwrap(activeStep.name) === 'setname') {
// if (self.state.steps['assignaddress']) {
// var tiledata = self.state.steps['assignaddress'].tile
// var tilevals = _.map(tiledata, function(v, k) {return v})
// var nodeval = tilevals[0] + "," + tilevals[1] + " " + tilevals[2];
// activeStep.requirements = self.state.steps.setname || {};
// // activeStep.requirements.applyOutputToTarget = self.state.steps['assignaddress'].applyOutputToTarget;
// // activeStep.requirements.targetnode = '1b95fb70-53ef-11e9-9001-dca90488358a';
// activeStep.requirements.targetnodegroup = ko.unwrap(activeStep.nodegroupid);
// activeStep.requirements.value = nodeval;
// }
// }
self.previousStep(val);
}

self.activeStep.subscribe(this.updateState);



self.ready(true);
},
template: { require: 'text!templates/views/components/plugins/site-visit.htm' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"pluginid": "a1667717-b7bd-4570-b27a-ec352c767e0e",
"name": "Add Consultation",
"icon": "fa fa-table",
"component": "views/components/plugins/add-consultation",
"componentname": "add-consultation",
"component": "views/components/plugins/consultation-workflow",
"componentname": "consultation-workflow",
"config": {},
"slug": "add-consultation",
"slug": "consultation-workflow",
"sortorder": 0
}
38 changes: 17 additions & 21 deletions consultations_prj/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
<body id="body" data-spy="scroll" data-target=".splash-nav" class="demo-lightbox-gallery">

<!--=== Header ===-->
<nav class="splash-nav navbar navbar-fixed-top" role="navigation">
<nav class="cons-splash-nav navbar navbar-fixed-top" role="navigation">
<div class="nav-container">
<div class="navbar-brand-disco">
<div class="navbar-brand-disco-icon">
<img src="{% static 'img/landing/arches_logo_dark.png' %}" style="height: 48px; width: 48px;" alt="Logo">
<img src="{% static 'img/landing/arches_logo_dark.png' %}" style="height: 80px; width: 80px; text-align: center;" alt="Arches Logo">
</div>
<div>
<h2>{% trans "Arches Consultations" %}</h2>
Expand All @@ -69,34 +69,30 @@ <h2>{% trans "Arches Consultations" %}</h2>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<div class="menu-container">
<ul class="nav navbar-nav splash-list">
{% if user.username == 'anonymous' %}
<li>
<a id="auth-link" href="{% url 'auth' %}?next={% url 'home' %}{% if user.username != 'anonymous' %}&logout=true{% endif %}">
<button>{% trans "Login" %}</button>
</a>
</li>
{% else %}
<ul class="nav navbar-nav cons-splash-list">
<li class="page-scroll">
<a href="{% url 'consultations' %}">{% trans "New" %}</a>
</li>
<li class="page-scroll">
<a href="{% url 'search_home' %}">{% trans "Find" %}</a>
</li>
{% if user|can_create_resource_instance %}
<li class="page-scroll">
<a href="{% url 'resource' %}">{% trans "Manage" %}</a>
{% if user|can_create_resource_instance %}
<li class="page-scroll">
<a href="{% url 'resource' %}">{% trans "Manage" %}</a>
</li>
{% endif %}
<li class="page-scroll">
{% if user.username == 'anonymous' %}
<a id="auth-link" href="{% url 'auth' %}?next={% url 'home' %}{% if user.username != 'anonymous' %}&logout=true{% endif %}">{% trans "Login" %}</a>
{% else %}
<a class="auth-welcome" href="{% url 'user_profile_manager' %}">
{% trans "Welcome, " %} {{ user.first_name|default:user.username }}
</a>
</li>
<li>
<a href="{% url 'auth' %}?next={% url 'home' %}{% if user.username != 'anonymous' %}&logout=true{% endif %}">({% trans 'logoff' %})</a>
{% endif %}
<li class="page-scroll" >
<a class="auth-welcome" href="{% url 'user_profile_manager' %}">
{% trans "Welcome, " %} {{ user.first_name|default:user.username }}
</a>
</li>
<li>
<a href="{% url 'auth' %}?next={% url 'home' %}{% if user.username != 'anonymous' %}&logout=true{% endif %}">({% trans 'logoff' %})</a>
</li>
{% endif %}
</ul>
</div>
</div>
Expand Down

0 comments on commit 4ecb4fe

Please sign in to comment.