Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Commit of v1.0.2, the first version available on the HP webOS App Cat…

…alog
  • Loading branch information...
commit a02ce75d33d59acbd599550349bc4bff2e0b5cd4 0 parents
Ben Tattersley jamtat authored
Showing with 2,711 additions and 0 deletions.
  1. BIN  .DS_Store
  2. +1 −0  README
  3. BIN  ifixit.application/.DS_Store
  4. +28 −0 ifixit.application/appinfo.json
  5. +320 −0 ifixit.application/blur.js
  6. +19 −0 ifixit.application/depends.js
  7. +19 −0 ifixit.application/guide.html
  8. +120 −0 ifixit.application/guide/guide.js
  9. +140 −0 ifixit.application/guide/guidecover.js
  10. +152 −0 ifixit.application/guide/guidepage.js
  11. +208 −0 ifixit.application/homescreen/areasbrowser.js
  12. +123 −0 ifixit.application/homescreen/devicepanel.js
  13. +132 −0 ifixit.application/homescreen/featuredwidget.js
  14. +321 −0 ifixit.application/homescreen/homescreen.js
  15. BIN  ifixit.application/icons/128.png
  16. BIN  ifixit.application/icons/256.png
  17. BIN  ifixit.application/icons/48.png
  18. BIN  ifixit.application/icons/512.png
  19. BIN  ifixit.application/icons/64.png
  20. BIN  ifixit.application/icons/guide128.png
  21. BIN  ifixit.application/icons/guide256.png
  22. BIN  ifixit.application/icons/guide512.png
  23. BIN  ifixit.application/icons/guide64.png
  24. +949 −0 ifixit.application/ifixit.css
  25. BIN  ifixit.application/images/.DS_Store
  26. BIN  ifixit.application/images/guide/.DS_Store
  27. BIN  ifixit.application/images/guide/bullets/black.png
  28. BIN  ifixit.application/images/guide/bullets/blue.png
  29. BIN  ifixit.application/images/guide/bullets/caution.png
  30. BIN  ifixit.application/images/guide/bullets/green.png
  31. BIN  ifixit.application/images/guide/bullets/note.png
  32. BIN  ifixit.application/images/guide/bullets/orange.png
  33. BIN  ifixit.application/images/guide/bullets/red.png
  34. BIN  ifixit.application/images/guide/bullets/reminder.png
  35. BIN  ifixit.application/images/guide/bullets/yellow.png
  36. BIN  ifixit.application/images/guide/info-shadow.png
  37. BIN  ifixit.application/images/guide/loading/gear-black.png
  38. BIN  ifixit.application/images/guide/loading/gear-white-small.png
  39. BIN  ifixit.application/images/guide/loading/gear-white.png
  40. BIN  ifixit.application/images/guide/logo.png
  41. BIN  ifixit.application/images/guide/photo-frame.png
  42. BIN  ifixit.application/images/guide/thumbnail-border.png
  43. BIN  ifixit.application/images/homescreen/.DS_Store
  44. BIN  ifixit.application/images/homescreen/areas-title.png
  45. BIN  ifixit.application/images/homescreen/browse.png
  46. BIN  ifixit.application/images/homescreen/devices-panel-border.png
  47. BIN  ifixit.application/images/homescreen/featured-title.png
  48. BIN  ifixit.application/images/homescreen/featured-widget-label-rotated.png
  49. BIN  ifixit.application/images/homescreen/featured-widget-label.png
  50. BIN  ifixit.application/images/homescreen/homescreen-header-slogan.png
  51. BIN  ifixit.application/images/homescreen/homescreen-header-title.png
  52. BIN  ifixit.application/images/homescreen/homescreen-header.png
  53. BIN  ifixit.application/images/homescreen/panel-right-bg.png
  54. BIN  ifixit.application/images/homescreen/scrollfade.png
  55. +34 −0 ifixit.application/index.html
  56. +33 −0 ifixit.application/services/ifixitapi.js
  57. BIN  ifixit.application/splash.png
  58. +11 −0 ifixit.package/packageinfo.json
  59. +78 −0 ifixit.srv/makeImageAssistant.js
  60. +14 −0 ifixit.srv/services.json
  61. +9 −0 ifixit.srv/sources.json
BIN  .DS_Store
Binary file not shown
1  README
@@ -0,0 +1 @@
+The official iFixit app for HP webOS. Built by Jamtat.
BIN  ifixit.application/.DS_Store
Binary file not shown
28 ifixit.application/appinfo.json
@@ -0,0 +1,28 @@
+{
+ "id": "com.jamtat.ifixit",
+ "version": "1.0.2",
+ "vendor": "Jamtat",
+ "type": "web",
+ "main": "index.html",
+ "title": "iFixit",
+ "icon": "icons/64.png",
+ "guideicon": "icons/guide64.png",
+ "guideicons": {
+ "64": "icons/guide64.png",
+ "128": "icons/guide128.png",
+ "256": "icons/guide256.png",
+ "512": "icons/guide512.png"
+ },
+ "splashicon": "splash.png",
+ "uiRevision": 2,
+ "universalSearch":{
+ "dbsearch":{
+ "displayName":"iFixit Device Search",
+ "url":"com.jamtat.ifixit",
+ "launchParam":"deviceName",
+ "launchParamDbField":"device",
+ "displayFields":["device"],
+ "dbQuery":{"from":"ifixit.devices:1", "where":[{"prop":"devicelowercase","op":"%","val":""}],"orderBy":"device","limit":20}
+ }
+ }
+}
320 ifixit.application/blur.js
@@ -0,0 +1,320 @@
+enyo.kind({
+ name: 'ifixit.ui.blur',
+ kind: enyo.Control,
+ nodeTag: 'canvas',
+ published: {
+ image: ''
+ },
+ events: {
+ onStart: '',
+ onBlurred: ''
+ },
+ create: function() {
+ this.inherited(arguments);
+ },
+
+ imageChanged: function() {
+ this.addClass('hidden');
+ if(!this.hasNode()) {
+ enyo.nextTick(this, 'imageChanged');
+ return;
+ }
+ this.hasNode().width = window.innerWidth;
+ this.hasNode().height = window.innerHeight;
+ var w = window.innerWidth;
+ var h = window.innerHeight;
+
+ var node = this.hasNode();
+ var ctx = this.hasNode().getContext('2d');
+ var self = this;
+ var img = new Image();
+ img.onload = function(){
+ var canvas = node;
+ var context = ctx;
+ ctx.clearRect( 0, 0, w, h );
+ ctx.drawImage( img, 0, 0, w, h );
+ stackBlurCanvasRGB(canvas, 0, 0, w, h, 15 );
+ self.removeClass('hidden');
+ }
+ img.src = this.image;
+ }
+})
+
+
+function BlurStack()
+{
+ this.r = 0;
+ this.g = 0;
+ this.b = 0;
+ this.a = 0;
+ this.next = null;
+}
+
+var mul_table = [
+ 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
+ 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
+ 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
+ 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
+ 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
+ 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
+ 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
+ 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
+ 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
+ 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
+ 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
+ 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
+ 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
+ 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
+ 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
+ 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
+
+
+var shg_table = [
+ 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
+ 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
+
+
+function stackBlurCanvasRGB( canvastarget, top_x, top_y, width, height, radius )
+{
+ if ( isNaN(radius) || radius < 1 ) return;
+ radius |= 0;
+
+ var canvas = canvastarget;
+ var context = canvas.getContext("2d");
+ var imageData;
+
+ try {
+ try {
+ imageData = context.getImageData( top_x, top_y, width, height );
+ } catch(e) {
+
+ // NOTE: this part is supposedly only needed if you want to work with local files
+ // so it might be okay to remove the whole try/catch block and just use
+ // imageData = context.getImageData( top_x, top_y, width, height );
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+ imageData = context.getImageData( top_x, top_y, width, height );
+ } catch(e) {
+ alert("Cannot access local image");
+ throw new Error("unable to access local image data: " + e);
+ return;
+ }
+ }
+ } catch(e) {
+ alert("Cannot access image");
+ throw new Error("unable to access image data: " + e);
+ }
+
+ var pixels = imageData.data;
+
+ var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
+ r_out_sum, g_out_sum, b_out_sum,
+ r_in_sum, g_in_sum, b_in_sum,
+ pr, pg, pb, rbs;
+
+ var div = radius + radius + 1;
+ var w4 = width << 2;
+ var widthMinus1 = width - 1;
+ var heightMinus1 = height - 1;
+ var radiusPlus1 = radius + 1;
+ var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2;
+
+ var stackStart = new BlurStack();
+ var stack = stackStart;
+ for ( i = 1; i < div; i++ )
+ {
+ stack = stack.next = new BlurStack();
+ if ( i == radiusPlus1 ) var stackEnd = stack;
+ }
+ stack.next = stackStart;
+ var stackIn = null;
+ var stackOut = null;
+
+ yw = yi = 0;
+
+ var mul_sum = mul_table[radius];
+ var shg_sum = shg_table[radius];
+
+ for ( y = 0; y < height; y++ )
+ {
+ r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
+
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi] );
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] );
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] );
+
+ r_sum += sumFactor * pr;
+ g_sum += sumFactor * pg;
+ b_sum += sumFactor * pb;
+
+ stack = stackStart;
+
+ for( i = 0; i < radiusPlus1; i++ )
+ {
+ stack.r = pr;
+ stack.g = pg;
+ stack.b = pb;
+ stack = stack.next;
+ }
+
+ for( i = 1; i < radiusPlus1; i++ )
+ {
+ p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 );
+ r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i );
+ g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs;
+ b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs;
+
+ r_in_sum += pr;
+ g_in_sum += pg;
+ b_in_sum += pb;
+
+ stack = stack.next;
+ }
+
+
+ stackIn = stackStart;
+ stackOut = stackEnd;
+ for ( x = 0; x < width; x++ )
+ {
+ pixels[yi] = (r_sum * mul_sum) >> shg_sum;
+ pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
+ pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
+
+ r_sum -= r_out_sum;
+ g_sum -= g_out_sum;
+ b_sum -= b_out_sum;
+
+ r_out_sum -= stackIn.r;
+ g_out_sum -= stackIn.g;
+ b_out_sum -= stackIn.b;
+
+ p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2;
+
+ r_in_sum += ( stackIn.r = pixels[p]);
+ g_in_sum += ( stackIn.g = pixels[p+1]);
+ b_in_sum += ( stackIn.b = pixels[p+2]);
+
+ r_sum += r_in_sum;
+ g_sum += g_in_sum;
+ b_sum += b_in_sum;
+
+ stackIn = stackIn.next;
+
+ r_out_sum += ( pr = stackOut.r );
+ g_out_sum += ( pg = stackOut.g );
+ b_out_sum += ( pb = stackOut.b );
+
+ r_in_sum -= pr;
+ g_in_sum -= pg;
+ b_in_sum -= pb;
+
+ stackOut = stackOut.next;
+
+ yi += 4;
+ }
+ yw += width;
+ }
+
+
+ for ( x = 0; x < width; x++ )
+ {
+ g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
+
+ yi = x << 2;
+ r_out_sum = radiusPlus1 * ( pr = pixels[yi]);
+ g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]);
+ b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]);
+
+ r_sum += sumFactor * pr;
+ g_sum += sumFactor * pg;
+ b_sum += sumFactor * pb;
+
+ stack = stackStart;
+
+ for( i = 0; i < radiusPlus1; i++ )
+ {
+ stack.r = pr;
+ stack.g = pg;
+ stack.b = pb;
+ stack = stack.next;
+ }
+
+ yp = width;
+
+ for( i = 1; i <= radius; i++ )
+ {
+ yi = ( yp + x ) << 2;
+
+ r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i );
+ g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs;
+ b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs;
+
+ r_in_sum += pr;
+ g_in_sum += pg;
+ b_in_sum += pb;
+
+ stack = stack.next;
+
+ if( i < heightMinus1 )
+ {
+ yp += width;
+ }
+ }
+
+ yi = x;
+ stackIn = stackStart;
+ stackOut = stackEnd;
+ for ( y = 0; y < height; y++ )
+ {
+ p = yi << 2;
+ pixels[p] = (r_sum * mul_sum) >> shg_sum;
+ pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
+ pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
+
+ r_sum -= r_out_sum;
+ g_sum -= g_out_sum;
+ b_sum -= b_out_sum;
+
+ r_out_sum -= stackIn.r;
+ g_out_sum -= stackIn.g;
+ b_out_sum -= stackIn.b;
+
+ p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2;
+
+ r_sum += ( r_in_sum += ( stackIn.r = pixels[p]));
+ g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1]));
+ b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2]));
+
+ stackIn = stackIn.next;
+
+ r_out_sum += ( pr = stackOut.r );
+ g_out_sum += ( pg = stackOut.g );
+ b_out_sum += ( pb = stackOut.b );
+
+ r_in_sum -= pr;
+ g_in_sum -= pg;
+ b_in_sum -= pb;
+
+ stackOut = stackOut.next;
+
+ yi += width;
+ }
+ }
+
+ context.putImageData( imageData, top_x, top_y );
+
+}
19 ifixit.application/depends.js
@@ -0,0 +1,19 @@
+enyo.depends(
+//UI Screens
+ 'homescreen/homescreen.js',
+ 'guide/guide.js',
+
+//Services
+ 'services/ifixitapi.js',
+
+//Widgets
+ 'homescreen/featuredwidget.js',
+ 'homescreen/areasbrowser.js',
+ 'homescreen/devicepanel.js',
+ 'guide/guidecover.js',
+ 'guide/guidepage.js',
+ //'blur.js',
+
+//CSS
+ 'ifixit.css'
+)
19 ifixit.application/guide.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset=UTF-8>
+<title>iFixit Guide</title>
+<script src="/opt/PalmSDK/Current/share/refcode/framework/enyo/1.0/framework/enyo.js" type="text/javascript"></script>
+<meta name="apple-mobile-web-app-capable" content="yes">
+<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
+<!--<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">-->
+<link rel="apple-touch-icon-precomposed" href="icons/128.png"/>
+</head>
+
+<body>
+<script type="text/javascript">
+ enyo.create({kind:'ifixit.ui.guide'}).renderInto(document.body);
+</script>
+</body>
+
+</html>
120 ifixit.application/guide/guide.js
@@ -0,0 +1,120 @@
+enyo.kind({
+ name: 'ifixit.ui.guide',
+ kind: enyo.VFlexBox,
+ published: {
+ guideid: 0,
+ guide: {}
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ enyo.keyboard.setManualMode(true);
+ //enyo.setAllowedOrientation('up');
+ if(enyo.windowParams.guideid) {
+ this.guideid = enyo.windowParams.guideid;
+ } else {
+ this.guideid = 5071;
+ }
+
+ enyo.nextTick(this , 'fetchGuide');
+ },
+
+ components: [
+ {name: 'loadingArea', align: 'center', kind: enyo.VFlexBox, className: 'guide-loading', components: [
+ {flex:1},
+ {className: 'gear gear-black'},
+ {className: 'gear gear-white'},
+ {content: 'L<img src="images/guide/loading/gear-white-small.png" class="lil-gear"/>ading guide', className: 'loading-message'},
+ ]},
+ {name: 'GuideService', kind: 'ifixit.service.api',
+ onSuccess: 'gotGuide',
+ onFailure: 'gotGuideFailure'},
+
+ {kind: 'AppMenu', components: [
+ {caption: 'Add This Guide To The Launcher', onclick: 'addLauncherIcon'},
+ ]},
+
+ {name: 'addToLauncherService', kind: 'PalmService', service: enyo.palmServices.application, method: 'addLaunchPoint'},
+ ],
+
+ openAppMenuHandler: function() {
+ var menu = this.$.appMenu;
+ menu.open();
+ },
+ closeAppMenuHandler: function() {
+ var menu = this.$.appMenu;
+ menu.close();
+ },
+
+
+ gotGuide: function(inSender, inResponse, inRequest) {
+ this.guide = inResponse.guide;
+ this.createComponent({flex: 1, kind: 'BasicCarousel', name: 'pagesCarousel', layoutKind: 'HFlexLayout', height: '100%'});
+ var cover = this.$.pagesCarousel.createComponent({kind: 'ifixit.ui.guidecover', guideid: this.guideid, image: this.guide.image.imageid, introduction: this.guide.introduction, title: this.guide.title, tools: this.guide.tools});
+
+ this.$.pagesCarousel.addViews(cover);
+
+ for(var i = 0; i < this.guide.steps.length; i++) {
+ var page = this.$.pagesCarousel.createComponent({kind: 'ifixit.ui.guidepage', step: this.guide.steps[i], last: (i===this.guide.steps.length-1)});
+
+ this.$.pagesCarousel.addViews(page);
+ }
+
+ this.render();
+ this.$.loadingArea.addClass('dead');
+ function kill() {
+ this.$.loadingArea.destroy();
+ console.log('killed');
+ }
+ setTimeout(kill.bind(this), 1500);
+ },
+
+ fetchGuide: function() {
+ this.$.GuideService.getGuide(this.guideid)
+ },
+
+ addLauncherIcon: function() {
+ this.$.pagesCarousel.$.guidecover.addLauncherIcon();
+ },
+
+ clickHandler: function(sender, event) {
+ var t = event.target;
+ var h;
+ if((t.nodeName === 'A' || t.nodeName === 'a') && t.href) {
+ event.preventDefault();
+ event.stopPropagation();
+ if(t.href.indexOf('http://') === -1) {
+ h = 'http://ifixit.com' + t.pathname;
+ } else {
+ h = t.href;
+ }
+ console.log(h);
+
+ window.location.href = h;
+ }
+ }
+})
+
+/*
+//Define the launch params the app will receive in the app assistant handleLaunch method when the shortcut is tapped:
+var launchParams = {
+ runTimer: timer.id()
+ ,runTimerName: timer.getLaunchpointCaption()
+};
+//define service call params to add the shortcut
+var callParams = {
+ id: Mojo.appInfo.id,
+ icon: Mojo.appPath + Mojo.appInfo.shortcuticon,
+ title: timer.getLaunchpointCaption(),
+ params: launchParams
+};
+//Call the service :)
+new Mojo.Service.Request('palm://com.palm.applicationManager/addLaunchPoint', {
+ parameters: callParams,
+ onSuccess: function(){
+ bannerShow('Timer added to launcher');
+ }.bind(this),
+ onFailure: function(){
+ bannerShow('Timer could not be added to launcher');
+ }.bind(this)
+});*/
140 ifixit.application/guide/guidecover.js
@@ -0,0 +1,140 @@
+enyo.kind({
+ name: 'ifixit.ui.guidecover',
+ kind: enyo.VFlexBox,
+ className: 'guide-cover',
+ published: {
+ guideid: 0,
+ image: 0,
+ introduction: '',
+ title: '',
+ tools: [],
+ icon: ''
+ },
+
+ events: {
+ onIcon: ''
+ },
+
+//Helper function to fix the api issues
+ toHTML: function(str) {
+ return str.replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ this.$.guideTitle.setContent(this.toHTML(this.title));
+ this.$.guideIntroduction.setContent(this.toHTML(this.introduction));
+ for(var i = 0; i < this.tools.length;i++) {
+ var toollink = '<a href ="' + this.tools[i].url + '">' + this.tools[i].text + '</a>';
+ this.$.toolbox.createComponent({content: toollink, className: 'toolbox-item condensed'});
+ }
+ this.$.ImageService.getImage(this.image);
+ },
+
+ chrome: [
+ {kind: 'Image', className: 'guide-cover-logo', src: 'images/guide/logo.png'},
+ {content: 'Swipe To Turn the Page', className: 'guide-hint oblique'}
+ ],
+
+ components: [
+ {name: 'guideTitle', className: 'guide-cover-title'},
+ {flex: 1, name: 'toolbox', className: 'toolbox', components: [
+ {className: 'toolbox-header', content: 'Toolbox'}
+ ]},
+ {name: 'guideIntroduction', className: 'guide-introduction oblique', allowHtml: true},
+
+ {name: 'ImageService', kind: 'ifixit.service.api',
+ onSuccess: 'gotImage',
+ onFailure: 'gotImageFailure'},
+ {content: '+ Add To Launcher', onclick: 'addLauncherIcon', className: 'add-launcher-message'},
+ {name: 'addToLauncherService',
+ kind: 'PalmService',
+ service: enyo.palmServices.application,
+ method: 'addLaunchPoint'},
+ {name: 'saveIconService',
+ kind: 'PalmService',
+ service: 'palm://com.jamtat.ifixit.service/',
+ method: 'makeImage',
+ onSuccess: 'doneImage'}
+
+ ],
+
+ gotImage: function(inSender, inResponse, inRequest) {
+ var img = inResponse.base_url + '.' + inResponse.sizes[inResponse.sizes.length-1];
+ this.applyStyle('background-image', 'url(' + img + ')')
+ this.iconImage = img;
+ },
+
+ addLauncherIcon: function() {
+ if(!window.PalmSystem)
+ return;
+ this.setupIcon(this.iconImage, 64)
+ },
+
+ setupIcon: function(url, w) {
+ enyo.windows.addBannerMessage('Making Icon', '{}');
+ var i = new Image();
+ var self = this;
+ i.onload = function() {
+ var c = document.createElement('canvas');
+ c.width = c.height = w;
+ var ctx = c.getContext('2d');
+
+ roundRect(ctx, 0, 0, w, w, Math.round(60/512*w));
+
+ ctx.drawImage(this, 0, 0, Math.floor(w/this.height*this.width), w);
+
+ var icon = new Image()
+ icon.onload = function() {
+ ctx.drawImage(this, 0, 0, w, w);
+ self.icon = c.toDataURL();
+ self.doIcon(self.icon);
+ enyo.windows.addBannerMessage('Saving Icon', '{}');
+ self.$.saveIconService.call({
+ dataurl: self.icon
+ })
+ //window.location.href = self.icon;
+ }
+
+ if(enyo.fetchAppInfo().guideicons[w.toString()]) {
+ var path = enyo.fetchAppRootPath() + enyo.fetchAppInfo().guideicons[w.toString()];
+ } else {
+ var path = enyo.fetchAppRootPath() + enyo.fetchAppInfo().guideicons[512];
+ }
+
+ icon.src = path;
+ }
+
+ i.src = url;
+
+ function roundRect(ctx, x, y, width, height, radius) {
+ ctx.beginPath();
+ ctx.moveTo(x + radius, y);
+ ctx.lineTo(x + width - radius, y);
+ ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
+ ctx.lineTo(x + width, y + height - radius);
+ ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
+ ctx.lineTo(x + radius, y + height);
+ ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
+ ctx.lineTo(x, y + radius);
+ ctx.quadraticCurveTo(x, y, x + radius, y);
+ ctx.closePath();
+ ctx.clip();
+ }
+ },
+
+ doneImage: function(sender, response) {
+
+ if(!window.PalmSystem)
+ return;
+ var launchParams = {guideid: this.guideid};
+ var callParams = {
+ id: enyo.fetchAppId(),
+ icon: response.reply,
+ title: this.title,
+ params: launchParams
+ };
+ this.$.addToLauncherService.call(callParams);
+ enyo.windows.addBannerMessage('Added to Favs', '{}');
+ }
+})
152 ifixit.application/guide/guidepage.js
@@ -0,0 +1,152 @@
+enyo.kind({
+ name: 'ifixit.ui.guidepage',
+ kind: enyo.HFlexBox,
+ className: 'guide-cover guide-page',
+ published: {
+ step: {},
+ last: false
+ },
+
+//Helper function to fix the api messing up the HTML
+ toHTML: function(str) {
+ return str.replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ this.updateSteps();
+ this.$.thumbnails.setImages(this.step.images);
+ if(this.last === true) {
+ this.$.pagehint.destroy();
+ }
+ },
+
+ components: [
+ //{kind: 'ifixit.ui.blur', name: 'blurImage', className: 'blurred hidden'},
+
+ {/*width: '665px',*/flex:1, className: 'image-pane', kind: enyo.VFlexBox, components:[
+ {name: 'stepNumber', className: 'step-number'},
+ {name: 'mainImage', className: 'main-image'},
+ {kind: 'ifixit.ui.thumbnailtray', name: 'thumbnails', onChoose: 'updateImage'}
+ ]},
+
+ {className:'info-shadow'},
+ {kind: enyo.VFlexBox, width:'370px', height: '100%', className: 'info-pane', components:[
+ {flex:1, kind: 'Scroller', components: [
+ {name: 'infoPane'}
+ ]},
+ {content: 'Swipe To Turn the Page', name: 'pagehint', className: 'guide-hint guide-hint-page oblique'}
+ ]}
+ ],
+
+
+ updateBlur: function() {
+ /*if(this.bigImage === undefined || !this.bigImage) {
+ this.$.blurImage.setImage(this.step.images[0].text + '.large');
+ } else {
+ this.$.blurImage.setImage(this.bigImage);
+ }*/
+ },
+
+ updateSteps: function() {
+ this.$.stepNumber.setContent('Step ' + this.step.number);
+ var lines = this.step.lines;
+ for(var i = 0; i < lines.length; i++) {
+ this.$.infoPane.createComponent({kind: 'ifixit.ui.infostep', colour: lines[i].bullet, text: this.toHTML(lines[i].text), level: lines[i].level});
+ }
+ },
+
+ updateImage: function(inSender, inImage) {
+ this.$.mainImage.applyStyle('background-image', 'url(' + inImage + '.large)');
+ this.bigImage = inImage;
+ enyo.job('updateBlur', enyo.bind(this, 'updateBlur'), 10);
+ }
+})
+
+
+
+enyo.kind({
+ name: 'ifixit.ui.infostep',
+ kind: enyo.Control,
+ className: 'infostep',
+ allowHtml: true,
+ published: {
+ colour: 'black',
+ text: '',
+ level: 0
+ },
+ create: function() {
+ this.inherited(arguments);
+ this.addClass(this.colour);
+ this.addClass('level' + this.level);
+ this.setContent(this.text);
+ }
+})
+
+enyo.kind({
+ name: 'ifixit.ui.thumbnailtray',
+ className: 'thumbnail-tray',
+ kind: enyo.Scroller,
+ autoHorizontal: false, horizontal: true, autoVertical: false, vertical: false,
+ selection: undefined,
+ published: {
+ images: []
+ },
+ events: {
+ onChoose: ''
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ },
+
+ components: [
+ {name: 'thumbnailTray', className: 'thumbnail-wrapper', kind: enyo.HFlexBox, components: []}
+ ],
+
+ imagesChanged: function() {
+ for(var i = 0; i < this.images.length; i++) {
+ var comp = this.$.thumbnailTray.createComponent({kind: 'ifixit.ui.thumbnailimage', image: this.images[i].text, onPick: 'imageChosen', owner: this});
+ if(i === 0) {
+ this.imageChosen(comp);
+ }
+ }
+
+ },
+
+ imageChosen: function(inSender) {
+ if(this.selection) {
+ this.selection.removeClass('active');
+ }
+ this.selection = inSender;
+ this.selection.addClass('active');
+ this.doChoose(inSender.image);
+ }
+
+
+})
+
+enyo.kind({
+ name: 'ifixit.ui.thumbnailimage',
+ kind: enyo.Control,
+ className: 'thumbnail-image',
+ published: {
+ image: ''
+ },
+ events: {
+ onPick: ''
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ this.imageChanged();
+ },
+
+ imageChanged: function() {
+ this.applyStyle('background-image', 'url(' + this.image + '.large)');
+ },
+
+ clickHandler: function() {
+ this.doPick();
+ }
+})
208 ifixit.application/homescreen/areasbrowser.js
@@ -0,0 +1,208 @@
+enyo.kind({
+ name: 'ifixit.ui.areasbrowser',
+ kind: enyo.VFlexBox,
+ className: 'areasbrowser',
+ currentPlace: ['root'],
+ depth: 1,
+ published: {
+ areas: {},
+ },
+ events: {
+ onPickDevice: ''
+ },
+ create: function() {
+ this.inherited(arguments);
+ document.addEventListener();
+ },
+
+ components: [
+
+ {flex:1, kind: enyo.VFlexBox, className: 'listSwitcherPane', name: 'listSwitcherPane'},
+ {className: 'areas-list-divider areas-footnote', content: 'Drag to the right to go back'}
+ ],
+
+ areasChanged: function(params) {
+ this.$.listSwitcherPane.createComponent({flex: 1, name: 'displayList', kind: 'ifixit.ui.listbuilder',owner: this, onClickDevice: 'bubble', depth: this.depth});
+ this.$.displayList.setCurrent(this.areas);
+ this.render();
+ },
+
+ loadCategory: function(category) {
+ this.depth++;
+ if(category) {
+ this.currentPlace.push(category);
+ }
+ var temp = undefined;
+
+ for(var i = 0; i < this.currentPlace.length; i++) {
+ if(temp === undefined) {
+ temp = this.areas[this.currentPlace[i]];
+ } else {
+ temp = temp[this.currentPlace[i]]
+ }
+ }
+ if(temp === undefined || !temp) {
+ temp = this.areas;
+ }
+ this.$.displayList.setDepth(this.depth);
+ this.$.displayList.setCurrent(temp);
+ },
+
+ back: function() {
+ this.depth-=2;
+ this.currentPlace.pop();
+ this.loadCategory();
+ this.$.listSwitcherPane.hasNode().style.webkitTransform = '';
+
+ },
+
+ dragHandler: function(inSender, inEvent) {
+ var dx = inEvent.dx;
+ if(this.currentPlace[1] === undefined) {
+ dx = Math.min((dx/320)*50,50);;
+ }
+ if(inEvent.dx < 0)
+ return false;
+ if(inEvent.dx < 50)
+ return false;
+ this.$.listSwitcherPane.hasNode().style.webkitTransform = 'translate3d(' + dx + 'px,0,0)';
+ inEvent.stopPropagation();
+ return true;
+ },
+
+ dragfinishHandler: function(inSender, inEvent) {
+ if(this.currentPlace[1] === undefined) {
+ this.$.listSwitcherPane.hasNode().style.webkitTransform = '';
+ return false;
+ }
+ if(inEvent.dx > 150) {
+ this.$.listSwitcherPane.hasNode().style.webkitTransform = 'translate3d(320px,0,0)';
+ this.back();
+ } else {
+ this.$.listSwitcherPane.hasNode().style.webkitTransform = '';
+ }
+ },
+
+ bubble: function(sender, device) {
+ this.doPickDevice(device);
+ }
+
+})
+
+enyo.kind({
+ name: 'ifixit.ui.listbuilder',
+ kind: enyo.VFlexBox,
+ categories: [],
+ published: {
+ current: {DEVICES:[]},
+ depth: 1
+ },
+ events: {
+ onClickDevice: ''
+ },
+ components:[
+ {className: 'areas-list-divider', content: 'Devices'},
+ {flex: 1, name: 'devicesList', kind: 'VirtualList', onSetupRow: 'setupDevicesRow', components: [
+ {kind: 'Item', onclick: 'deviceClick', className: 'devices-item', components: [
+ {kind: 'Control', className: 'areas-label', name: 'listItemLabel'}
+ ]}
+ ]},
+
+ {className: 'areas-list-divider', content: 'Categories'},
+ {flex: 2, name: 'categoryList', kind: 'VirtualList', onSetupRow: 'setupCategoryRow', components: [
+ {kind: 'Item', onclick: 'categoryClick', className: 'category-item', components: [
+ {kind: 'Control', className: 'areas-label', name: 'categoryItemLabel'}
+ ]}
+ ]}
+ ],
+
+ currentChanged: function() {
+ this.categories = [];
+
+ if(this.depth !== 1) {
+ this.$.devicesList.punt();
+ }
+
+ this.$.devicesList.refresh();
+
+
+ for(category in this.current) {
+ if(this.current.hasOwnProperty(category) && category !== 'DEVICES') {
+ this.categories.push(category)
+ }
+ }
+
+ if(this.depth !== 1) {
+ this.$.categoryList.punt();
+ }
+
+ this.$.categoryList.refresh();
+ },
+
+ create: function() {
+ this.inherited(arguments);
+ this.current = this.owner.areas;
+ enyo.nextTick(this, 'fixLists');
+ },
+
+ fixLists: function() {
+ this.$.devicesList.refresh();
+ this.$.categoryList.refresh();
+ },
+
+ setupDevicesRow: function(inSender, index) {
+ if(!this.current.DEVICES)
+ return false;
+ var row = this.current.DEVICES[index];
+ if(row) {
+ this.$.listItemLabel.setContent(row);
+ return true;
+ }
+ },
+
+ setupCategoryRow: function(inSender, index) {
+ var row = this.categories[index];
+ if(row) {
+ this.$.categoryItemLabel.setContent(row);
+ return true;
+ }
+ },
+
+ deviceClick: function(inSender, event, index) {
+ var devicetext = this.current.DEVICES[index];
+ this.doClickDevice(devicetext);
+ },
+
+ categoryClick: function(inSender, event, index) {
+ this.owner.loadCategory(this.categories[index])
+ }
+
+})
+
+enyo.kind({
+ name: 'ifixit.ui.devicebutton',
+ kind: enyo.CustomButton,
+ className: 'devices-item',
+ published: {
+ device: ''
+ },
+ components: [],
+ create: function() {
+ this.inherited(arguments);
+ this.createComponent({className: 'areas-label', name: 'label', content: this.device});
+ }
+})
+
+enyo.kind({
+ name: 'ifixit.ui.categorybutton',
+ kind: enyo.CustomButton,
+ className: 'category-item',
+ published: {
+ category: ''
+ },
+ components: [],
+ create: function() {
+ this.inherited(arguments);
+ this.createComponent({className: 'areas-label', name: 'label', content: this.category});
+ }
+})
123 ifixit.application/homescreen/devicepanel.js
@@ -0,0 +1,123 @@
+enyo.kind({
+ name: 'ifixit.ui.devicewidget',
+ kind: enyo.VFlexBox,
+ className: 'device-widget',
+ state: 'closed',
+ published: {
+ image: '',
+ title: '',
+ guideid: 0,
+ tools: []
+ },
+ components: [
+ {kind: 'CustomButton', onclick: 'itemClicked', name:'label', className: 'device-widget-label'},
+ {flex: 1, name: 'toolbox', className: 'toolbox', components: [
+ {className: 'toolbox-header', content: 'Toolbox'}
+ ]},
+ {kind: 'CustomButton', className: 'go-button', content: 'Start Fixin\'', onclick: 'goClicked'},
+
+ {name: 'GuideService', kind: 'ifixit.service.api',
+ onSuccess: 'gotGuide',
+ onFailure: 'gotGuideFailure'},
+
+ ],
+ create: function() {
+ this.inherited(arguments);
+ this.applyStyle('background-image', 'url(' + this.image + ')');
+ this.$.label.setContent(this.title);
+ this.$.GuideService.getGuide(this.guideid);
+ },
+ itemClicked: function(inEvent) {
+
+ if(this.state === 'closed') {
+ this.addClass('active');
+ this.state = 'open';
+ return true;
+ }
+
+ if(this.state === 'open') {
+ this.removeClass('active');
+ this.state = 'closed';
+ return true;
+ }
+
+ },
+
+ gotGuide: function(inSender, inResponse, inRequest) {
+ this.tools = inResponse.guide.tools;
+ for(var i = 0; i < this.tools.length;i++) {
+ var toollink = '<a href ="' + this.tools[i].url + '">' + this.tools[i].text + '</a>';
+ this.$.toolbox.createComponent({content: toollink, className: 'toolbox-item condensed'});
+ }
+ this.render();
+ },
+
+ goClicked: function(sender, event) {
+ enyo.$.home.launchGuide(this.guideid);
+ }
+})
+
+enyo.kind({
+ name: 'ifixit.ui.devicepanel',
+ kind: enyo.HFlexBox,
+ className: 'device-panel kill',
+ published: {
+ device: ''
+ },
+ events: {
+ onExit: ''
+ },
+ components: [
+ {flex:1, onclick: 'doExit'},
+ {kind: 'Scroller', width:'612px', components: [
+ {className: 'device-panel-frame', name: 'devicePanelFrame', components: [
+ //About the device box
+ {name: 'aboutDevice', className: 'about-device-box', components:[
+ //Header
+ {className: 'about-device-box-header', components:[
+ {name: 'deviceTitle', className: 'about-device-box-header-title'},
+ {name: 'deviceDescription', className: 'about-device-box-header-description'}
+ ]}
+ ]},
+ ]},
+ ]},
+ {flex:1, onclick: 'doExit'},
+
+
+ {name: 'DeviceService', kind: 'ifixit.service.api',
+ onSuccess: 'gotDevice',
+ onFailure: 'gotDeviceFailure'},
+ ],
+
+ create: function() {
+ this.inherited(arguments);
+ if(this.device !== '') {
+ this.$.DeviceService.getDevice(this.device);
+ this.$.deviceTitle.setContent(this.device);
+ }
+ },
+
+ deviceChanged: function() {
+ if(this.$.guidesSection) {
+ this.$.guidesSection.destroy();
+ }
+ this.$.devicePanelFrame.createComponent({name: 'guidesSection', owner: this});
+ if(this.device !== '') {
+ this.$.DeviceService.getDevice(this.device);
+ this.$.deviceTitle.setContent(this.device);
+ }
+ },
+
+ gotDevice: function(inSender, inResponse, inRequest) {
+ this.$.aboutDevice.applyStyle('background-image', 'url(' + inResponse.image.text+'.medium)');
+ this.$.deviceDescription.setContent(inResponse.description);
+
+ var guides = inResponse.guides;
+
+ for(var i = 0; i < guides.length; i++) {
+ var img = guides[i].thumbnail.replace('.thumbnail','.medium');
+ this.$.guidesSection.createComponent({kind: 'ifixit.ui.devicewidget', image: img, guideid: guides[i].guideid, title: guides[i].title});
+ }
+ this.render();
+ }
+})
132 ifixit.application/homescreen/featuredwidget.js
@@ -0,0 +1,132 @@
+//Archived
+/*enyo.kind({
+ name: 'ifixit.ui.featured',
+ kind: enyo.HFlexBox,
+ className: 'featured-area',
+ activeItem: undefined,
+ components: [
+ {name: 'scroller', kind: 'FadeScroller', autoHorizontal: false, horizontal: true, autoVertical: false, vertical: false, components: [
+
+ ]}
+ ],
+ addPanel: function(guide) {
+ this.$.scroller.createComponent({kind: 'ifixit.ui.featuredwidget', image:guide.image.text + '.large', title: guide.title, tools: guide.tools, guideid: guide.guideid});
+ this.render();
+ },
+
+ itemClicked: function(sender) {
+ if(this.activeItem)
+ this.activeItem.removeClass('active');
+ if(this.activeItem === sender) {
+ this.activeItem.removeClass('active');
+ this.activeItem = undefined;
+ return true;
+ }
+ this.activeItem = sender;
+ sender.addClass('active');
+ return true;
+ }
+})
+
+enyo.kind({
+ name: 'ifixit.ui.featuredwidget',
+ kind: enyo.HFlexBox,
+ className: 'featured-widget',
+ published: {
+ image: '',
+ title: '',
+ tools: [],
+ guideid: 0
+ },
+ flex: 1,
+ chrome: [
+ {className: 'featured-widget-label-background'},
+ {kind: 'CustomButton', onclick: 'goClicked', name:'label', className: 'featured-widget-label'},
+ {kind: 'CustomButton', className: 'go-button', content: 'Start Fixin\'', onclick: 'goClicked'},
+ {name: 'toolbox', className: 'toolbox', components: [
+ {className: 'toolbox-header', content: 'Toolbox'}
+ ]}
+ ],
+ create: function() {
+ this.inherited(arguments);
+ this.applyStyle('background-image', 'url(' + this.image + ')');
+ this.$.label.setContent(this.title);
+ for(var i = 0; i < this.tools.length;i++) {
+ var toollink = '<a href ="' + this.tools[i].url + '">' + this.tools[i].text + '</a>';
+ this.$.toolbox.createComponent({content: toollink, className: 'toolbox-item condensed'});
+ }
+ },
+ itemClicked: function(sender, event) {
+ this.owner.owner.itemClicked(sender.owner);
+ },
+ goClicked: function(sender, event) {
+ enyo.$.home.launchGuide(this.guideid);
+ }
+});
+*/
+
+enyo.kind({
+ name: 'ifixit.ui.featured',
+ kind: enyo.VFlexBox,
+ className: 'featured-area',
+ activeItem: undefined,
+ __index: 0,
+ components: [
+ {flex:1, className: 'featured-row', kind: enyo.HFlexBox, name: 'top'},
+ {flex:1, className: 'featured-row', kind: enyo.HFlexBox, name: 'middle'},
+ {flex:1, className: 'featured-row', kind: enyo.HFlexBox, name: 'bottom'}
+ ],
+ addPanel: function(guide) {
+ if(this.__index <=2) {
+ this.$.top.createComponent({kind: 'ifixit.ui.featuredwidget', image:guide.image.text + '.large', title: guide.title, tools: guide.tools, guideid: guide.guideid});
+ }
+
+ if(this.__index > 2 && this.__index <= 5) {
+ this.$.middle.createComponent({kind: 'ifixit.ui.featuredwidget', image:guide.image.text + '.large', title: guide.title, tools: guide.tools, guideid: guide.guideid});
+ }
+
+ if(this.__index > 5 && this.__index <= 8) {
+ this.$.bottom.createComponent({kind: 'ifixit.ui.featuredwidget', image:guide.image.text + '.large', title: guide.title, tools: guide.tools, guideid: guide.guideid});
+ }
+
+ this.__index++;
+ this.render();
+ },
+
+ itemClicked: function(sender) {
+ if(this.activeItem)
+ this.activeItem.removeClass('active');
+ if(this.activeItem === sender) {
+ this.activeItem.removeClass('active');
+ this.activeItem = undefined;
+ return true;
+ }
+ this.activeItem = sender;
+ sender.addClass('active');
+ return true;
+ }
+});
+
+enyo.kind({
+ name: 'ifixit.ui.featuredwidget',
+ kind: enyo.HFlexBox,
+ className: 'featured-widget',
+ published: {
+ image: '',
+ title: '',
+ tools: [],
+ guideid: 0
+ },
+ flex: 1,
+ chrome: [
+ {kind: 'CustomButton', onclick: 'goClicked', name:'label', className: 'featured-widget-label'},
+ ],
+ create: function() {
+ this.inherited(arguments);
+ this.applyStyle('background-image', 'url(' + this.image + ')');
+ this.$.label.setContent(this.title);
+ },
+ goClicked: function(sender, event) {
+ enyo.$.home.launchGuide(this.guideid);
+ }
+});
321 ifixit.application/homescreen/homescreen.js
@@ -0,0 +1,321 @@
+enyo.kind({
+ name: 'ifixit.ui.home',
+ kind: enyo.VFlexBox,
+ published: {
+ devicesarray: [],
+ launchParams: null
+ },
+ components: [
+ {kind: 'ApplicationEvents', onWindowParamsChange: 'windowParamsChangeHandler', onApplicationRelaunch: 'windowParamsChangeHandler'},
+
+//UI
+ {kind: enyo.HFlexBox, className: 'homescreen-header', components: [
+ {flex:1, className: 'normal'},
+ {className: 'title-homescreen'},
+ {flex:1, className: 'slogan'}
+ ]},
+ {kind: enyo.HFlexBox, flex:1, components: [
+ //Featured Section
+ {kind: enyo.VFlexBox, flex:1, components: [
+ {className: 'featured-header'},
+ {flex: 1, kind: enyo.HFlexBox, components:[
+ {name: 'featuredSection', flex:1, kind: 'ifixit.ui.featured'},
+ {name: 'browseButton', className: 'browse-button'}
+ ]},
+ ]},
+ //Browse Section
+ {className: 'browse-areas-container', kind: enyo.VFlexBox, width:'320px', components: [
+ {className: 'areas-header'},
+ {name: 'areasbrowser', kind: 'ifixit.ui.areasbrowser', flex: 1, onPickDevice: 'deviceFetch'}
+ ]}
+ ]},
+ //Device Panel
+ {kind: 'ifixit.ui.devicepanel', name: 'devicePanel', device: '', onExit: 'closeDevicePanel'},
+//Palm Service
+ {
+ name: 'iCheck',
+ kind: 'PalmService',
+ service: 'palm://com.palm.connectionmanager',
+ method: 'getstatus',
+ onSuccess: 'internets',
+ onFailure: 'internets',
+ subscribe: true
+ },
+//Services
+ {name: 'FeaturedService', kind: 'ifixit.service.api',
+ onSuccess: 'gotFeatured',
+ onFailure: 'gotFeaturedFailure'},
+ {name: 'GuideService', kind: 'ifixit.service.api',
+ onSuccess: 'gotGuide',
+ onFailure: 'gotGuideFailure'},
+ {name: 'AreasService', kind: 'ifixit.service.api',
+ onSuccess: 'gotAreas',
+ onFailure: 'gotAreasFailure'},
+ {name: 'DeviceService', kind: 'ifixit.service.api',
+ onSuccess: 'gotDevice',
+ onFailure: 'gotDeviceFailure'},
+
+//App Menu
+ {kind: 'AppMenu', components: [
+ {caption: 'About iFixit', onclick: 'openabout'},
+ ]},
+
+//About Box
+ {name: 'about-box', align: 'center', className: 'about-main hidden', kind: enyo.VFlexBox, components:[
+ {flex:1},
+ {className: 'about', components:[
+ {kind: 'CustomButton', className: 'about-close', onclick: 'closeabout', content:'x'},
+ {kind:'Scroller', components:[
+ {name: 'aboutcontent', kind: 'HtmlContent', srcId: 'aboutcontent', className: 'about-content', onLinkClick:'linkclick'}
+ ]}
+ ]},
+ {flex:1}
+ ]},
+
+//DB Stuff
+ {kind: 'DbService', dbKind: 'ifixit.devices:1', onFailure: 'dbFailure', components: [
+ {name: 'deleteiFixitDbKind', method: 'delKind', onResponse: 'deleteiFixitDbKindResponse'},
+ {name: 'makeiFixitDbKind', method: 'putKind', onSuccess: 'putDbKindSuccess'},
+ {name: 'insertiFixit', method: 'put', onResponse: 'insertiFixitResponse'},
+ {name: 'findiFixit', method: 'find', onResponse: 'findiFixitResponse'}
+ ]},
+
+ {
+ name: 'putDBPermissions',
+ kind: enyo.PalmService,
+ service: 'palm://com.palm.db/',
+ method: 'putPermissions',
+ onSuccess: 'permissionSuccess',
+ onFailure: 'permissionFailure',
+ }
+ ],
+
+//DB functions
+
+ deleteiFixitDbKindResponse: function() {
+ // when the delKind is done, then make the iFixit devices dbKind.
+ this.$.makeiFixitDbKind.call({
+ 'id': 'ifixit.devices:1',
+ 'schema': {
+ 'id': 'ifixit.devices:1',
+ 'type': 'object',
+ 'properties': {
+ '_kind': {
+ 'type': 'string',
+ 'value': 'ifixit.devices:1'
+ },
+ 'device': {
+ 'type': 'string',
+ 'description': 'device string'
+ },
+ 'devicelowercase': {
+ 'type': 'string',
+ 'description': 'device lowercase string'
+ }
+ }
+ },
+ 'owner': 'com.jamtat.ifixit',
+ 'indexes': [{
+ 'name': 'device',
+ 'props': [{
+ 'name': 'device'
+ }]
+ },
+ {
+ 'name': 'devicelowercase',
+ 'props': [{
+ 'name': 'devicelowercase'
+ }]
+ }]
+ });
+
+ this.recurse(this.areas);
+
+ this.devicesarray.sort(function(a,b) {
+ if(a.device.toLowerCase() < b.device.toLowerCase())
+ return -1;
+ if(a.device.toLowerCase() > b.device.toLowerCase())
+ return 1;
+ return 0;
+ });
+ console.log(this.devicesarray);
+
+ this.$.insertiFixit.call({objects: this.devicesarray});
+
+ var permObj = [{
+ 'type':'db.kind',
+ 'object':'ifixit.devices:1',
+ 'caller':'com.palm.launcher',
+ 'operations':{'read':'allow'}
+ }];
+ this.$.putDBPermissions.call({'permissions':permObj});
+ },
+ putDbKindSuccess: function() {
+ this.log();
+ },
+ insertiFixitResponse: function(a, b, c) {
+ console.log(a);
+ console.log(JSON.stringify(b));
+ console.log(JSON.stringify(c));
+ this.log();
+ },
+
+ permissionSuccess: function(){
+ console.log('DB permission granted successfully!');
+ },
+ permissionFailure: function(){
+ console.log('DB failed to grant permissions!');
+ },
+
+//end DB functions
+
+ create: function() {
+ enyo.keyboard.setManualMode(true);
+ this.inherited(arguments);
+ //enyo.nextTick(this, 'getData');
+ if(window.PalmSystem)
+ this.$.iCheck.call();
+ else
+ enyo.nextTick(this, 'getData');
+ },
+
+ internets: function(sender, response) {
+ if (response.isInternetConnectionAvailable === true) {
+ enyo.nextTick(this, 'getData');
+ } else {
+ enyo.windows.addBannerMessage('No Internet Connection','{}');
+ }
+ },
+
+ openAppMenu: function() {
+ this.$.appMenu.open();
+ },
+ openabout: function(sender, event) {
+ this.$['about-box'].removeClass('hidden');
+ },
+ closeabout: function(sender, event) {
+ this.$['about-box'].addClass('hidden');
+ },
+ linkclick: function(sender, url) {
+ location.href = url;
+ return true;
+ },
+
+ getData: function() {
+ this.$.FeaturedService.getType('featured');
+ this.$.AreasService.getAreas();
+ },
+
+ gotFeatured: function(inSender, inResponse, inRequest) {
+ for(var i = 0; i < inResponse.length; i++) {
+ this.$.GuideService.getGuide(inResponse[i].guideid)
+ }
+ },
+
+ gotGuide: function(inSender, inResponse, inRequest) {
+ this.$.featuredSection.addPanel(inResponse.guide);
+ },
+
+ gotAreas: function(inSender, inResponse, inRequest) {
+ console.log(inResponse);
+ this.areas = inResponse;
+ this.$.areasbrowser.setAreas(this.areas);
+
+ //We'll delete the ifixit DB Kind
+ if(window.PalmSystem) {
+ this.$.deleteiFixitDbKind.call();
+ } else {
+ this.recurse(this.areas);
+
+ this.devicesarray.sort(function(a,b) {
+ if(a.device.toLowerCase() < b.device.toLowerCase())
+ return -1;
+ if(a.device.toLowerCase() > b.device.toLowerCase())
+ return 1;
+ return 0;
+ });
+ console.log(this.devicesarray);
+ }
+ },
+
+ deviceFetch: function(inSender, deviceQuery) {
+ console.log(deviceQuery);
+ this.$.devicePanel.setDevice(deviceQuery);
+ this.$.devicePanel.removeClass('kill');
+ },
+
+ closeDevicePanel: function() {
+ this.$.devicePanel.addClass('kill');
+ },
+
+ gotDevice: function(inSender, inResponse, inRequest) {
+ },
+
+ launchGuide: function(guideid) {
+ enyo.windows.activate('guide.html', 'guide' + guideid, {'guideid': guideid});
+ },
+
+
+ recurse: function(obj) {
+
+ for(key in obj) {
+
+ if(key === 'DEVICES' && obj[key].length) {
+ var d = obj[key],
+ l = d.length,
+ i = 0;
+
+ for(i;i<l;i++) {
+ this.devicesarray.push({
+ '_kind': 'ifixit.devices:1',
+ 'device': d[i],
+ 'devicelowercase': d[i].toLowerCase()
+ });
+ }
+
+ } else {
+ if(obj.hasOwnProperty(key)) {
+ this.recurse(obj[key]);
+ }
+ }
+
+ }
+
+ },
+
+ devices: function(arr) {
+ var i = 0;
+ var l = arr.length;
+ var temp = []
+ while(i < l) {
+ temp.push(arr[i]);
+ var device = {
+ _kind: 'com.jamtat.ifixit:1',
+ };
+
+ //this.$.dbPut.call({objects: [device]});
+
+ i++;
+ }
+ this.devicesarray = this.devicesarray.concat(temp);
+ },
+
+ //Handle launching a guide from another launcher icon
+ launchParamsChanged: function(){
+
+ if (this.launchParams.guideid){
+ this.launchGuide(this.launchParams.guideid);
+ }
+
+ if(this.launchParams.deviceName) {
+ this.deviceFetch(undefined, this.launchParams.deviceName);
+ }
+ },
+
+ windowParamsChangeHandler: function() {
+ // capture any parameters associated with this app instance
+ var params = enyo.windowParams;
+ this.setLaunchParams(enyo.windowParams);
+ },
+
+})
BIN  ifixit.application/icons/128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/256.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/guide128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/guide256.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/guide512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ifixit.application/icons/guide64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
949 ifixit.application/ifixit.css
@@ -0,0 +1,949 @@
+body {
+ background: #e1e1de;
+}
+
+.condensed {
+ font-family: 'Prelude-CondensedMedium', Helvetica;
+}
+
+.oblique {
+ font-style: italic;
+}
+
+.oblique strong {
+ font-style: italic;
+}
+
+
+
+/* @group Homescreen */
+
+/* @group Header Bar */
+
+.homescreen-header {
+ height: 136px;
+ margin-bottom: -17px;
+ z-index: 100;
+}
+
+.title-homescreen {
+ width: 390px;
+ background-image: url(images/homescreen/homescreen-header-title.png);
+ position: relative;
+ z-index: 1;
+}
+.normal {
+ background-image: url(images/homescreen/homescreen-header.png);
+ position: relative;
+ z-index: 1;
+}
+.slogan {
+ background: url(images/homescreen/homescreen-header-slogan.png) no-repeat top right,
+ url(images/homescreen/homescreen-header.png);
+ position: relative;
+ z-index: 1;
+}
+
+/* @end */
+
+/* @group Headers */
+.featured-header {
+ height: 50px;
+ background: #70706f url(images/homescreen/featured-title.png) no-repeat 5px center;
+}
+
+.areas-header {
+ height: 50px;
+ background: #70706f url(images/homescreen/areas-title.png) no-repeat 5px center;
+}
+
+
+/* @end */
+
+/* @group Featured Widget Box */
+
+.featured-area {
+}
+
+.featured-row {
+ width: 100%;
+}
+
+div#home_featuredSection_scrolling_client.enyo-hflexbox.enyo-scroller-scrollee {
+ height: 600px;
+}
+
+
+.featured-widget {
+ background-size:cover;
+ background-position: center top;
+ width: 150px;
+ -webkit-transition: width 0.2s ease;
+ overflow: hidden;
+ -webkit-transform: translateZ(0);
+}
+
+div#home_featuredSection.featured-area.enyo-hflexbox {
+ -webkit-box-flex: 1;
+}
+
+.featured-widget.active {
+ width: 600px;
+}
+
+
+.featured-widget-label {
+ background: rgba(0,0,0,0.5);
+ color: white;
+ width: 100%;
+ height: 100%;
+ padding: 3px 5px 5px;
+ -webkit-box-sizing: border-box;
+}
+
+/* Archived
+
+.featured-widget-label {
+ white-space: nowrap;
+ color: white;
+ -webkit-transform-origin: top left;
+ -webkit-transform: rotate(90deg);
+ position: relative;
+ left: 60px;
+ padding-left: 10px;
+ width: 1000px;
+ line-height: 60px;
+ font-size: 19px;
+ letter-spacing: 1px;
+ text-align: left;
+}
+
+
+
+.featured-widget-label-background {
+ background: url(images/homescreen/featured-widget-label-rotated.png) repeat-y;
+ width: 60px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ pointer-events: none;
+}
+
+*/
+/* @end */
+
+/* @group Browse Button */
+
+.browse-button {
+ width: 90px;
+ background: #b5ccfd url(images/homescreen/browse.png) no-repeat center center;
+ border: 1px solid #3f5cab;
+ display: none;
+}
+
+.browse-button:active {
+ background-color: #94a7cf;
+}
+
+/* @end */
+
+/* @group Go Button */
+
+.go-button {
+ background: #3f5cab;
+ color: white;
+ width: 150px;
+ -webkit-border-bottom-left-radius: 30px;
+ -webkit-border-bottom-right-radius: 30px;
+ text-align: center;
+ -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5);
+ line-height: 47px;
+ position: absolute;
+ top: 0;
+ left: 210px;
+ height: 50px;
+}
+
+
+
+/* @end */
+
+/* @group Areas Browser */
+.browse-areas-container {
+ background: #c2c2bf;
+}
+
+.areasbrowser {
+ background: url(images/homescreen/panel-right-bg.png) repeat-y;
+ border-top: 1px solid #7890c4;
+ padding-left: 10px;
+}
+
+.areas-list-divider {
+ color: white;
+ font-size: 16px;
+ height: 20px;
+ text-align: center;
+ background: #3f5cab;
+ border-top: 1px solid #7890c4;
+ margin-top: -1px;
+ border-bottom: 1px solid #4b4b4b;
+}
+
+.devices-item {
+ background: #999999;
+ border-bottom: 1px solid #737373;
+ border-top: 1px solid #a8a8a8;
+ height: 50px;
+ border-left: 1px solid #4b4b4b;
+ padding: 0;
+}
+
+.devices-item:active {
+ background: #7f7f7f;
+}
+
+.category-item {
+ background: #7f7f7f;
+ border-bottom: 1px solid #5f5f5f;
+ border-top: 1px solid #929292;
+ height: 50px;
+ border-left: 1px solid #4b4b4b;
+ padding: 0;
+}
+
+.category-item::after {
+ content: ">";
+ color: white;
+ position: absolute;
+ right: 10px;
+ top: 0;
+ bottom: 0;
+ line-height: 50px;
+}
+
+.category-item:active {
+ background: #666666;
+}
+
+
+.areas-label {
+ line-height: 50px;
+ color: white;
+ text-align: left;
+ padding-left: 10px;
+ font-size: 22px;
+ padding-bottom: 0 !important;
+ padding-right: 0 !important;
+ padding-top: 0 !important;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.areas-footnote {
+ font-size: 12px;
+ line-height: 16px;
+ color: #c2d2ff;
+ height: 16px;
+}
+
+.listSwitcherPane {
+ background: #e1e1de;
+ //-webkit-transition: -webkit-transform 0.2s ease;
+}
+
+/* @end */
+
+/* @group Device */
+
+/* @group Device Widget */
+.device-widget {
+ width: 592px;
+ height: 222px;
+ position: relative;
+ overflow: hidden;
+ background-size:cover;
+ -webkit-transition: all 0.3s ease;
+ display: block;
+ background-position: center center;
+}
+
+.device-widget.active {
+ width: 592px;
+ height: 444px;
+}
+
+/* @group Label */
+.device-widget-label {
+ color: white;
+ background: rgba(0,0,0,0.5);
+ text-align: left;
+ padding-left: 5px;
+ padding-top: 5px;
+ padding-bottom: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+}
+
+
+/* @end */
+
+/* @group Toolbox */
+
+.device-widget > .toolbox {
+ left: 370px;
+ display: block;
+ position: relative;
+ height: inherit !important;
+ -webkit-transform: translate3d(0,100%,0);
+ -webkit-transition: -webkit-transform 0.3s ease 0s;
+}
+
+.device-widget.active > .toolbox {
+ -webkit-transform: translate3d(0,0px,0);
+ -webkit-transition: -webkit-transform 0.3s ease 0.6s;
+}
+
+
+/* @end */
+
+/* @group Go Button */
+
+.device-widget > .go-button {
+ background: #3f5cab;
+ color: white;
+ width: 150px;
+ -webkit-border-bottom-left-radius: 0px;
+ -webkit-border-bottom-right-radius: 0px;
+ -webkit-border-top-left-radius: 30px;
+ -webkit-border-top-right-radius: 30px;
+ top: 396px;
+ bottom: 0px;
+ height: 50px;
+ left: 121px;
+}
+
+/* @end */
+
+
+/* @end */
+
+/* @group Device Panel */
+.device-panel {
+ background: rgba(0,0,0,0.7);
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 200;
+ opacity: 1;
+ pointer-events:inherit;
+ -webkit-transition: opacity 0.6s linear;
+}
+
+.device-panel.kill {
+ opacity: 0;
+ pointer-events: none;
+}
+
+.device-panel-frame {
+ background: #e1e1de;
+ border-width: 10px;
+ -webkit-border-image: url(images/homescreen/devices-panel-border.png) 10 10 10 10 repeat repeat;
+ width: 612px;
+ margin-top: 30px;
+ margin-bottom: 30px;
+ -webkit-box-sizing: border-box;
+}
+
+.about-device-box {
+ width: 592px;
+ height: 444px;
+}
+
+/* @group Title Bar */
+
+.about-device-box-header {
+ background: rgba(0,0,0,0.5);
+ color: white;
+ padding-left: 6px;
+ padding-bottom: 4px;
+}
+.about-device-box-header-title {
+ font-size: 22px;
+}
+
+.about-device-box-header-description {
+ font-size: 16px;
+}
+
+
+/* @end */
+
+/* @end */
+
+/* @end */
+
+/* @end */
+
+/* @group Scroller Fixes */
+#home_featuredSection_scroller {
+ -webkit-box-flex: 1;
+}
+
+#home_featuredSection_scroller_innerClient, #home_featuredSection_scroller_client {
+ -webkit-box-orient: horizontal;
+ display: -webkit-box;
+}
+
+.enyo-scrollfades-right {
+ width: 38px;
+ background: url(images/homescreen/scrollfade.png);
+}
+/* @end */
+
+/* @group Guide Screen */
+
+/* @group Loading Page */
+
+.guide-loading {
+ background: #83b1ff;
+ font-size: 90px;
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ height: 100%;
+ width: 100%;
+ color: white;
+ z-index: 100;
+ opacity: 1;
+ -webkit-transition: opacity 1s linear 2s;
+ pointer-events:none;
+}
+
+.guide-loading.dead {
+ opacity: 0;
+ pointer-events:none;
+}
+
+
+.lil-gear {
+ -webkit-animation: spin;
+ -webkit-animation-duration: 1.5s;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-timing-function: linear;
+}
+
+.loading-message {
+ margin-bottom: 10px;
+ margin-right: 430px;
+}
+
+.gear {
+ width: 400px;
+ height: 400px;
+
+}
+
+.gear-black {
+ background-image: url(images/guide/loading/gear-white.png);
+ -webkit-animation: spin;
+ -webkit-animation-duration: 4s;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-timing-function: linear;
+}
+
+
+.gear-white {
+ background-image: url(images/guide/loading/gear-white.png);
+ -webkit-animation: spinoffset;
+ -webkit-animation-duration: 4s;
+ -webkit-animation-iteration-count: infinite;
+ -webkit-animation-timing-function: linear;
+ margin-top: -130px;
+ margin-left: 550px;
+ margin-bottom: -160px;
+}
+
+
+/* @end */
+
+/* @group Cover Page */
+
+.guide-cover {
+ background-size: cover;
+ background-position: center center;
+ width: 100%;
+ height: 100%;
+ color: white;
+ -webkit-box-align: end !important;
+ background-repeat: no-repeat;
+ position: relative;
+}
+
+.guide-cover-title {
+ background: rgba(0,0,0,0.5);
+ font-size: 42px;
+ min-height: 100px;
+ -webkit-box-sizing: border-box;
+ padding-left: 10px;
+ padding-bottom: 10px;
+ display: block;
+ width: 100%;
+ padding-right: 298px;
+}
+
+.guide-cover-logo {
+ position: absolute;
+ right: 10px;
+ z-index: 100;
+ top: 10px;
+}
+
+.guide-cover > .toolbox {
+ display: block;
+ position: static;
+}
+
+.guide-introduction {
+ background: rgba(0,0,0,0.6);
+ padding: 0 0 0 5px;
+ font-size: 16px;
+ position: absolute;
+ bottom: 10px;
+ right: 210px;
+ left: 0;
+}
+
+p {
+ margin: 5px;
+}
+
+a {
+ color: #c4daff;
+ text-decoration: none;
+}
+
+.guide-hint {
+ position: absolute;
+ bottom: 60px;
+ z-index: 100;
+ font-size: 16px;
+ width: 200px;
+ right: 0;
+ text-align: center;
+}
+
+.add-launcher-message {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ background: rgba(254,255,254,0.36);
+ z-index: 90;
+ height: 48px;
+ width: 200px;
+ line-height: 48px;
+ text-align: center;
+ color: white;
+ font-size: 20px;
+}
+
+/* @end */
+
+/* @group Guide Page */
+
+/* @group Info Pane */
+
+.info-pane {
+ background: rgba(0,0,0,0.6);
+}
+
+.guide-hint-page {
+ position: static;
+ height: 30px;
+ width: 100%;
+ color: #bbbab8;
+}
+
+/* @group Info Step */
+
+.infostep {
+ margin-right: 50px;
+ padding-left: 0;
+ padding-right: 30px;
+ margin-top: 20px;
+ list-style-type: none;
+ display: list-item;
+ list-style-position: outside;
+ position: relative;
+ left: 25px;
+ margin-left: 8px;
+ list-style-image: url(images/guide/bullets/black.png);
+}
+
+/* @group Bullet Colours */
+
+.infostep.red {
+ list-style-image: url(images/guide/bullets/red.png);
+}
+
+.infostep.blue {
+ list-style-image: url(images/guide/bullets/blue.png);
+}
+
+.infostep.yellow {
+ list-style-image: url(images/guide/bullets/yellow.png);
+}
+
+.infostep.orange {
+ list-style-image: url(images/guide/bullets/orange.png);
+}
+
+.infostep.green {
+ list-style-image: url(images/guide/bullets/green.png);
+}
+
+.infostep.icon_note::before {
+ content: url(images/guide/bullets/note.png);
+ float: right;
+}
+
+.infostep.icon_reminder::before {
+ content: url(images/guide/bullets/reminder.png);
+ float: right;
+}
+
+.infostep.icon_caution::before {
+ content: url(images/guide/bullets/caution.png);
+ float: right;
+}
+
+/* @end */
+
+/* @group Levels */
+
+.infostep.level1 {
+ margin-left: 40px;
+}
+
+.infostep.level2 {
+ margin-left: 80px;
+}
+
+.infostep.level3 {
+ margin-left: 120px;
+}
+
+/* @end */
+
+
+
+/* @end */
+
+
+
+/* @end */
+
+/* @group Image Pane */
+
+/* @group Main Image */
+
+.main-image {
+ max-width: 592px;
+ height: 444px;
+ -webkit-border-image: url(images/guide/photo-frame.png) 7 9 11 9;
+ border-top-width: 7px;
+ border-right-width: 9px;
+ border-left-width: 9px;
+ border-bottom-width: 11px;
+ background-size: auto 100%;
+ background-repeat: no-repeat;
+ background-position: center center;
+ -webkit-background-clip: content-box;
+ margin: auto;
+}
+
+/* @end */
+
+.thumbnail-tray {
+ height: 236px;
+ width: 100%;
+ margin-top: 8px;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ background: url(images/guide/thumbnail-border.png) repeat-x;
+ position: relative;
+}
+
+.thumbnail-wrapper {
+ /*overflow: hidden;*/
+ width: 100%;
+}
+
+/* @group Thumbnail Images */
+
+.thumbnail-image {
+ width: 300px;
+ height: 215px;
+ -webkit-border-image: url(images/guide/photo-frame.png) 7 9 11 9;
+ border-top-width: 7px;
+ border-right-width: 9px;
+ border-left-width: 9px;
+ border-bottom-width: 11px;
+ background-position: center center;
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+ -webkit-background-clip: content-box;
+ margin-top: 2px;
+ -webkit-transition: -webkit-transform 0.2s ease, opacity 0.2s linear;
+}
+
+.thumbnail-image.active {
+ opacity: 0.8;
+ -webkit-transform: scale(0.9);
+}
+
+/* @end */
+
+.image-pane {
+ background: rgba(51,97,173,0.7);
+ height: 100%;
+ position: relative;
+ z-index: 0;
+}
+
+.info-shadow{
+ background: url(images/guide/info-shadow.png) repeat-y right;
+ height: 100%;
+ width: 10px;
+ margin-left: -10px;
+}
+
+/* @end */
+
+/* @group Blurred Image */
+
+.blurred {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ top:0;
+ opacity: 1;
+ -webkit-transition: opacity 1s linear;
+ z-index: -10;
+}
+
+.blurred.hidden {
+ opacity: 0;
+ -webkit-transition: opacity 0.1s linear;
+}
+
+/* @end */
+
+/* @end */
+
+.step-number {
+ color: #b3c3dd;
+ z-index: 200;
+ margin-left: 10px;
+ margin-bottom: 2px;
+ font-size: 16px;
+}
+/* @end */
+
+iframe {
+ z-index: 1000;
+}
+
+/* @group Toolbox */
+
+.toolbox {
+ position: absolute;
+ left: 390px;
+ top: 0;
+ background: rgba(51,97,173,0.7);
+ height: 100%;
+ color: white;
+ font-size: 16px;
+ width: 200px;
+}
+
+.toolbox a {
+ color: white;
+ outline: none;
+ display: block;
+ width: 100%;
+ background: rgba(255,254,255,0.31);
+ padding-left: 10px;
+ padding-right: 30px;
+ -webkit-box-sizing: border-box;
+ border-radius: 10px;
+}
+
+.toolbox a:hover {
+ background: rgba(255,254,255,0.6);
+}
+
+.toolbox-header {
+ font-size: 36px;
+ text-align: center;
+ background: rgba(0,0,0,0.5);
+}
+
+.toolbox > .toolbox-item {
+ -webkit-box-sizing: border-box;
+ font-size: 16px;
+ margin-right: 0;
+ margin-top: 20px;
+ list-style-type: none;
+ display: list-item;
+ width: 190px;
+ margin-left: 5px;
+ color: #6888bd;
+}
+/* @end */
+
+/* @group Animations */
+
+/* @group Spin */
+
+@-webkit-keyframes spin {
+ 0% {
+ -webkit-transform: rotate(0deg) translate3d(0,0,0);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg) translate3d(0,0,0);
+ }
+}
+
+
+
+/* @end */
+
+/* @group Offset Spin */
+
+@-webkit-keyframes spinoffset {
+ 100% {
+ -webkit-transform: rotate(22.5deg) translate3d(0,0,0);
+ }
+ 0% {
+ -webkit-transform: rotate(382.5deg) translate3d(0,0,0);
+ }
+}
+
+/* @end */
+
+/* @group Fade Out */
+
+@-webkit-keyframes fadeout {
+ 0% {
+ opacity:1;