October 2010

iui code sprint notes

Getting started:
Checkout the code with:
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6--1 -d iui contributions/themes/iui
(you can install cvs via ports or fink).
You can browse the code online: http://drupalcode.org/viewvc/drupal/contributions/themes/iui/iui/?pathre...

Download the simulator: http://developer.apple.com/devcenter/ios/index.action
Run the simulator with: open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/

Things to do:
- go through bugs: http://drupal.org/project/issues/iui
- go through iui bugs: https://code.google.com/p/iui/issues/list
- find patches from the bts and apply them
- write simpletest tests / selenium tests

Todo list bugs (taken from the bts + issue tracker):
- Use Libraries API to externalize the iUI User Interface Library (http://drupal.org/project/libraries + http://drupal.org/node/735160)
- add a way to change webclip icon from the admin panel (similar to how favicons are handled): http://vjarmy.com/archives/2008/01/howto_iphone_webclip_icons.php
- add a "mobile menu" (besides primary+secondary links)
- add zoom support: http://j-query.blogspot.com/2010/05/iphone-touch-events.html
- iphone 3g bug. http://drupal.org/files/issues/IMG_0001.PNG
(Current workaround to fix this - provide descriptions for each item on your primary and/or secondary menus. Then it works great.)
- replace any short tags that might be left (various issues come up as artifacts of shorttags being off on most servers)
- thickbox / lightbox2 integration
- Switchtheme integration, you can add a block w/:
<?php
$block = module_invoke('switchtheme', 'block', 'view', 0);
print $block['content'];
?>
but your links will be broken when switching back/forth
- http://www.k10design.net/articles/iui/ <-- mentions things on the bottom which may still be open issues
- search does not work
- support for non-clean urls
- pagination doesn't work properly - fix: http://drupal.org/node/260076#comment-1312688
- teasers should have links to nodes

Ideas mentioned:
- iwebkit, I see nothing here making it worth an effort to make this work
- all of the "features" are easily implemented (I've used them before w/ iui). Examples of iwebkit are here: http://demo.iwebkit.net/integration.html -- the other style things seem simple (compared to integrating jqtouch). They can be done as subthemes to iui
- D7 release.... we can do this once D6 works well
- D5 - no way (at least for me), that user should just upgrade
- jqtouch - i won't repeat those comments again :)

List of features:
- the first thing to do is get the core iui code to be the latest + incorporate w/ libraries api (documentation here: http://drupal.org/node/735160)
- theme switching (http://www.iui-js.org/samples/music/music.html#_themes)
- do we use theme switcher or do we have our own theme switching for iui in the iui prefs?

Other things not mentioned (but I find cool):
- geolocation
- view website offline feature

jQuery Mobile running on Drupal 7

The first pre--pre-pre-alpha release of jquery mobile for drupal has been released HERE. styol has done a great job so far of getting the ball rolling.

For a demo, have a look at his site: http://www.vishun.com/jquery_mobile

Basically all you need to do is: you need to be using drupal 7, install jquery_update, and manually replace the contents of /sites/all/modules/jquery_update/replace/jquery.min.js with the min version of jquery 1.4.3. Enable the module and download the theme from: CVS.

Here are some directions to get it to run (using drush):

mysqladmin -u root -p create yourdatabasename
drush dl drupal-7.x-dev
cd drupal-7.x-dev
mkdir sites/default/files
cp ./sites/default/default.settings.php ./sites/default/settings.php
chmod -R 777 sites/default/files
chmod 777 ./sites/default/settings.php

Open your web browser and go through the install process.

Now go back to the commandline:
drush dl jquery_update

cd sites/all/modules/jquery_update/replace/jquery/
rm jquery.min.js
wget http://code.jquery.com/jquery-1.4.3.min.js
mv jquery-1.4.3.min.js jquery.min.js

cd ../../../../../../
drush en jquery_update
The following projects will be enabled: jquery_update
Do you really want to continue? (y/n): y
jquery_update was enabled successfully.

cd sites/all/themes/
cvs -z6 checkout -d jquery_mobile-HEAD contributions/themes/jquery_mobile/

tar -zxvf jquery_mobile-HEAD.tar.gz
cd ../../../

drush en jquery_mobile
The following projects will be enabled: jquery_mobile
Do you really want to continue? (y/n): y
jquery_mobile was enabled successfully.

drush vset theme_default jquery_mobile
Enter a number to choose which variable to set.
[0] : Cancel
[1] : theme_default
1
theme_default was set to jquery_mobile

Now you will be ready to test the pre-pre-pre alpha release. ;) Don't use this on your production work.