Merge remote branch 'origin/master'

This commit is contained in:
Pootle server
2010-08-28 16:40:11 +02:00
3 changed files with 12 additions and 3 deletions

View File

@@ -113,6 +113,8 @@ $Id$
+ [interface] AJAXification on various pages + [interface] AJAXification on various pages
3.3.7.0 (not yet released) 3.3.7.0 (not yet released)
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
a page size increase, thanks to Martin Schönberger - mad05
3.3.6.0 (not yet released) 3.3.6.0 (not yet released)
- bug #3033063 [core] Navi gets wrong db name - bug #3033063 [core] Navi gets wrong db name

View File

@@ -1406,6 +1406,7 @@ function refreshDragOption(e) {
var elm = $('#' + e); var elm = $('#' + e);
if (elm.css('visibility') == 'visible') { if (elm.css('visibility') == 'visible') {
refreshLayout(); refreshLayout();
TableDragInit();
} }
} }

View File

@@ -392,13 +392,13 @@ class PMA_User_Schema
<label for="with_doc"><?php echo __('Data Dictionary'); ?></label><br /> <label for="with_doc"><?php echo __('Data Dictionary'); ?></label><br />
<input type="checkbox" name="show_keys" id="show_keys" /> <input type="checkbox" name="show_keys" id="show_keys" />
<label for="show_keys"><?php echo __('Only show keys'); ?></label><br /> <label for="show_keys"><?php echo __('Only show keys'); ?></label><br />
<select name="orientation" id="orientation_opt"> <select name="orientation" id="orientation_opt" onchange="refreshDragOption('pdflayout');" >
<option value="L"><?php echo __('Landscape');?></option> <option value="L"><?php echo __('Landscape');?></option>
<option value="P"><?php echo __('Portrait');?></option> <option value="P"><?php echo __('Portrait');?></option>
</select> </select>
<label for="orientation_opt"><?php echo __('Orientation'); ?></label> <label for="orientation_opt"><?php echo __('Orientation'); ?></label>
<br /> <br />
<select name="paper" id="paper_opt"> <select name="paper" id="paper_opt" onchange="refreshDragOption('pdflayout');">
<?php <?php
foreach ($cfg['PDFPageSizes'] as $key => $val) { foreach ($cfg['PDFPageSizes'] as $key => $val) {
echo '<option value="' . $val . '"'; echo '<option value="' . $val . '"';
@@ -481,7 +481,7 @@ class PMA_User_Schema
$drag_x = $temp_sh_page['x']; $drag_x = $temp_sh_page['x'];
$drag_y = $temp_sh_page['y']; $drag_y = $temp_sh_page['y'];
$draginit .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n"; $draginit2 = ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
$draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n"; $draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n";
$draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n"; $draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
$draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n"; $draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
@@ -516,6 +516,12 @@ class PMA_User_Schema
refreshLayout(); refreshLayout();
myid = getElement('pdflayout'); myid = getElement('pdflayout');
<?php echo $draginit; ?> <?php echo $draginit; ?>
TableDragInit();
}
function TableDragInit() {
myid = getElement('pdflayout');
<?php echo $draginit2; ?>
} }
function resetDrag() { function resetDrag() {