Changeset 1840
- Timestamp:
- 05/26/08 01:57:38 (6 months ago)
- Location:
- trunk/htdocs/system
- Files:
-
- 5 modified
-
admin/css/admin.css (modified) (2 diffs)
-
admin/entries.php (modified) (2 diffs)
-
admin/import.php (modified) (1 diff)
-
admin/js/admin.js (modified) (6 diffs)
-
classes/adminhandler.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/system/admin/css/admin.css
r1836 r1840 1157 1157 } 1158 1158 1159 .navigator spaninput {1159 .navigator input { 1160 1160 width: 90%; 1161 1161 margin: 0 5%; … … 1164 1164 .navigator .newer { 1165 1165 text-align: right; 1166 } 1167 1168 .navigator .special_search { 1169 text-align: center; 1170 } 1171 1172 .navigator .special_search a { 1173 outline: none; 1174 padding: 0px 2px; 1175 margin: 2px 5px; 1176 } 1177 1178 .navigator .special_search a.active { 1179 background-color: #a9a9a9; 1166 1180 } 1167 1181 -
trunk/htdocs/system/admin/entries.php
r1820 r1840 5 5 <span class="older pct10"><a href="#" onclick="timeline.skipLoupeLeft();return false">« <?php _e('Older'); ?></a></span> 6 6 <span class="currentposition pct15 minor"><?php _e('0-0 of 0'); ?></span> 7 <span class="search pct50"><input type="search" placeholder="<?php _e('Type and wait to search for any entry component'); ?>" autosave="habaricontent" results="10" value="<?php echo $search_args ?>"></span> 7 <span class="search pct50"> 8 <input id="search" type="search" placeholder="<?php _e('Type and wait to search for any entry component'); ?>" autosave="habaricontent" results="10" value="<?php echo $search_args ?>"> 9 <div class="special_search pct100"> 10 <?php foreach($special_searches as $text => $term): ?> 11 <a href="#<?php echo $term; ?>"><?php echo $text; ?></a> 12 <?php endforeach; ?> 13 </div> 14 </span> 8 15 <span class="nothing pct15"> </span> 9 16 <span class="newer pct10"><a href="#" onclick="timeline.skipLoupeRight();return false"><?php _e('Newer'); ?> »</a></span> … … 74 81 timelineHandle.loupeUpdate = function(a,b,c) { 75 82 spinner.start(); 76 83 77 84 var search_args= $('.search input').val(); 78 85 -
trunk/htdocs/system/admin/import.php
r1796 r1840 2 2 <div class="container"> 3 3 <hr> 4 <div class=" column prepend-1 span-22 append-1">4 <div class=""> 5 5 <h1><?php _e('Import'); ?></h1> 6 6 <form method="post" action=""> -
trunk/htdocs/system/admin/js/admin.js
r1820 r1840 179 179 if (!$('.timeline').length) return; 180 180 181 var timelineWidth = $('.years').width();181 var timelineWidth = $('.years').width(); 182 182 var viewWidth= $('.timeline').width(); 183 183 timeline.overhang= ( timelineWidth > viewWidth ) ? timelineWidth - viewWidth : 0; … … 199 199 // find the width which makes the loupe select 20 items 200 200 var handleWidth= timelineWidth - timeline.positionFromIndex( timeline.totalCount - 20 ); 201 201 202 202 // make the slider bounded by the view 203 203 var maxSliderValue= Math.min( viewWidth, timelineWidth ) - handleWidth; … … 333 333 }, 334 334 reset: function () { 335 var timelineWidth = $('.years').width();335 var timelineWidth = $('.years').width(); 336 336 var viewWidth= $('.timeline').width(); 337 337 timeline.overhang= ( timelineWidth > viewWidth ) ? timelineWidth - viewWidth : 0; … … 604 604 } 605 605 }); 606 606 607 607 // If menu is open and mouse is clicked outside menu, close menu. 608 608 $('html').click(function() { … … 660 660 return liveSearch.search(); 661 661 } 662 662 663 663 }, 664 664 search: null, // specific search functions are defined on the individual pages 665 665 } 666 666 667 // SEARCH CRITERIA TOGGLE 668 function toggleSearch() { 669 var re = new RegExp('\\s*' + $(this).attr('href').substr(1), 'gi'); 670 if($('#search').val().match(re)) { 671 $('#search').val($('#search').val().replace(re, '')); 672 $(this).removeClass('active'); 673 } 674 else { 675 $('#search').val($('#search').val() + ' ' + $(this).attr('href').substr(1)); 676 $(this).addClass('active'); 677 } 678 liveSearch.doSearch(); 679 return false; 680 } 667 681 668 682 // RESIZABLE TEXTAREAS … … 853 867 854 868 // LOGIN: Focus cursor on 'Name'. 855 $('body.login #habari_username').focus() 856 869 $('body.login #habari_username').focus(); 870 871 // SEARCH: Set default special search terms and assign click handler 872 $('.special_search a') 873 .click(toggleSearch) 874 .each(function(){ 875 var re = new RegExp($(this).attr('href').substr(1)); 876 if($('#search').val().match(re)) { 877 $(this).addClass('active'); 878 } 879 }); 857 880 858 881 }); -
trunk/htdocs/system/classes/adminhandler.php
r1834 r1840 680 680 // not a dup, add to string 681 681 $modstatus['Approved comments on these posts: %s']= (isset($modstatus['Approved comments on these posts: %s'])? $modstatus['Approved comments on these posts: %s'] . ' · ' : '') . '<a href="' . $comment->post->permalink . '">' . $comment->post->title . '</a> '; 682 } 683 682 } 683 684 684 $comment->status= Comment::STATUS_APPROVED; 685 685 $comment->update(); … … 928 928 public function get_entries() 929 929 { 930 // Get the default page contents 930 931 $this->fetch_entries(); 932 933 // Get special search statuses 934 $statuses = array_keys(Post::list_post_statuses()); 935 array_shift($statuses); 936 $statuses = array_combine( 937 $statuses, 938 array_map( 939 create_function('$a', 'return "status:{$a}";'), 940 $statuses 941 ) 942 ); 943 944 // Get special search types 945 $types = array_keys(Post::list_active_post_types()); 946 array_shift($types); 947 $types = array_combine( 948 $types, 949 array_map( 950 create_function('$a', 'return "type:{$a}";'), 951 $types 952 ) 953 ); 954 955 $this->theme->special_searches = array_merge($statuses, $types); 931 956 $this->display( 'entries' ); 932 957 } … … 1365 1390 1366 1391 /** 1367 * Handle GET requests for /admin/tags to display the tags 1392 * Handle GET requests for /admin/tags to display the tags 1368 1393 */ 1369 1394 public function get_tags()
