From 68331b3ca029009a468373e64a689c1b32928877 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Mon, 5 Sep 2011 13:34:10 -0700 Subject: Refs #3449. Some IE7 CSS fixes. I need to shower now. --- views/default/css/ie.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'views/default/css/ie.php') diff --git a/views/default/css/ie.php b/views/default/css/ie.php index 6760d3886..279ddfdbf 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -71,4 +71,44 @@ } *:first-child+html #login-dropdown #signin-button a.signin.menu-open span { background-position:-150px -74px; +} + +/* Gallery */ +.elgg-gallery-fluid > li { + float: left; + margin: 2px; +} + + +/* navigation */ +.elgg-breadcrumbs > li { + display: inline; +} + +.elgg-breadcrumbs > li > a { + display: inline; + padding-right: 4px; + margin-right: 4px; + border-right: 1px solid #bababa; +} + +.elgg-menu-title > li { + display: block; +} + +.elgg-menu-title > li > a { + display: block; +} + +.elgg-menu-footer > li > a { + display: inline; +} + +.elgg-menu-river > li { + display: inline; +} + +/* admin */ +.elgg-menu-footer li { + display: inline; } \ No newline at end of file -- cgit v1.2.3 From 826310d08ba1ed468ab01b8a5c87b5396fed3a3c Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Mon, 5 Sep 2011 18:46:36 -0700 Subject: Refs #3449, #3770. Using JS to fix submenu dropdown in IE7. --- js/lib/ui.js | 34 ++++++++++++++++++++++++++++++++++ views/default/css/ie.php | 4 ++++ 2 files changed, 38 insertions(+) (limited to 'views/default/css/ie.php') diff --git a/js/lib/ui.js b/js/lib/ui.js index 4426917ed..46e418e8b 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -22,6 +22,13 @@ elgg.ui.init = function () { if ($('.elgg-input-date').length) { elgg.ui.initDatePicker(); } + + // fix for ie7 CSS issue on menu dropdown + // open the menu when you hover over it, close when you click off of it. + // @todo This should be possible with CSS. Anyone want to tame the beast, go for it. + if ($.browser.msie && $.browser.version <= 7) { + $('.elgg-menu-site > .elgg-more').live('mouseenter', elgg.ui.ie7MenuFixMouseEnter) + } } /** @@ -275,5 +282,32 @@ elgg.ui.initDatePicker = function() { }); } +/** + * IE 7 doesn't like our site menu system CSS, so open it with JS. + */ +elgg.ui.ie7MenuFixMouseEnter = function() { + $('.elgg-menu-site .elgg-menu-site-more').css('display', 'block'); + $('.elgg-menu-site .elgg-more > a') + .css('background-color', 'white') + .css('color', '#555') + + $body = $('body'); + if (!$body.data('hasIe7Clear')) { + $body.live('click', elgg.ui.ie7MenuClear); + $body.data('hasIe7Clear', true); + } + +} + +/** + * Close the menu when clicking on the body + */ +elgg.ui.ie7MenuClear = function() { + $('.elgg-menu-site .elgg-menu-site-more').css('display', 'none'); + $('.elgg-menu-site .elgg-more > a') + .css('background-color', 'transparent') + .css('color', 'white') +} + elgg.register_hook_handler('init', 'system', elgg.ui.init); elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.LoginHandler); \ No newline at end of file diff --git a/views/default/css/ie.php b/views/default/css/ie.php index 279ddfdbf..cb4ede0ae 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -108,6 +108,10 @@ display: inline; } +li:hover > .elgg-menu-site-more { + display: none; +} + /* admin */ .elgg-menu-footer li { display: inline; -- cgit v1.2.3 From 9a44acd27b0f8fb63cd07af7e7232f6c2b29ecf5 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 21 Sep 2011 20:57:33 -0400 Subject: Fixes #3770 CSS only site menu that works in IE7 --- js/lib/ui.js | 33 -------- views/default/css/elements/navigation.php | 123 ++++++++++++++++-------------- views/default/css/ie.php | 13 ++-- views/default/navigation/menu/site.php | 2 +- 4 files changed, 73 insertions(+), 98 deletions(-) (limited to 'views/default/css/ie.php') diff --git a/js/lib/ui.js b/js/lib/ui.js index 46e418e8b..7abf7626f 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -22,13 +22,6 @@ elgg.ui.init = function () { if ($('.elgg-input-date').length) { elgg.ui.initDatePicker(); } - - // fix for ie7 CSS issue on menu dropdown - // open the menu when you hover over it, close when you click off of it. - // @todo This should be possible with CSS. Anyone want to tame the beast, go for it. - if ($.browser.msie && $.browser.version <= 7) { - $('.elgg-menu-site > .elgg-more').live('mouseenter', elgg.ui.ie7MenuFixMouseEnter) - } } /** @@ -282,32 +275,6 @@ elgg.ui.initDatePicker = function() { }); } -/** - * IE 7 doesn't like our site menu system CSS, so open it with JS. - */ -elgg.ui.ie7MenuFixMouseEnter = function() { - $('.elgg-menu-site .elgg-menu-site-more').css('display', 'block'); - $('.elgg-menu-site .elgg-more > a') - .css('background-color', 'white') - .css('color', '#555') - - $body = $('body'); - if (!$body.data('hasIe7Clear')) { - $body.live('click', elgg.ui.ie7MenuClear); - $body.data('hasIe7Clear', true); - } - -} - -/** - * Close the menu when clicking on the body - */ -elgg.ui.ie7MenuClear = function() { - $('.elgg-menu-site .elgg-menu-site-more').css('display', 'none'); - $('.elgg-menu-site .elgg-more > a') - .css('background-color', 'transparent') - .css('color', 'white') -} elgg.register_hook_handler('init', 'system', elgg.ui.init); elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.LoginHandler); \ No newline at end of file diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index b5388715e..9eef96eb9 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -169,95 +169,100 @@ } .elgg-menu-site > li > a { - font-weight: bold; - padding: 3px 13px 0px 13px; - height: 20px; + font-weight: bold; + padding: 3px 13px 0px 13px; + height: 20px; } .elgg-menu-site > li > a:hover { - text-decoration: none; + text-decoration: none; } - .elgg-menu-site-default { - position: absolute; - bottom: 0; - left: 0; - height: 23px; + position: absolute; + bottom: 0; + left: 0; + height: 23px; } .elgg-menu-site-default > li { - float: left; - margin-right: 1px; + float: left; + margin-right: 1px; } -.elgg-menu-site-default > li > a {color: white} +.elgg-menu-site-default > li > a { + color: white; +} +.elgg-menu-site > li > ul { + display: none; + background-color: white; +} + +.elgg-menu-site > li:hover > ul { + display: block; +} .elgg-menu-site-default > .elgg-state-selected > a, .elgg-menu-site-default > li:hover > a { - background: white; - color: #555; - - -webkit-box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); - -moz-box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); - box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); - - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; + background: white; + color: #555; + + -webkit-box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); + -moz-box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); + box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); + + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; } .elgg-menu-site-more { - display: none; - position: relative; - left: -1px; - width: 100%; - z-index: 1; - min-width: 150px; - border: 1px solid #999; - border-top: 0; - - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; - - -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); - -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); - box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); -} + position: relative; + left: -1px; + width: 100%; + min-width: 150px; + border: 1px solid #999; + border-top: 0; -li:hover > .elgg-menu-site-more { - display: block; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; + + -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); + -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); } .elgg-menu-site-more > li > a { - background: white; - color: #555; - - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + background-color: white; + color: #555; + + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; } + .elgg-menu-site-more > li > a:hover { - background: #4690D6; - color: white; + background: #4690D6; + color: white; } + .elgg-menu-site-more > li:last-child > a, .elgg-menu-site-more > li:last-child > a:hover { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; } .elgg-more > a:before { - content: "\25BC"; - font-size: smaller; - margin-right: 4px; + content: "\25BC"; + font-size: smaller; + margin-right: 4px; } /* *************************************** diff --git a/views/default/css/ie.php b/views/default/css/ie.php index cb4ede0ae..c5edefd4c 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -1,11 +1,14 @@ /** - * elgg_layout css for Internet Explorer > ie6 - * @uses $vars['wwwroot'] The site URL -*/ + * CSS for Internet Explorer for versions > ie6 + */ + * {zoom: 1;} /* trigger hasLayout in IE */ -/* tools drop-down menu */ -#elgg-header {z-index:1;} +/* site menu drop-down for IE7 */ +.elgg-page-header { + z-index: 1; +} + .navigation li a:hover ul {display:block; position:absolute; top:21px; left:0;} .navigation li a:hover ul li a {display:block;} .navigation li.navigation-more ul li a {width:150px;background-color: #dedede;} diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php index 1409f54af..e2d3aa8fa 100644 --- a/views/default/navigation/menu/site.php +++ b/views/default/navigation/menu/site.php @@ -15,7 +15,7 @@ if (isset($vars['menu']['more'])) { echo '
  • '; $more = elgg_echo('more'); - echo "$more"; + echo "$more"; echo elgg_view('navigation/menu/elements/section', array( 'class' => 'elgg-menu elgg-menu-site elgg-menu-site-more', -- cgit v1.2.3 From 43f82db7fe8cab6b035fb66b307e5466cb5b3aa5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 24 Sep 2011 22:11:43 -0400 Subject: Fixes #3845 added ie7 css view and tested all current hacks for ie7 --- engine/lib/views.php | 1 + mod/embed/views/default/embed/css.php | 2 +- views/default/css/elements/core.php | 4 - views/default/css/elements/navigation.php | 4 +- views/default/css/ie.php | 119 +----------------------------- views/default/css/ie6.php | 8 +- views/default/css/ie7.php | 49 ++++++++++++ views/default/page/elements/head.php | 6 +- 8 files changed, 61 insertions(+), 132 deletions(-) create mode 100644 views/default/css/ie7.php (limited to 'views/default/css/ie.php') diff --git a/engine/lib/views.php b/engine/lib/views.php index 9a236508f..3b9448c71 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1553,6 +1553,7 @@ function elgg_views_boot() { elgg_register_simplecache_view('css/elgg'); elgg_register_simplecache_view('css/ie'); elgg_register_simplecache_view('css/ie6'); + elgg_register_simplecache_view('css/ie7'); elgg_register_simplecache_view('js/elgg'); elgg_register_js('jquery', '/vendors/jquery/jquery-1.6.2.min.js', 'head'); diff --git a/mod/embed/views/default/embed/css.php b/mod/embed/views/default/embed/css.php index 5750c05c0..03373da2b 100644 --- a/mod/embed/views/default/embed/css.php +++ b/mod/embed/views/default/embed/css.php @@ -8,7 +8,7 @@ .embed-wrapper { width: 730px; min-height: 400px; - margin: 10px; + margin: 15px; } .embed-wrapper h2 { color: #333333; diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php index af4a1882a..627cae55c 100644 --- a/views/default/css/elements/core.php +++ b/views/default/css/elements/core.php @@ -98,8 +98,4 @@ position: relative; display: inline-block; - - /* Inline-block: IE 6, 7 */ - zoom: 1; - *display: inline; } diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index 9386fa27b..bee1312ec 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -98,7 +98,7 @@ .elgg-breadcrumbs > li { display: inline-block; } -.elgg-breadcrumbs > li:after{ +.elgg-breadcrumbs > li:after { content: "\003E"; padding: 0 4px; font-weight: normal; @@ -412,7 +412,7 @@ .elgg-menu-footer > li, .elgg-menu-footer > li > a { display: inline-block; - color:#999; + color: #999; } .elgg-menu-footer > li:after { diff --git a/views/default/css/ie.php b/views/default/css/ie.php index c5edefd4c..d20bb4d59 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -1,121 +1,4 @@ /** - * CSS for Internet Explorer for versions > ie6 + * CSS for IE8 and above */ -* {zoom: 1;} /* trigger hasLayout in IE */ - -/* site menu drop-down for IE7 */ -.elgg-page-header { - z-index: 1; -} - -.navigation li a:hover ul {display:block; position:absolute; top:21px; left:0;} -.navigation li a:hover ul li a {display:block;} -.navigation li.navigation-more ul li a {width:150px;background-color: #dedede;} - -.clearfix { display: block; } -.hidden.clearfix { display: none; } -#elgg-page-contents {overflow: hidden;} /* remove horizontal scroll on riverdash */ -#breadcrumbs {top:-2px; margin-bottom: 5px;} - -/* entity list views */ -.entity-metadata {max-width: 300px;} -.entity-edit {float:right;} -.access_level {float:left;} -.elgg-image-block .entity-metadata { - min-width:400px; - text-align: right; -} - -/* profile */ -.elgg-tabs.profile .profile_name {margin-left: -260px;} -#profile_content .river_comment_form.hidden .input-text { width:510px; } - -/* notifications */ -.friends-picker-navigation {margin:0;padding:0;} -.friends-picker-container h3 {margin:0;padding:0;line-height: 1em;} - -/* private messages */ -#elgg-topbar-contents a.privatemessages.new span { - display:block; - padding:1px; - position:relative; - text-align:center; - float:left; - top:-1px; - right:auto; -} -#elgg-topbar-contents a.privatemessages.new {padding:0 0 0 20px;} -#elgg-topbar-contents a.privatemessages:hover {background-position:left 2px;} -#elgg-topbar-contents a.privatemessages.new:hover {background-position: left 2px;} - -/* riverdashboard mod rules */ -#riverdashboard_updates {clear:both;} -#riverdashboard_updates a.update_link {margin:0 0 9px 0;} -.riverdashboard_filtermenu {margin:10px 0 0 0;} -.river_comment_form.hidden .input-text { - width:530px; - float:left; -} -.river_link_divider { - width:10px; - text-align: center; -} - -/* shared access */ -.shared_access_collection h2.shared_access_name {margin-top:-15px;} - -/* dropdown login */ -*:first-child+html #login-dropdown #signin-button { - line-height:10px; -} -*:first-child+html #login-dropdown #signin-button a.signin span { - background-position:-150px -54px; -} -*:first-child+html #login-dropdown #signin-button a.signin.menu-open span { - background-position:-150px -74px; -} - -/* Gallery */ -.elgg-gallery-fluid > li { - float: left; - margin: 2px; -} - - -/* navigation */ -.elgg-breadcrumbs > li { - display: inline; -} - -.elgg-breadcrumbs > li > a { - display: inline; - padding-right: 4px; - margin-right: 4px; - border-right: 1px solid #bababa; -} - -.elgg-menu-title > li { - display: block; -} - -.elgg-menu-title > li > a { - display: block; -} - -.elgg-menu-footer > li > a { - display: inline; -} - -.elgg-menu-river > li { - display: inline; -} - -li:hover > .elgg-menu-site-more { - display: none; -} - -/* admin */ -.elgg-menu-footer li { - display: inline; -} \ No newline at end of file diff --git a/views/default/css/ie6.php b/views/default/css/ie6.php index f8ed208f6..cf49d33f2 100644 --- a/views/default/css/ie6.php +++ b/views/default/css/ie6.php @@ -1,15 +1,11 @@ /** - * elgg_layout css for Internet Explorer6 - * @uses $vars['wwwroot'] The site URL -*/ + * CSS for IE6 + */ * {zoom: 1;} /* trigger hasLayout in IE */ /* main nav drop-down */ #elgg-header {z-index:1;} -.navigation li a:hover ul {display:block; position:absolute; top:21px; left:0;} -.navigation li a:hover ul li a {display:block;} -.navigation li.navigation-more ul li a {width:150px;background-color: #dedede;} /* @todo check this one */ .elgg-button-delete a { background-position-y: 2px; } diff --git a/views/default/css/ie7.php b/views/default/css/ie7.php new file mode 100644 index 000000000..91d23823f --- /dev/null +++ b/views/default/css/ie7.php @@ -0,0 +1,49 @@ +/** + * CSS for IE7 + */ + +/* trigger hasLayout in IE */ +* { + zoom: 1; +} + +/* site menu drop-down z-index fix for IE7 */ +.elgg-page-header { + z-index: 1; +} + +/* inline-block fixes */ +.elgg-gallery > li, +.elgg-button, +.elgg-icon, +.elgg-menu-hz > li, +.elgg-menu-hz > li:after, +.elgg-menu-hz > li > a, +.elgg-menu-hz > li > span, +.elgg-breadcrumbs > li, +.elgg-menu-footer > li > a, +.elgg-menu-footer li { + display: inline; +} + +/* IE7 does not support :after */ +.elgg-breadcrumbs > li > a { + display: inline; + padding-right: 4px; + margin-right: 4px; + border-right: 1px solid #bababa; +} +.elgg-menu-footer li, +.elgg-menu-user li { + padding-left: 4px; + padding-right: 4px; +} + +/* longtext menu would not display horizontally without this */ +.elgg-menu-longtext { + width: 100%; +} +.elgg-menu-longtext li { + width: 100px; + float: right; +} diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php index 8776f07a7..e968e95ce 100644 --- a/views/default/page/elements/head.php +++ b/views/default/page/elements/head.php @@ -48,11 +48,15 @@ $release = get_version(true); - + -- cgit v1.2.3 From 83221c9eb9dcf37d5287180e7f7d9469036aaac6 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 24 Sep 2011 22:29:22 -0400 Subject: Fixes #3653 shrink wrapping .elgg-avatar so that hover menu arrow is constrained to the avatar image --- views/default/css/admin.php | 1 + views/default/css/elements/icons.php | 1 + views/default/css/ie.php | 4 ++++ views/default/css/ie7.php | 4 ++++ 4 files changed, 10 insertions(+) (limited to 'views/default/css/ie.php') diff --git a/views/default/css/admin.php b/views/default/css/admin.php index e9e489fcb..c032ee3fc 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -1065,6 +1065,7 @@ a.elgg-widget-collapsed:before { *************************************** */ .elgg-avatar { position: relative; + display: inline-block; } .elgg-avatar > a > img { display: block; diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index ee166b5be..f7c789e33 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -297,6 +297,7 @@ *************************************** */ .elgg-avatar { position: relative; + display: inline-block; } .elgg-avatar > a > img { display: block; diff --git a/views/default/css/ie.php b/views/default/css/ie.php index d20bb4d59..4bddd4d55 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -2,3 +2,7 @@ * CSS for IE8 and above */ +/* ie8 does not like shrink wrapping this div with inline-block */ +.elgg-avatar { + display: block; +} diff --git a/views/default/css/ie7.php b/views/default/css/ie7.php index 91d23823f..56047b954 100644 --- a/views/default/css/ie7.php +++ b/views/default/css/ie7.php @@ -47,3 +47,7 @@ width: 100px; float: right; } + +.elgg-avatar { + display: inline; +} \ No newline at end of file -- cgit v1.2.3