mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-01 05:47:17 +00:00
21 lines
579 B
JavaScript
21 lines
579 B
JavaScript
import Route from '@ember/routing/route';
|
|
import { scheduleOnce } from '@ember/runloop';
|
|
import $ from 'jquery';
|
|
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
|
|
|
export default Route.extend(AuthenticatedRouteMixin, {
|
|
init() {
|
|
this._super(...arguments);
|
|
scheduleOnce('afterRender', this, 'bindKeyEvent');
|
|
},
|
|
|
|
bindKeyEvent() {
|
|
$('#name').bind('paste keyup', () =>
|
|
scheduleOnce(() => {
|
|
this.controller.set('schemaName', $('#name').val());
|
|
this.controller.updateSchemas(1, 0);
|
|
})
|
|
);
|
|
}
|
|
});
|