Changeset 5730
- Timestamp:
- 04/10/08 20:52:43 (9 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 modified
-
interface/owner/entry/add/index.php (modified) (2 diffs)
-
interface/owner/entry/draft/index.php (modified) (2 diffs)
-
interface/owner/entry/edit/index.php (modified) (8 diffs)
-
interface/owner/entry/finish/index.php (modified) (2 diffs)
-
interface/owner/entry/index.php (modified) (13 diffs)
-
interface/owner/entry/update/index.php (modified) (2 diffs)
-
lib/model/blog.entry.php (modified) (10 diffs)
-
style/admin/whitedream/basic.css (modified) (1 diff)
-
style/admin/whitedream/editor.css (modified) (1 diff)
-
style/admin/whitedream/image/icon_star.gif (added)
-
style/admin/whitedream/image/icon_starred_single.gif (added)
-
style/admin/whitedream/post.css (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/owner/entry/add/index.php
r5285 r5730 6 6 'POST' => array( 7 7 'visibility' => array('int', 0, 3), 8 'starred' => array('int', 0, 2), 8 9 'category' => array('int', 'default' => 0), 9 10 'title' => array('string'), … … 27 28 $entry = array(); 28 29 $entry['visibility'] = $_POST['visibility']; 30 $entry['starred'] = $_POST['starred']; 29 31 $entry['category'] = empty($_POST['category']) ? 0 : $_POST['category']; 30 32 $entry['title'] = $_POST['title']; -
trunk/interface/owner/entry/draft/index.php
r5079 r5730 6 6 'POST' => array( 7 7 'visibility' => array('int', 0, 3), 8 'starred' => array('int', 0, 2), 8 9 'category' => array('int', 'default' => 0), 9 10 'title' => array('string'), … … 29 30 $entry['draft'] = 1; 30 31 $entry['visibility'] = $_POST['visibility']; 32 $entry['starred'] = $_POST['starred']; 31 33 $entry['category'] = $_POST['category']; 32 34 $entry['title'] = $_POST['title']; -
trunk/interface/owner/entry/edit/index.php
r5584 r5730 190 190 } 191 191 } 192 192 var starred = 1; 193 for (var i = 0; i < oForm.starred.length; i++) { 194 if (oForm.starred[i].checked) { 195 starred = oForm.starred[i].value; 196 break; 197 } 198 } 193 199 var entrytype = 0; 194 200 for (var i = 0; i < oForm.entrytype.length; i++) { … … 242 248 published = Math.floor(published / 1000); 243 249 } 244 250 245 251 return ( 246 252 "visibility=" + visibility + 253 "&starred=" + starred + 247 254 "&title=" + encodeURIComponent(title) + 248 255 "&permalink=" + encodeURIComponent(permalink) + … … 713 720 <input type="button" value="<?php echo _t('미리보기');?>" class="preview-button input-button" onclick="entryManager.preview();return false;" /> 714 721 <span class="hidden">|</span> 715 <input type="submit" id="saveButton" value="<?php echo _t(' 저장하기');?>" class="save-button input-button" onclick="entryManager.save();return false;" />722 <input type="submit" id="saveButton" value="<?php echo _t('중간 저장');?>" class="save-button input-button" onclick="entryManager.save();return false;" /> 716 723 <span class="hidden">|</span> 717 <input type="submit" value="<?php echo _t('저장 후 닫기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" />724 <input type="submit" value="<?php echo _t('저장 후 돌아가기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" /> 718 725 </div> 719 726 <?php … … 723 730 <input type="button" value="<?php echo _t('미리보기');?>" class="preview-button input-button" onclick="entryManager.preview();return false;" /> 724 731 <span class="hidden">|</span> 725 <input type="submit" id="saveButton" value="<?php echo _t(' 저장하기');?>" class="save-button input-button" onclick="entryManager.save();return false;" />732 <input type="submit" id="saveButton" value="<?php echo _t('중간 저장');?>" class="save-button input-button" onclick="entryManager.save();return false;" /> 726 733 <span class="hidden">|</span> 727 <input type="submit" value="<?php echo _t('저장 후 닫기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" />734 <input type="submit" value="<?php echo _t('저장 후 돌아가기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" /> 728 735 <span class="hidden">|</span> 729 736 <input type="submit" value="<?php echo _t('목록으로');?>" class="list-button input-button" onclick="returnToList();return false;" /> … … 801 808 </dl> 802 809 <?php 803 $countResult = POD::queryExistence("SELECT `id` FROM `{$database['prefix']}Entries` WHERE `blogid` = ".getBlogId()." AND `visibility` = 3 LIMIT 1");810 $countResult = POD::queryExistence("SELECT `id` FROM `{$database['prefix']}Entries` WHERE `blogid` = ".getBlogId()." AND `visibility` = 3"); 804 811 ?> 805 812 <dl id="status-line" class="line"> … … 812 819 </dd> 813 820 </dl> 814 821 822 <dl id="finish-line" class="line"> 823 <dt><span class="label"><?php echo _t('완성여부');?></span></dt> 824 <dd> 825 <div id="status-finished" class="status-finished"><input type="radio" id="write_finished" class="radio" name="starred" value="1"<?php echo (abs($entry['starred']) > 0 ? ' checked="checked"' : '');?> /><label for="write_finished"><?php echo _t('완성한 글');?></label></div> 826 <div id="status-draft" class="status-draft"><input type="radio" id="write_draft" class="radio" name="starred" value="0"<?php echo (abs($entry['starred']) == 0 ? ' checked="checked"' : '');?> /><label for="write_draft"><?php echo _t('쓰고 있는 글');?></label></div> 827 <div id="status-starred" class="status-starred"><input type="radio" id="write_starred" class="radio" name="starred" value="0"<?php echo (abs($entry['starred']) == 2 ? ' checked="checked"' : '');?> /><label for="write_starred"><?php echo _t('별표가 붙은 글');?></label></div> 828 </dd> 829 </dl> 830 815 831 <dl id="power-line" class="line"<?php if($isKeyword) echo _t('style="display: none"');?>> 816 832 <dt><span class="label"><?php echo _t('권한');?></span></dt> … … 828 844 <input type="button" value="<?php echo _t('미리 보기');?>" class="preview-button input-button" onclick="entryManager.preview();return false;" /> 829 845 <span class="hidden">|</span> 830 <input type="submit" value="<?php echo _t('저장 후 닫기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" />846 <input type="submit" value="<?php echo _t('저장 후 돌아가기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" /> 831 847 </div> 832 848 <?php … … 836 852 <input type="button" value="<?php echo _t('미리 보기');?>" class="preview-button input-button" onclick="entryManager.preview();return false;" /> 837 853 <span class="hidden">|</span> 838 <input type="submit" value="<?php echo _t('저장 후 닫기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" />854 <input type="submit" value="<?php echo _t('저장 후 돌아가기');?>" class="save-and-return-button input-button" onclick="entryManager.saveAndReturn();return false;" /> 839 855 <span class="hidden">|</span> 840 856 <input type="submit" value="<?php echo _t('목록으로');?>" class="list-button input-button" onclick="returnToList();return false;" /> -
trunk/interface/owner/entry/finish/index.php
r5719 r5730 6 6 'POST' => array( 7 7 'visibility' => array('int', 0, 3), 8 'category' => array('int', 'default' => 0), 9 'title' => array('string'), 10 'content' => array('string'), 8 'starred' => array('int', 0, 2), 9 'category' => array('int', 'default' => 0), 10 'title' => array('string'), 11 'content' => array('string'), 11 12 'contentFormatter' => array('string'), 12 'contentEditor' => array('string'),13 'permalink' => array('string', 'default' => ''),14 'location' => array('string', 'default' => '/'),15 'tag' => array('string', 'default' => ''),16 'acceptComment' => array(array('0', '1'), 'default' => '0'),17 'acceptTrackback' => array(array('0', '1'), 'default' => '0'),18 'published' => array('int', 0, 'default' => 1)13 'contentEditor' => array('string'), 14 'permalink' => array('string', 'default' => ''), 15 'location' => array('string', 'default' => '/'), 16 'tag' => array('string', 'default' => ''), 17 'acceptComment' => array(array('0', '1'), 'default' => '0'), 18 'acceptTrackback' => array(array('0', '1'), 'default' => '0'), 19 'published' => array('int', 0, 'default' => 1) 19 20 ) 20 21 ); 21 22 require ROOT . '/lib/includeForBlogOwner.php'; 22 23 requireModel('blog.entry'); 23 24 24 25 25 requireStrictRoute(); … … 37 37 if (empty($suri['id']) || !is_null($entry)) { 38 38 $entry['visibility'] = $_POST['visibility']; 39 $entry['category'] = $_POST['category']; 40 $entry['location'] = empty($_POST['location']) ? '/' : $_POST['location']; 41 $entry['tag'] = empty($_POST['tag']) ? '' : $_POST['tag']; 42 $entry['title'] = $_POST['title']; 43 $entry['content'] = $_POST['content']; 39 $entry['starred'] = $_POST['starred']; 40 $entry['category'] = $_POST['category']; 41 $entry['location'] = empty($_POST['location']) ? '/' : $_POST['location']; 42 $entry['tag'] = empty($_POST['tag']) ? '' : $_POST['tag']; 43 $entry['title'] = $_POST['title']; 44 $entry['content'] = $_POST['content']; 44 45 $entry['contentFormatter'] = $_POST['contentFormatter']; 45 $entry['contentEditor'] = $_POST['contentEditor'];46 $entry['contentEditor'] = $_POST['contentEditor']; 46 47 if ((isset($_POST['permalink'])) && ($_POST['permalink'] != '')) { 47 48 $entry['slogan'] = $_POST['permalink']; -
trunk/interface/owner/entry/index.php
r5632 r5730 44 44 $_POST['visibility'] = $_GET['visibility']; 45 45 } 46 46 $starred = $visibility = null; 47 47 $tabsClass = array(); 48 48 if (isset($_POST['visibility'])) { … … 65 65 } else if($_POST['visibility']=='template') { 66 66 // $categoryId = -4; 67 $visibility = null;68 67 $tabsClass['template'] = true; 69 68 $visibilityText = _t('서식'); 69 } else if($_POST['visibility']=='starred') { 70 $starred = 2; 71 $tabsClass['starred'] = true; 72 $visibilityText = _t('별표'); 73 } else if($_POST['visibility']=='draft') { 74 $starred = 0; 75 $tabsClass['draft'] = true; 76 $visibilityText = _t('작성중'); 70 77 } else { 71 $visibility = null;72 78 $tabsClass['all'] = true; 73 79 $visibilityText = _t('모든'); 74 80 } 75 81 } else { 76 $visibility = null;77 82 $tabsClass['all'] = true; 78 83 $visibilityText = _t('모든'); … … 100 105 else $categoryIdforPrint = $categoryId; // preserves category selection even if template tab is activated. 101 106 102 list($entries, $paging) = getEntriesWithPagingForOwner(getBlogId(), $categoryIdforPrint, $searchKeyword, $suri['page'], $perPage, $visibility );107 list($entries, $paging) = getEntriesWithPagingForOwner(getBlogId(), $categoryIdforPrint, $searchKeyword, $suri['page'], $perPage, $visibility, $starred); 103 108 104 109 // query string 생성. … … 190 195 tempTd = document.getElementById("protectedIcon_" + entry).parentNode; 191 196 tempTr = tempTd.parentNode; 192 tempTr.cells[ 7].innerHTML = "";197 tempTr.cells[8].innerHTML = ""; 193 198 194 199 break; … … 219 224 tempTd = document.getElementById("protectedIcon_" + entry).parentNode; 220 225 tempTr = tempTd.parentNode; 221 tempTr.cells[ 7].appendChild(tempLink);226 tempTr.cells[8].appendChild(tempLink); 222 227 223 228 break; … … 240 245 tempTd = document.getElementById("protectedIcon_" + entry).parentNode; 241 246 tempTr = tempTd.parentNode; 242 tempTr.cells[ 7].innerHTML = "";247 tempTr.cells[8].innerHTML = ""; 243 248 244 249 break; … … 269 274 countSyndicated = true; 270 275 276 break; 277 } 278 } 279 request.onError = function () { 280 window.location = "<?php echo $blogURL;?>/owner/entry"; 281 } 282 request.send(); 283 } 284 285 function setEntryStar(entry, mark) { 286 if ((mark < 0) || (mark > 2)) 287 return false; 288 var request = new HTTPRequest("<?php echo $blogURL;?>/owner/entry/star/" + entry + "?mark=" + mark); 289 request.onSuccess = function () { 290 switch (mark) { 291 case 1: 292 document.getElementById("starIcon_" + entry).innerHTML = '<a href="<?php echo $blogURL;?>/owner/entry/star/<?php echo $entry['id'];?>?command=mark" onclick="setEntryStar(<?php echo $entry['id'];?>, 2); return false;" title="<?php echo _t('별표를 줍니다.');?>"><span class="text"><?php echo _t('별표');?></span></a></span>'; 293 document.getElementById("starIcon_" + entry).className = 'unstar-icon'; 294 break; 295 case 2: 296 document.getElementById("starIcon_" + entry).innerHTML = '<a href="<?php echo $blogURL;?>/owner/entry/star/<?php echo $entry['id'];?>?command=unmark" onclick="setEntryStar(<?php echo $entry['id'];?>, 1); return false;" title="<?php echo _t('별표를 지웁니다.');?>"><span class="text"><?php echo _t('별표');?></span></a></span>'; 297 document.getElementById("starIcon_" + entry).className = 'star-icon'; 271 298 break; 272 299 } … … 580 607 objTr = getParentByTagName("TR", getObject("trackbackIcon_" + id)); 581 608 objTable.deleteRow(objTr.rowIndex + 1); 582 583 609 document.getElementById("trackbackIcon_" + id).className = "trackback-off-button button"; 584 610 } else { … … 591 617 592 618 newCell = newRow.insertCell(0); 593 newCell.colSpan = 1 0;619 newCell.colSpan = 11; 594 620 newCell.setAttribute("align", "right"); 595 621 … … 712 738 <ul id="entry-tabs-box" class="tabs-box"> 713 739 <!-- TODO : $tab['postfix'] 버그 --> 714 <li<?php echo isset($tabsClass['all']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>"><?php echo _t('모든 글');?></a></li> 715 <li<?php echo isset($tabsClass['private']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=private"><?php echo _t('비공개 글');?></a></li> 716 <li<?php echo isset($tabsClass['public']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=public"><?php echo _t('공개된 글');?></a></li> 717 <li<?php echo isset($tabsClass['protected']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=protected"><?php echo _t('보호된 글');?></a></li> 718 <li<?php echo isset($tabsClass['reserved']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=reserved"><?php echo _t('예약된 글');?></a></li> 719 <li<?php echo isset($tabsClass['template']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=template"><?php echo _t('서식');?></a></li> 740 <li class="entry-all<?php echo isset($tabsClass['all']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>"><?php echo _t('모든 글');?></a></li> 741 <li class="entry-draft<?php echo isset($tabsClass['draft']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=draft"><?php echo _t('쓰고 있는 글');?></a></li> 742 <li class="entry-starred<?php echo isset($tabsClass['starred']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=starred"><?php echo _t('별표');?></a></li> 743 <li class="entry-private<?php echo isset($tabsClass['private']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=private"><?php echo _t('비공개 글');?></a></li> 744 <li class="entry-public<?php echo isset($tabsClass['public']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=public"><?php echo _t('공개된 글');?></a></li> 745 <li class="entry-protected<?php echo isset($tabsClass['protected']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=protected"><?php echo _t('보호된 글');?></a></li> 746 <li class="entry-reserved<?php echo isset($tabsClass['reserved']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=reserved"><?php echo _t('예약된 글');?></a></li> 747 <li class="entry-template<?php echo isset($tabsClass['template']) ? ' selected' : NULL;?>"><a href="<?php echo $blogURL;?>/owner/entry?page=1<?php echo $tab['postfix'];?>&visibility=template"><?php echo _t('서식');?></a></li> 720 748 </ul> 721 749 … … 769 797 <tr> 770 798 <th class="selection"><input type="checkbox" id="allChecked" class="checkbox" onclick="checkAll(this.checked);" /></th> 799 <th class="starred"> </th> 771 800 <th class="date"><span class="text"><?php echo _t('등록일자');?></span></th> 772 801 <th class="status"><span class="text"><?php echo _t('상태');?></span></th> … … 794 823 <tr class="<?php echo $className;?> inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')"> 795 824 <td class="selection"><input type="checkbox" class="checkbox" name="entry" value="<?php echo $entry['id'];?>" onclick="document.getElementById('allChecked').checked=false; toggleThisTr(this);" /></td> 825 <td class="starred"><?php 826 if($entry['starred'] == 2) { 827 ?> 828 <span id="starIcon_<?php echo $entry['id'];?>" class="star-icon"><a href="<?php echo $blogURL;?>/owner/entry/star/<?php echo $entry['id'];?>?command=unmark" onclick="setEntryStar(<?php echo $entry['id'];?>, 1); return false;" title="<?php echo _t('별표를 지웁니다.');?>"><span class="text"><?php echo _t('별표');?></span></a></span> 829 <?php 830 } else { 831 ?> 832 <span id="starIcon_<?php echo $entry['id'];?>" class="unstar-icon"><a href="<?php echo $blogURL;?>/owner/entry/star/<?php echo $entry['id'];?>?command=mark" onclick="setEntryStar(<?php echo $entry['id'];?>, 2); return false;" title="<?php echo _t('별표를 줍니다.');?>"><span class="text"><?php echo _t('별표');?></span></a></span> 833 <?php 834 } 835 ?></td> 796 836 <td class="date"><?php echo Timestamp::formatDate($entry['published']);?></td> 797 837 <td class="status"> … … 974 1014 <h2><?php echo _t('기능 설명');?></h2> 975 1015 1016 <dl class="starred-description"> 1017 <dt><?php echo _t('별표');?></dt> 1018 <dd><?php echo _t('중요한 글에 별표를 매깁니다.');?></dd> 1019 </dl> 976 1020 <dl class="eolin-description"> 977 1021 <dt><?php echo _t('발행');?></dt> -
trunk/interface/owner/entry/update/index.php
r5481 r5730 6 6 'POST' => array( 7 7 'visibility' => array('int', 0, 3), 8 'category' => array('int', 'default' => 0), 9 'title' => array('string'), 10 'content' => array('string'), 8 'starred ' => array('int', 0, 2), 9 'category' => array('int', 'default' => 0), 10 'title' => array('string'), 11 'content' => array('string'), 11 12 'contentFormatter' => array('string'), 12 13 'contentEditor' => array('string'), 13 'permalink' => array('string', 'default' => ''),14 'location' => array('string', 'default' => '/'),15 'tag' => array('string', 'default' => ''),16 'acceptComment' => array(array('0', '1'), 'default' => '0'),14 'permalink' => array('string', 'default' => ''), 15 'location' => array('string', 'default' => '/'), 16 'tag' => array('string', 'default' => ''), 17 'acceptComment' => array(array('0', '1'), 'default' => '0'), 17 18 'acceptTrackback' => array(array('0', '1'), 'default' => '0'), 18 'published' => array('int', 0, 'default' => 1)19 'published' => array('int', 0, 'default' => 1) 19 20 ) 20 21 ); … … 32 33 if (!is_null($entry)) { 33 34 $entry['visibility'] = $_POST['visibility']; 35 $entry['starred'] = $_POST['starred']; 34 36 $entry['category'] = $_POST['category']; 35 37 $entry['location'] = empty($_POST['location']) ? '/' : $_POST['location']; -
trunk/lib/model/blog.entry.php
r5557 r5730 52 52 'draft' => 0, 53 53 'visibility' => 0, 54 'starred' => 1, 54 55 'category' => 0, 55 56 'location' => '', … … 283 284 } 284 285 285 function getEntriesWithPagingForOwner($blogid, $category, $search, $page, $count, $visibility = null ) {286 function getEntriesWithPagingForOwner($blogid, $category, $search, $page, $count, $visibility = null, $starred = null, $draft = null) { 286 287 global $database, $suri; 287 288 requireComponent('Eolin.PHP.Core'); … … 315 316 } else { 316 317 $sql .= ' AND e.visibility '.$visibility; 318 } 319 } 320 if(isset($starred)) { 321 if(Validator::isInteger($starred,0,3)) { 322 $sql .= ' AND e.starred = '.$starred; 323 } else { 324 $sql .= ' AND e.starred '.$starred; 317 325 } 318 326 } … … 522 530 } 523 531 $result = POD::query("INSERT INTO {$database['prefix']}Entries 524 (blogid, userid, id, draft, visibility, category, title, slogan, content, contentFormatter,532 (blogid, userid, id, draft, visibility, starred, category, title, slogan, content, contentFormatter, 525 533 contentEditor, location, password, acceptComment, acceptTrackback, published, created, modified, 526 534 comments, trackbacks) … … 531 539 0, 532 540 {$entry['visibility']}, 541 {$entry['starred']}, 533 542 {$entry['category']}, 534 543 '$title', … … 662 671 userid = {$entry['userid']}, 663 672 visibility = {$entry['visibility']}, 673 starred = {$entry['starred']}, 664 674 category = {$entry['category']}, 665 675 draft = 0, … … 797 807 userid = {$entry['userid']}, 798 808 visibility = {$entry['visibility']}, 809 starred = {$entry['starred']}, 799 810 category = {$entry['category']}, 800 811 draft = 1, … … 812 823 } else { 813 824 $result = POD::query("INSERT INTO {$database['prefix']}Entries 814 (blogid, userid, id, draft, visibility, category, title, slogan, content, contentFormatter,825 (blogid, userid, id, draft, visibility, starred, category, title, slogan, content, contentFormatter,
