Commit b4e5aa4779e5f9067f878d342eec39930dfe4516
1 parent
8c363458
Merged in from STABLE trunk...
KTC-586 "Improve the mime icons for shortcuts" Fixed. Added new mime types. Committed by: Megan Watson Reviewed by: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.3a-Release-Branch@9194 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
20 changed files
with
67 additions
and
42 deletions
plugins/ktcore/KTColumns.inc.php
| ... | ... | @@ -6,31 +6,31 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 30 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 31 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | */ |
| ... | ... | @@ -117,7 +117,7 @@ class AdvancedTitleColumn extends AdvancedColumn { |
| 117 | 117 | }else{ |
| 118 | 118 | $iDocId = $aDataRow["document"]->getId(); |
| 119 | 119 | } |
| 120 | - | |
| 120 | + | |
| 121 | 121 | $url = KTBrowseUtil::getUrlForDocument($iDocId); |
| 122 | 122 | if($aDataRow['document']->isSymbolicLink()){ |
| 123 | 123 | $aDataRow['document']->switchToRealCore(); |
| ... | ... | @@ -171,10 +171,10 @@ class AdvancedTitleColumn extends AdvancedColumn { |
| 171 | 171 | } else { |
| 172 | 172 | $contenttype = $this->_mimeHelper($aDataRow["document"]->getMimeTypeId()); |
| 173 | 173 | $link = $this->renderDocumentLink($aDataRow); |
| 174 | - | |
| 174 | + | |
| 175 | 175 | //Render an image instead of the size in case of a shortcut |
| 176 | - if($aDataRow['document']->isSymbolicLink()){ | |
| 177 | - return sprintf('<span class="contenttype %s">%s <img src="resources/tango-icons/shortcut.png" /></span>', $contenttype, $link); | |
| 176 | + if($aDataRow['document']->isSymbolicLink()){ | |
| 177 | + return sprintf('<span class="contenttype %s shortcut">%s</span>', $contenttype, $link); | |
| 178 | 178 | }else{ |
| 179 | 179 | $size = $this->prettySize($aDataRow["document"]->getSize()); |
| 180 | 180 | return sprintf('<span class="contenttype %s">%s (%s)</span>', $contenttype, $link, $size); |
| ... | ... | @@ -416,7 +416,7 @@ class AdvancedSingleSelectionColumn extends AdvancedSelectionColumn { |
| 416 | 416 | return ' '; |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | - $return = '<input type="radio" name="' . $localname . '" value="' . $v . '" '; | |
| 419 | + $return = '<input type="radio" name="' . $localname . '" value="' . $v . '" '; | |
| 420 | 420 | if($this->show_folders && $this->show_documents){ |
| 421 | 421 | $return .= 'onClick="forceSingleSelect(this)" '; |
| 422 | 422 | } | ... | ... |
resources/css/kt-contenttypes.css
| 1 | -/* | |
| 1 | +/* | |
| 2 | 2 | Getting Mime-type CSS right is a bit tricky here. |
| 3 | 3 | the idea is that you apply these to a span, as follows: |
| 4 | - | |
| 4 | + | |
| 5 | 5 | <span class="contenttype presentation">My Filename</span> |
| 6 | 6 | */ |
| 7 | 7 | .contenttype { |
| ... | ... | @@ -17,15 +17,25 @@ |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | .contenttype.office { background-image: url(../../resources/mimetypes/office.png); } |
| 20 | +.contenttype.office.shortcut { background-image: url(../../resources/mimetypes/shortcuts/office.png); } | |
| 20 | 21 | .contenttype.word { background-image: url(../../resources/mimetypes/word.png); } |
| 22 | +.contenttype.word.shortcut { background-image: url(../../resources/mimetypes/shortcuts/word.png); } | |
| 21 | 23 | .contenttype.database { background-image: url(../../resources/mimetypes/database.png); } |
| 24 | +.contenttype.database.shortcut { background-image: url(../../resources/mimetypes/shortcuts/database.png); } | |
| 22 | 25 | .contenttype.excel { background-image: url(../../resources/mimetypes/excel.png); } |
| 26 | +.contenttype.excel.shortcut { background-image: url(../../resources/mimetypes/shortcuts/excel.png); } | |
| 23 | 27 | .contenttype.openoffice { background-image: url(../../resources/mimetypes/openoffice.png); } |
| 28 | +.contenttype.openoffice.shortcut { background-image: url(../../resources/mimetypes/shortcuts/openoffice.png); } | |
| 24 | 29 | .contenttype.opendocument { background-image: url(../../resources/mimetypes/openoffice.png); } |
| 30 | +.contenttype.opendocument.shortcut { background-image: url(../../resources/mimetypes/shortcuts/openoffice.png); } | |
| 25 | 31 | .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); } |
| 32 | +.contenttype.pdf.shortcut { background-image: url(../../resources/mimetypes/shortcuts/pdf.png); } | |
| 26 | 33 | .contenttype.image { background-image: url(../../resources/mimetypes/image.png); } |
| 34 | +.contenttype.image.shortcut { background-image: url(../../resources/mimetypes/shortcuts/image.png); } | |
| 27 | 35 | .contenttype.compressed { background-image: url(../../resources/mimetypes/zip.png); } |
| 36 | +.contenttype.compressed.shortcut { background-image: url(../../resources/mimetypes/shortcuts/zip.png); } | |
| 28 | 37 | .contenttype.html { background-image: url(../../resources/mimetypes/html.png); } |
| 38 | +.contenttype.html.shortcut { background-image: url(../../resources/mimetypes/shortcuts/html.png); } | |
| 29 | 39 | |
| 30 | 40 | .contenttype.txt, |
| 31 | 41 | .contenttype.text, | ... | ... |
resources/css/kt-framing.css
| ... | ... | @@ -2019,6 +2019,21 @@ hr { |
| 2019 | 2019 | display: block; |
| 2020 | 2020 | } |
| 2021 | 2021 | |
| 2022 | +.collapse | |
| 2023 | +{ | |
| 2024 | + padding-left: 20px; | |
| 2025 | + border: 0px; | |
| 2026 | + background: url(../graphics/plus.gif) no-repeat; | |
| 2027 | +} | |
| 2028 | + | |
| 2029 | + | |
| 2030 | +.expand | |
| 2031 | +{ | |
| 2032 | + padding-left: 20px; | |
| 2033 | + border: 0px; | |
| 2034 | + background: url(../graphics/minus.gif) no-repeat; | |
| 2035 | +} | |
| 2036 | + | |
| 2022 | 2037 | |
| 2023 | 2038 | |
| 2024 | 2039 | /* -------------------------- iframe browse ------------------------ */ | ... | ... |
resources/mimetypes/shortcuts/access.png
0 โ 100755
3.38 KB
resources/mimetypes/shortcuts/code.png
0 โ 100755
3.42 KB
resources/mimetypes/shortcuts/database.png
0 โ 100755
3.38 KB
resources/mimetypes/shortcuts/excel.png
0 โ 100755
3.41 KB
resources/mimetypes/shortcuts/flash.png
0 โ 100755
3.38 KB
resources/mimetypes/shortcuts/html.png
0 โ 100755
3.52 KB
resources/mimetypes/shortcuts/image.png
0 โ 100755
3.47 KB
resources/mimetypes/shortcuts/office.png
0 โ 100755
3.54 KB
resources/mimetypes/shortcuts/openoffice.png
0 โ 100755
3.33 KB
resources/mimetypes/shortcuts/pdf.png
0 โ 100755
3.38 KB
resources/mimetypes/shortcuts/php.png
0 โ 100755
3.37 KB
resources/mimetypes/shortcuts/run.png
0 โ 100755
3.34 KB
resources/mimetypes/shortcuts/vector-image.png
0 โ 100755
3.43 KB
resources/mimetypes/shortcuts/word.png
0 โ 100755
3.4 KB
resources/mimetypes/shortcuts/zip.png
0 โ 100755
3.34 KB
rss.php
| ... | ... | @@ -6,48 +6,39 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 30 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 31 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 32 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | 38 | require_once('config/dmsDefaults.php'); |
| 39 | 39 | require_once(KT_LIB_DIR .'/authentication/DBAuthenticator.inc'); |
| 40 | +require_once(KT_LIB_DIR .'/authentication/authenticationutil.inc.php'); | |
| 40 | 41 | require_once(KT_DIR. '/plugins/rssplugin/KTrss.inc.php'); |
| 41 | -require_once(KT_LIB_DIR . '/browse/browseutil.inc.php'); | |
| 42 | - | |
| 43 | -// widget includes. | |
| 44 | -require_once(KT_LIB_DIR . "/widgets/portlet.inc.php"); | |
| 45 | -require_once(KT_LIB_DIR . "/widgets/fieldsetDisplay.inc.php"); | |
| 46 | -require_once(KT_LIB_DIR . "/widgets/FieldsetDisplayRegistry.inc.php"); | |
| 47 | -require_once(KT_LIB_DIR . "/actions/documentaction.inc.php"); | |
| 48 | -require_once(KT_LIB_DIR . "/browse/browseutil.inc.php"); | |
| 49 | - | |
| 50 | -require_once(KT_LIB_DIR . '/mime.inc.php'); | |
| 51 | 42 | |
| 52 | 43 | // workaround to get http authentication working in cgi mode |
| 53 | 44 | $altinfo = KTUtil::arrayGet( $_SERVER, 'kt_auth', KTUtil::arrayGet( $_SERVER, 'REDIRECT_kt_auth')); |
| ... | ... | @@ -146,6 +137,12 @@ if (!validateUser($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { |
| 146 | 137 | |
| 147 | 138 | // Validate user credentials |
| 148 | 139 | function validateUser($username, $password){ |
| 149 | - return DBAuthenticator::checkPassword($username, $password); | |
| 140 | + //return DBAuthenticator::checkPassword($username, $password); | |
| 141 | + $oUser =& User::getByUsername($username); | |
| 142 | + if(PEAR::isError($oUser) || is_a($oUser, 'KTEntityNoObjects')){ | |
| 143 | + return false; | |
| 144 | + } | |
| 145 | + | |
| 146 | + return KTAuthenticationUtil::checkPassword($oUser, $password); | |
| 150 | 147 | } |
| 151 | 148 | ?> |
| 152 | 149 | \ No newline at end of file | ... | ... |
templates/ktcore/configsettings.smarty
| ... | ... | @@ -3,14 +3,16 @@ |
| 3 | 3 | function toggleSettingsDisplay(id) |
| 4 | 4 | { |
| 5 | 5 | var el = document.getElementById(id); |
| 6 | - var visible = el.style.visibility; | |
| 6 | + var head = document.getElementById(id+'_head'); | |
| 7 | 7 | |
| 8 | - if(visible == 'visible'){ | |
| 8 | + if(el.style.visibility == 'visible'){ | |
| 9 | 9 | el.style.visibility = 'hidden'; |
| 10 | 10 | el.style.display = 'none'; |
| 11 | + head.className = 'collapse'; | |
| 11 | 12 | }else{ |
| 12 | 13 | el.style.visibility = 'visible'; |
| 13 | 14 | el.style.display = 'block'; |
| 15 | + head.className = 'expand'; | |
| 14 | 16 | } |
| 15 | 17 | } |
| 16 | 18 | {/literal} |
| ... | ... | @@ -26,10 +28,12 @@ |
| 26 | 28 | {foreach from=$groupList item=groupItem} |
| 27 | 29 | {assign var=group value=$groupItem.name} |
| 28 | 30 | |
| 29 | - <h3><span onclick='javascript: toggleSettingsDisplay("{$groupItem.id}");' style='cursor: hand;'>{$group}</span></h3> | |
| 31 | + <h4 style='margin-top: 20px;'><span class="expand" id='{$groupItem.id}_head' onclick='javascript: toggleSettingsDisplay("{$groupItem.id}");' style='cursor: pointer;'> | |
| 32 | + {$group} | |
| 33 | + </span></h3> | |
| 30 | 34 | <span class='descriptiveText'>{$groupItem.description}</span> |
| 31 | 35 | |
| 32 | - <div id='{$groupItem.id}' style='visibility: visible'> | |
| 36 | + <div id='{$groupItem.id}' style='visibility: visible;'> | |
| 33 | 37 | <fieldset> |
| 34 | 38 | |
| 35 | 39 | {* <!-- Display the settings, render the input according to the setting type (dropdown / radio / etc) --> *} |
| ... | ... | @@ -47,13 +51,12 @@ |
| 47 | 51 | |
| 48 | 52 | </fieldset> |
| 49 | 53 | </div> |
| 50 | - <br> | |
| 51 | 54 | |
| 52 | 55 | {/foreach} |
| 53 | 56 | |
| 54 | 57 | {/if} |
| 55 | 58 | |
| 56 | - | |
| 59 | +<br><hr> | |
| 57 | 60 | <input type="submit" name="AlterConfig" value="{i18n}Save Config Settings{/i18n}" /> |
| 58 | 61 | |
| 59 | 62 | </form> |
| 60 | 63 | \ No newline at end of file | ... | ... |