Add generic odd/even for dashboard widgets
- Use CSS for odd/even spacing + clearing in browsers that support it using :nth-child and the new class .dashboard_widget (to seperate positioning styles from visual styles) - 'Polyfill' said behaviour for IE 8 using JS - Adapt hardcoded dashboard sections accordingly - Add fix for IE 8 where mq_small is not set properly - New build of oldie.css References #297
This commit is contained in:
		| @@ -2,10 +2,15 @@ | ||||
|     padding-top: 0; | ||||
| } | ||||
|  | ||||
| .actions li { | ||||
| .actions li, | ||||
| .actions_extra { | ||||
|     margin: 0 .4em .5em 0; | ||||
| } | ||||
|  | ||||
| .actions_extra { | ||||
|     margin-top: .75em; | ||||
| } | ||||
|  | ||||
| #edit_entry_submit { | ||||
|     top: -3.25em; | ||||
| } | ||||
| @@ -144,30 +149,41 @@ pre { | ||||
| #serendipityScaleForm, | ||||
| #serendipityScaleImg, | ||||
| .media_file, | ||||
| #dashboard > .quick_list, | ||||
| #dashboard > .dashboard_widget, | ||||
| #maintenance > .quick_list, | ||||
| .serendipity_statistics > section, | ||||
| #serendipity_category > div > div, | ||||
| #serendipity_category #preview, | ||||
| #serendipity_category > div > fieldset, | ||||
| #directory_permissions .form_multiselect { | ||||
| #directory_permissions .form_multiselect, | ||||
| .media_chooser { | ||||
|     float: left; | ||||
|     margin: 0 2% 1em 0; | ||||
|     width: 48%; | ||||
| } | ||||
|  | ||||
| .media_chooser { | ||||
|     margin-bottom: 0; | ||||
| } | ||||
|  | ||||
| .media_chooser + .field_info { | ||||
|     margin-top: 0; | ||||
| } | ||||
|  | ||||
| .taxonomy ul { | ||||
|     clear: none; | ||||
|     float: right; | ||||
|     width: 84%; | ||||
| } | ||||
|  | ||||
| #template_select .current_backend_template, | ||||
| #template_select li:nth-child(even) article, | ||||
| .media_pane .even, | ||||
| #dashboard > .even { | ||||
|     margin: 0 0 1em 2%; | ||||
| } | ||||
|  | ||||
| #dashboard > .dashboard_widget:nth-child(even), | ||||
| #maintenance > section:nth-of-type(even) { | ||||
|     margin: 0 0 1em 2%; | ||||
| } | ||||
|  | ||||
| #dashboard > .odd, | ||||
| #maintenance > section { | ||||
|     margin: 0 2% 1em 0; | ||||
| } | ||||
| @@ -191,6 +207,10 @@ pre { | ||||
|     margin: 0 0 0 .4em; | ||||
| } | ||||
|  | ||||
| .compact_categories #edit_entry_category .form_check { | ||||
|     width: 25%; | ||||
| } | ||||
|  | ||||
| #meta_data > div, | ||||
| #template_options fieldset legend, | ||||
| #template_options fieldset > .grouped, | ||||
| @@ -261,7 +281,7 @@ pre { | ||||
|  | ||||
| .js .configuration_group .media_choose input { | ||||
|     margin-right: 1%; | ||||
|     max-width: 41.5%; | ||||
|     max-width: none; | ||||
| } | ||||
|  | ||||
| .info_expanded select, | ||||
| @@ -288,7 +308,8 @@ pre { | ||||
| .media_pane .odd, | ||||
| #dashboard > .odd, | ||||
| .plugins_installable > li:nth-child(odd), | ||||
| .serendipity_statistics > section:nth-child(odd) { | ||||
| .serendipity_statistics > section:nth-child(odd), | ||||
| .dashboard_widget:nth-child(odd) { | ||||
|     clear: left; | ||||
| } | ||||
|  | ||||
| @@ -328,6 +349,10 @@ pre { | ||||
|     margin-left: 1%; | ||||
| } | ||||
|  | ||||
| #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { | ||||
|     clear: left; | ||||
| } | ||||
|  | ||||
| #meta p { | ||||
|     font-size: .875em; | ||||
|     padding: .85715em; | ||||
| @@ -374,7 +399,7 @@ pre { | ||||
| #media_filter > div, | ||||
| #media_pane_sort > .left, | ||||
| #media_pane_sort > .center, | ||||
| #media_pane_sort > .right,     | ||||
| #media_pane_sort > .right, | ||||
| #media_pane_sort > .grouped > div { | ||||
|     float: left; | ||||
|     width: 33% ; | ||||
| @@ -531,6 +556,10 @@ main { | ||||
|     width: 73%; | ||||
| } | ||||
|  | ||||
| .compact_categories #edit_entry_category .form_check { | ||||
|     width: 20%; | ||||
| } | ||||
|  | ||||
| .installer #content { | ||||
|     float: none; | ||||
|     margin: 0 auto 2em; | ||||
| @@ -541,7 +570,3 @@ main { | ||||
| #login { | ||||
|     margin: 4em auto 8em; | ||||
| } | ||||
|  | ||||
| .js .configuration_group .media_choose input { | ||||
|     max-width: 42.5%; | ||||
| } | ||||
|   | ||||
| @@ -32,7 +32,7 @@ | ||||
|             </section> | ||||
|         {/if} | ||||
|     {/if} | ||||
|         <section id="dashboard_comments" class="odd equal_heights quick_list"> | ||||
|         <section id="dashboard_comments" class="equal_heights quick_list dashboard_widget"> | ||||
|             <h3>{if 'adminComments'|checkPermission}<a href="serendipity_admin.php?serendipity[adminModule]=comments">{/if}{$CONST.COMMENTS}{if 'adminComments'|checkPermission}</a>{/if}</h3> | ||||
|  | ||||
|             <ol class="plainList"> | ||||
| @@ -69,7 +69,7 @@ | ||||
|             </ol> | ||||
|         </section> | ||||
|  | ||||
|         <section id="dashboard_entries" class="even equal_heights quick_list"> | ||||
|         <section id="dashboard_entries" class="equal_heights quick_list dashboard_widget"> | ||||
|             <h3>{if 'adminEntries'|checkPermission}<a href="serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=editSelect">{/if}{$CONST.DASHBOARD_ENTRIES}{if 'adminEntries'|checkPermission}</a>{/if}</h3> | ||||
|  | ||||
|             <ol class="plainList"> | ||||
| @@ -123,5 +123,4 @@ | ||||
|                 <li><a class="s9y_bookmarklet" href="{$bookmarklet}" title="{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET_DESC}">{$CONST.FURTHER_LINKS_S9Y_BOOKMARKLET}</a></li> | ||||
|             </ul> | ||||
|         </section> | ||||
|  | ||||
|     </div> | ||||
|   | ||||
| @@ -799,6 +799,8 @@ | ||||
| $(function() { | ||||
|     // Breakpoints for responsive JS | ||||
|     var mq_small = Modernizr.mq('(min-width:640px)'); | ||||
|     // IE 8 should always be larger than mq_small | ||||
|     if($('html').hasClass('lt-ie9')) { mq_small = true; } | ||||
|  | ||||
|     // Fire responsive nav | ||||
|     if($('#main_menu').length > 0) { | ||||
| @@ -829,6 +831,15 @@ $(function() { | ||||
|         footer: '#meta' | ||||
|     }); | ||||
|  | ||||
|     // Layout helpers for IE < 9 | ||||
|     if($('html').hasClass('lt-ie9')) { | ||||
|         if($('#dashboard').length > 0) { | ||||
|             // For some reason, .addClass() does not work here | ||||
|             $('.dashboard_widget:nth-child(odd)').css('clear', 'left'); | ||||
|             $('.dashboard_widget:nth-child(even)').css('margin', '0 0 1em 2%'); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // Editor-area | ||||
|     if($('#serendipityEntry').length > 0) { | ||||
|         serendipity.catsList(); | ||||
|   | ||||
| @@ -2944,7 +2944,7 @@ img.mfp-img { | ||||
|     #serendipityScaleForm, | ||||
|     #serendipityScaleImg, | ||||
|     .media_file, | ||||
|     #dashboard > .quick_list, | ||||
|     #dashboard > .dashboard_widget, | ||||
|     #maintenance > .quick_list, | ||||
|     .serendipity_statistics > section, | ||||
|     #serendipity_category > div > div, | ||||
| @@ -2974,15 +2974,11 @@ img.mfp-img { | ||||
|     #template_select .current_backend_template, | ||||
|     #template_select li:nth-child(even) article, | ||||
|     .media_pane .even, | ||||
|     #dashboard > .even { | ||||
|         margin: 0 0 1em 2%; | ||||
|     } | ||||
|  | ||||
|     #dashboard > .dashboard_widget:nth-child(even), | ||||
|     #maintenance > section:nth-of-type(even) { | ||||
|         margin: 0 0 1em 2%; | ||||
|     } | ||||
|  | ||||
|     #dashboard > .odd, | ||||
|     #maintenance > section { | ||||
|         margin: 0 2% 1em 0; | ||||
|     } | ||||
| @@ -3105,9 +3101,9 @@ img.mfp-img { | ||||
|     #template_select li:nth-child(odd), | ||||
|     #template_select h2, | ||||
|     .media_pane .odd, | ||||
|     #dashboard > .odd, | ||||
|     .plugins_installable > li:nth-child(odd), | ||||
|     .serendipity_statistics > section:nth-child(odd) { | ||||
|     .serendipity_statistics > section:nth-child(odd), | ||||
|     .dashboard_widget:nth-child(odd) { | ||||
|         clear: left; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user