Changeset 1736
- Timestamp:
- 05/17/08 01:55:22 (7 months ago)
- Location:
- branches/postgres/htdocs/system
- Files:
-
- 13 modified
- 2 copied
-
admin/comments.php (modified) (3 diffs)
-
admin/css/admin.css (modified) (8 diffs)
-
admin/dashboard.php (modified) (1 diff)
-
admin/entries.php (modified) (2 diffs)
-
admin/entries_items.php (modified) (1 diff)
-
admin/js/admin.js (modified) (22 diffs)
-
admin/options.php (modified) (3 diffs)
-
admin/tags.php (modified) (5 diffs)
-
classes/adminhandler.php (modified) (26 diffs)
-
classes/comments.php (modified) (1 diff)
-
classes/databaseconnection.php (modified) (1 diff)
-
classes/posts.php (modified) (1 diff)
-
classes/tags.php (modified) (1 diff)
-
plugins/s9yimport (copied) (copied from trunk/htdocs/system/plugins/s9yimport)
-
plugins/s9yimport/s9yimport.plugin.php (copied) (copied from trunk/htdocs/system/plugins/s9yimport/s9yimport.plugin.php)
Legend:
- Unmodified
- Added
- Removed
-
branches/postgres/htdocs/system/admin/comments.php
r1702 r1736 4 4 <span class="older pct10"><a href="#" onclick="timeline.skipLoupeLeft();return false">« Older</a></span> 5 5 <span class="currentposition pct15 minor">0-0 of 0</span> 6 <span class="search pct50"><input type="search" placeholder="Type and wait to search for any entry component" autosave="habaricontent" results="10" ></span>6 <span class="search pct50"><input type="search" placeholder="Type and wait to search for any entry component" autosave="habaricontent" results="10" value="<?php echo $search_args ?>"></span> 7 7 <span class="nothing pct15"> </span> 8 8 <span class="newer pct10"><a href="#" onclick="timeline.skipLoupeRight();return false">Newer »</a></span> … … 31 31 <input type="hidden" name="search" value="<?php echo $search; ?>"> 32 32 <input type="hidden" name="limit" value="<?php echo $limit; ?>"> 33 <input type="hidden" name="index" value="<?php echo $index; ?>">34 33 <input type="hidden" name="search_status" value="<?php echo $search_status; ?>"> 35 34 <input type="hidden" id="nonce" name="nonce" value="<?php echo $wsse['nonce']; ?>"> … … 111 110 type: "POST", 112 111 url: "<?php echo URL::get('admin_ajax', array('context' => 'comments')); ?>", 113 data: "offset=" + (parseInt(c) - parseInt(b)) + "&limit=" + ( parseInt(b) - parseInt(a)) +112 data: "offset=" + (parseInt(c) - parseInt(b)) + "&limit=" + (1 + parseInt(b) - parseInt(a)) + 114 113 <?php 115 114 $vars= Controller::get_handler_vars(); -
branches/postgres/htdocs/system/admin/css/admin.css
r1703 r1736 779 779 top: 14px; 780 780 left: 20px; 781 font-size: 1.5em ;782 line-height: 2 0px;781 font-size: 1.5em !important; 782 line-height: 22px !important; 783 783 } 784 784 … … 957 957 } 958 958 959 959 960 /* PLUGINS */ 961 962 .plugins .item { 963 padding: 4px 40px; 964 margin: 10px -40px; 965 } 966 967 .plugins .item:hover { 968 background: #eee; 969 } 970 971 .plugins .item .dropbutton { 972 top: 5px !important; 973 right: 40px !important; 974 } 975 976 .plugins .head { 977 margin: 0; 978 font-size: 1.1em; 979 } 960 980 961 981 .plugins .description { 962 982 margin: 0; 963 983 width: 70%; 964 }965 966 .plugins .item {967 padding: 9px 0;968 border-bottom: 1px dotted #e6e6e6;969 984 } 970 985 … … 1029 1044 .manage .item .title { 1030 1045 margin-left: 5px; 1046 white-space: nowrap; 1047 width: 25% !important; 1048 overflow: hidden; 1049 text-overflow: ellipsis; 1050 position: absolute; 1031 1051 } 1032 1052 … … 1040 1060 } 1041 1061 1062 .manage .state { 1063 text-transform: capitalize; 1064 } 1065 1066 1042 1067 /* COMMENTS */ 1043 1068 … … 1073 1098 1074 1099 .navigator { 1075 padding: ;1100 padding:0 ; 1076 1101 } 1077 1102 … … 1121 1146 display: table-row; 1122 1147 height: inherit; 1123 overflow: none;1148 overflow: hidden; 1124 1149 position: relative; 1125 1150 } … … 1304 1329 } 1305 1330 1306 ul.tabs li.first .lasta {1331 ul.tabs li.first-child.last-child a { 1307 1332 width: 150px; 1308 1333 } … … 1342 1367 } 1343 1368 1344 .splitterinside a {1369 .splitterinside * a { 1345 1370 color: #999; 1346 1371 } -
branches/postgres/htdocs/system/admin/dashboard.php
r1699 r1736 49 49 ?> 50 50 </p> 51 52 <?php 53 54 if ( count( $updates ) > 0 ) { 55 56 foreach ( $updates as $update ) { 57 58 $class= implode( ' ', $update['severity'] ); 59 60 if ( in_array( 'critical', $update['severity'] ) ) { 61 $update_text= _t( '<a href="%1s">%2s %3s</a> is a critical update.' ); 62 } 63 elseif ( count( $update['severity'] ) > 1 ) { 64 $update_text= _t( '<a href="%1s">%2s %3s</a> contains bug fixes and additional features.' ); 65 } 66 elseif ( in_array( 'bugfix', $update['severity'] ) ) { 67 $update_text= _t( '<a href="%1s">%2s %3s</a> contains bug fixes.' ); 68 } 69 elseif ( in_array( 'feature', $update['severity'] ) ) { 70 $update_text= _t( '<a href="%1s">%2s %3s</a> contains additional features.' ); 71 } 72 73 $update_text= sprintf( $updatetext, $update['url'], $update['name'], $update['latest_version'] ); 74 75 ?> 76 77 <p class="<?php echo $class; ?>"><?php echo $update_text; ?></p> 78 79 <?php 80 81 } 82 83 } 84 85 ?> 86 51 87 </div> 52 88 -
branches/postgres/htdocs/system/admin/entries.php
r1702 r1736 5 5 <span class="older pct10"><a href="#" onclick="timeline.skipLoupeLeft();return false">« Older</a></span> 6 6 <span class="currentposition pct15 minor">0-0 of 0</span> 7 <span class="search pct50"><input type="search" placeholder="Type and wait to search for any entry component" autosave="habaricontent" results="10" ></span>7 <span class="search pct50"><input type="search" placeholder="Type and wait to search for any entry component" autosave="habaricontent" results="10" value="<?php echo $search_args ?>"></span> 8 8 <span class="nothing pct15"> </span> 9 9 <span class="newer pct10"><a href="#" onclick="timeline.skipLoupeRight();return false">Newer »</a></span> … … 88 88 type: "POST", 89 89 url: "<?php echo URL::get('admin_ajax', array('context' => 'entries')); ?>", 90 data: "offset=" + (parseInt(c) - parseInt(b)) + "&limit=" + ( parseInt(b) - parseInt(a)) +90 data: "offset=" + (parseInt(c) - parseInt(b)) + "&limit=" + (1 + parseInt(b) - parseInt(a)) + 91 91 <?php 92 92 $vars= Controller::get_handler_vars(); -
branches/postgres/htdocs/system/admin/entries_items.php
r1690 r1736 9 9 <span class="state pct10"><a href="<?php URL::out('admin', array('page' => 'entries', 'type' => $post->content_type, 'status' => $post->status ) ); ?>"><?php echo $post->statusname; ?></a></span> 10 10 <span class="author pct20"><a href="<?php URL::out('admin', array('page' => 'entries', 'user_id' => $post->user_id, 'type' => $post->content_type, 'status' => 'any') ); ?>"><span class="dim">by</span> <?php echo $post->author->username; ?></a></span> 11 <span class="time pct10"><span class="dim">at</span> <strong><?php echo date('H:i', strtotime($post->pubdate)); ?></strong></span>12 11 <span class="date pct15"><a href="<?php URL::out('admin', array('page' => 'entries', 'type' => $post->content_type, 'year_month' => date( 'Y-m', strtotime( $post->pubdate ) ) ) ); ?>"><span class="dim">on</span> <?php echo date('M j, Y', strtotime($post->pubdate)); ?></a></span> 12 <span class="time pct10"><span class="dim">at <?php echo date('H:i', strtotime($post->pubdate)); ?></span></span> 13 13 14 14 <ul class="dropbutton"> -
branches/postgres/htdocs/system/admin/js/admin.js
r1700 r1736 21 21 init: function() { 22 22 if(!$('.item.controls input[type=checkbox]')) return; 23 23 24 24 itemManage.initItems(); 25 25 26 26 $('.item.controls input[type=checkbox]').change(function () { 27 27 if($('.item.controls span.selectedtext').hasClass('all')) { … … 31 31 } 32 32 }); 33 33 34 34 $('.item.controls input.submitbutton').click(function () { 35 35 if($('.item.controls select.actiondropdown').val() == 1) { … … 54 54 changeItem: function() { 55 55 var selected = {}; 56 56 57 57 if(itemManage.selected.length != 0) { 58 58 selected = itemManage.selected; 59 59 } 60 60 61 61 $('.item .checkboxandtitle input[type=checkbox]:checked').each(function() { 62 62 id = $(this).attr('id'); … … 69 69 selected['p' + id] = 0; 70 70 }); 71 71 72 72 itemManage.selected = selected; 73 73 74 74 visible = $('.item .checkboxandtitle input[type=checkbox]:checked').length; 75 75 count = 0; … … 79 79 } 80 80 } 81 81 82 82 if(count == 0) { 83 83 $('.item.controls input[type=checkbox]').each(function() { … … 117 117 remove: function( id ) { 118 118 spinner.start(); 119 119 120 120 var query= {} 121 121 if ( id == null ) { … … 141 141 } 142 142 143 // Tag Management 144 var tagManage = { 145 init: function() { 146 // Return if we're not on the tags page 147 if(!$('.page-tags').length) return; 148 149 $('.tags .tag').click(function() { 150 $(this).toggleClass('selected'); 151 tagManage.changeTag(); 152 } 153 ); 154 155 $('.tags.controls input.deletebutton').click(function () { 156 tagManage.remove(); 157 }); 158 $('.tags.controls input.renamebutton').click(function () { 159 tagManage.rename(); 160 }); 161 }, 162 changeTag: function() { 163 count = $('.tags .tag.selected').length; 164 165 if(count == 0) { 166 $('.tags.controls span.selectedtext').addClass('none').removeClass('all').text('None selected'); 167 } else if(count == $('.tags .tag').length) { 168 $('.tags.controls span.selectedtext').removeClass('none').addClass('all').text('All selected'); 169 } else { 170 $('.tags.controls span.selectedtext').removeClass('none').removeClass('all').text(count + ' selected'); 171 } 172 } 173 } 174 143 175 // TIMELINE 144 176 var timeline = { … … 148 180 149 181 var timelineWidth = $('.years').width(); 150 182 151 183 // get an array of posts per month 152 timeline.monthData= [ ];153 timeline.monthWidths= [ ];184 timeline.monthData= [0]; 185 timeline.monthWidths= [0]; 154 186 timeline.totalCount= 0; 155 187 $('.years span').each(function(i) { … … 159 191 }); 160 192 193 // if there are fewer than 20 things, set the handle width to the timelineWidth 194 var minWidth= ( timelineWidth < 20 ) ? timelineWidth : 20; 195 161 196 $('.track') 162 197 .width($('.years').width()) 163 198 .slider({ 164 199 handle: '.handle', 165 maxValue: timelineWidth -20,166 startValue: timelineWidth -20,200 maxValue: timelineWidth - minWidth, 201 startValue: timelineWidth - minWidth, 167 202 axis: 'horizontal', 168 203 stop: function(event, ui) { … … 190 225 timeline.t1 = setTimeout('timeline.skipLoupeRight()', 300); 191 226 }); 192 227 228 // update current position text 229 loupeStartPosition = timeline.indexFromPosition( parseInt($('.handle').css('left')) ); 230 $('.currentposition').text( loupeStartPosition +'-'+ timeline.totalCount +' of '+ timeline.totalCount ); 231 193 232 // Spool the timeline handle 194 timelineHandle.init( )233 timelineHandle.init( ( timelineWidth < 20 ) ? timelineWidth : 20 ); 195 234 }, 196 235 skipLoupeLeft: function(e) { … … 217 256 indexFromPosition: function(pos) { 218 257 var monthBoundary= 0; 219 var monthIndex= 0;258 var monthIndex= 1; 220 259 var month= 0; 221 260 var i; 222 261 223 262 // get the index of the first post in the month that the handle is over 224 263 225 264 for ( i = 0; i < timeline.monthWidths.length && monthBoundary + timeline.monthWidths[i] < pos; i++ ) { 226 265 monthBoundary += timeline.monthWidths[i]; … … 228 267 month= i + 1; 229 268 } 230 269 231 270 // the index is the offset from this boundary, but it cannot be greater than 232 271 // the number of posts in the month (the month has some extra padding which 233 272 // increases its width). 234 return monthIndex + Math.min( pos - monthBoundary, timeline.monthData[month] ); 273 var padding= parseInt( $('.years span').css('margin-left') ); 274 padding= padding ? padding : 0; 275 return monthIndex + Math.min( 276 Math.max( pos - ( monthBoundary + padding ), 0 ), 277 timeline.monthData[month] - 1 ); 235 278 } 236 279 } … … 239 282 // TIMELINE HANDLE 240 283 var timelineHandle = { 241 init: function() { 284 init: function( handleWidth ) { 285 $('.handle').css('width', handleWidth + 'px'); 242 286 // Resize Handle Left 243 287 $('.resizehandleleft') … … 289 333 290 334 $('.currentposition').text( loupeStartPosition +'-'+ loupeEndPosition +' of '+ timeline.totalCount ); 291 335 292 336 /* AJAX call to fetch needed info goes here. */ 293 337 if(jQuery.isFunction(this.loupeUpdate)) { … … 382 426 $('#menulist li').removeClass('carrot') 383 427 }) 384 428 385 429 // Open menu on Q 386 430 $.hotkeys.add('q', {propagate:true, disableInInput: true}, function(){ … … 394 438 } 395 439 }); 396 440 397 441 // Close menu on ESC 398 442 $.hotkeys.add('esc', {propagate:true, disableInInput: false}, function(){ … … 400 444 dropButton.hideMenu(); 401 445 }); 402 446 403 447 // Down arrow 404 448 $.hotkeys.add('down', {propagate:true, disableInInput: true}, function(){ … … 418 462 } 419 463 }); 420 464 421 465 // Up arrow 422 466 $.hotkeys.add('up', {propagate:true, disableInInput: true}, function(){ … … 436 480 } 437 481 }); 438 482 439 483 // Enter & Carrot 440 484 $.hotkeys.add('return', {propagate:true, disableInInput: true}, function(){ … … 445 489 } 446 490 }); 447 491 448 492 // Page hotkeys 449 493 $('#menu ul li').each(function() { … … 505 549 506 550 liveSearch.prevSearch= liveSearch.input.val(); 507 551 508 552 if ( jQuery.isFunction( liveSearch.search ) ) { 509 553 return liveSearch.search(); … … 555 599 timeline.init(); 556 600 itemManage.init(); 601 tagManage.init(); 557 602 liveSearch.init(); 558 603 -
branches/postgres/htdocs/system/admin/options.php
r1654 r1736 45 45 <div class="container settings"> 46 46 <h2>Publishing</h2> 47 <div class="item clear" id="siteabout">48 <span class="column span-5">49 <label for="sitetagline">About</label>50 </span>51 <span class="column span-14 last">52 <textarea name="about" id="about" class="border"><?php Options::out('about'); ?></textarea>53 </span>54 </div>55 56 47 <div class="item clear" id="encoding"> 57 48 <span class="column span-5"> 58 <label for="encoding">Items per page</label>49 <label for="encoding">Items per Page</label> 59 50 </span> 60 51 <span class="column span-5 last"> … … 65 56 <div class="item clear" id="encoding"> 66 57 <span class="column span-5"> 67 <label for="encoding">Send Pingbacks to linked URLs</label>58 <label for="encoding">Send Pingbacks to Links</label> 68 59 </span> 69 60 <span class="column span-5 last"> … … 74 65 <div class="item clear" id="encoding"> 75 66 <span class="column span-5"> 76 <label for="encoding">Require comment authors info</label>67 <label for="encoding">Require Comment Author Info</label> 77 68 </span> 78 69 <span class="column span-5 last"> -
branches/postgres/htdocs/system/admin/tags.php
r1650 r1736 1 1 <?php include('header.php');?> 2 2 3 4 <div class="container timeline"> 3 <div class="container"><!-- TODO: implement the tags loupe --> 5 4 <span class="older pct10"><a href="#">« Older</a></span> 6 5 <span class="currentposition pct15 minor">0-20 of 480</span> … … 10 9 </div> 11 10 <?php 12 $tags= Tags::get();11 $tags= $available_tags; 13 12 //what's the max count? 14 13 //ugly! and probably needs to be a Tags method or something … … 18 17 <div class="container tags"> 19 18 <?php foreach ($tags as $tag) { ?> 20 <a href="#" class="tag wt<?php echo round(($tag->count * 10)/$max); ?>"><span><?php echo $tag->tag; ?></span><sup><?php echo $tag->count; ?></sup></a>19 <a href="#" id="<?php echo 'tag_' . $tag->id ?>" class="tag wt<?php echo round(($tag->count * 10)/$max); ?>"><span><?php echo $tag->tag; ?></span><sup><?php echo $tag->count; ?></sup></a> 21 20 <?php } ?> 22 21 <ul class="dropbutton"> … … 29 28 <div class="container tags transparent"> 30 29 31 <div class=" itemcontrols">30 <div class="tags controls"> 32 31 <span class="checkboxandselected pct15"> 33 32 <span class="selectedtext minor none">None selected</span> … … 36 35 <span class="or pct5">or</span> 37 36 <span class="renamecontrols"> 38 <input type="text" ></input>37 <input type="text" class="renametext"></input> 39 38 <input type="button" value="Rename" class="renamebutton"></input> 40 39 </span> 40 <input type="hidden" id="nonce" name="nonce" value="<?php echo $wsse['nonce']; ?>"> 41 <input type="hidden" id="timestamp" name="timestamp" value="<?php echo $wsse['timestamp']; ?>"> 42 <input type="hidden" id="PasswordDigest" name="PasswordDigest" value="<?php echo $wsse['digest']; ?>"> 41 43 </div> 42 44 </div> 43 45 46 <script type="text/javascript"> 47 tagManage.remove= function() { 48 spinner.start(); 44 49 50 selected= $('.tags .tag.selected'); 51 if ( selected.length == 0 ) { 52 humanMsg.displayMsg('You need to select some tags before you can delete them.'); 53 return; 54 } 55 var query= {} 56 57 selected.each(function() { 58 query[$(this).attr('id')]= 1; 59 }); 60 61 query['action']= 'delete'; 62 query['timestamp']= $('input#timestamp').attr('value'); 63 query['nonce']= $('input#nonce').attr('value'); 64 query['digest']= $('input#PasswordDigest').attr('value'); 65 $.post( 66 "<?php echo URL::get('admin_ajax', array('context' => 'tags')); ?>", 67 query, 68 function(msg) { 69 spinner.stop(); 70 //TODO When there's a loupe, update it 71 //timelineHandle.updateLoupeInfo(); 72 selected.remove(); 73 humanMsg.displayMsg(msg); 74 tagManage.changeTag(); 75 }, 76 'json' 77 ); 78 }; 79 tagManage.rename= function() { 80 selected= $('.tags .tag.selected'); 81 master= $('.tags.controls input.renametext').val().trim(); 82 83 if ( selected.length == 0 ) { 84 humanMsg.displayMsg('You need to select some tags before you can rename them.'); 85 return; 86 } 87 else if ( master == '' ) { 88 humanMsg.displayMsg('You need to enter a new tag to rename tags.'); 89 return; 90 } 91 var query= {} 92 93 // Unselect the master, if it's selected 94 $('.tags .tag:contains(' + master + ')').each(function() { 95 if ($(this).find('span').text() == master) { 96 $(this).removeClass('selected'); 97 } 98 }) 99 100 spinner.start(); 101 102 selected.each(function() { 103 que
