Sha256: 6ac0e83d55d53d7ae406afb5f42d0327a6ab9a12566d859e97e0b8aca0fe551d

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

Ext.ns('Rwiki');

Ext.apply(Ext.form.VTypes, {
  pageName: function(val, field) {
    return /^\w+[\s\w]+\w+$/.test(val);
  },
  pageNameText: 'Page name is invalid'
});

Rwiki.PageNameDialog = Ext.extend(Ext.Window, {
  constructor: function() {
    this.formPanel = new Ext.FormPanel({
      labelWidth: 75,
      frame: true,
      defaultType: 'textfield',
      items: [{
        fieldLabel: 'Page name',
        name: 'page_name',
        allowBlank: false,
        vtype: 'pageName'
      }],
      buttons: [{
        text: 'Ok'
      }, {
        text: 'Cancel'
      }]
    });

    Ext.apply(this, {
      title: 'Page name',
      modal: true,
      width: 280,
      height: 100,
      items: [this.formPanel]
    });

    Rwiki.PageNameDialog.superclass.constructor.apply(this, arguments);
  }
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rwiki-0.2.5 public/javascripts/Rwiki/PageNameDialog.js