Author: dgoette
Date: Sun May 3 20:00:39 2009
New Revision: 400
URL:
http://svn.reactos.org/svn/reactos?rev=400&view=rev
Log:
* allow admins to translate every language (spotted by frik85)
* don't switch toolbar while sort by columns (spotted by d0g)
* allow to compare selected entries from overview again (spotted by Colin_Finck)
* hide help for now (there is non written yet and I don't have the time to)
Modified:
branches/danny-web/www/www.reactos.org/roscms/js/cms.js
branches/danny-web/www/www.reactos.org/roscms/js/cms_website.js
branches/danny-web/www/www.reactos.org/roscms/lib/HTML_CMS.class.php
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEdito…
branches/danny-web/www/www.reactos.org/roscms/lib/view/HTML_CMS_Website.cla…
Modified:
branches/danny-web/www/www.reactos.org/roscms/js/cms.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/js/cms.js [iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/roscms/js/cms.js [iso-8859-1] Sun May 3
20:00:39 2009
@@ -28,6 +28,7 @@
var filtstring1 = '';
var filtstring2 = '';
+var current_entry_table;
@@ -441,7 +442,7 @@
if (setting != filtstring2) {
filtstring2 = setting;
htmlFilterChoices(setting);
- loadEntryTable();
+ loadEntryTable(current_entry_table);
}
} // end of function sortEntryTable
Modified:
branches/danny-web/www/www.reactos.org/roscms/js/cms_website.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/js/cms_website.js [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/roscms/js/cms_website.js [iso-8859-1] Sun May
3 20:00:39 2009
@@ -514,6 +514,8 @@
*/
function loadEntryTable( objevent )
{
+ current_entry_table = objevent;
+
if (document.getElementById('frametable').style.display !== 'block') {
document.getElementById('frametable').style.display = 'block';
document.getElementById('frameedit').style.display = 'none';
@@ -635,7 +637,7 @@
/**
* shows the edit frame which allows to edit an entry
*/
-function showEditor( )
+function showEditor( event )
{
if (document.getElementById('frameedit').style.display !== 'block') {
document.getElementById('frametable').style.display = 'none';
@@ -643,6 +645,13 @@
document.getElementById('newentryarea').style.display = 'none';
document.getElementById('frameedit').style.display = 'block';
}
+
+ if (event == 'diff') {
+ document.getElementById('editzone').style.display = 'none';
+ }
+ else {
+ document.getElementById('editzone').style.display = 'block';
+ }
// deactivate alert-timer
window.clearTimeout(alertactiv);
@@ -678,7 +687,7 @@
{
switch (objevent) {
case 'diffentry':
- showEditor();
+ showEditor('diff');
document.getElementById('frmedithead').innerHTML = '<span
class="virtualLink"
onclick="loadEntryTableWithOffset(roscms_current_tbl_position)"><strong>«
Back</strong></span> <strong>Compare two
Entries</strong>';
break;
@@ -2114,7 +2123,7 @@
var cmdhtml_space = ' ';
var cmdhtml_diff = '<div class="button"
onclick="compareEntries()"><img
src="'+roscms_intern_webserver_roscms+'images/compare.png"
alt="" /><span
class="text">Compare</span></div>';
var cmdhtml_preview = '<div class="button"
onclick="previewPage()"><img
src="'+roscms_intern_webserver_roscms+'images/preview.png"
alt="" /><span
class="text">Preview</span></div>';
- var cmdhtml_ready = '<div class="button"
onclick="changeSelectedTags(\'mn\')"><img
src="'+roscms_intern_webserver_roscms+'images/submit" alt=""
/><span class="text">to
<em>Pending</em></span></div>';
+ var cmdhtml_ready = '<div class="button"
onclick="changeSelectedTags(\'mn\')"><img
src="'+roscms_intern_webserver_roscms+'images/submit.png"
alt="" /><span class="text">to
<em>Pending</em></span></div>';
var cmdhtml_stable = '';
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/HTML_CMS.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/lib/HTML_CMS.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/roscms/lib/HTML_CMS.class.php [iso-8859-1] Sun
May 3 20:00:39 2009
@@ -103,7 +103,7 @@
<th'.(($this->branch == 'welcome') ? '
class="active"' : '').'>
<div class="corner_TL">
<div class="corner_TR">
- <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=welcome"
onclick="'."loadBranch()".'">Welcome</a>
+ <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=welcome"
onclick="'."loadBranch()".'">Welcome</a>
</div>
</div>
</th>
@@ -115,7 +115,7 @@
<th'.(($this->branch == 'website') ? '
class="active"' : '').'>
<div class="corner_TL">
<div class="corner_TR">
- <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=website"
onclick="'."loadBranch()".'">Content</a>
+ <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=website"
onclick="'."loadBranch()".'">Content</a>
</div>
</div>
</th>
@@ -128,7 +128,7 @@
<th'.(($this->branch == 'maintain') ? '
class="active"' : '').'>
<div class="corner_TL">
<div class="corner_TR">
- <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=maintain"
onclick="'."loadBranch()".'">Maintain</a>
+ <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=maintain"
onclick="'."loadBranch()".'">Maintain</a>
</div>
</div>
</th>
@@ -141,7 +141,7 @@
<th'.(($this->branch == 'stats') ? '
class="active"' : '').'>
<div class="corner_TL">
<div class="corner_TR">
- <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=stats"
onclick="'."loadBranch()".'">Statistics</a>
+ <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=stats"
onclick="'."loadBranch()".'">Statistics</a>
</div>
</div>
</th>
@@ -149,10 +149,10 @@
}
echo_strip('
- <th'.(($this->branch == 'help') ? '
class="active"' : '').'>
+ <th'.(($this->branch == 'help') ? '
class="active"' : '').' style="display:none">
<div class="corner_TL">
<div class="corner_TR">
- <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=help"
onclick="'."loadBranch()".'">Help</a>
+ <a class="text"
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=help"
onclick="'."loadBranch()".'">Help</a>
</div>
</div>
</th>
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEdito…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEdito…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEdito…
[iso-8859-1] Sun May 3 20:00:39 2009
@@ -971,13 +971,13 @@
private function showDifference( $rev_id1, $rev_id2 )
{
// diff source 1
- $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name,
d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content
FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id =
d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN
".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON
t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1");
+ $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name,
d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content,
r.status FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON
r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN
".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON
t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1");
$stmt->bindParam('rev_id',$rev_id1,PDO::PARAM_INT);
$stmt->execute();
$revision1 = $stmt->fetchOnce();
// diff source 2
- $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name,
d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content
FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON r.data_id =
d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN
".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON
t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1");
+ $stmt=&DBConnection::getInstance()->prepare("SELECT r.data_id, d.name,
d.type, r.id, r.version, l.name AS language, r.datetime, u.name AS user_name, t.content,
r.status FROM ".ROSCMST_ENTRIES." d JOIN ".ROSCMST_REVISIONS." r ON
r.data_id = d.id JOIN ".ROSCMST_USERS." u ON r.user_id = u.id JOIN
".ROSCMST_LANGUAGES." l ON r.lang_id = l.id JOIN ".ROSCMST_TEXT." t ON
t.rev_id=r.id WHERE r.id = :rev_id AND t.name='content' LIMIT 1");
$stmt->bindParam('rev_id',$rev_id2,PDO::PARAM_INT);
$stmt->execute();
$revision2 = $stmt->fetchOnce();
@@ -1003,7 +1003,12 @@
<tr>
<td style="text-align:center;">
<select name="cbmdiff1" id="cbmdiff1"
onchange="'."getDiffEntries(this.value,
document.getElementById('cbmdiff2').value)".'">');
- $this->selectRevision($rev_id1);
+ if ($revision1['status'] == 'stable') {
+ $this->selectRevision($rev_id1);
+ }
+ else {
+ echo '<option>Not a stable entry.</option>';
+ }
// history
echo_strip('
</select>
@@ -1013,7 +1018,12 @@
</td>
<td style="text-align:center;">
<select name="cbmdiff2" id="cbmdiff2"
onchange="'."getDiffEntries(document.getElementById('cbmdiff1').value,
this.value)".'">');
- $this->selectRevision($rev_id2);
+ if ($revision2['status'] == 'stable') {
+ $this->selectRevision($rev_id2);
+ }
+ else {
+ echo '<option>Not a stable entry.</option>';
+ }
// history
echo_strip('
</select>
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/view/HTML_CMS_Website.cla…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/r…
==============================================================================
---
branches/danny-web/www/www.reactos.org/roscms/lib/view/HTML_CMS_Website.cla…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/roscms/lib/view/HTML_CMS_Website.cla…
[iso-8859-1] Sun May 3 20:00:39 2009
@@ -147,7 +147,7 @@
<div id="smenutab2" class="lmItemTop"
onclick="loadMenu(this.id)">
<div id="smenutabc2"
class="lmItemBottom">Pending</div>
</div>
- <div id="smenutab7" class="lmItemTop"
onclick="loadMenu(this.id)"'.($thisuser->language() ==
Language::getStandardId() ? ' style="display:none;"' :
'').'>
+ <div id="smenutab7" class="lmItemTop"
onclick="loadMenu(this.id)"'.($thisuser->language() ==
Language::getStandardId() && !$thisuser->hasAccess('admin') ? '
style="display:none;"' : '').'>
<div id="smenutabc7"
class="lmItemBottom">Translate</div>
</div>
<div id="smenutab8" class="lmItemTopSelected"
onclick="loadMenu(this.id)">