Permalink
Browse files

Refactored the interface

- UI and launcher logic are completely seperated
- everything is build on top of Hopscotch.Action
  • Loading branch information...
1 parent 3f19492 commit bf8ba17a4814fddccd9bcb3b4a3b03c2cfefb333 @beaucollins committed Mar 11, 2013
Showing with 645 additions and 479 deletions.
  1. +3 −2 Info.plist
  2. +3 −3 init.js
  3. +2 −2 launcher/launcher.css
  4. +305 −408 launcher/launcher.js
  5. +285 −0 launcher/ui.js
  6. +47 −64 plugins/wordpress.js
View
@@ -5,7 +5,7 @@
<key>Author</key>
<string>Beau Collins</string>
<key>Builder Version</key>
- <string>7534.52.7</string>
+ <string>8536.26.17</string>
<key>CFBundleDisplayName</key>
<string>Hopscotch</string>
<key>CFBundleIdentifier</key>
@@ -25,9 +25,10 @@
<key>Start</key>
<array>
<string>lib/liquid-metal.js</string>
+ <string>lib/jquery.js</string>
<string>launcher/launcher.js</string>
+ <string>launcher/ui.js</string>
<string>init.js</string>
- <string>lib/jquery.js</string>
<string>plugins/wordpress.js</string>
</array>
</dict>
View
@@ -1,16 +1,16 @@
// only do this on top level windows, no iframes or frames
if (window.top === window) {
- var launcher = new Launcher();
+ var launcher = Hopscotch.ui;
document.addEventListener('DOMContentLoaded', function(){
launcher.initialize();
// if we don't have any actions, theres nothing for us to do
- if (launcher.root.actions == 0) return;
- console.log("Hopscotch intitialized with: ", launcher.root.actions.length, 'actions');
+ if (!launcher.hasActions()) return;
+ console.log("Hopscotch intitialized with: ", launcher.getActionCount(), 'actions');
// For repositioning the interface when browser changes
var resize_timer;
View
@@ -119,12 +119,12 @@ wplauncher-action:hover {
border-top-color: hsla(0,0%,0%,0.05) !important;
}
-wplauncher-action[highlighted] {
+wplauncher-action[data-highlighted] {
background: hsla(199,79%,61%,0.4) !important;
border-top-color: hsla(0,0%,0%,0.05) !important;
}
-wplauncher-action[highlighted]::after {
+wplauncher-action[data-highlighted]::after {
opacity:0.5;
color:#000;
text-shadow: 0 1px 0 hsla(0,0%,100%,1.0);
Oops, something went wrong.

0 comments on commit bf8ba17

Please sign in to comment.