Author: bklaas
Date: Tue Feb 12 07:05:37 2008
New Revision: 1917
URL: http://svn.slimdevices.com?rev=1917&root=Jive&view=rev
Log:
Bug: 6818
Description: add hooks for a new nextWindow destination: 'grandparent'
in this case the top window and the parent are both hidden, and if the
grandparent
had a json action that created it, it is requested again and the menu is updated
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1917&root=Jive&r1=1916&r2=1917&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
(original)
+++
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
Tue Feb 12 07:05:37 2008
@@ -673,8 +673,28 @@
end
end
+-- _hideMeAndMyDad
+-- hides the top window and the parent below it, refreshing the 'grandparent'
window via a new request
+local function _hideMeAndMyDad(step)
+ Framework:playSound("WINDOWHIDE")
+ step.window:hide()
+ if step.origin then
+ local parentStep = step.origin
+ if parentStep.origin then
+ parentStep.window:hide()
+ local grandparentStep = parentStep.origin
+ local timer = Timer(1000,
+ function()
+ _refreshJSONAction(grandparentStep)
+ end, true)
+ timer:start()
+ end
+ end
+end
+
+
-- _hideMe
--- hides the top window
+-- hides the top window and refreshes the parent window, via a new request
local function _hideMe(step)
Framework:playSound("WINDOWHIDE")
step.window:hide()
@@ -730,6 +750,8 @@
_goPlaylist()
elseif destination == 'parent' and step and step.window then
_hideMe(step)
+ elseif destination == 'grandparent' and step and step.window then
+ _hideMeAndMyDad(step)
elseif destination == 'refresh' and step and step.window then
_refreshMe(step)
end
@@ -1254,6 +1276,8 @@
sink = goHome
elseif item['nextWindow'] == 'parent' then
sink = _hideMe(_curStep)
+ elseif item['nextWindow'] == 'grandparent' then
+ sink = _hideMeAndMyDad(_curStep)
elseif item['nextWindow'] == 'refresh' then
sink = _refreshMe(_curStep)
elseif item["showBigArtwork"] then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins