lift-3-demo icon indicating copy to clipboard operation
lift-3-demo copied to clipboard

Minor improvements.

Open eltimn opened this issue 12 years ago • 8 comments

I few minor improvements I made when I was trying to get my wip_liftjs_30 branch working with it.

I like your JavaScriptLoader snippet. Would you be interested in putting that in lift-extras? I'd like to make that the default in my lift-mongo.g8 template.

eltimn avatar Nov 11 '13 13:11 eltimn

I'd certainly like to put the JavaScriptLoader into lift-extras. Do you wish a pull request or do you mind just copying it over?

I'll review the changes later and pull them in. Did you by any chance already port to BS3? I have planned that for the demo during the next 3 weeks, if you haven't done so already is there a simple way I can do it for both?

tuhlmann avatar Nov 11 '13 15:11 tuhlmann

I'll copy the snippet over.

I haven't ported to bs3 yet and I'm not sure of a simple way to do them both.

A couple of things to keep in mind, if/when you do move to bs 3:

  • At least one of bsAlerts.js and bsFormAlert.js needs to be updated. Ascendant is using an updated. version.

  • lift-extra's BootstrapScreen needs to be updated.

  • bsFormAlerts.js relies on the form element outer div having a specific class name. This was the default in 2.0. In 3.0 they removed those classes. So, you'll need to add some .less code to create these classes. This is the code:

    // add classes to roughly mimic v2 .form-horizontal { .form-actions { .make-row(); margin-top: 20px; padding: 10px;

    .actions {
      .make-lg-column(8);
      .make-lg-column-offset(2);
    }
    

    }

    .form-group { .make-row(); margin-top: 15px;

    .control-label {
      .make-lg-column(2);
    }
    
    .controls {
      .make-lg-column(8);
    }
    
    .controls-offset {
      .make-lg-column(8);
      .make-lg-column-offset(2);
    }
    

    } }

I'll try to get everything updated and released later this week or early next week. Then I can take a look at updating lift-mongo.g8.

eltimn avatar Nov 12 '13 12:11 eltimn

I checked out your changes. I get an exception for "Bootstrap Typeahead Roundtrip Autocomplete" on the Promises tab:

[ERROR] net.liftweb.actor.ActorLogger - Actor threw an exception

I need to dig in to see what happens though. The other one and "jQuery Roundtrip Autocomplete" work.

tuhlmann avatar Nov 14 '13 10:11 tuhlmann

Interesting. Have you found anything yet?

I just tried and it seems to work fine on my system.

eltimn avatar Nov 15 '13 13:11 eltimn

no, not yet. It works without the patch, so I try to apply them bit by bit to see where it bails.

Do you know how to best make these exceptions thrown by the actor visible? Is that a log setting somewhere?

Thanks, Torsten.

2013/11/15 Tim Nelson [email protected]

Interesting. Have you found anything yet?

I just tried and it seems to work fine on my system.

— Reply to this email directly or view it on GitHubhttps://github.com/tuhlmann/lift-3-demo/pull/2#issuecomment-28568137 .

AGYNAMIX(R). Passionate Software. Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim Phone: +49 3721 273445 Fax: +49 3721 273446 Mobile: +49 151 12412427 Web: http://www.agynamix.de Author of "Lift Web Applications How-Tohttp://www.packtpub.com/lift-web-applications/book "

tuhlmann avatar Nov 15 '13 13:11 tuhlmann

Not sure about the actors. I would say try putting in some try/catches and see if you catch anything.

eltimn avatar Nov 15 '13 14:11 eltimn

The problem occurs when I apply the promises.html changes, moving the JavaScript to the .

I have surrounded the whole handler method (AutocompleteSnippet.typeAheadRoundTrip) with a try/catch- no exception is thrown in there. But interestingly the query string is empty and so is the result it returns:

findSuggestions_typeahead DO FIND

Query: None

RE: None

[ERROR] net.liftweb.actor.ActorLogger - Actor threw an exception

I have no clue why the method doesn't work here...

Torsten.

2013/11/15 Tim Nelson [email protected]

Not sure about the actors. I would say try putting in some try/catches and see if you catch anything.

— Reply to this email directly or view it on GitHubhttps://github.com/tuhlmann/lift-3-demo/pull/2#issuecomment-28572404 .

AGYNAMIX(R). Passionate Software. Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim Phone: +49 3721 273445 Fax: +49 3721 273446 Mobile: +49 151 12412427 Web: http://www.agynamix.de Author of "Lift Web Applications How-Tohttp://www.packtpub.com/lift-web-applications/book "

tuhlmann avatar Nov 15 '13 16:11 tuhlmann

Just tested on Ubuntu 13.10, the BS Typeahead problem occurs there as well.

tuhlmann avatar Nov 17 '13 19:11 tuhlmann