[icinga-checkins] icinga.org: icinga-web/mhein/default: * Removed YUI

git at icinga.org git at icinga.org
Fri Oct 30 16:14:50 CET 2009


Module: icinga-web
Branch: mhein/default
Commit: 0f926eb0686965ff105602bb276a771a0c14a8ab
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=0f926eb0686965ff105602bb276a771a0c14a8ab

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Oct 30 16:02:46 2009 +0100

* Removed YUI
* Changed the header menu

---

 app/config/icinga.xml                              |   22 ---
 .../AppKit/templates/Admin/Groups/EditSuccess.php  |   38 ++----
 .../AppKit/templates/Widgets/ShowNavigationTop.php |  143 +++++++++++--------
 .../views/Widgets/ShowImageSuccessView.class.php   |    2 +-
 .../Widgets/SquishLoaderSuccessView.class.php      |    2 +-
 5 files changed, 97 insertions(+), 110 deletions(-)

diff --git a/app/config/icinga.xml b/app/config/icinga.xml
index e259b17..1b48440 100644
--- a/app/config/icinga.xml
+++ b/app/config/icinga.xml
@@ -103,17 +103,6 @@
 		<!-- ICINGAWireFrame css -->
 		<parameter>/styles/WireFrameDefault.css</parameter>
 		<parameter>/styles/WireFrameStructural.css</parameter>
-	
-		<!-- YUI css -->
-		<parameter>/js/yui/build/fonts/fonts-min.css</parameter>
-		<parameter>/js/yui/build/menu/assets/skins/sam/menu.css</parameter>
-		<parameter>/js/yui/build/tabview/assets/skins/sam/tabview.css</parameter>
-		<!-- <parameter>/js/yui/build/autocomplete/assets/skins/sam/autocomplete.css</parameter> -->
-		<parameter>/js/yui/build/container/assets/skins/sam/container.css</parameter>
-		<parameter>/js/yui/build/button/assets/skins/sam/button.css</parameter>
-		<!-- <parameter>/js/yui/build/resize/assets/skins/sam/resize.css</parameter> -->
-		<!-- <parameter>/js/yui/build/calendar/assets/skins/sam/calendar.css</parameter> -->
-		<parameter>/styles/WireFrameYUI.css</parameter>
 		
 		<!-- ExtJS -->
 		<parameter>/js/ext3/resources/css/ext-all-notheme.css</parameter>
@@ -141,17 +130,6 @@
 		* please provide absolute paths, we create one big file later.
 	-->
 	<setting name="appkit.include_javascript">
-	
-		<!-- YUI -->
-		<parameter>%core.root_dir%/lib/yui/build/yahoo/yahoo-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/event/event-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/yahoo-dom-event/yahoo-dom-event.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/container/container-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/get/get-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/element/element-beta-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/animation/animation-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/menu/menu-min.js</parameter>
-		<parameter>%core.root_dir%/lib/yui/build/button/button-min.js</parameter>
 
 		<!-- Firebug lite for debug purposes -->
 		<!-- <parameter>%core.root_dir%/lib/firebug/firebug-lite-compressed.js</parameter> -->
diff --git a/app/modules/AppKit/templates/Admin/Groups/EditSuccess.php b/app/modules/AppKit/templates/Admin/Groups/EditSuccess.php
index 2470d61..023abd4 100755
--- a/app/modules/AppKit/templates/Admin/Groups/EditSuccess.php
+++ b/app/modules/AppKit/templates/Admin/Groups/EditSuccess.php
@@ -5,22 +5,7 @@ $role = $t['role'];
 ?>
 <?php if ($role instanceof NsmRole) { ?>
 
-<script type="text/javascript">
-<!-- // <![CDATA[
-	YAHOO.util.Event.onContentReady("group_tabs", function () { 
-		var groupTabs = new YAHOO.widget.TabView('group_tabs');
-	});
-// ]]> -->
-</script>
-
-<div id="group_tabs" class="yui-navset">
-
-	<ul class="yui-nav">
-		<li class="selected"><a href="#group_data"><em>Settings</em></a></li>
-		<li><a href="#group_members"><em>Members</em></a></li>
-	</ul>
-	
-	<div class="yui-content">
+	<div>
 		<div id="group_data">
 		
 			<h4>Basic data</h4>
@@ -59,15 +44,8 @@ $role = $t['role'];
 				</tr>
 			
 			</table>
-			
-			<div class="submit">
-				<?php echo AppKitFormElement::create('submit', 'submit', 'Update')?>
-			</div>
-			
-			</form>
-		</div>
-	
-		<div id="group_members">
+		
+			<div id="group_members" style="margin-top: 10px">
 			
 			<h4>Memberships</h4>
 			<div>
@@ -90,9 +68,17 @@ $role = $t['role'];
 				<i>Sorry, this role contains no members!</i>
 			<?php } ?>
 			</div>
+			</div>
+			
+			<div class="submit">
+				<?php echo AppKitFormElement::create('submit', 'submit', 'Update')?>
+			</div>
+			
+			</form>
 		</div>
+	
+		
 	</div>
 
-</div>
 
 <?php } ?>
\ No newline at end of file
diff --git a/app/modules/AppKit/templates/Widgets/ShowNavigationTop.php b/app/modules/AppKit/templates/Widgets/ShowNavigationTop.php
index b725e6c..ebbfd84 100755
--- a/app/modules/AppKit/templates/Widgets/ShowNavigationTop.php
+++ b/app/modules/AppKit/templates/Widgets/ShowNavigationTop.php
@@ -6,80 +6,103 @@
 	$open = 0;
 ?>
 
+<div id="menuTopTarget"></div>
+
 <script type="text/javascript">
 <!-- // <![CDATA[
-YAHOO.util.Event.onContentReady("yahooTopMenu", function () { 
-	var oMenu = new YAHOO.widget.MenuBar("yahooTopMenu", {
-		autosubmenudisplay: true, 
-		hidedelay: 750, 
-		lazyload: true,
-		effect: {
-			effect: YAHOO.widget.ContainerEffect.FADE,
-			duration: 0.25
-		}
-	});
-	
-	oMenu.render();
+Ext.onReady(function() {
 
-});
-// ]]> -->
-</script>
+<?php
 
-<div id="topBar">
-<div id="yahooTopMenu" class="yuimenubar yuimenubarnav">
-<div class="bd"> 
-<ul class="first-of-type">
+$d = '[';
+
+foreach ($iterator as $name=>$navItem) {
 
-<?php foreach ($iterator as $name=>$navItem) { ?>
-<?php 
 	$check = false;
 	if ($check_depth <> $iterator->getDepth()) $check = true;
-?>
-<?php if ($iterator->getDepth() < $check_depth) { ?>
-<?php
-	for ($i=$check_depth;$i>$iterator->getDepth();$i--) {
-		$open--;
-		echo '</ul></div></div></li>';
-	} 
-?>
-<?php } ?>
-<li class="yuimenuitem">
-<?php if ($navItem->getRoute() !== null) { ?>
-<?php echo AppKitHtmlHelper::Obj()->LinkToRoute($navItem->getRoute(), $navItem->getCaption() ? $navItem->getCaption() : (string)$navItem, $navItem->getRouteArgs(), array('class' => 'yuimenuitemlabel')) ?>
-<?php } else { ?>
-<a name="<?php echo $navItem->getName(); ?>"><?php echo $navItem->getCaption(); ?></a>
-<?php } ?>
 
-<?php if ($navItem->getContainer()->hasChildren()) { ?>
-<?php $open++; ?>
+	if ($iterator->getDepth() < $check_depth) {
 
-	<div id="item.<?php echo $navItem->getName(); ?>" class="yuimenubarnav"><div class="bd"><ul>
-<?php } else { ?>
+		for ($i=$check_depth;$i>$iterator->getDepth();$i--) {
+			$open--;
+			$d .= ']}},';
+		} 
 
-</li>
-<?php } ?>
-<?php $check_depth = $iterator->getDepth(); ?>
-<?php } ?>
+	}
 
-<?php for ($i=$open; $i>0; $i--) {?>
-	</ul></div></div>
-	</li>
-<?php } ?>
-</ul>
-</div>
-</div>
-<?php } ?>
-<a href="http://www.icinga.org/" target="_blank"><div id="icinga-logo-top"></div></a>
-<!-- <div id="rss-top"><?php echo AppKitHtmlHelper::Obj()->Image('icons.rss'); ?></div> -->
-<div id="links-top">
+	$d .= '{';
+	$d .= 'text: "'. $navItem->getCaption(). '",';
+	
+	if ($navItem->getRoute() !== null) {
+		$d .= 'href: "'. $ro->gen( $navItem->getRoute() ). '",';
+	
+	} else {
+		// UH?
+	}
+
+	if ($navItem->getContainer()->hasChildren()) {
+		$open++;
+		$d .= 'menu: { items: [';
+	} else {
+		$d .= '},';
+	}
+	
+	$check_depth = $iterator->getDepth();
+	
+	}
+
+	for ($i=$open; $i>0; $i--) {
+		$d .= ']}},';
+	}
+
+}
+
+$d .= ']';
+
+?>
+
+var xh = '';
 
 <?php if ($us->isAuthenticated()) { ?>
-	<?php echo $tm->_('User')?>: <?php echo $us->getNsmUser()->givenName(); ?>
-	| <a href="<?php echo $ro->gen('appkit.logout'); ?>">Logout</a>
+xh += '<?php echo $tm->_('User')?>: <?php echo $us->getNsmUser()->givenName(); ?>'
+xh += '| <a href="<?php echo $ro->gen('appkit.logout'); ?>">Logout</a>'
 <?php } else { ?>
-	<?php echo $tm->_('User')?>: <?php echo $tm->_('Guest')?>
+xh += '<?php echo $tm->_('User')?>: <?php echo $tm->_('Guest')?>'
 <?php } ?>
 
-</div>
+	var p = new Ext.Panel({
+		applyTo: 'menuTopTarget',
+		layout: 'column',
+		border: false,
+		
+		defaults: {
+			border: false
+		}
+	});
+
+	p.add({
+		xtype: 'toolbar',
+		defaults: {
+			listeners: {
+				mouseover: function(e) {
+					this.showMenu();
+				}
+			}
+		},
+		columnWidth: .8,
+		cls: 'x-icinga-top-toolbar',
+		items: <?php echo $d?>
+	});
 
-</div>
\ No newline at end of file
+	p.add({
+		xtype: 'panel',
+		columnWidth: .2,
+		html: xh,
+		baseCls: 'x-icinga-top-right',
+		height: 31
+	});
+
+	p.doLayout();
+});
+// ]]> -->
+</script>
\ No newline at end of file
diff --git a/app/modules/AppKit/views/Widgets/ShowImageSuccessView.class.php b/app/modules/AppKit/views/Widgets/ShowImageSuccessView.class.php
index 5910d40..ece6b49 100755
--- a/app/modules/AppKit/views/Widgets/ShowImageSuccessView.class.php
+++ b/app/modules/AppKit/views/Widgets/ShowImageSuccessView.class.php
@@ -19,7 +19,7 @@ class AppKit_Widgets_ShowImageSuccessView extends ICINGAAppKitBaseView
 			$response->setHttpHeader('Expires', gmdate('D, d M Y H:i:s \G\M\T', time() + 3600), true);
 			$response->setHttpHeader('Cache-Control', 'public', true);
 			$response->setHttpHeader('Age', 10, true);
-			$response->removeHttpHeader('Pragma');
+			$response->setHttpHeader('Pragma', '', true);
 			
 			
 			// Return the resource, because the AgaviResponse understand fpassthrough
diff --git a/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php b/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
index 5117003..825da72 100644
--- a/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
+++ b/app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php
@@ -17,7 +17,7 @@ class AppKit_Widgets_SquishLoaderSuccessView extends ICINGAAppKitBaseView
 		$response->setHttpHeader('Expires', gmdate('D, d M Y H:i:s \G\M\T', time() + 3600), true);
 		$response->setHttpHeader('Cache-Control', 'public', true);
 		$response->setHttpHeader('Age', 10, true);
-		$response->removeHttpHeader('Pragma');
+		$response->setHttpHeader('Pragma', '', true);
 		
 		switch ($type) {
 			case AppKit_SquishFileContainerModel::TYPE_JAVASCRIPT:





More information about the icinga-checkins mailing list