$.widget("ui.Scrollers",{_create:function(){var i=this.element,t=this;i.form({columns:[{label:i18n("name"),widget:"<input class = 'resource-dialog-input ui-widget-content ui-corner-al name'/>"}]});var n={};n[i18n("confirm_")]=function(){t.confirm()&&i.dialog("close")};n[i18n("cancel")]=function(){i.dialog("close")};i.dialog({width:280,height:170,buttons:n,modal:!0,closeText:i18n("close_")})},updateScroller:function(i,t,n){var o=this.element;this.callback=t;this.oldId=n;this.oldJson=i;o.find(".name").val(n);this.addHistory()},confirm:function(){var i=this.element,t=i.find(".name").val();return this.callback&&this.callback(this.oldJson,t)},addHistory:function(i){this.history||(this.history=new gamemeiHistory);$.history=this.history;i&&$.history.add(i)}});