Removed alt button, set level to max level for generation on team creation as to prevent confusion. Feature Complete for 1.0 beta.
This commit is contained in:
parent
1114909caf
commit
ed924b9957
|
@ -183,8 +183,12 @@ class @PokemonEditView extends Backbone.View
|
|||
value = parseInt($input.val(), 10)
|
||||
value = @generation.maxLevel if isNaN(value) || value > @generation.maxLevel
|
||||
value = 1 if value < 1
|
||||
$input.val(value)
|
||||
@pokemon.set("level", value)
|
||||
@changeLevel2(value)
|
||||
|
||||
changeLevel2: (level) =>
|
||||
$levelBox = $(".selected_level")
|
||||
$levelBox.val(level)
|
||||
@pokemon.set("level", level)
|
||||
|
||||
changeIv: (e) =>
|
||||
# todo: make changeIv and changeEv DRY
|
||||
|
@ -391,6 +395,7 @@ class @PokemonEditView extends Backbone.View
|
|||
@renderStats()
|
||||
@renderMoves()
|
||||
@renderFormat()
|
||||
@changeLevel2(@generation.maxLevel) if typeof @pokemon.get("level") == "undefined"
|
||||
|
||||
# Disable entering values if this is a NullPokemon
|
||||
$elements = @$el.find("input, select").not(".species input, .species select")
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
p
|
||||
strong In-battle display name:
|
||||
.alt-input.clearfix.hidden
|
||||
.input-wrapper
|
||||
input(type="text")
|
||||
.buttons-wrapper
|
||||
button.button.add-button Add
|
||||
button.button.cancel-button Cancel
|
||||
.alt-dropdown-section.dropdown
|
||||
.select.select-alt(data-toggle="dropdown")
|
||||
ul.dropdown-menu.alt-dropdown(role = "menu")
|
||||
|
||||
p
|
||||
strong Format:
|
||||
.dropdown
|
||||
|
|
|
@ -5496,6 +5496,7 @@
|
|||
this.changeEv = __bind(this.changeEv, this);
|
||||
this.focusEv = __bind(this.focusEv, this);
|
||||
this.changeIv = __bind(this.changeIv, this);
|
||||
this.changeLevel2 = __bind(this.changeLevel2, this);
|
||||
this.changeLevel = __bind(this.changeLevel, this);
|
||||
this.changeGender = __bind(this.changeGender, this);
|
||||
this.changeItem = __bind(this.changeItem, this);
|
||||
|
@ -5750,8 +5751,14 @@
|
|||
if (value < 1) {
|
||||
value = 1;
|
||||
}
|
||||
$input.val(value);
|
||||
return this.pokemon.set("level", value);
|
||||
return this.changeLevel2(value);
|
||||
};
|
||||
|
||||
PokemonEditView.prototype.changeLevel2 = function(level) {
|
||||
var $levelBox;
|
||||
$levelBox = $(".selected_level");
|
||||
$levelBox.val(level);
|
||||
return this.pokemon.set("level", level);
|
||||
};
|
||||
|
||||
PokemonEditView.prototype.changeIv = function(e) {
|
||||
|
@ -6031,6 +6038,9 @@
|
|||
this.renderStats();
|
||||
this.renderMoves();
|
||||
this.renderFormat();
|
||||
if (typeof this.pokemon.get("level") === "undefined") {
|
||||
this.changeLevel2(this.generation.maxLevel);
|
||||
}
|
||||
$elements = this.$el.find("input, select").not(".species input, .species select");
|
||||
$elements.prop("disabled", this.pokemon.isNull);
|
||||
setSelectizeDisabled($elements, this.pokemon.isNull);
|
||||
|
|
|
@ -626,7 +626,7 @@ buf.push("<p class=\"logo\"></p><h2>Chat</h2><ul class=\"nav nav_rooms\"><li cla
|
|||
this["JST"]["new_battle"] = function anonymous(locals
|
||||
/**/) {
|
||||
var buf = [];
|
||||
var locals_ = (locals || {}),window = locals_.window,defaultClauses = locals_.defaultClauses;buf.push("<p><strong>In-battle display name:</strong></p><div class=\"alt-input clearfix hidden\"><div class=\"input-wrapper\"><input type=\"text\"/></div><div class=\"buttons-wrapper\"><button class=\"button add-button\">Add</button><button class=\"button cancel-button\">Cancel</button></div></div><div class=\"alt-dropdown-section dropdown\"><div data-toggle=\"dropdown\" class=\"select select-alt\"></div><ul role=\"menu\" class=\"dropdown-menu alt-dropdown\"></ul></div><p><strong>Format:</strong></p><div class=\"dropdown\"><div data-toggle=\"dropdown\" class=\"select select-format\"></div><ul role=\"menu\" class=\"dropdown-menu format-dropdown\">");
|
||||
var locals_ = (locals || {}),window = locals_.window,defaultClauses = locals_.defaultClauses;buf.push("<p><strong>Format:</strong></p><div class=\"dropdown\"><div data-toggle=\"dropdown\" class=\"select select-format\"></div><ul role=\"menu\" class=\"dropdown-menu format-dropdown\">");
|
||||
var allformats = window.PokeBattle.conditions.Formats()
|
||||
// iterate allformats
|
||||
;(function(){
|
||||
|
|
Loading…
Reference in New Issue