Package org.wicketstuff.jquery

Examples of org.wicketstuff.jquery.FunctionString


    @Override protected CharSequence getOnReadyScript() {
      StringBuilder onReady = new StringBuilder("$('#" + getComponent().getMarkupId() + "').resizable(");
     
      // Add callback method to options
      options.set("stop", new FunctionString("function() {\n " + getCallbackScript() + "}\n"));
     
      onReady.append(options.toString(false));
      onReady.append(");");
     
      return onReady;
View Full Code Here


  }

  @Override
    public void renderHead(IHeaderResponse response) {
    droppableOptions.set("accept", dragSelector, false);
    droppableOptions.set("drop", new FunctionString(getDropScript()));

    response.renderJavascriptReference(JQueryBehavior.JQUERY_UI_JS);
    super.renderHead(response);
    }
View Full Code Here

  }

  @Override protected CharSequence getOnReadyScript() {
    StringBuilder onReady = new StringBuilder("$('#" + getComponent().getMarkupId() + "').Resizable(");

    options.set("onStop", new FunctionString("cropCallback"));
    options.set("onDragStop", new FunctionString("cropCallback"));

    options.set("onResize", new FunctionString("function(size, position) {\n this.style.backgroundPosition = '-' + (position.left) + 'px -' + (position.top) + 'px'; \n}\n"));
    options.set("onDrag", new FunctionString("function(x, y) {\n this.style.backgroundPosition = '-' + (x) + 'px -' + (y) + 'px'; \n}\n"));

    options.set("handlers", new FunctionString("{ se: '#resizeSE', e: '#resizeE', ne: '#resizeNE', n: '#resizeN', nw: '#resizeNW', w: '#resizeW', sw: '#resizeSW', s: '#resizeS' }\n"));
   
    onReady.append(options.toString(false));
    onReady.append(");");

    return onReady;
View Full Code Here

  @Override
  public void renderHead(Component component, IHeaderResponse response)
  {
    droppableOptions.set("accept", dragSelector, false);
    droppableOptions.set("drop", new FunctionString(getDropScript()));

    response.render(JavaScriptHeaderItem.forReference(JQueryBehavior.JQUERY_UI_JS));
    super.renderHead(component, response);
  }
View Full Code Here

  protected CharSequence getOnReadyScript()
  {
    StringBuilder onReady = new StringBuilder("$('#" + getComponent().getMarkupId() +
      "').Resizable(");

    options.set("onStop", new FunctionString("cropCallback"));
    options.set("onDragStop", new FunctionString("cropCallback"));

    options.set(
      "onResize",
      new FunctionString(
        "function(size, position) {\n this.style.backgroundPosition = '-' + (position.left) + 'px -' + (position.top) + 'px'; \n}\n"));
    options.set(
      "onDrag",
      new FunctionString(
        "function(x, y) {\n this.style.backgroundPosition = '-' + (x) + 'px -' + (y) + 'px'; \n}\n"));

    options.set(
      "handlers",
      new FunctionString(
        "{ se: '#resizeSE', e: '#resizeE', ne: '#resizeNE', n: '#resizeN', nw: '#resizeNW', w: '#resizeW', sw: '#resizeSW', s: '#resizeS' }\n"));

    onReady.append(options.toString(false));
    onReady.append(");");
View Full Code Here

  {
    StringBuilder onReady = new StringBuilder("$('#" + getComponent().getMarkupId() +
      "').resizable(");

    // Add callback method to options
    options.set("stop", new FunctionString("function() {\n " + getCallbackScript() + "}\n"));

    onReady.append(options.toString(false));
    onReady.append(");");

    return onReady;
View Full Code Here

TOP

Related Classes of org.wicketstuff.jquery.FunctionString

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.