stocked
Daniel Asher Resnick 3 years ago
parent 050c71e872
commit 962f5fff48
  1. 4
      src/public/js/stocked.js
  2. 9
      src/views/partials/stocked.erb

@ -1636,7 +1636,9 @@ function StockedSetting(name, settingData) {
this.lifepaths.push(new StockedLifePath(name, settingData[name]));
}
}
// StockedSetting.prototype.
StockedSetting.prototype.addLifepath = function() {
this.lifepaths.push(new StockedLifePath(this.newLifepathName, {}));
}
function StockedLifePath(name, pathData) {
if(pathData) {

@ -252,19 +252,22 @@
</div>
</div>
<div class='panel panel-default'>
<a href='/#/stocked'>+ TODO: Add new lifepath</a>
<input class='form-control input-lg not-editing editable-name'
name='new-lifepath-name' id='new-lifepath-name'
ng-model="setting.newLifepathName" ng-click="$event.stopPropagation()"
ng-focus='editField($event, true)' ng-blur='editField($event, false)' />
<a href='' ng-click='setting.addLifepath()'>Add new lifepath</a>
</div>
</div>
</div>
</div>
</div>
<div class='panel panel-default'>
<label for='stock-name'>Name:</label>
<input class='form-control input-lg not-editing editable-name'
name='new-setting-name' id='new-setting-name'
ng-model="newSettingName" ng-click="$event.stopPropagation()"
ng-focus='editField($event, true)' ng-blur='editField($event, false)' />
<a href='' ng-click='addSetting()'>+ TODO: Add new setting</a>
<a href='' ng-click='addSetting()'>Add new setting</a>
</div>
</div>
</div>

Loading…
Cancel
Save