Requirements for cherry picking a single function out of jQuery Mobile? - ruby-on-rails

I'm interested in incorporating the jQuery Mobile Datetime text input capabilities into a hobby Rails app that I'm building. I do not need any of the other jQuery Mobile features.
What is the best way to go about this? Will it work if I include nothing but the jquery.mobile.forms.textinput.js file from github or are there other required jQuery Mobile files?

I know in the Release Notes for RC1 they had decoupled jQM and were working on a Download Builder
http://jquerymobile.com/blog/2011/09/29/jquery-mobile-1-0rc1-released/
Download builder: In the works
Now that we’ve decoupled most of the UI widgets, we’ve set the stage
for there to be a download builder. This will let you build a custom
version of jQuery Mobile to only include the parts you need. For
example, you could just use the core files to add Ajax-based
navigation with pushState and leverage some of the touch events and
other utilities with a very lightweight build (roughly 10k). Or, you
could add in specific UI widgets like form elements, listviews, etc.
to create an optimized build. We’re aiming to have a download builder
tool launch as part of 1.0 final in some form. We’re working on a
dependency map now for all the plugins to support this tool.
Not sure if this is release as of yet

As far as I know there is no widget for a date/time picker packaged with jQuery Mobile at the moment.
There are however several options out there (and I'm sure you can find more with some Google-time):
http://mobiscroll.com/ - I use this one on mobile websites
http://dev.jtsage.com/jQM-DateBox/ - Updated to work well with jQuery Mobile 1.0RC3, but note that it requires jQuery Mobile (see J.T.Sage's comment below).

Related

How do I make an inline PDF Viewer

I want to open PDF files from assets but inline with other flutter widgets, like in column widget.
I have used flutter_pdf_viewer plugin. Although being a good plugin, it opens PDF files as a new activity instead of embedding them or display them inline with other widgets.
Can anybody help me figure out how to achieve this?
The flutter_pdf_viewer plugin has a working MVP for inline pdfs available at the inline branch.
A full example is available here.
It still has some stability issues, which are being discussed over here.
In the latest master builds of Flutter, there is an AndroidView widget that allows you to display native android views.
Combine with AndroidPdfViewer to display an interactive PDF in a widget.
Of course that will only work on Android. Right now there is no comparable solution for iOS.

Is any possibilities to use ANT UI Design in Electron Desktop App Framework?

I have found so many facility to use javascript, Angular, material design ui with Electron App Framework, I would like to know, is there any possibilities to use ANT UI for my desktop application? At-least some work around.
Yes
The short answer is yes. Electron provides an entire NodeJS environment and allows you to use common Node, Javascript and React toolsets.
In fact, Electron is listed as an officially supported environment on their Github page.
That being said, it's a very diverse library so there might be occurrences where a particular component is not supported or might need tweaking to be compatible with the Electron environment.
Update
The company I work for actually had to do this for a project we're working on so I can officially confirm that it works great.

How do I know what's in my jQuery UI custom build?

I'd like to upgrade my jQuery UI version due to an annoying slider bug found in older versions.
My problem is that I'm using a custom jQuery UI build, with an inherited codebase. The current jquery-ui.min.js is about 260k, so I really don't want to download the whole thing at 2 megs zipped!! Is there any way to easily figure out exactly what I'm using so I can upgrade only the relevant bits?

What is Fast&Easy way to migrate Flex 3.5/4 Web App to Flash Builder 4.6 for Mobile iOS?

I currently have a fully working web app built in Flex 3.5/4 using java back end with Spring Framework using TomCat.
I need to migrate or convert this project into Flash Builder 4.6 to create a mobile iOS application and use the same SpringFramework with TomCat. How can i do this?
Do i just copy code over and adjust?
Do I export from flex 3.5/4 and import into flash builder 4.6 and adjust for mobile?
Is there a certain export feature that exports to mobile?
Do I have to change the code to mobile components by hand? Is there anything automated?
I have spent about 3 days trying to search and figure out specific detailed information on what to do, but oddly enough, I have not found anything that is helpful. I say it is ODD because Adobe claims that with Flash Builder 4.6 and 4.7, migrating to different platforms, will remove about 70% of the work with the latest Flash Builder. However, I have found no tutorials or steps on exactly what to do. I don't even know if the spring framework would work with TomCat for an iOS app.
Here's what I have found out through my research:
1. Migrating to mobile, I will have to change various code to use the mobile optimized components for performance.
What do I need to do?
EDIT: I even tried adding mx.swc to my library path just for testing purposes to make things easier for the migration/conversion and it still doesn't fix my error in Flash Builder 4.6 mobile project with mx:Application:
http://i.stack.imgur.com/dFdIk.jpg
Lots of things to cover; and I'm not sure where to start. First, I want to clarify that the browser based app you developed for a 72-ish dpi 15+ inch computer screen may not easily migrate to 3.5/4 inch iPhone or 9.7 inch iPad screen. Keeping that in mind
Do i just copy code over and adjust?
I would start there, yes. Even better if you move the 'shared' code into a library project so you can use it for your web app and your mobile project. Flex 3.5 does not formally have mobile support; so I would not expect great performance on a mobile device. You'll also have to add some "non-mobile optimized" libraries to the library path manually in a Flash Builder Mobile project. The MX.swc is probably the big one, as you already mentioned.
Do I export from flex 3.5/4 and import into flash builder 4.6 and adjust for mobile?
In Flash Builder 4.6 mobile projects are different than web projects. Most likely you'll want to move as much shared code as possible into a library project and then create a web project--for maintenance of your current application--and a mobile project for deployment to iOS and other mobile devices.
Is there a certain export feature that exports to mobile?
If you have created a Flash Builder Mobile project; then yes you can export to iOS, Android, or Blackberry.
Do I have to change the code to mobile components by hand? Is there anything automated?
Yes, you'll have to change code to mobile components by hand. That is if you are replacing a non-mobile optimized component with a mobile optimized one. However, if you are using a Spark Component [introduced in Flex 4], such as a List, then you can use the spark list with the default theme in the web project and a spark list with the mobile theme in your mobile project without any changes.
...Adobe claims that with Flash Builder 4.6 and 4.7, migrating to
different platforms, will remove about 70% of the work with the latest
Flash Builder.
I am not aware of such claims. But, I do believe that you can reuse a lot of code between mobile projects and non-mobile projects. It took me 3-4 months to build a mobile game using AIR/Flex. It took me less than a day to port the code to work in a web browser.
I don't even know if the spring framework would work with TomCat for
an iOS app.
If you want you're iOS app to make calls to a server, then yes it will work without issues.
If you want to deploy Tomcat and Spring onto an iOS device I would not expect that to work.
This question is a bit non-specific; but I tried to help. If that doesn't point you in a direction, then I may ask what have you tried and what problems have you run into?

PhoneGap (Cordova), with Sencha Touch 2 or jQuery Mobile?

In the past i've used PhoneGap (1.x) with Sencha Touch 1.x, because that was back then the best combination. Although i'm a much bigger fan of jQuery than any ExtJS library. But jQuery Mobile was really buggy back then. Page transitions caused white flashes on Android devices. Responsiveness wasn't as good as it was with Sencha Touch 1 (ST1). Eventhough ST1 also had its quirks, it was definitely the best choice.
But currently PhoneGap is at version 2 and Sencha Touch aswell. But like i said, i like jQuery more. So i'm actually wondering if jQuery Mobile is any good these days. Does it still show alot of flickering when sliding from one page to another? Or any other buggy things?
Or should i still go for Sencha Touch (version 2 in this case)?
I hope i can cut some time in testing out both of these products by the answers in this post. That's the reason i'm asking.
This really depends on what platform you are going to create the application.
If suppose you want to build an iOS app then you should go for Phonegap + sencha because sencha makes it looks like a real native app. It will work very good for iPhone. But if you want to port the same app in Android. Then its a mistake. It is very slow in android due to low hardware specs. Although it is some what better in HTC one x and S3 because of there good specs.
I would recommend for Jquery Mobile because it is improved in these years. Although its look and feel is not that much good as Sencha but it works very well in almost all the platforms i Tested(Android 2.x and later, Iphone, BB 5.x and later).
One advantage that JQM has over Sencha is that
Jquery mobile scripts can be customized and then imported in your application. It can be minified as per your needs. For furthur info look here http://jquerymobile.com/download-builder/
So JQM will be more lightweight than sencha.
This is all my personal experiences which i have. Hope it helps you
That flickering issue has been resolved in the latest version of Jquery Mobile.
http://jquerymobile.com/blog/
https://github.com/jquery/jquery-mobile/issues/4024 resolved.
#Coder_sLaY: Sencha has SDKTools and a Visual IDE that can not only create an app build, and after that they can create native android/ios builds. Sencha can be as lean as jQuery mobile.
So Sencha mobile scripts can be customised, external scripts included, and then the code is minified ready for production, removing all unused classes from Sencha touch.
If you're going to look at the Sencha route, then go to the API docs and check out the guides and videos, as there is a lot that's changed to make coding easier including the new data package which is simply amazing!
There are some discussions about this subject on Quora too.
You might want to check out this thread We're deciding between jQuery Mobile, Sencha Touch & Dojo Mobile. What are the pros and cons for each?.

Resources