Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- showLoginPane: function(){
- var me = this;
- this._loginData = SC.ObjectController.create({
- username: '',
- password: ''
- });
- var sheet = SC.SheetPane.create({
- layout: { width:400, height: 250, centerX: 0 },
- contentView: SC.View.extend({
- layout: { top: 0, right: 0, bottom: 0, left: 0 },
- childViews: "usernameLabel passwordLabel usernameInput passwordInput cancelButton loginButton".w(),
- usernameLabel: SC.LabelView.design({
- layout: { height: 25, width: 150, bottom: 120, centerX: -80 },
- textAlign: SC.ALIGN_CENTER,
- value: 'User name:'
- }),
- passwordLabel: SC.LabelView.design({
- layout: { height: 25, width: 150, bottom: 120, centerX: 80 },
- textAlign: SC.ALIGN_CENTER,
- value: 'Password:'
- }),
- usernameInput: SC.TextFieldView.design({
- layout: { height: 25, width: 150, bottom: 80, centerX: -80 },
- hint: 'Username...',
- isPassword: NO,
- isTextArea: NO,
- valueBinding: me._loginData.username
- }),
- passwordInput: SC.TextFieldView.design({
- layout: { height: 25, width: 150, bottom: 80, centerX: 80 },
- hint: 'Password...',
- isPassword: YES,
- isTextArea: NO,
- valueBinding: me._loginData.password
- }),
- cancelButton: SC.ButtonView.design({
- layout: { height: 25, width: 100, bottom: 20, centerX: 80 },
- title: 'Annuleren',
- action: 'closeLoginPane',
- target: me
- }),
- loginButton: SC.ButtonView.design({
- layout: { height: 25, width: 100, bottom: 20, centerX: -80 },
- title: 'Login',
- action: 'attemptLogin',
- target: me
- })
- })
- });
- this._pane = sheet;
- sheet.append();
- },
Add Comment
Please, Sign In to add comment