Commits

Aaron Toth  committed 41c4b17

Added makefile, and made welcome screen and register popip work

  • Participants
  • Parent commits 6c90bbe

Comments (0)

Files changed (4)

File .DS_Store

Binary file modified.
+APPNAME = me.aaront.pinnned
+VERSION = 0.7.0
+PACKAGEFILE = $(APPNAME)_$(VERSION)_all.ipk
+BUILDDIR = build/
+
+default: package
+
+package: $(PACKAGEFILE)
+
+install: package
+	palm-install $(BUILDDIR)$(PACKAGEFILE)
+
+remove:
+	palm-install -r $(APPNAME)
+
+launch: install
+	palm-launch $(APPNAME)
+
+$(PACKAGEFILE):
+	palm-package --exclude="Makefile" --exclude="build" -o $(BUILDDIR) .

File source/Pinnned.js

             ]}
         ]},
         {name: "accountUtilities", kind: "me.aaront.AccountUtilities"},
-        {kind: "ApplicationEvents", onLoad: "showOrBypassWelcomeView"}
+        {kind: "ApplicationEvents", onWindowActivated: "showOrBypassWelcomeView"}
     ],
     openAppMenuHandler: function() {
         this.$.appMenu.open();
     welcomeDone: function(inSender, inNew) {
         var accounts = inNew;
         this.$.mainView.receiveAccounts(accounts);
+        this.$.mainPane.selectViewByName('mainView');
     },
     showPreferences: function() {
         this.$.mainPane.selectViewByName("preferencesView");
     showOrBypassWelcomeView: function() {
         var accounts = this.$.accountUtilities.getAccounts();
         if (accounts.length === 0) {
-            this.$.mainPane.selectViewByName("welcome");
+            this.$.mainPane.selectViewByName("welcomeView");
         }
     }
 });

File source/views/Welcome.js

     },
     components: [
         {kind: "PageHeader", content: "Welcome to Pinnned"},
-        {kind: "Scroller", flex: 1, components: [
-            {kind: "VFlexBox", flex: 1, style: "width: 600px; margin: 20px auto;", components: [
-                {name: "welcomeText",kind: "Drawer", components: [
-                    {content: "Hey there!", className: "welcome-bigtext"},
-                    {content: "Thanks for downloading Pinned, the premier social bookmarking client for the HP Touchpad!", className: "welcome-normaltext"},
-                    {content: "We just need one piece of information to get started: an account.", className: "welcome-normaltext"},
-                    {content: "Please type in your details below and click next to see your bookmarks, or "+
-                        "tap the 'I Need an Account' button to to get an account.", className: "welcome-normaltext"}
-                ]},
-                {kind: "RowGroup", caption: "Service", components: [
-                    {name: "service", kind: "ListSelector", value: 1}
-                ]},
-                {kind: "RowGroup", caption: "Account Details", components: [
-                    {name: "username", kind: "Input", hint: "Username", autoCapitalize: "lowercase", onfocus: "hideWelcomeText"},
-                    {name: "password", kind: "PasswordInput", hint: "Password", onfocus: "hideWelcomeText"}
-                ]},
-                {kind: "HFlexBox", pack: "end", style: "padding: 0 10px;", components: [
-                    {name: "registerButton", kind: "Button", content: "I Need an Account", onclick: "registerAccount"},
-                    {kind: "Spacer"},
-                    {name: "saveButton", kind: "Button", className: "enyo-button-affirmative", content: "Next", onclick: "addAccountSubmitted", isDefault: true}
-                ]}
+        {kind: "VFlexBox", flex: 1, style: "width: 600px; margin: 20px auto;", components: [
+            {name: "welcomeText",kind: "Drawer", components: [
+                {content: "Hey there!", className: "welcome-bigtext"},
+                {content: "Thanks for downloading Pinned, the premier social bookmarking client for the HP Touchpad!", className: "welcome-normaltext"},
+                {content: "We just need one piece of information to get started: an account.", className: "welcome-normaltext"},
+                {content: "Please type in your details below and click next to see your bookmarks, or "+
+                    "tap the 'I Need an Account' button to to get an account.", className: "welcome-normaltext"}
+            ]},
+            {kind: "RowGroup", caption: "Service", components: [
+                {name: "service", kind: "ListSelector", value: 1}
+            ]},
+            {kind: "RowGroup", caption: "Account Details", components: [
+                {name: "username", kind: "Input", hint: "Username", autoCapitalize: "lowercase", onfocus: "hideWelcomeText"},
+                {name: "password", kind: "PasswordInput", hint: "Password", onfocus: "hideWelcomeText"}
+            ]},
+            {kind: "HFlexBox", pack: "end", style: "padding: 0 10px;", components: [
+                {name: "registerButton", kind: "Button", content: "I Need an Account", onclick: "registerAccount"},
+                {kind: "Spacer"},
+                {name: "saveButton", kind: "Button", className: "enyo-button-affirmative", content: "Next", onclick: "addAccountSubmitted", isDefault: true}
             ]}
         ]},
         {name: "registerAccountPopup", kind: "Popup", scrim: true, modal: true, className: "transitioner", width: "500px", components: [
-            {kind: "finiteloop.AccountsRegister", onCancel: "closePopup", onDone: "registerDone"}
+            {kind: "me.aaront.RegisterAccount", onCancel: "closePopup", onDone: "registerDone"}
         ]},
-        {name: "accountUtilities", kind: "me.aaront.AccountUtilities"},
+        {name: "accountUtilities", kind: "me.aaront.AccountUtilities"}
     ],
     create: function() {
         this.inherited(arguments);
         this.$.welcomeText.close();
     },
     registerAccount: function(inSender) {
-        this.$.accountRegisterPopup.openAtCenter();
+        this.$.registerAccountPopup.openAtCenter();
     },
     registerDone: function(inSender) {
         this.closePopup(inSender);
     addAccountSubmitted: function() {
         var account = {
             service: this.$.service.getValue(),
-            username: this.$.service.getValue(),
+            username: this.$.username.getValue(),
             password: this.$.password.getValue()
         };
         this.$.accountUtilities.addAccount(account);
         var allAccounts = this.$.accountUtilities.getAccounts();
+        console.log(allAccounts);
         this.doDone(allAccounts);
     }
 });