Package gwtquery.plugins.ui.widgets

Examples of gwtquery.plugins.ui.widgets.Dialog


        tab_counter++;
      }
    };

    // modal dialog init: custom buttons and a "close" callback reseting the form inside
    final Dialog dialog = $("#dialog").as(Ui).dialog(Dialog.Options.create().autoOpen(false).modal(true)//
    .buttons(Buttons.create() //
    .define("Add", new Function() {
      public boolean f(Event e) {
        addTab.f((Element) null);
        $("#dialog").as(Ui).dialog().close();
        return false;
      }
    }) //
    .define("Cancel", new Function() {
      public boolean f(Event e) {
        $("#dialog").as(Ui).dialog().close();
        return false;
      }
    })));

    dialog.bind(Dialog.Event.open, new Function() {
      public void f(Element e) {
        tab_title_input.focus();
      };
    })//
    .bind(Dialog.Event.close, new Function() {
      public void f(Element e) {
        FormElement form = $("form", dialog.elements()[0]).elements()[0].cast();
        form.reset();
      };
    });

    // addTab button: just opens the dialog
    $("#add_tab").as(Ui).button().click(new Function() {
      public boolean f(Event e) {
        dialog.open();
        return false;
      };
    });

  }
View Full Code Here

TOP

Related Classes of gwtquery.plugins.ui.widgets.Dialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.