From: Jan Schneider Date: Tue, 27 Oct 2009 22:40:45 +0000 (+0100) Subject: Handle options smarter by making the iframe a regular view. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=de0b584bc79891be5346c10627fa8f79942e2293;p=horde.git Handle options smarter by making the iframe a regular view. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 0856d4989..4cc12aaf6 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -181,7 +181,7 @@ KronolithCore = { case 'year': case 'agenda': case 'tasks': - this.closeView(); + this.closeView(loc); var locCap = loc.capitalize(); $('kronolithNav' + locCap).addClassName('on'); @@ -324,10 +324,11 @@ KronolithCore = { break; case 'options': - this.closeView(); + this.closeView('iframe'); this.iframeContent(loc, Kronolith.conf.prefs_url); this.setTitle(Kronolith.text.prefs); this._addHistory(loc); + this.view = 'iframe'; break; } }, @@ -435,17 +436,14 @@ KronolithCore = { /** * Closes the currently active view. */ - closeView: function() + closeView: function(loc) { [ 'Day', 'Week', 'Month', 'Year', 'Tasks', 'Agenda' ].each(function(a) { $('kronolithNav' + a).removeClassName('on'); }); - if (this.view) { + if (this.view && this.view != loc) { $('kronolithView' + this.view.capitalize()).fade({ 'queue': 'end' }); } - if ($('kronolithIframe').visible()) { - $('kronolithIframe').fade({ 'queue': 'end' }); - } }, /** @@ -1748,11 +1746,11 @@ KronolithCore = { } else { var iframe = new Element('IFRAME', { 'id': 'kronolithIframe' + name, 'class': 'kronolithIframe', 'frameBorder': 0, 'src': loc }); //this._resizeIE6Iframe(iframe); - $('kronolithIframe').insert(iframe); + $('kronolithViewIframe').insert(iframe); } this.view = null; - $('kronolithIframe').appear({ 'queue': 'end' }); + $('kronolithViewIframe').appear({ 'queue': 'end' }); }, onResize: function(noupdate, nowait) diff --git a/kronolith/templates/index/index.inc b/kronolith/templates/index/index.inc index ad9d69cf9..fb3a05df5 100644 --- a/kronolith/templates/index/index.inc +++ b/kronolith/templates/index/index.inc @@ -128,7 +128,7 @@ require dirname(__FILE__) . '/year.inc'; require dirname(__FILE__) . '/tasks.inc'; require dirname(__FILE__) . '/agenda.inc'; ?> - + diff --git a/kronolith/themes/screen.css b/kronolith/themes/screen.css index 256448cf7..e2ffdde56 100644 --- a/kronolith/themes/screen.css +++ b/kronolith/themes/screen.css @@ -1129,6 +1129,16 @@ table.kronolithView td.kronolithToday { background: #fff; } */ +#kronolithViewIframe iframe { + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + border: none; + width: 100%; + height: 100%; +} /* Events */ .kronolithEvent { @@ -1203,18 +1213,6 @@ div.kronolithView div.kronolithViewBody div.kronolithRow div .kronolithEvent.kro overflow: hidden; } -/* IFRAME */ -#kronolithIframe iframe { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - border: none; - width: 100%; - height: 100%; -} - /* Tags */ .panel-tags { margin-left: 10px;