1
0
Fork 0
forked from OpenNeo/impress

Merge branch 'bugmash'

This commit is contained in:
Emi Matchu 2010-11-16 17:26:22 -05:00
commit 09da6e31ac
5 changed files with 15 additions and 7 deletions

View file

@ -273,7 +273,7 @@ body.outfits-edit
height: auto height: auto
max-height: 100% max-height: 100%
#preview-search-form #preview-search-form
bottom: 1em bottom: 1.5em
left: 0 left: 0
overflow: auto overflow: auto
padding: .5em 1em padding: .5em 1em

View file

@ -49,16 +49,16 @@
%li %li
%a{:href => "http://forum.openneo.net/", :target => "_blank"} Forum %a{:href => "http://forum.openneo.net/", :target => "_blank"} Forum
%li %li
%a{:href => "http://github.com/matchu/openneo-impress"} The Source Code %a{:href => "http://github.com/matchu/openneo-impress-rails"} Source Code
%li %li
%a{:href => terms_path} Terms of Use %a{:href => terms_path} Terms of Use
%div %div
Contact: Contact:
%ul %ul
%li %li
%a{:href => "http://openneo.uservoice.com/forums/40720-dress-to-impress"} Feedback %a{:href => "http://openneo.uservoice.com/forums/40720-dress-to-impress"} Suggestions
%li %li
%a{:href => "mailto:webmaster@openneo.net"} Questions, comments, bug reports %a{:href => "mailto:webmaster@openneo.net"} Questions, comments, bugs
%p %p
Images © 2000-2010 Neopets, Inc. All Rights Reserved. Images © 2000-2010 Neopets, Inc. All Rights Reserved.
Used With Permission Used With Permission

View file

@ -209,6 +209,10 @@ View.Fullscreen = function (wardrobe) {
$('#preview').data('fit', fit); $('#preview').data('fit', fit);
win.resize(fit).load(fit); win.resize(fit).load(fit);
// run fit after search updates select fields
function fitSoon() { setTimeout(fit, 0) }
wardrobe.item_zone_sets.bind('update', fitSoon);
wardrobe.pet_attributes.bind('update', fitSoon);
fit(); fit();
var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a}; var Konami=function(){var a={addEvent:function(b,c,d,e){if(b.addEventListener)b.addEventListener(c,d,false);else if(b.attachEvent){b["e"+c+d]=d;b[c+d]=function(){b["e"+c+d](window.event,e)};b.attachEvent("on"+c,b[c+d])}},input:"",pattern:"3838404037393739666513",load:function(b){this.addEvent(document,"keydown",function(c,d){if(d)a=d;a.input+=c?c.keyCode:event.keyCode;if(a.input.indexOf(a.pattern)!=-1){a.code(b);a.input=""}},this);this.iphone.load(b)},code:function(b){window.location=b},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:false,capture:false,keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(b){a.code(b)},load:function(b){a.addEvent(document,"touchmove",function(c){if(c.touches.length==1&&a.iphone.capture==true){c=c.touches[0];a.iphone.stop_x=c.pageX;a.iphone.stop_y=c.pageY;a.iphone.tap=false;a.iphone.capture=false;a.iphone.check_direction()}});a.addEvent(document,"touchend",function(){a.iphone.tap==true&&a.iphone.check_direction(b)},false);a.addEvent(document,"touchstart",function(c){a.iphone.start_x=c.changedTouches[0].pageX;a.iphone.start_y=c.changedTouches[0].pageY;a.iphone.tap=true;a.iphone.capture=true})},check_direction:function(b){x_magnitude=Math.abs(this.start_x-this.stop_x);y_magnitude=Math.abs(this.start_y-this.stop_y);x=this.start_x-this.stop_x<0?"RIGHT":"LEFT";y=this.start_y-this.stop_y<0?"DOWN":"UP";result=x_magnitude>y_magnitude?x:y;result=this.tap==true?"TAP":result;if(result==this.keys[0])this.keys=this.keys.slice(1,this.keys.length);this.keys.length==0&&this.code(b)}}};return a};
@ -691,7 +695,7 @@ View.PetStateForm = function (wardrobe) {
label.appendTo(li); label.appendTo(li);
li.appendTo(ul); li.appendTo(ul);
} }
updatePetState(wardrobe.outfit.pet_state); updatePetState(wardrobe.outfit.getPetState());
} }
}); });

View file

@ -745,8 +745,8 @@ function Wardrobe() {
function setFullOutfit(new_outfit) { function setFullOutfit(new_outfit) {
outfit = new_outfit; outfit = new_outfit;
controller.in_transaction = true; controller.in_transaction = true;
controller.setPetTypeByColorAndSpecies(outfit.color_id, outfit.species_id);
controller.setPetStateById(outfit.pet_state_id); controller.setPetStateById(outfit.pet_state_id);
controller.setPetTypeByColorAndSpecies(outfit.color_id, outfit.species_id);
controller.setClosetItemsByIds(outfit.getClosetItemIds()); controller.setClosetItemsByIds(outfit.getClosetItemIds());
controller.setWornItemsByIds(outfit.getWornItemIds()); controller.setWornItemsByIds(outfit.getWornItemIds());
controller.events.trigger('setOutfit', outfit); controller.events.trigger('setOutfit', outfit);
@ -774,6 +774,10 @@ function Wardrobe() {
return outfit; return outfit;
} }
this.getPetState = function () {
return outfit.pet_state;
}
this.getPetType = function () { this.getPetType = function () {
return outfit.pet_type; return outfit.pet_type;
} }

View file

@ -1097,7 +1097,7 @@ body.outfits-edit.fullscreen #preview-sidebar.viewing-saving-outfit {
} }
/* line 275, ../../../app/stylesheets/outfits/_edit.sass */ /* line 275, ../../../app/stylesheets/outfits/_edit.sass */
body.outfits-edit.fullscreen #preview-search-form { body.outfits-edit.fullscreen #preview-search-form {
bottom: 1em; bottom: 1.5em;
left: 0; left: 0;
overflow: auto; overflow: auto;
padding: 0.5em 1em; padding: 0.5em 1em;